Little Blue Man 2

Last modified date

Comments: 0

Well I’ve finally finished the second game in my new Little Blue Man series.  Okay, working with caveats.  The final product is somewhat drawn back from the original design spec not because I couldn’t code the design spec but because I kept running into problems associated with trying to use my chosen language, Laser BASIC on the Amstrad CPC.

So the final game remains uncompiled, has no sound, only two enemy sprites and half the number of planed levels!

The first big issue I ran into was memory.  Now I’m working on a CPC6128 but unfortunately the Z80 microprocessor can’t access all that RAM and thus by extension Locomotive BASIC (and hence Laser BASIC) are highly restricted in how that extra memory space can be used.  Long story short, the program code is still restricted to the same 41KB block as the original CPC464.  Worse still a good chunk of that workspace is hijacked by the Laser BASIC RSX extensions and the Sprite memory space.

At 11KB I’d hit Memory Full errors and only got to about 13KB code because I was coding using Notepad++ and copying and pasting changes in to the a snapshot image on the CPC emulator.

That of itself wasn’t so much of an issue.  However my sprites were.  The plan was to have 10 levels each made up from 4 tile map sprites.  So 44 sprites in total just there, plus 4 different enemy sprites, their animations, etc, etc, etc.  Once I got the main game all working fine and the first level in place it was time to work on the other 9.  Working on the first tile map type I got through to level 6 before I couldn’t save more sprites.  I still needed to create another 34 sprite tile maps to complete the game.

Deleting two of the enemy sprites, the broken jump animation sprites, and generally tiding up freed enough memory in the sprite area to make this a 5 level game.  With the current game engine design this is the limit.  I’d need to think about loading each level individually from disc which is a major rewrite of the whole system to improve this.

So, yes, the jump animation was broken.  Couldn’t work out why but the sprites would scramble when switching between the standard walk sprites and the jump sprites.  I think the key to the problem is Laser BASIC appears to always end the animation sequence back on the first sprite image.  Given the two part animation sequence the displayed sprite would be wrong when loading the second half of the animation.  So it had to go.  Simplified.

With the game finished it was time to hit the compiler.  Undocumented errors on compiling the CPC sound shaping commands lead to sound be stripped out of the would be compiled version.  Stripping out just the ENT and ENV commands that ran correctly through the interpreter would lead to already bad sound being just plan wrong compiled.

Still it didn’t matter much in the end because having got to the end of the first compile pass and thinking we were good to go I got presented with a completely unfathomable error that lead to me giving up on the whole compilation idea completely.  I got a “Type Mismatch” error on a WHILE command comparing integer values for two variables:

WHILE lives%>0 AND level%<6

So the download link below offers up a .dsk image with the code in both BASIC and ASCII format but don’t expect it to run.  The snapshot is the completed game running through the interpreter so it’s slow, very slow, barely playable slow.  But it’s the full 5 level game, with sound.

It obviously builds on the last two games.  The big difference being the lower resolution Mode 0 allowing more on screen colours and Laser BASIC introducing Sprites to replace the User Defined Graphics in standard BASIC.  In terms of gameplay I’ve added the ability to jump and new enemy that moves vertically to get in your way.  Also once you’ve collected all the coins in a level you now need to make your way to the exit to complete the level.

So yes, a very poor mans Manic Miner clone.

Where does that leave me for the next project?

Well not on the CPC.  For the next game I want to take a step towards the Jet Set Willy, Dizzy, Castlevania mould with interconnected flip-screens rather than single screen levels.  If I could compile to the CPC I would have considered coding blind in Notepad++ and compiling in Laser BASIC but the sound and type mismatch problems puts a complete end to that.

So I think I’ll be moving off to AMOS BASIC on the Amiga in order to take this to the next level and, hopefully, get a game out completed as envisioned.

Download

Share

Leave a Reply

Your email address will not be published. Required fields are marked *

Post comment