Something has bugged me for quite a while: Aural Fighter reacted slower and slower the longer I played it. I was absolutely sure it had to do with the rendering code, but even a bare-bone test game slowed down after a while. Confused, I ignored the issue for a while, but I realized I couldn’t release Aural Fighter with such an issue unresolved, so I just had to fix it.
But whatever I tried, nothing seemed to cause the problem. Finally, I decided to create a minimum piece of code that still reproduced the problem, to post on the HaXe mailing list. While doing so, I found out that the game only stopped respondeding after a lot of keypress events had happened, not just after some time. I was confused: was I handling input in a wrong way? It should be a perfectly normal method… but while stripping away unrelevant code, I finally figured it out: I had added another keyListener in a pre-loader frame, one that was never removed afterwards. This one started to intervene with the other keyListener. Removing it finally solved the problem.
On a side-note, I’ve added shadows to all enemy fighters and I’ve drawn a few new enemies and tiles. I’m also working on another game – as a school project – so Aural Fighter is proceeding slower as desired, but the experience I gain from that project should be pretty usefull for later games. I’ll write some more about that project later.