The game is getting to a point where the speed is really killing us. We need to find ways of speeding up the game, and doing so within the next release or two. Lag causes players to give up and leave. We need to start attracting fans to play regularly.
So the point of this thread is to discuss, collect, and action on ways we can actually speed up the game. Found a really slow part of the game? Post where it is and some ideas for improving it. Working on something to speed it up? Post about it an get feedback early.
This is now top priority for all developers. Other work can continue, but you should be working together to get the game faster. Communicate, collaborate, contribute....
Here are some ideas/tickets to get things started.
- Finish developing the new path finder - http://trac.wildfire...com/ticket/1756
The new pathfinder is designed to be faster and give closer results between long range and short range path finding.
- CCmpRangeManager optimisation - http://trac.wildfire...com/ticket/1707
- Implement an Octree - http://en.wikipedia.org/wiki/Octree
- Rewrite the AI base system in C++ - AI are very slow. From what I understand, several systems are implemented in JS when they would be much faster in C++, e.g. building placement needs to copy data from C++ to JS and then loop over the data. Move as much of the AI system to C++ for speed.
- boost::unordered_map is potentially faster than std::map in some situations. This is now serializable so should be very easy to change (it won't even break multiplayer sync because it serializes as a std::map). I don't know if there are any situations currently where this would help though. (Except for CCmpRangeManager, but the proposal in the ticket is better for that).
- Disable the ability to have arrows hit units other than the one they targetted, this would save looking up entities near to the arrows hit location.