How to improve my game performance ? ( RTS)

Started by
12 comments, last by HolyGrail 14 years, 1 month ago
Quote:Original post by zedz
the OP needs to find the actual bottleneck
QFT. No point optimising until you have run a profiler, and identified the bottlenecks.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Advertisement
Quote:Original post by zedz
>>Your bottleneck is right at the loop inside the loop there, and you are going through all player and enemy units even though they are completely far away off from each other.<<

I wouldnt bet on it, my money would be on the A*

the OP needs to find the actual bottleneck


I must emphasize the truth in this. If you do not run a profiler to find the bottlenecks in your system, you will probably just waste your time.
Ok thanks to all.
Thank you for the quad tree technique and thank you for the link to Gamedev it is very useful ( diablos_blade and alnite )
Yes I would better use a profiler :)
Quote:
Other techniques can involve grouping. i.e. if a group of units are given a move command it may work for your game to just generate a single path for that group and have everyone flock around the leader. but this is very game specific and may not work for you. I'd stick to the above first.

Hierarchical A* is also something you want to look at for an RTS. pathing across a whole map with traditional A* is obviously going to be hugely expensive.

-me


Wow I didn't think about grouping units and make a single path it's a good idea !
Thank you for the tip !

This topic is closed to new replies.

Advertisement