Qwak level editor

reminisce about classic bbc micro and acorn electron games here
Related forum: adventures


Post Reply
User avatar
Cybershark
Posts: 736
Joined: Wed Jun 14, 2006 11:16 pm
Contact:

Qwak level editor

Post by Cybershark »

A recent round of the High Score Challenge saw Qwak in the spotlight. This was a marvellous game, from back in the day, which Superior didn't deem worthy of a solo release but which did make its way onto Play it Again Sam 10. The game is generally very smooth and polished but, as all the HSC contenders noted, some of the levels can be quite brutal and down to pure luck.
tnash wrote:Does anyone know if anyone has done a level designer/ alt levels for Qwak?
I was pretty sure that neither existed but, having once taken apart Hobgoblin and created level (and sprite) editors for it, I was curious if I could make sense of the Qwak level data and maybe even remember how to do anything useful with it. I knew that sbadger claimed to have cracked the level format (when creating a NuLA version of the game) - or that I could possibly even reach out to the game author - but I wanted to challenge myself.

Was able to easily identify where the data was stored by loading the game into screen memory. Then it was easy then to break it down into the 16x12 block format which the levels use. This was the first simplistic MODE 7 recreation of it:

qwakm7.jpg

It became apparent that each byte of map data is used to store two blocks for the levels. The lower bits are the left hand block and the high bit is the right block. Eg. the value of &B1 breaks down to B (11) and 1, which translates as a solid block (thing 1) on the left and a spike (thing 11) on the right.

I could almost create game-realistic MODE 2 recreations of each map layout at that point - although it was a little slow, as I was plotting the sprites using BASIC - but a couple of key parts were still missing, and required me to sift through a bit more data.

Monster info is stored in pairs in the next 16 bytes (after the initial &60 bytes used for the map). The X/Y coordinates are encoded - as above - into the first byte, and the monster type (0-4) is stored in the following byte. Any type value above 4 means that the byte pair is ignored. The 16 byte limit here means that only 8 monsters may be present on a given level.

Of the 16 bytes that follow (before the start of the data for the next level) only the first two bytes are utilised, and these are used to specify the "theme" of each level. The first byte specifies which sprite to use for the blocks in the level and the second tells the game which type of score item - red apple, green apple, cherries or lollipop - is to be found on the level.

Soon had the basics of the editor down, with cursor movement, sprite selection, etc. There were some ticky parts - mostly around monster placement and removal (as the data is handled differently) - but I've now got something which - while a bit clunky in places - I think has all the required bells and whistles, and am very pleased with. Load and save are implemented, level order can be switched around, the variant blocks (which have different behaviours) are clearly represented, and I switched the slow BASIC sprite plot routine over to machine code :D

qnewlev1.jpg

I've included instructions in a text file with the SSD, and the (slightly different) Electron levels are also included, there are also a couple of layouts which I was messing with, and also 3 levels which I "ported" from the Amiga version of the game. When I say ported, I mean that I took screenshots of a video on youtube and created (very) rough analogues. I may continue to tinker with levels myself, and look forward to seeing anything that others come up with :)

QwakEditor.zip
(24.32 KiB) Downloaded 33 times
bob147
Posts: 340
Joined: Thu May 02, 2019 10:02 pm
Contact:

Re: Qwak level editor

Post by bob147 »

Seems to work great so far, well done. The theme of this level is "squashed bbc micro owl" :lol:
qwakedit.png
User avatar
sbadger
Posts: 499
Joined: Mon Mar 25, 2013 1:12 pm
Location: Farnham, Surrey
Contact:

Re: Qwak level editor

Post by sbadger »

Hey nice work!!

Yes, As you noticed I'd worked out the level definition stuff during NuLA Qwak conversion, but never gave it any more time, So really nice to see you've put in the effort. Good work! :)

I wonder if there's enough room to do an Original + NuLA + Editor all-in-one disc?
So many projects, so little time...
User avatar
Arcadian
Site Admin
Posts: 4221
Joined: Fri Nov 24, 2000 12:16 pm
Contact:

Re: Qwak level editor

Post by Arcadian »

