This post was supposed to be about how important is polish, even at such an early stage. I had a couple of polishing runs, one where I changed the scheduling and path finding so that now it looks a lot better, with less random jumping around. I have some great ideas for the final form of the algorithm based on some profiling and a little fooling around with it. In another session I did some general cleanup.
But my third session was cancelled. Unfortunately, even these primitive 2D graphics were too much for my very powerful development machine. I tried it also on an average machine with a comparatively very poor graphics card, and the result was similar. The performance of the rendering engine was capped by whatever (probably software rendering) the graphical toolkit was using to do the rendering. On my machine I had between 10-20 FPS and on the other machine even lower. It is even visible in the previous post’s video: there is some serious mouse lag.
But now everything is better. I ported my rendering engine over to Irrlicht. Now I have 84 FPS on the poor machine. The porting was very easy. I’m not sure if Irrlicht is the final way to go because Ogre3D is also a strong contender, but there is one lesson to be learned here: do not cheap out on using a third party tool that can offer hardware acceleration, platform independence, abstraction and simplification of common tasks, even if what you are programming is very simple at this stage and you may or may not wish to extend upon it. You can use anything from SDL to something you find on the net, but using something with a strong user base will make things easier for you.
I won’t post a screenshot because everything looks the same. Now there is no way I’m using something with the capabilities of Irrlicht to draw 2D tiles forever. With this change, switching to 3D tiles & perspective is up on the table for the near future.
With the introduction of Irrlicht image data is no longer included in the resulting executable and has no impact on the number of lines of code in the project like it did before. I will also exclude image data from the size of the code:
2922 line of code in 23 files
75.3 KiB of code