Forum posts

Posted 18 years ago2006-05-15 17:24:34 UTC
in Programmers, help me out Post #180313
STL provides a string class. Not a 'fundamental' type perhaps, but a usefull one nonetheless. It's member function c_str() returns a char* just in case you need that for function passing and whatnot.

I usually don't work with char arrays, but char pointers instead. Though these seem to be similar, using char* rather than char[] gives different results. For example, the == operator does actually compare the strings they contain:

char* a = "hello";
char* b = "hello";
if(a == b)
cout << "True";
else
cout << "False";

This prints True to screen. Changing b to "hello1" gives False. Comparing a string (#include <string>) with a char* gives the same results.

As far as I understand, the == operator compares char pointers as if they were null-terminated strings, comparing char by char, while it compares char arrays by their adresses.
I tested casting char arrays to char pointers, too, which gave interesting results:

((char*)s == (char*)t) == false, while
((char*)s[0] == (char*)t[0]) == true, provided both are assigned the same string value.

Not everything is clear to me, but there's a subtle difference between arrays and pointers. &s, for example, is the adress of the array, and while it's the same adress as the first element in the array (&s[0]), it's not of the same type: (&s + 1 == &s[0] + 1) == false.
Posted 18 years ago2006-05-15 17:09:11 UTC
in Month of May Mini Contests! Post #180308
Ant... lion? Hehe... hehehe... :P
Posted 18 years ago2006-05-15 17:04:18 UTC
in Bad Surface Extents Post #180307
Those checkboxes are for texture alignment. They're not magical stuff - in the end it's just texture coordinates for the engine to handle, all the same.

Usually, you only notice the difference on angled faces. With world alignment, all textures are aligned along the axis. If you have an angled face, the texture looks stretched (because, the texture is applied as if you were looking at it from one of the 2D views - from that particular view, the texture looks ok, but an angled face is always longer than you can see in the 2D view).
Face alignment aligns the texture taking the surface normal (direction) into account, solving the stretching problem.

This is why flat, axis-aligned surfaces have both checkboxes checked, but other surfaces can have only one checked.

Aanyway, onto those surface extends, those are usually caused by extreme texture scales. Above mentioned alignment modes have no effect on this as far as I know.
Posted 18 years ago2006-05-15 13:17:20 UTC
in Programmers, help me out Post #180255
@BJ: I assumed he meant "s" rather than a generic string, but even then, the == operator works just fine. Both for char* as for string. Unless you really need non-case-sensitive checks. :)
Posted 18 years ago2006-05-15 13:11:24 UTC
in Month of May Mini Contests! Post #180251
I like that elite combine smiley. Very recognizable. :)
Posted 18 years ago2006-05-14 18:52:59 UTC
in Month of May Mini Contests! Post #180078
ROFL!
Posted 18 years ago2006-05-14 15:28:48 UTC
in Programmers, help me out Post #180029
Now I just need the solution for the second task.
I've given you some pseudocode, it shouldn't be too hard from there. ;)
Posted 18 years ago2006-05-14 15:27:15 UTC
in Month of May Mini Contests! Post #180028
1 idea, 2 minutes, 3 smileys (well, in total now :P):
User posted image
Nice Kirby bytheway. :)
Posted 18 years ago2006-05-14 10:45:42 UTC
in Month of May Mini Contests! Post #179983
I had a few minutes to spare... :)
User posted image
User posted image
User posted image
Posted 18 years ago2006-05-13 18:13:26 UTC
in Train question. Post #179854
Take a look at the properties of the path_corner entity. I'm sure the teleport flag and the wait-here property will be interesting to you. ;)
Posted 18 years ago2006-05-13 18:11:23 UTC
in Programmers, help me out Post #179853
1 is pretty much a mathematical problem, one which I'm not going to solve. :P

2 is easier. A possible solution would be to use two loops, the outer loop going over all rows and the inner loop checking a decreasing amount of cells. Some pseudocode to get you started:

string matrix[width][height];
for(i = 0; i < height - 1; i++)
for(j = 0; j < width - i - 1; j++)
if(matrix[j][i] == "s")
return true;
Posted 18 years ago2006-05-13 04:27:31 UTC
in Question with carving Post #179717
I don't agree with you, Tosse.
I've seen too much trouble come from careless carving. I assume you didn't test carving a wall that touches the void, so you didn't stumble on a microscopic leak or something else? Also, I assume you didn't compare poly counts with a non-carved equivalent map?

And is the resulting mess really that easy to work with when the map gets larger and more complex? I'm afraid it's getting quite difficult to maintain such a map over time.

