Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 


Submitted by Chazz, posted on June 29, 2001




Image Description, by Chazz



I am/was working on a game engine called 'Heylow'. It was originally intended to resemble the game HALO by Bungie software (halo.bungie.com) and I guess it still does.

It's a first person shooter, and it is terrain based, like HALO. It has 4 layered 3D texturing (rock, dirt, grass, and an optional detail texture) and supports the Half-Life mdl model format. It's got all the essentials, a skybox, particle system, entity system, etc.

At the moment, you run around on an island in the middle of an ocean, with map-objects like trees/rocks/grass blades or whatever, and shoot 'bad-guys' that are placed around the map. Your gun has a clip of ammo that needs to be reloaded whenever it runs out, etc. There are only two guns though. I was planning on putting a vehicle system in, but I am lazy and finish 2% of all my projects so it's a lost cause, really.

I have an older version uploaded somewhere. ICQ me if you want the link (I can't seem to locate the URL at the moment). 120943431.

I haven't touched this project in about a month, and before that, I had only been working on it for two weeks. I have only recently discovered flipcode, so I decided to submit these pics. Some of you may recognize the gun model from Counter-Strike (the P90), I just needed something to test it with. :)

This picture was too big for me to put fullsize onto flipcode, but you can see the fullsize version here.

-Chazz


[prev]
Image of the Day Gallery
www.flipcode.com

[next]

 
Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
Dodger_

June 29, 2001, 02:23 PM

Can you explain these "map-objects" a bit further? I'd really like to know how to handle
detail objects efficiently. What kind of vehicles were you thinking about putting in? It
looks like a very nice engine to me.

Dodger_

 
Derek Simkowiak

June 29, 2001, 02:51 PM

Does your engine support the Half-Life bones/hitbox/animation system?

Which file format are you using; the text files generated from the .3DS files or the compiled .MDL files?

Finally, do you have source available? I've been trying to learn more about the Half-Life model format and data structures...


Thanks,
Derek Simkowiak

 
MarkN

June 29, 2001, 02:52 PM

Looks very very cool m8, hope u continue with this project.

 
Frank L

June 29, 2001, 03:12 PM

great looking pictures,

you said you are using 4 layer texture. I'm making my own terrain engine at the moment and the texturing is kind of tricky. I'm assuming you are using 4 rendering passes, putting on a lightmap and then modulating the texture on it, basically doing this once for each of the four layers. Then in the end you put the detail texture on top of it.

Could you explain if this is how you do it, and if so, isn't 4 rendering passes (assuming 2 texture units) quite a lot, and hence a bottleneck in the engine.

A question that kinda relates to this is in Black and White the terrain has lots of extra detail when you get up close (like fields), could someone give a guess to how this is done. I thought it was blended on top of the terrain, but when the polygons making up the terrain aren't coplanar, that may be tricky and slow.

Any comments on this is greatly appreciated.

 
lycium

June 29, 2001, 03:27 PM

hey, very nice. i really like the moody skies...

pity the enemies are a tad lowpoly, while the landscape gets all the triangles dedicated to it.

i wish the world would stop it's obsession with landscapes. i would much rather admire great interior architecture from various eras (gothic, aztec, etc...) than stare at plain GRASS, huge expanses of bare GRASS for hours on end.

what is it with landscapes that excites people so much? respect for the nice engine and graphics, i just don't understand the whole "landscape obsession" thing...

 
Chazz

June 29, 2001, 03:51 PM


Yes, I do 4 passes. One for each texture, but I do vertex-lighting, it's much cheaper.

I don't use the Half-Life hitbox system, I use cylindrical hitboxes. They are basically 'pillars' that surround each object. But I do use the skeletal animation. You can get mdl rendering code from the Half-Life sdk.

The map objects are just entities with no velocity. They have models, etc. You can give each entity a 'type' to determine if you can walk through them (grass) or they are solid (boulders, trees).

I was thinking about doing a jeep, and hover vehicle of some sort. The way that would work, is like an item in Quake or something. Only when you touch it, instead of increasing ammo, etc, the item 'sticks' to you, and you are given a flag that says you are in a vehicle (and which type).

Then in the physics code, I just make it behave differently and it looks like you are riding the jeep/hovercraft. I do lots of little 'hacks' ;P

One good example of a hack is the lighting, I don't bother with vector normals, etc. I could do it that way, but I found an easier way.

I simply take the vertex that I am lighting, and subtract the height of the vertex to the north of it. The greater the difference, the lighter the polygon. If it's the other way around, where the northern vertex is actually higher, then the polygon is darker.

I of course tweak it with some lighting constants (so it doesn't go from fullbright to pitch black over one polygon).

btw: I am only 14, I have written several 'Quake' style fps engines before, but after seeing the Halo movies, I just had to do this project ;)


 
D_Dog

June 29, 2001, 04:09 PM

i assume you are doing some kind of LOD on your terrain, so my question is, doesn't the use of vertex lighting create a lot of popping in the terrain when you insert/remove nodes. I only ask because this is the reason i decided to go to lightmap based lighting

 
David20321

June 29, 2001, 04:13 PM

Looks nice, where'd you get the skybox?
-David-

 
Kail

June 29, 2001, 04:27 PM

Its easy to get data for a landscape. Just make a clouds texture or whatnot. Architecture means you need to find/make levels.

 
Chazz

June 29, 2001, 04:42 PM


Actually, there's no LOD, I am no where near that advanced.

I got that skybox from as_oilrig from Counter-Strike.

 
SamS

June 29, 2001, 04:49 PM

Nice job! Screenshots look somewhat similar to Halo. But Halo is a lot more advanced than just an outdoor terrain engine and some half-life models. Anyone who went to E3 and played it will tell you that.

What I don't like is the Aimbot cheat on your site :(

 
Derek Simkowiak

June 29, 2001, 05:06 PM

I simply take the vertex that I am lighting, and subtract the height of the vertex to the north of it. The greater the difference, the lighter the polygon. If it's the other way around, where the northern vertex is actually higher, then the polygon is darker.

Um... did you make this up yourself? Or did you read about it somewhere?

Is it just me, or is this pure genius? Fast, simple, and elegant. I've never seen this before. I must be missing something...

I assume using the Northern vertex is an arbitrary choice for this algorithm, right? I think you should use East or West, since the Sun 'travels' East to West. Shadows would be either afternoon or morning shadows, instead of "Earth has flipped its rotational axis ninety degress and now the Sun sets in the South" shadows.

Furthermore, you could use a weighted average of the East and West vertexes, weighting each one differently over time, thus having shadows that would would slowly transition from morning shadows, to Noon shadows (i.e., East and West vertexes are weighted equally, giving you basically no shadows), to evening shadows, to night (where again East and West vertexes are weighted equally, but both are subtracted, instead of both added, so you'd have a dark landscape).

I gotta try this out...


btw: I am only 14, I have written several 'Quake' style fps engines before, but after seeing the Halo movies, I just had to do this project ;)

Good grief! Amazing...


--Derek Simkowiak
dereks at realloc dot net

 
Chazz

June 29, 2001, 05:16 PM


Yea, I made it up. The only reason people don't use it on models, etc is because it's only linear on the z (or y, depending on how you look at it) axis.

It wouldn't look right on a sphere.

I didn't understand why people didn't do that instead of all those vector normal caculations for JUST TERRAIN.

It looks fine :)

