4 ms·
The other comments are really talking about complex 3D games which is valid (for now at least). Tower Storm is far simpler than this and runs perfectly on PC's
by TimJRobinson 13y ago
The other comments are really talking about complex 3D games which is valid (for now at least). Tower Storm is far simpler than this and runs perfectly on PC's and runs great on most high end phones released in the last 2 years (iPhone 4+ and Galaxy Nexus+). I've even got it running on the Firefox OS phone (1Ghz cpu, 512MB Ram, 480 x 320 res) but it slows down significantly late game.
However it has taken some time to optimize the code to run fast enough on all these devices. The main issues I've come across are normal game algorithm issues (using a quadtree to find nearby minions, using hashmaps instead of arrays for some data that is always searched by id etc) and garbage collection. Garbage collection has been an annoying issue which I've somewhat solved by using entity pools. So instead of creating new entities and deleting them when they die a pool of entities is created at the beginning. Then upon creation each entity is pulled from that pool and after it dies all its variables is reset back to zero and it is placed back in the pool to be used again later. This uses up a lot more memory but it means the game doesn't have a large CPU spike every few seconds as it does garbage collection.
Canvas performance may be an issue once I turn it into an iPhone app as I've heard the canvas app renderer has far worse performance than the browser renderer (I have no idea why), but I'll cross that bridge when I get to it.
So in summary I think it's fine for simple casual 2D games that don't have complex logic (using A* algorithms to move large groups of units may be too much, or having advanced AI). But anything designed to appeal to hardcore gamers who need 60+ FPS and want in depth gameplay may be a bit much for it for now.