Very nice work.

I've attached the editor that the author used to create levels, which I archived on the same day that I [only just] managed to recover "Zap" from the author's master discs, back in 2008.

I actually forgot this existed, but this thread reminded me.
Attachments
QWAKEDIT.zip
(18.54 KiB) Downloaded 26 times
Please subscribe to the ABug YouTube channel!
bob147
Posts: 340
Joined: Thu May 02, 2019 10:02 pm
Contact:

Re: Qwak level editor

Post by bob147 »

Now that's a treat, interesting to see the different choices made.
User avatar
Cybershark
Posts: 736
Joined: Wed Jun 14, 2006 11:16 pm
Contact:

Re: Qwak level editor

Post by Cybershark »

bob147 wrote: Tue Nov 21, 2023 9:21 am Seems to work great so far, well done. The theme of this level is "squashed bbc micro owl" :lol: qwakedit.png
I suppose we need a level that's one big acorn too :lol: and that's magic to see something that someone else has created using it :D

sbadger wrote: Tue Nov 21, 2023 9:36 am Hey nice work!!

...
I wonder if there's enough room to do an Original + NuLA + Editor all-in-one disc?
Thanks! Yeah, would be grand to have one all-singing package :D

Arcadian wrote: Tue Nov 21, 2023 11:37 am I've attached the editor that the author used to create levels, which I archived on the same day that I [only just] managed to recover "Zap" from the author's master discs, back in 2008.

I actually forgot this existed, but this thread reminded me.
Wow, that is quite a treat 😮 Thanks for digging that out!
I had been curious if the author had crafted an editor, or if he'd gone the oldschool route of sketching the levels out on squared paper (and then editing the raw hex values).

The difference in the level rendering speed is quite apparent, as he took the assembly language route, rather than using BASIC. I do think that my version is more user-friendly though 😛

bob147 wrote: Tue Nov 21, 2023 1:48 pm Now that's a treat, interesting to see the different choices made.
Yes, there are a couple of unused sprites in there - an alternate block type and different spikes. Looks like there was something more planned with the doors too - perhaps they were originally intended to change from closed to open when all keys were acquired? Seems like the original plan was to maybe run to 32 levels instead of 24. There's at least half a dozen scrapped levels in the data there :D
User avatar
Cybershark
Posts: 736
Joined: Wed Jun 14, 2006 11:16 pm
Contact:

Re: Qwak level editor

Post by Cybershark »

QBONUS3.jpg
QBONUS4.jpg
QBONUS2.jpg
QBONUS1.jpg
Upon closer inspection there were only 4 playable layouts in the extra data on the editor disc. The first one looks unfinished but still proves enough of a challenging play, I think. They're all completable :)
User avatar
Arcadian
Site Admin
Posts: 4221
Joined: Fri Nov 24, 2000 12:16 pm
Contact:

Re: Qwak level editor

Post by Arcadian »

Wow, nice find! Awesome!
Please subscribe to the ABug YouTube channel!
tnash
Posts: 161
Joined: Mon May 02, 2022 9:56 am
Contact:

Re: Qwak level editor

Post by tnash »

Wonderful! Glad to have been the inspiration for this, I'll have a play this evening
User avatar
Cybershark
Posts: 736
Joined: Wed Jun 14, 2006 11:16 pm
Contact:

Re: Qwak level editor

Post by Cybershark »

tnash wrote: Fri Dec 01, 2023 1:17 pm Wonderful! Glad to have been the inspiration for this, I'll have a play this evening
Have been adding to it from time to time and have gotten up to 18 alternate levels now. Here's the current version:
Qwak_alt18.ssd
(200 KiB) Downloaded 17 times

Jamie's 4 unpublished levels are in there, alongside some original creations, and some levels that I created based on Amiga version levels. That game plays very differently though, so they're only loose "conversions".

Something fun I found that you can do is set the level block type to any of the games sprites, meaning you can create some pretty twisted layouts, such as this one:
qwakdoors.jpg

This means you could also create levels of fake fruit, or false spikes :twisted:
Post Reply

Return to “8-bit acorn software: classic games”