You could consider north to be west, it really doesn't matter. It just depends on what side of the skybox the sun is on :)

Mine is on the front, and I just call the front north. But if you had a 'correct' skybox, with the sun on either side, you could have it look much more realistic.

To do sun elevation (the sun won't always be direct north of a hill, it could be above the hill) so that the shadows don't start when the hill slope degrades, then simple add a value to the final lighting value.

Like 0.2, that would make the sun illuminate a tad bit more on the opposing side, as though the sun were more above the hill.

Lots of little hacks like that. They are much more efficient too.

I also make sure that the polygons being drawn are certainly in your view, and/or nearby. This makes it alot faster when it's not trying to draw polygons to your side and behind you.

;D

 
Navreet Gill

June 29, 2001, 05:49 PM

Damn.. 14, you make me feel old (17), lol..

Are you using any LOD or any other algorithms like that? Or is it just a basic heightmap with models on them?

 
lycium

June 29, 2001, 07:23 PM

is that really the sole reason why everone's going nuts about terrains?

 
Chazz

June 29, 2001, 07:26 PM


Basic terrain with models.. :(

But I think it runs pretty good for 4 passes on the terrain, and you can see relatively far (to the player's scale).

But LOD would be way better. I just didn't plan on this being a commercial project or anything. I also intended to add some netcode and make it muliplayer (fun fun fun).. but never got around to that either

 
lycium

June 29, 2001, 07:37 PM

good old 2d bumpmapping (demoscene style) used this technique to do the "lighting".

dx = heightmap[x - 1, y] - heightmap[x + 1,y]
dy = heightmap[x, y - 1] - heightmap[x,y + 1]

 
lycium

June 29, 2001, 08:34 PM

4 passes at 38fps on an ati rage is nothing short of impossible :)

 
Navreet Gill

June 29, 2001, 11:12 PM

Yup... nothing new... has been discussed in the forums on flipcode...

=)

Just not an accurate as you can be...

 
Sebastian Sylvan

June 30, 2001, 05:07 AM

I'd have to meassure. But I don't think the framebuffer traffic is the main bottle neck. More likely is that texture filtering and bandwidth is the bottle neck.

 
Sebastian Sylvan

June 30, 2001, 05:13 AM

Unfortunately you won't get any shadows. Ie hills won't cast shadows, they will only be brighter on one side and darker on another.

 
Grugnorr

June 30, 2001, 07:20 AM

.-Blade has evrything you ask for. Even the aztec pyramids!

.-When you are a lonely programmer who doesn´t ,nor have time left, to use a 3d editor to construct buldings, using a simple height map to build very good looking terrains is very nice.

 
Bruce Sutherland

June 30, 2001, 10:55 AM

Congratulations Chazz, this is amazing work at 14 years old. I think you have a bright future ahead of you!

 
DaVEkELLY

June 30, 2001, 10:55 AM


I am extremely impressed.

That vertex lighting idea is indeed brilliant, I slapped my 32 year old bald head. Damn kids!

If you want a quick and cool vehicle system, check out FastCar at http://www.oxforddynamics.co.uk/ It is free to use (but not to distribute), and works great.

Keep up the good work.

 
Lion V

June 30, 2001, 11:46 AM

Hm....
Its a simple idea, but I`m not sure if I like the effect.
It simply put shadows in the low places and light in the high places, sems to me, from the shots. It seems to drop the apparent ambient light level too much. Besides, canyons are never that dark in reality.
Still...with some refining and tweaking, it could be a rather nice tecnique.
Wheres the light from the gun ? :-)
Anyway, it looks really sweet.
Keep it up.
~V'lion

 
ector

June 30, 2001, 12:08 PM

...i think :)

ignoring the lod-morphing:

it divides the terrain up in chunks of say 32x32 "heights", and generates a single texture for this chunk from small textures in software (or perhaps uses SetRenderTarget and lets the 3d card do the blending). Then when rendering it applies a detail texture (probably with ADDSIGNED) to get the really small details.

I have done about the same thing in my old landscape engine and it really works very well.. I can have unique-texturing on huge maps this way, and lod becomes a doddle. only problem is seams, but I've solved that problem too by a very simple stitching scheme.

 
Chazz

June 30, 2001, 02:43 PM


Actually, the lighting doesn't light lower elevations darker and higher elevations lighter. It uses the difference between elevation to determine the shade of a polygon, more specifically a vertice.

It basically simplifies the logic that the closer a plane is facing 90 from a light, the less that light has an affect on it.

Take a piece of cardboard, have it face direct sunlight, it is fullbright.

Rotate it on the x-axis, this would simulate a hillside, it changes shade, mainly because of the difference between the height of one end of the cardboard to the other.

 
Espyria

July 20, 2001, 12:49 PM

The optimal is of course to have both great landscapes and clever indoor scenes but, as Grugnorr says, one simply don't have time to do it all!

 
Espyria

July 20, 2001, 01:11 PM

Gadnappit! I'm 25 and I feel like I'm actuallly growing older reading this page!

Hey Kurt! What about an age limit on this site? Like 18 or so ;)

 
This thread contains 29 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.