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


Submitted by Stefan Johansson, posted on November 26, 2001




Image Description, by Stefan Johansson



This a program/engine that i have been working on for some time. From the begining i meant to create a game of it but lately i have mostly used it to test stuff for my exam work.

The most interesting feauture currently in is probably the pathfinding used for ground vehicles. Its about 20x faster than standard A* with an admissible distance based heuristic while generating about 5% worse paths on my test map. Another good thing about it is that while it need about 0.04s to generate a 800 nodes long path it only need about 0.002s to startup the path while the rest is used while the vehicle is moving. This has several advantages such as spreading out the cpu load and not having to throw away that much work away if the user decides to direct the vehicle elsewhere. The pathfinding part of my exam work can be found here. The lower left image shows some searches in progress and how the path get more detailed closer to the vehicle.

Another thing that some might find interesting is the finite element like simulation model i use on the player controled crafts (lower right image). It should in theory have several advantages such as regional damage, taking damage on a craft into consideration for its movement and also allow the users to create their own totally unique crafts without the ability for them to cheat. In practice i havent got it to work that well though.

Since i have "borrowed" some 3d models from the old RTS Total Annihilation (cavedog m:50) you might have to own that to legally download a demo from http://www.tauniverse.com/SY/download/spring.zip.

//SJ


[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.
 
Bunnz

November 26, 2001, 10:04 AM

Looks really really nice

Have fun
Bunnz

Visit: www.bunnz.com

 
Mattman

November 26, 2001, 10:19 AM

It crashed when showing all the stuff it was loading...I couldn't see which part it was up to in the loading routine though.

 
Pixelish

November 26, 2001, 11:22 AM

tested it and works fine for me. looks really nice.
One thing though. While running red worm rising there was a plane that rotated around a ground object but keeping its orientation locked onto the ground object. Besides that it was really sweet to watch.
Have fun!

 
BLooD

November 26, 2001, 11:22 AM

I crashed too while loading the tree textures... ?

Ciao BLooD

 
Genu

November 26, 2001, 11:54 AM

This is the kind of suff I like to see here :-)

military applications?

 
jurgen

November 26, 2001, 12:24 PM

oh my god,

this is really a nice engine. and I am reluctant there is some physics and ai code in it.

checking out your site now ...

jurgen

 
Badgers

November 26, 2001, 12:32 PM

Crashed while loading. Too bad, I would've wanted to take a closer look.

 
AndyM

November 26, 2001, 12:56 PM


nice terrain engine, at least from a distance.
Tell us about that!

 
Politik

November 26, 2001, 01:11 PM

Loads well with win2k SP2 and the newest (afaik) nvidia drivers and dx 8.something.

Best part for me is the terrain, really looks impressive with the camera zoomed out. Please please please make a turn based war game. Having 1000 people playing simultaneous turns would be beautiful. Like all those web-based games, but with a great 3d frontend.

 
geekster

November 26, 2001, 01:30 PM

Shots looks great but the demo crashes here also (Win98SE, Athlon 800, 256mb ram, geforce2mx 32mb)

 
Thomas Young

November 26, 2001, 02:02 PM

hehe

Yankspankers rock
TA rocks (still)
In no small part thanks to you guys.

Works fine on my machine, in windowed mode at least
How do you get it to do pathfinding?

 
Stefan Johansson

November 26, 2001, 02:15 PM

Those units (rapiers) functions more like helicopters than planes in TA and i kept that behaviour.

 
Anthracks

November 26, 2001, 02:18 PM

Just so you know, I couldn't get it to run in fullscreen or windowed mode (it comes up with an error in GLU32.DLL while trying to load the tree texture). I am running Windows XP Pro on an Athlon, with a Geforce 3 and the latest official nVidia drivers, DirectX 8.1. Hope that helps you a little in finding your bug, I would have liked to try this game!

Anthracks

 
max621

November 26, 2001, 02:27 PM

Total Annihilation 2? :)
Loved the original TA, this looks cool. Will DL once i get home from school.

 
Stefan Johansson

November 26, 2001, 02:36 PM

The terrain uses a really simple algorithm (so simple i was ashamed to describe it :) ). It just use every vertex in the map in a square close to the viewer and then every other vertex in a square twice that size and so on. It ignores how bumpy or flat the terrain is which leads to some unnecessary vertexes but is cheap on the cpu and let me create long triangle strips.

For texturing it uses one 1024*1024 texture covering the whole map (just a colorized version of the terrain type) and a smaller detail texture.

