From 2a52b21f8abb5d96415c957cbbbe812c8c89d51b Mon Sep 17 00:00:00 2001 From: Jeremy Rand Date: Wed, 20 Jan 2021 22:14:59 -0500 Subject: [PATCH] Fix bug where the flea sometimes would appear before the second level actually started. --- BUGS.md | 4 ++-- BuGS/globals.s | 2 ++ BuGS/level.s | 6 +++++- TODO.md | 3 +-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/BUGS.md b/BUGS.md index 6d57e58..77b1ba0 100644 --- a/BUGS.md +++ b/BUGS.md @@ -5,13 +5,13 @@ This is a list of the software bugs (as opposed to the bugs in the game that you * The sound is muddy at times on real HW. Especially when lots of stuff is going on, the sound ends up coming out garbled. This isn't happening on emulators where everything is always quite clear. Perhaps I am reaching some limit of the Ensoniq. Do I need to reduce some sampling frequencies perhaps? * I tried reducing the sampling frequency from 11025 for most of the samples to 5513 and I didn't notice any improvement in the quality of the sound on real HW. Nor did I notice any real degredation on real HW or on an emulator. -* The flea appears before the second level actually begins, in the time before the level starts if you have too few mushrooms at the bottom. This is due to the way that levels are incremented now in the game state machine. +* Sometimes a mushroom seems to appear out of nowhere. I usually see that happen in the middle of the playfield but I don't know if that is the only place that can happen. What makes it appear is something coming along and marking that tile as dirty and suddenly it is refreshed and the mushoom is visible. FIXED ======= - +* The flea appears before the second level actually begins, in the time before the level starts if you have too few mushrooms at the bottom. This is due to the way that levels are incremented now in the game state machine. Similar will probably happen also for the scorpion which randomly appears above a particular level. * It seems to be possible to both shoot and be killed by the spider in a single frame. Either the spider should be killed by the shot or the spider should kill the player but not both. * Based on the code, I don't think it is possible that this happened in a single frame. Instead, I think what is happening is that the spider is being shot and then goes through a small number of explosion frames. The colour used in those explosion frames were detected as a collision to the player. * I have changed the colours of the explosion to no longer be detected as a collision for the player. diff --git a/BuGS/globals.s b/BuGS/globals.s index 6fa1005..742cb27 100644 --- a/BuGS/globals.s +++ b/BuGS/globals.s @@ -173,6 +173,8 @@ numLives dc i2'0' dc i2'0' gameLevel dc i2'0' dc i2'0' +nextGameLevel dc i2'0' + dc i2'0' colourLevelNum dc i2'0' dc i2'0' centipedeLevelNum dc i2'0' diff --git a/BuGS/level.s b/BuGS/level.s index 3067592..3ca923c 100644 --- a/BuGS/level.s +++ b/BuGS/level.s @@ -18,6 +18,8 @@ level start levelInit entry stz gameLevel stz gameLevel+2 + stz nextGameLevel + stz nextGameLevel+2 stz centipedeLevelNum stz centipedeLevelNum+2 stz colourLevelNum @@ -35,6 +37,8 @@ levelStart entry jsl startSegmentSound ldy playerNum + lda nextGameLevel,y + sta gameLevel,y ldx centipedeLevelNum,y lda levelTable,x tax @@ -85,7 +89,7 @@ levelNext entry levelNext_skip anop sta colourLevelNum,x ldx playerNum - inc gameLevel,x + inc nextGameLevel,x lda scoreNum20000,x cmp #2 diff --git a/TODO.md b/TODO.md index 36e1745..fc46540 100644 --- a/TODO.md +++ b/TODO.md @@ -2,6 +2,5 @@ TODO ======= * Look at supporting a global high score list for systems with an Internet connection -* Implement the code for supporting a two player game * Look at supporting Versions in order to support automatic SW upgrades -* So much more. +* More ideas?