What's wrong with ZX-Nibbler?

General games-related topics
User avatar
XavSnap
Posts: 1941
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: What's wrong with ZX-Nibbler?

Post by XavSnap »

Hi JohnsBargs,

Greet job !
Last edited by XavSnap on Sat Aug 12, 2023 4:23 pm, edited 2 times in total.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
JohnsBargs
Posts: 169
Joined: Fri Oct 19, 2018 2:22 am

Re: What's wrong with ZX-Nibbler?

Post by JohnsBargs »

XavSnap wrote: Sat Aug 12, 2023 3:09 pm Hi JohnsBargs,
Good job !

Score/bonus fixed :
ZX-NIBBLER-EN.P
Still broken here, cleared Area 1 and my score is still a mess and there's some leftover garbage at bottom right :(

ZX-NIBBLER-230812-142311.png
Last edited by JohnsBargs on Sat Aug 12, 2023 3:35 pm, edited 1 time in total.
JohnsBargs
Posts: 169
Joined: Fri Oct 19, 2018 2:22 am

Re: What's wrong with ZX-Nibbler?

Post by JohnsBargs »

This is my best version so far. Cleaned up the front end a bit but the score still seems to get broken when you beat the 8th stage and I can't work out why.

ZX-NIBBLER JB1.P
(13.83 KiB) Downloaded 107 times

But no garbage on bottom right at least.

ZX-NIBBLER-230812-145046.png

The code is just a big inexplicable jumble of stuff from line 9505.

code9505.jpg

It looks like that's meant to be the title screen, but if it's the title screen then why is there a bonus count going on in the middle of it? It makes more sense if it's a reward screen for beating the 8 stages (that would be when you get the big bonus), but in that case why does it lead on to the instructions screen? Something's gone very screwy. If I edit the "60000" part of line 9505 the whole game crashes. (I can blank out "BONUS" safely with spaces, but not the "60000".)
Last edited by JohnsBargs on Sat Aug 12, 2023 3:52 pm, edited 1 time in total.
User avatar
XavSnap
Posts: 1941
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: What's wrong with ZX-Nibbler?

Post by XavSnap »

Code: Select all

  1002 PRINT AT I,0;"                                "
:oops:

The main problem on the bonus and the scrore, in the ASM routine is due to the buffer located on the screen !
The ASM add or subtract the decimals directly on the screen.
If the screen is empty, the character code will be zero, not CODE "0" .
Last edited by XavSnap on Sat Aug 12, 2023 4:28 pm, edited 1 time in total.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
JohnsBargs
Posts: 169
Joined: Fri Oct 19, 2018 2:22 am

Re: What's wrong with ZX-Nibbler?

Post by JohnsBargs »

My latest version with line 1002 fixed:

ZX-NIBBLER JB2.P
(13.83 KiB) Downloaded 108 times

So, we beat eight stages and we get to here:

code1000.jpg

The screen is cleared, the level (Area) number is increased and we go back to the main game loop with the first maze:

code100.jpg

But somewhere - presumably in all those POKEs - the score has been screwed up. It looks like there ISN'T supposed to be an extra bonus for clearing a whole area, so the big bonus must be for clearing all six areas.

But how do we stop the score being wrecked? Line 1000 shows it's only meant to clear the lines BELOW the score, so where's it getting blanked? My CLS is at line 1120, after the POKEs. Gonna try removing it and see what happens.
User avatar
XavSnap
Posts: 1941
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: What's wrong with ZX-Nibbler?

Post by XavSnap »

:D

Yes, i removed all your CLS in my update!!!

:mrgreen:
Attachments
ZX-NIBBLER-EN.P
(13.65 KiB) Downloaded 111 times
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
JohnsBargs
Posts: 169
Joined: Fri Oct 19, 2018 2:22 am

Re: What's wrong with ZX-Nibbler?

Post by JohnsBargs »

Yep, my version worked too :D

ZX-NIBBLER JB3.P
(13.8 KiB) Downloaded 115 times

So the only difference now is the startup. Mine starts with the instructions screen, your version starts with the title/bonus screen, and I'm not sure either of us is quite right. What is the 60,000 bonus for? It must be for beating all six levels, but then why is it tied up in the title screen and what happens then? I'm not sure I have the skill to beat 48 stages to find out :D
User avatar
XavSnap
Posts: 1941
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: What's wrong with ZX-Nibbler?

Post by XavSnap »

:lol:

No, it's used to count the worm location on the screen.
Better to save after the screen generation, we save display time at start up.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
JohnsBargs
Posts: 169
Joined: Fri Oct 19, 2018 2:22 am

Re: What's wrong with ZX-Nibbler?

Post by JohnsBargs »

Okay, here's a final unified version - have tweaked a couple of bits and the title screen now says "BOOTING", arcade-style, rather than "BONUS", because "BONUS" makes no sense when you've just loaded :D

ZX-NIBBLER-FINAL.P
(13.74 KiB) Downloaded 114 times

I still want to see if I can make it centre better (now that I know we have to leave the position of the scorelines alone), but that can wait for another day. We fixed it! Now Nibbler is the game it should have been all along! :D
JohnsBargs
Posts: 169
Joined: Fri Oct 19, 2018 2:22 am

Re: What's wrong with ZX-Nibbler?

Post by JohnsBargs »

JohnsBargs wrote: Sat Aug 12, 2023 5:23 pm I still want to see if I can make it centre better (now that I know we have to leave the position of the scorelines alone), but that can wait for another day.
Proof of concept working, though :)

nibblec.jpg
Post Reply