But, in the end, it's about the result, not the tools used, so if you can carve without taking down performance or making it difficult for yourself to keep working on a map, then I see little reason not to use a tool. I just don't find the carving tool very usefull when I compare it's advantages against it's disadvantages, and those of other tools.
Posted 18 years ago2006-05-12 15:10:46 UTC
in Can Brush Entity Move With Point Entity Post #179649
I think they made some entities for that, Muzzle. Why let mappers do the hard job when the coders can make it easy for them once and for all? :)
Posted 18 years ago2006-05-12 13:59:15 UTC
in Question with carving Post #179626
The compile tools may not snap vertices to the grid, but Hammer does when your map is saved to the .map format - which happens to be the file used by the compile tools.

This can indeed be a source of trouble sometimes - surfaces that seemed to be right (and probably were) get messed up after some vertices are corrected.

So, it's a little more than just a good habit to keep the grid in mind. ;)
Posted 18 years ago2006-05-11 18:03:13 UTC
in floating func_pushables Post #179520
but will also make some most annoying sounds
Such as... splash? :P

Nah, I just saw why you asked this question. That map turned out pretty nice man. I'm not sure if those floating objects really added something though, they were more annoying for movement and looked too dark compared to the slime, but hey... you did a great rowleyjob, so I shouldn't complain... :)
Posted 18 years ago2006-05-11 09:16:13 UTC
in Media Release Update! Post #179455
Look, now we're getting somewhere. Good to see such a media burst. :)
Sketches and models look very promising, I'm looking forward to see more work. Are the code and level-design departments keeping up the pace too?

Oh, btw, get rid of that logo page. Only slows people down. :)
Posted 18 years ago2006-05-10 18:45:37 UTC
in scroll textures Post #179370
HL2 materials are much more advanced than HL textures - special properties like animation or movement are defined within the .vmt files, not through texture names.

A scrolling texture is done as following:

[quote]
"LightmappedGeneric"
{
"$basetexture" "vtfname"
"Proxies"
{
	"TextureScroll"
	{
		"texturescrollvar" "$texture2transform"
		"texturescrollrate" 0.1
		"texturescrollangle" 90
	}
}
}[/quote]

For more info, check the Valve wiki. :)
Posted 18 years ago2006-05-09 04:42:21 UTC
in Sustained combine energy ball? Post #179142
They will always degenerate after a certain time, unless they're held in those energy fields. No way around that.

What were you trying to achieve, then?
Posted 18 years ago2006-05-09 04:37:03 UTC
in This should be simple but isn't... Post #179141
As far as I know, it's pretty difficult to detect the round start in CS, but wasn't there a trick for it with a door or such?

Once you get that sorted out, darkphoenix' method will work just fine - an env_global that always sets the master to on should be triggered on round-start, and an env_global that always sets the master to off should be triggered when you run through the specific trigger_multiple.
Posted 18 years ago2006-05-08 15:44:14 UTC
in Trigger_push in spirit Post #179075
The solution is simple. Use the advanced entity mode and enter the pitch yaw roll key with a value yourself. Look up in normal HL entities how the key is actually called.
Alternately, you can modify the spirit.fgd.

Another, evil, solution would be to manually type the key into the .map, .rmf or .bsp file... :P
Posted 18 years ago2006-05-08 04:29:33 UTC
in Newbie Questions (/apologize) Post #178975
You may want to compile your map soon - 1024 and 512 are pretty large measurements. A normal hallway is usually around 128 units high. :)

Compiling often helps detecting leaks as soon as possible, and working on the grid helps preventing them. From what I've heard, leaks aren't an issue for Unreal mappers, right? It may be some getting used to... :)
Posted 18 years ago2006-05-07 17:17:42 UTC
in My model Post #178938
You could also use a beam, with a chain-like sprite. Always faces the camera so there's no need for a second layer, perhaps the quality loss doesn't look that bad with that distance... an advantage would be the more flexible movement beams allow you... :)
Posted 18 years ago2006-05-05 18:11:35 UTC
in Question with carving Post #178597
Heh heh, the old argument about carving/clipping/vertex manipulation pops up again, complete with name calling and insulting. :P

Just use the tools you're comfortable with, as long as you're able to create good maps with it. A close look at HL (and HL2) maps reveals that these aren't always up to par to 'our technical standards'. While it certainly helps to know the advantages and disadvantages of the tools you work with, it's not really that important in the end (assuming you aren't misusing your tools in such ways that they cause significant performance or workability issues...).

Oh, Kasp: VM operations would be to create a brush, select the yellow nodes on one side, press Ctrl + F, move the corner vertices, and repeat those three actions for the other side. Still not really a timesaver, but not taking more brushes. :)
Posted 18 years ago2006-05-05 18:02:07 UTC
in WADs from BSPs? Post #178596
Just something odd that messes up the decompiler. Those programs can contain bugs, too... :)
Posted 18 years ago2006-05-04 15:03:21 UTC
in Half Life Deathmatch Source Post #178427
This last one was really shocking. Point lights and opaque blue water? I thought only n00bs did that!
6 years ago... new technology... deadlines...

