Game Production Diary - The Gigabyte Trap
At a guess it's been a year and three months since I started making this game - a 20 level platformer called Cap'n Rescue, for Windows 10 PCs. That originally had nothing to rescue in it. Except a Captain. So, I guess that's okay then. Still, I've now added some sailors to rescue as well.
At various times I've thought that I was close to finished and - every time, a new problem crops up. How long does it take one person to make a full sized retro-style game? Turns out the answer is - no matter what tools are used - quite a long time.
Most recently I've been encountering lag in the game from around level 9 onwards. Everything on the screen goes at a snails pace. I try and increase the player speed, no apparent change.
Maybe there's something wrong in the logic? Nope - can't see anything. Even so, I make a few clicks, and try running Level 9 with the logic from Level 1. That will change the background music and a few other things but, might solve some problems.
Nope - still no change. Level 9 runs like a decrepit and elderly snail, travelling through treacle -wearing an elastic band with one end wrapped around it's waist and the other end around a tree trunk, that has forgotten it's supposed to be going in the other direction anyway.
On previous attempts to solve this problem, my thoughts have become tired and I haven't been able to 'see the wood for trees' but, I have a clear mind now and a great idea. I deactivate all of the logic, except for the player controls.
Now, I can't pick anything up. Enemies remain stationary, and cannot be removed. Surprise - the problem isn't in the player controls.
One by one, I reactivate the various blocks of logic. It soon becomes apparent that the problem is with a group of instructions for 'left-right enemies', which is self-explanatory.
I know from the manual of the game engine I am using, that too many objects on screen can slow things down but, I already split this level into two for exactly that reason, and things had seemed okay. But, then - I added those sailors for the player to rescue.
I halve the number of enemies on the level, deleting the rest. My frame rate is back, the game is running smoothly - until I meet the sailors, then we're going through liquid tar again. So, I delete one of the sailors - the game is smooth again.
Problem solved. So, I fell into a trap - I'll call it the 'Gigabyte Trap'. I thought because I had much higher specifications than on a 1990s computer, that I could just have as many objects on the screen as I liked. I was wrong.
A further thought is that the High Density (HD) resolution of my pixel graphics means I can have even less objects on screen. As the next thing I want to look at - once all the levels are less bloated - is player speed, this information may become useful again. Cap'n Goode does plod a bit, and I'd like him to be a bit more nippy like certain, possibly famous, 1990s platform game characters from Japan.
Thanks for reading.
Stephen