WIP - Knockabout (z88dk)

Show us your work, thrill and amaze us :)

Moderator: Programming Moderators

Post Reply
User avatar
bob_fossil
Posts: 30
Joined: Tue May 30, 2017 5:26 pm

WIP - Knockabout (z88dk)

Post by bob_fossil » Tue Aug 29, 2017 5:14 pm

Knockabout is a sort of sequel to my first attempt at a game, Walkbout. Again, it's a port of a port. This time 'Puzzleboy', a homebrew title on the Nintendo DS which was a port of the Gameboy title, 'Kwirk' by Atlus.

Get our heroine to the flag to move on to the next level. You can't pass through walls but blue switches can be pushed to rotate them and yourself around - so long as there is nothing in the way of the switch. Yellow blocks also obstruct your path on some levels and need to be moved out of the way. They can also fill in black holes if they are completely consumed by the hole.

Some levels need you to enlist the help of your friend. You can change between players with the 'Swap/Ok' button. You can also press the Break key in game to access the game menu (select an option with left, right and swap/ok). This lets you undo your last move, restart the level if you get stuck or quit back to the main menu.

Controls default to Q,A,O,P and Space. There's still a bit of work to do and I need to add more levels (currently stuck on Level 30 on the DS version :) ).

.tap file available here.
Attachments
knockabout005.png
knockabout005.png (46.23 KiB) Viewed 1745 times
Last edited by bob_fossil on Sun Oct 15, 2017 4:34 pm, edited 1 time in total.

seb
Posts: 1
Joined: Fri Sep 01, 2017 2:09 pm

Re: WIP - Knockabout (z88dk)

Post by seb » Fri Sep 01, 2017 2:16 pm

Hi, just registered on the forum to be able to answer that particular post. It deserves at least one answer!

This is very cool, I thought that was just a sokoban clone but that looks more complex than that. Congratulations!
I could not test it yet, still working on installing the emulator. Are you taking advantage of the specnext hardware? The player sprite in particular could use more colors ;)

User avatar
bob_fossil
Posts: 30
Joined: Tue May 30, 2017 5:26 pm

Re: WIP - Knockabout (z88dk)

Post by bob_fossil » Fri Sep 01, 2017 8:55 pm

Thank you for the kind words. I'm not planning on taking advantage of any ZX-Next specific hardware as I'd like this to run on as many machines as possible.

You should also grab the updated version from here as this fixes a silly glitch in level 4 which stops you progressing any further in the game. I also had a burst of inspiration and am now up to level 32 in the original, so there's now 32 levels. :)

SamusDrake
Posts: 250
Joined: Mon Jun 26, 2017 10:11 pm
Contact:

Re: WIP - Knockabout (z88dk)

Post by SamusDrake » Fri Sep 01, 2017 10:51 pm

Looking good. Keep going!

User avatar
bob_fossil
Posts: 30
Joined: Tue May 30, 2017 5:26 pm

Re: WIP - Knockabout (z88dk)

Post by bob_fossil » Thu Sep 14, 2017 10:17 pm

Small update here. Now with 50 levels, some graphical tweaks (you can now see holes when pushing a block over them), speed ups and fixes.

User avatar
bob_fossil
Posts: 30
Joined: Tue May 30, 2017 5:26 pm

Re: WIP - Knockabout (z88dk)

Post by bob_fossil » Sun Sep 24, 2017 9:50 pm

Another update here. Now with 64 levels.

I got stuck on level 57 and couldn't see a way through. I'm using No$Gba to play through the DS version, PuzzleBoy and it has an option to show the file system of the cartridge. DS cartridges can have an embedded file system called Nitro in them so you can access various assets and data as files. If a cartridge supports this, the cartridge header has two offsets into the file: one for the list of folder and file names and another containing the actual offsets of the file in the cartridge and the length of the file. Examining the filesystem showed that the level data was being stored as individual files (rather worringly there were 136 levels so I'm not even 50% of the way through the game yet). I couldn't save or view the contents of the files in the file system. I was hoping to be able to look at one of the level files and work out the level format.

So I wrote a basic terminal app in C which took the data for the file names and the data for the offsets and matched them up, allowing me to find the contents of any file in the cartridge. I found the level data but after some head scratching couldn't work out the format of the level data. So I was back to square one. I then had a brain wave. What if I replaced the offsets for the file containing level 57 with the offsets of a previous level I could complete? Using a hex editor, I overwrote the offsets and length data for the file entry for level 57 with a preceding level. Loading the modified cartridge back into the emulator, level 57 was now showing the previous level which I completed again allowing me to progress to level 58.

The realisation that there was still more than 70 levels to go through led to me having a rethink of how the data was stored. z88dk comes with a command line version of zx7 which is a nice compression tool. I re-jigged my level generation script to use this to pack each individual level into one blob of data which contained all the compressed levels, one after the other. It also generated a list of offsets into the blob so I can unpack a specific level. I had to sacrifice a bit of memory to unpack the level data to but I managed to more than halve the size of the level data using this approach. So I should be able to fit all the levels in now.

User avatar
bob_fossil
Posts: 30
Joined: Tue May 30, 2017 5:26 pm

Re: WIP - Knockabout (z88dk)

Post by bob_fossil » Sun Oct 15, 2017 4:43 pm

New month, new update here. Now with 70 levels.

I've improved the switch graphics - the switch pins now have specific tiles for each rotation which makes then easier to distinguish when they're next to each other. I've also added a 'Map' option to the break menu which lets you see a birds eye view of the current level which can be handy on the larger levels when you're trying to get your bearings.

User avatar
bob_fossil
Posts: 30
Joined: Tue May 30, 2017 5:26 pm

Re: WIP - Knockabout (z88dk)

Post by bob_fossil » Sun Oct 29, 2017 10:47 pm

Putting that extra hour to good use with another update.

Post Reply