April 10, 2014
Engine Performance Tests
The deadline for submitting my thesis is closing in quickly, so I’ve stopped working on the engine and have been devoting my time to writing about it. Included in the thesis are the results of several tests I ran on the engine, with some interesting results.
The more disappointing test was the test that involved the collision system. In that test, various numbers of entities were added to a scene with the collision system and CPU usage was measured. It turns out that CPU usage degrades in an approximately n2 curve, and only 40 entities can be added before the CPU usage of my iPhone 5 maxed out (CPU usage is actually 50% of the phone’s capability; I think Apple caps it so that no one process can take up more than half of the CPU). I’ll explore some ways to improve the collision system in the future, but not before I finish my thesis.
The more exciting result was without the collision system. In that test, various numbers of entities were added to a scene without the collision system and frames per second was measured. The result was much more satisfying. FPS performance didn’t drop significantly until over 1500 entities were added to the scene. The rendering, sprite, tile, player input, and camera systems were all in use at the time and the device didn’t seem to have any trouble keeping up.
I’ll probably not have much more to share before the end of the semester, so I don’t expect another big post until May. I’m still updating the blog regularly. Keep reading and please leave a comment and let me know what you think!