Sid Spanners ------------ by Digital Prawn 26th December 2010 Platform: ZX Spectrum 48K KEYS ---- LEFT - O RIGHT - P JUMP - Q/Z/M Instructions ------------ Guide Sid Spanners through eight levels of platform mayhem, unscrewing nuts (small white circles) as you go. Simply touching a nut causes it to unscrew. When all nuts on the level have been unscrewed, the door will activate and start to flash. Exit via the flashing door to complete the level. Each level contains four lethal guardians which must be avoided. You start the game with four lives. There's also a fixed timer on each level which counts down from 100. If the timer runs out, then the game immediately ends regardless of how many lives remain, although the time limit is very generous. Complete all eight levels to win the game. Thanks ------ Thanks to the creators of Z88DK, the SP1 library and all of the other libraries used in this game. Thanks also to all World of Spectrum forum members who replied to my questions in the "Development" thread. Too numerous to mention everyone who made this game possible, but all of your useful information helped. In particular aralbrec's sprite example, Timmy's pointer to the info on implementing the U_malloc() function used by the SP1 sprite libraries. Alcoholic's Anonymous for developing the Z88DK system, na_th_an's Spritepack notes, metalbrain's jump key suggestion and also for creating SevenUP... Thanks to Martijn for uploading the game to the WoS archive etc... etc... Developer Notes --------------- This is my first program to use the excellent SP1 sprite library for Z88DK. Originally written as a simple test program just so I could get some sprites moving around the screen, it started to look like a playable game just after a couple of evenings of tinkering. When I got the jump action of the player sprite refined, it just seemed so much fun to jump around the screen. So I went ahead and proceeded to finish this simple game. Running out of RAM was the main problem encountered as the level data set is coded in a memory-inefficient (but easy to work with) format. Each level description takes up 0.5KB of space and is a simple 2D character-map description of the level. However, with some form of compression, or an alternative representation more suited to a "sparse array", I'm sure a lot more levels could be fitted in. This game has just under 1KB of space remaining, so theoretcally, one more level could just about be shoe-horned in without changing the code. I had to repeatedly reduce the size of the heap (used by the sprite library) and the space allocated to the z80 stack just to fit the ever-expanding program code in. Also the progam uses a replacement ISR in IM2 mode which does nothing, simply to prevent the ROM ISR from clobbering something used by this program and to speed it up. IM1 mode does crash this game though, although I never investigated exactly why that is. Also, the game does do a lot of stuff in contended memory, which no doubt does slow it down a bit, but given the tight memory constraints, it's seemingly impossible to avoid. Compiled C code tends to fill up the RAM quite quickly, but I never got round to attempting to optimise this program for space - although I'm sure there is room for space savings by tweaking the code a bit. It's very easy to take the source code of this game and just create an alternative level set by changing the level data. Or even the sprite and tile data can easily be replaced. It's all in the public domain.