At the time of writing, I've just performed a rejig of my blog, based on Blogger's own supplied templates. I did intend to match the theme to my personal site, but it all looked too complicated for my mental capacity. I hope you like the new look.
The festive edition of Polymer Picker |
Back in December 2023, I decided to make a festive edition of my retro game Polymer Picker. I worked fairly feverishly to add some added sparkle to the game, and hastily published it shortly before Christmas.
Fast forward to a year later. I pushed the festive edition on social media, and then decided to play it.
Oh dear.
The dreaded 'No room' error. How to kill a game! |
There is nothing more annoying than to discover that your game crashes. Even more so when it has been doing this since last year!
I had fallen into the trap of rushing to publicise something before it was ready. Twice.
I dusted myself down, took a deep breath and waded into the game repository. Having enjoyed playing Valve Software's 20th anniversary release of Half Life 2, I was fascinated by some of their developer commentary on having to revisit code from nearly 25 years ago, and remember how and why they made certain decisions in the game's development.
I was having to do the same thing, but for a game last visited only a year ago! For anyone who has dared to visit the code repository, it looks like an impenetrable mass of weeds and brambles. The code is heavily compacted and obfuscated by hand, in order to fit the game into the BBC Micro's tight memory. Out of the 32k of memory available, 20 is lost on the choice of screen display. Once you take the operating system, and the BASIC language workspace into account, you only have roughly 7 or 8k left to play with, to contain your sound, graphics, and game code. It is impossible to have a game of this complexity without compromising somewhere, so the code readability was an early casualty.
Which is all well and good, until you have to debug the code.
The last few days have been a real effort to find ways of reducing the size of the game to prevent the No room error. However, it also gave me an opportunity to look more closely at what the code was doing, and see if any of the logic could be tweaked in such a way to save a few more bytes here and there.
Thankfully, I have not only succeeded, but have been able to resolve some other bugs, including ones which are present in the standard game, which I can port across:
Fellow BBC Micro retro fan Colin Hoad made a video review of the original game in October 2024, which included some footage of the shark sprite behaving in a very strange manner, namely levitating out of the water. A closer look at the logic involving how it is positioned on later levels, revealed it was not working as expected. Once addressed, the shark no longer tries to outdo what Bruce did in the finale of Jaws.
The festive edition had what turned out to be another bug concerning the last of 4 items to collect, which I had redesigned to match Christmas related trinkets and presents. The last item was appearing as what I had assumed to be tinsel. However, when I checked the character definitions, I discovered that the last item was in fact a toy soldier. The logic I had was incorrectly cycling through the 4 items and missing the last, poking an empty character definition that just happened to resemble a tatty tree decoration.
With these issues, and a couple of other wrinkles addressed, I was finally able to release a bug fixed edition. A year late.
Well, better late than never!
Comments