When looking for collisions, treat the lowest collision as the one that counts. Before this, if you had two stacked mushrooms, it was possible to shoot through the mushroom below and "hit" the mushroom above. This happened because the first collision found was the one that the game handled. If the shot ended up being draw across both mushrooms, then the upper mushroom would record the collision. Now, the collision we care about most is the lowest one which should ensure that the bottom mushroom records to collision always with stacked mushrooms. This is similar to the "shoot through a partial mushroom" problem but is restricted to just when the mushrooms are stacked.

This commit is contained in:
Jeremy Rand 2020-12-26 15:03:29 -05:00
parent 3f0578d142
commit cdded307f9
2 changed files with 0 additions and 4 deletions

View File

@ -3,7 +3,6 @@ BUGS
This is a list of the software bugs (as opposed to the bugs in the game that you shoot) that still need attention:
* I have seen some mushrooms appear suddenly. Sometimes, if I am shooting, the shot "hits" an invisible mushroom which then becomes visible. My guess is that there is something wrong with the code which turns a centipede segment into a mushroom when shot and the tile isn't correctly marked dirty all the time.
* In theory, there shouldn't be a collision with an invisible mushroom but what happens is that when the shot overlaps with the tile, it becomes dirty. At that point, the mushroom will appear on the next frame and a collision can then occur.
* It is possible to shoot between two segments of a centipede. The problem is that there are black pixels between the segments and if things are timed just right (or just wrong), the shot can slot in at those black pixels and end up missing both segments.

View File

@ -705,8 +705,6 @@
macro
_collision &mask,&addr
ldy collision
bne _alreadyCollided_&SYSCNT
tax
and &mask
beq _noCollision_&SYSCNT
@ -717,5 +715,4 @@
sta collisionAddr
_noCollision_&SYSCNT anop
txa
_alreadyCollided_&SYSCNT anop
mend