We've got a lot more time on our hands to get the most out of an engine, since we don't have deadlines tied to our salary and all. Plus, we're with many mappers, sharing knowledge. Well, you get the idea, you can't simply compare things that easily. ;)
Posted 18 years ago2006-05-01 16:21:03 UTC
in cl_dll.dsw Post #177734
As far as I know, the Express editition doesn't include windows libraries so there's no way to compile programs or .dll's that make use of those libraries. You may want to get another version to compile the code. You should be able to compile the .dll's with the 2003 edition, personally I use MSV.NET 6.0 which is capable of handling it.
Posted 18 years ago2006-04-30 15:26:50 UTC
in A physics experiment in HL2 Post #177531
Heh, fun. :) Looks like the top crate almost hits the ceiling, perhaps that has some influence?
Posted 18 years ago2006-04-30 07:56:43 UTC
in GoldSource Mapping Tips Post #177468
For whatever reason, rotating multiple compex objects using CTRL-M will cause 100's of Erroneous "Invalid" errors!
The actual reason is as following:

Surfaces must be planar, that is, completely flat. Programming-wise, grid locations are integers (0, 1, 2, etc), not floats (0.5, 2.0, etc). As a result, rotating brushes may cause vertices to go off the grid. In the editor, that's fine, seemingly they're treated as floats there. But the compilers will cast these to integers, causing some (usually minor) differences, often enough to make surfaces not completely planar. That's where errors start popping up.

So, I would advise not to stick to degrees as a valuable measurement. Personally I don't really stick to precise and exact placement of objects anymore, as it often results in over-tidy, too clean feeling maps. In real-life, not everything matches precisely, not everything is rotated perfectly or constructed exactly to the millimeter. Take some care with the technical aspects for performance and workability reasons, but don't limit yourself with artificial rules like tidyness. Of course, sometimes there's a place for these, some map themes require tidy placement, but keep in mind it's just a rule that you should break when you need to.
Edit: there's another kind of overlap consisting of simultaneous brush faces occupying the same place in the map. This should of course be avoided!
It's called z-fighting, two surfaces 'fighting' to be drawn first. May also happen on large distances, when the distance between each other is relatively small compared to their distance to you. Not a pretty sight indeed. :)
Posted 18 years ago2006-04-28 03:05:13 UTC
in Props black for some reason. Need help. Post #177156
I don't know what that means. File, meaning the model file? I need to know why it's black.
Had nothing to do with your problem, but with the fake .png that really is a .bmp... which is evil when used on the web. The screenshot hardly shows anything anyway since it's pretty small too...
Posted 18 years ago2006-04-27 19:42:45 UTC
in Creating a Torus Post #177106
Nah, no, a torus isn't hollow per definition. Your donut is fine. :)
Posted 18 years ago2006-04-26 17:22:57 UTC
in Stats on Screen Post #176897
Binding +showbudget to a key to bring up the nice budget panel is a handy thing, too... tells much more than just the fps.
Posted 18 years ago2006-04-26 12:42:06 UTC
in Kasperg Projects! Post #176844
Of course, it happens, and there's nothing wrong with it, but a too low ratio isn't really encouraging in the end...
Posted 18 years ago2006-04-26 12:24:09 UTC
in Kasperg Projects! Post #176837
welcome to my world. i've finished a whopping 13% of my maps.
That's actually a high finish ratio...
Posted 18 years ago2006-04-26 12:22:31 UTC
in Half-Life 2 Review Post #176836
With the ever so powerful CPUs Intel and AMD are churning out, I am not sure whether a physics card would be necessary.
There's a limit to the amount of physics to process when you also have to run AI routines and a lot of other stuff on it at the same time. In the past, before 3D cards existed, the rendering would be run on the CPU as well.
Now I agree with you when you doubt it's usefullness, as not every game needs physics as much as rendering, but it might be a nice addition anyway. Perhaps it'll stimulate some innovation in games?

As for the review, fair review, but I don't agree with the author on all parts. Especially the story - there's a lot of info for the observant ones, which I think is a sort of reward for those that seek it. The Combine walls weren't a weapon against Gordon - to me it was obvious it was their way to slowly process earths capitals. And the unknown things leave room for speculation. I do agree that the end was rather abrubt and less satisfying though.
Oh well, it's his review, not mine, and it's interesting to see how others think about games, so yeah... :)
Posted 18 years ago2006-04-25 19:23:12 UTC
in Kasperg Projects! Post #176730
How about blocking off area's in those large area's, like the Combine did in the train station at HL2's start? Or some collapsed parts (though that would probably mean you'd have to create more damaged area's to keep the map consistent).

