The Daily Click ::. Projects ::. Unnamed RTS
 

Project: Unnamed RTS
Project Started: 18th February, 2009 Last Update: 31st December, 2009
Project Owner: bigredron Project Members:
Project Type: RTS Project Progress:

pathfinding
Posted 14th Sep 09, by bigredron  
The biggest resource hog for any RTS game is pathfinding. If you have many units selected and click to set their destination on a far side of the map, trying to find a path for each unit at the one time causes extreme lag while the pathfinding does it job.

I have come up with a solution to this problem by splitting up the load over multiple game loops. So basically I only find a path for a small number of the units within any given frame, thus freeing up time for other events and for the game to not lag. The only downside to this is that units wont move right away, they will all move once the pathfinding is finished for all units (usually within 5-10 frames so maybe 0.1 to 0.2 second delay at the most). I think the pros outweight the cons here.

I have a test application running as we speak testing 500 units moving around a small 16x16 grid. Each unit is assigned a random grid position as its destination and moves towards it. Once it reaches its destination, it find another one, and so on. I am getting framerate of 80-90 FPS on my quad core, which also includes drawing the 500units on screen and all other events. When I change the number of units to 300 I getting about 180-200 FPS. Not bad at all I say.

Posted by lembi2001 14th September, 2009

i am really looking forward to this game. sounds like you are taking it really seriously with all the testing you are doing.

are you planning to release this as freeware or selling it?

do you have a storyline in mind for it or are you not that far along yet?
 
Posted by 0ko 14th September, 2009

Are you a rocket scientist or a robot?
Either way, I'm looking forward to this game.

 
Posted by bigredron 15th September, 2009

I have been playing with RTS engines in click products for about 5 years and only now it is powerful enough to make a decent RTS game with lots of units. I have no storyline yet (got some basic ideas in my head) and am hoping to make this freeware. Depends exactly how long it will take.

And no, im not a rocket scientist. A robot? maybe....
 


 



Project Forums


Favourite

Advertisement

Worth A Click