Homeworld-style ship pathing
Hi, I was wondering what would be the best way to plot paths for ships like in Homeworld? There are so many fighters, they fly in arcs and maintain formation, never bump into each other- how do they do that?? The algorithms I have come up with so far are horribly inefficient, I hope someone out there has a good idea
The homeworld source was released. You can download it from :
http://www.relic.com/
-ddn
http://www.relic.com/
-ddn
Thank you and yes I do have the sourcecode, but what I''m looking for was an algorithm- its faster than looking thru code (with little or no comments) and trying to figure out how all the pieces fit.
quote: Original post by akn81
its faster than looking thru code (with little or no comments) and trying to figure out how all the pieces fit.
You need to get yourself a program like Sniff, or similar. Such programs are invaluable when you need to decode someone elses work.
Cheers,
Timkin
From looking at it they use flocking algorithims to get the ships to stay in formation. The ship AI is multilayered, using a subsumption architecture, where the lower reactive behaviors like follow the leader, avoid collision and such are modulated by the higher behavaiors of attack/defend/etc..
They proably optimize the proximity calculations needed for flocking algorithims by using some spatial sorting algorithim combined with a query cache.
You can find the low level flocking behavior mostly in AIShip.c.
It''s an intresting approach, I''m taking somewhat of a similar approach with my AIs.
Good Luck!
-ddn
They proably optimize the proximity calculations needed for flocking algorithims by using some spatial sorting algorithim combined with a query cache.
You can find the low level flocking behavior mostly in AIShip.c.
It''s an intresting approach, I''m taking somewhat of a similar approach with my AIs.
Good Luck!
-ddn
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement