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


Image of the Day Gallery


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.
Stefan Johansson

November 27, 2001, 05:25 AM

Its mostly a force based system (although what is exchanged isnt exactly corsponding to a real world force for stability reasons). Every vertex has a mass. The edges has a desired length and exerts a force on the vertexes it connectes to retain that length. Faces that move through the air exerts a force perpendicular to themselves depending on their speed.

Also their are rigid edges that cant change length. For those the force on the system as a whole is calculated at once and used.

Also their are some special forces from sources like gravity, explosions, weapon recoils (including jet engines), collisions etc.

If edges recieves larger forces than they can handle (get too stretched out) they start taking damage and eventually breaks.

Stefan Johansson

November 27, 2001, 05:29 AM

You are supposed to run it as server if you dont plan to connect to one. Uploaded a new version that exit without error if you dont though.

Stefan Johansson

November 27, 2001, 05:32 AM

I guess what you refer to is a player controlled craft. Its the one you chooses in the second menu. Check the readme for some keys to control it.


November 27, 2001, 08:20 AM

Almost a good theory.. except, the person running WinXP Pro that had the same problem :o).



November 27, 2001, 08:22 AM

new version runs fine on my machine...

Ciao BLooD


November 27, 2001, 12:02 PM

Do the rudders on the planes actually cause them to turn or is that just a visual?



November 27, 2001, 12:48 PM

Still crashing on my sis (loading path costs 2):
Win2k, 1Ghz, Matrox G450 (I know, I said G400 before - whoops!), 512MB

Da Wolf

November 27, 2001, 12:59 PM

great demo.. one question how are you rendering such a large terrain, quadtree? or brute force?

worked fine on my sys: P3 866 - GF2 MX 32MB

Stefan Johansson

November 27, 2001, 05:31 PM

Its the actual force exerted by the rudders (caused by their angle to the airstream) that turn the plane. Thats why i said that damages would translate into the movement characteristics of the vehicle.


November 28, 2001, 01:24 AM

Very impressive. Nice graphics, and even without much gameplay it's already fun. Just skimming over treetops with the plane is robocool, I'd love to see this turned into a game.


December 03, 2001, 09:58 AM

Shouldn't the force on the faces that moves through the air be perpendicular to the direction that the air flow against the face?

Anyhow, great work!

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.