Obviously, I prefer Carceri. Especially the outside looks nice. The inside looks interesting but at the same time monotone because of the repetetious architecture parts (damaged parts would definitely 'break' it up there) and it's essentially one playable plane. I prefer multi-leveled combat. :)

As for modern transport being out of the question... a racing part with the sandbuggy through an ancient temple/palace doesn't sound too bad too me... :P
Posted 18 years ago2006-04-25 19:17:13 UTC
in XSI or Milkshape Post #176727
You can use both XSI and Milkshape for both engines - modelling packages usually aren't made for games specifically, and even when they are there's usually an exporter available.

Personally I stick to Milkshape, as I only do low-poly models. For characters and such, 3ds Max or XSI are more appropriate, and of course you can use them for low-poly models as well.
Posted 18 years ago2006-04-25 17:01:28 UTC
in Transparent trees???? Post #176700
Might be an auto-detecting system for unknown, porbably alien and hostile, .dll's in place?

Of course you're right... :)
Posted 18 years ago2006-04-25 16:18:16 UTC
in Transparent trees???? Post #176696
I didn't have any problems with them when I put them in my HL folders when I still didn't use Steam, but backing up the original ones (do they actually overwrite any?) is never a bad idea.
Posted 18 years ago2006-04-25 11:40:34 UTC
in Lots of Mod Related Questions Post #176652
Just open the project file or the solution file with Visual Studio. Then, I'd recommend compiling it first to check if everything works as intended. You may need to change a few things to get it working with your compiler (at least I had to, and several others judging by the articles on Wavelength), more info on that can be found here: Building the Half-Life DLLs with the Microsoft Command-Line Compiler.
Posted 18 years ago2006-04-25 08:11:46 UTC
in N.I.L. Post #176625
Hey, finally someone who read the boards descriptions. :)

Feel free to ask your questions in the Engine Discussion boards, those are the question boards.
Posted 18 years ago2006-04-24 18:45:26 UTC
in Creating sprites on displacement grass. Post #176560
Check the material files (.vmt), this is a material property. It's easy to copy an existing .vmt, rename it and change it's properties - you can simply use the already existing textures (.vtf), all you need to do is to include this custom .vmt with the map.
Posted 18 years ago2006-04-24 15:18:20 UTC
in Transparent trees???? Post #176501
First, there's no need for swearing.

Second, get Steam (and yes, Steam contains the .dll's that are responsible for the transparant model rendering).
Posted 18 years ago2006-04-24 13:12:18 UTC
in Lots of Mod Related Questions Post #176445
The client .dll contains the client-side code, and since a HL server doesn't care about the color of his clients huds, you can feel safe about that. ;)
Posted 18 years ago2006-04-24 09:48:50 UTC
in -wadinclude won't work Post #176389
That shouldn't be necessasy actually, the wad name without extension suffices. I'm with Kasp here: there's probably something else wrong.
Posted 18 years ago2006-04-23 17:03:25 UTC
in More HL Single Player Mods Post #176296
Have you checked this site already: ten four? Many mod reviews over there... :)
Posted 18 years ago2006-04-23 15:30:20 UTC
in [CS:S] - de_venetia (WIP) Post #176282
I meant, they add to the square feeling of the map. Rounded corners won't do the trick (they probably look out of place as a parking lot itself is indeed usually square) - rotating the parking lot on itself will do, I think. :)
Posted 18 years ago2006-04-23 15:28:33 UTC
in Breaking up with your girl friend. Post #176281
That's good to hear. Luckily a first reaction isn't always the final reaction. :)
Posted 18 years ago2006-04-22 17:54:40 UTC
in Breaking up with your girl friend. Post #176131
Yes, I received yours. Sorry I didn't reply - I've written a new journal entry now in which I said thanks, perhaps it would've been better to reply immediatly by PM. Well, thanks again. :)
Posted 18 years ago2006-04-22 17:34:49 UTC
in Breaking up with your girl friend. Post #176121
Relationships go deeper than we think when we still have them, yeah... one of my best friends died last week and was buried today. Man, it seems only then you know who you miss. I'm so glad God is there for us to help us through when we need it... and that He provides good times too. :)
Posted 18 years ago2006-04-22 17:15:43 UTC
in Breaking up with your girl friend. Post #176115
Oh yeah, Seventh, phone numbers... lemme see... ow, I still remember it, though vaguely. The tunes I used to hear while calling still stick to my head sometimes... :P