I guess what makes it look good is the trees that are placed algorithmically according to terrain type. To increase the speed i generate them in 16*16 (terrain type squares) batches that are compiled to display lists from Quad vertex arrays. Above half the max tree distance away I just render the trees with one quad while close up they are 3 quads. Im currently testing if its possible to polygonize the trees when you get really close while still keping the frame rate up. Another idea im thinking about is creating some sort of bill board texture for a whole 16*16 batch when the trees are really far away to allow them to be visible much further, but im not sure if that can look good.

The pathfinding is probably better explainded in the link at the top then what i can write here.

Not sure about the crashes I have only tested it on one gf2gts,nt4,p3,256mb and one gf3,w2k,athlon,256mb machine. What sort of error msg do it give ?

 
Rui Martins

November 26, 2001, 02:49 PM

Do you do any kind of haze or Fog, near the Edge where the Sky and The Ground meet (Bottom left picture). Or is it simple MipMapping of the Sky Texture.
It turns out very well.

Could ou explain the Terrain approach with a little more detail ?
I think I understood what you said, but wouldn't that make the terrain look very tiled, in terms of elevation / geography.

See ya

 
Tino Didriksen

November 26, 2001, 02:53 PM

Theory: Only works on NT based Windows versions?

It crashed as it was loading tree texture with an error in GLU32.DLL.

Screen capture: http://irc.projectjj.dk/spring_error.gif
(yes, that's danish, but the relevant info is there...)

--|--
Tino Didriksen
Project JJ

 
ecko_53

November 26, 2001, 02:58 PM

crashed :-( (trees)

System:
gf2go, p3 900, 256 ram, cur drivers for gf2go

 
BLooD

November 26, 2001, 03:15 PM

crashed :-( (trees)

System
P4 2GHz, 512 RIMM, GeForce3 Ti500, WinXP, latest NV-Driver, DX8.1

Ciao BLooD

 
Mikko Siren

November 26, 2001, 03:20 PM

crashes :-( (trees)

System:

AMD 1.2GHz, 378mb, GeForce DDR, WinXP, DX8.1

 
337

November 26, 2001, 03:24 PM

works on my win 2000 gf 256, athlon 500 system, but crashes when server address is not entered

 
raimund

November 26, 2001, 05:13 PM

crashes :-( (trees)

System:
AMD 1.2GHz, 256mb, GeForce 2 GTS, Win98 SE, DX8.1

 
Kosh

November 26, 2001, 05:28 PM

runs fine, Win2k, Elsa Gladiac 511, ..complains about some textures not found. looks very nice

 
Punchey

November 26, 2001, 06:00 PM

Crashes:
Win2k, Matrox G400, 512RAM.

 
James Matthews

November 26, 2001, 06:39 PM

crashes :-( (trees)

System:
933Mhz, GeForce2 GTS, 256 RAM, Win98SE, DX7.0

Ah, well...your pathfinding essay was interesting enough to make up for it! :) Beautiful IOTD too.

 
Roch Denis

November 26, 2001, 08:29 PM

Hey, didnt know you read that board SJ ^_^. Still works fine on my comp.

-Dark Rain

 
noxa

November 27, 2001, 02:20 AM

Yum yum - TA :)
I'm a long time fan of the series (wishing a TA2 would have been possible), and love this project. I saw this awhile ago when it was initially being worked on in all the TA news sites.

If anyone is up for a game of TA:CC, mail me :D

Btw, if your interested Stefan, I've been thinking of ways to take the original TA map format and use it in an efficient 3D setup. Maybe we could chat about it sometime, as it would allow for some awesome looking maps, as well as a wide variety of them to be loaded.

Again, Good Job!

 
Max

November 27, 2001, 02:55 AM

The physics part is awesome... can you provide some more detail on how it works?

Max

 
Stefan Johansson

November 27, 2001, 05:10 AM

Yes there is a distance fog on both the ground and the sky.

For a square say 30 vertexes large my tiles is 1*1 (verteces are stored in a cartesian grid) then for a square 60 big (excluding the central square) i use 2*2 tiles then for a 120 square i use 4*4 tiles and so on.

Not sure what you mean by a tiled look. The texture is continuous over the whole map so that wont look tiled except that the texels will be kind of large. The height map has a finite resolution and thus might look unrealistic but this map is somewhat flat and also the trees tend to hide such stuff. Also i smooth the transitions between the different resolutions of terrain so you will see the terrain "flowing" into new configurations rather than poping.

 
Bodo Pfeifer

November 27, 2001, 05:11 AM

runs fine (win2k, 1.2 Thunderbird, GF3, 1.5 RAM)

whats that white wire-vehicle in the middle of the landscape ? .. some sort of physics testobject ? .. are the green lines dampeners or so ?

 
This thread contains 41 messages.
First Previous ( To view more messages, select a page: 0 1 ... out of 1) Next Last
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.