SOL a.i/steering demo
www.specis.pwp.blueyonder.co.uk/SOLaiTest.zip
first off - thanks to specis for hosting this demo :]
Ok..well for those havent heard of my project, SOL is
a singler player space exploration/trading/combat game.
Anyway..after a long break ive decided to pick up the ball
again. im currently working on the a.i module, and thats
what this demo is all about..grouping/formations/steering...
ive yet to add the complex routines that allow groups to
dogfight or perform any similar high level a.i, but this will
come soon..
for those that are interested - the logic is quite simple..
- spherical collisions / distance checks are made, + if
- the close enough, the vector from the object to your ship
- is averaged with your ship vector + this becomes the new
- target vector....the more collisions, the more adjusments..
- to keep all this collision madness from killing the fps,
- a dynamic spacial partioning system is used to keep track
- of small ships..i suppose its similar to hash coding..
- x,y,&z are used to from a area number, and this number
- is assigned to ship & a reference to the ship is added
- to the table...its slightly more complex than this, but
- thats the basic idea...
- larger objects have to treated in different way, but because
- these objects will be few in number in any given scene, this
- isnt really a big problem..collisions against these objects
- is done by testing the radius of a group of objects vs the
- radius of the large object...if a group is within this zone,
- we then perform some sphere/mesh tests + apply vector ajustments
- to the target vector as before...this is slightly more complex,
- involving finding face normals etc..but most of this is done via
- coldet...
hmmm..typed quite a lot..
- anyhoO, i hope to release a new SOL demo sometime in the next few
- weeks...until then, you can check out the old demo if you want
- www.mindcage.4saken.co.uk
- cheers! ;)
matt/defoc8
www.specis.pwp.blueyonder.co.uk/SOLaiTest.zip
first off - thanks to specis for hosting this demo :]
Ok..well for those havent heard of my project, SOL is
a singler player space exploration/trading/combat game.
Anyway..after a long break ive decided to pick up the ball
again. im currently working on the a.i module, and thats
what this demo is all about..grouping/formations/steering...
ive yet to add the complex routines that allow groups to
dogfight or perform any similar high level a.i, but this will
come soon..
for those that are interested - the logic is quite simple..
- spherical collisions / distance checks are made, + if
- the close enough, the vector from the object to your ship
- is averaged with your ship vector + this becomes the new
- target vector....the more collisions, the more adjusments..
- to keep all this collision madness from killing the fps,
- a dynamic spacial partioning system is used to keep track
- of small ships..i suppose its similar to hash coding..
- x,y,&z are used to from a area number, and this number
- is assigned to ship & a reference to the ship is added
- to the table...its slightly more complex than this, but
- thats the basic idea...
- larger objects have to treated in different way, but because
- these objects will be few in number in any given scene, this
- isnt really a big problem..collisions against these objects
- is done by testing the radius of a group of objects vs the
- radius of the large object...if a group is within this zone,
- we then perform some sphere/mesh tests + apply vector ajustments
- to the target vector as before...this is slightly more complex,
- involving finding face normals etc..but most of this is done via
- coldet...
hmmm..typed quite a lot..
- anyhoO, i hope to release a new SOL demo sometime in the next few
- weeks...until then, you can check out the old demo if you want
- www.mindcage.4saken.co.uk
- cheers! ;)
matt/defoc8