player graphic sticks around at old position when entering and exiting an explosion precisely

Found a bug in R'n'D? Report it here!

Moderators: Flumminator, Zomis

Post Reply
ncrecc
Posts: 321
Joined: Thu Jul 12, 2018 12:59 am

player graphic sticks around at old position when entering and exiting an explosion precisely

Post by ncrecc »

this tape for level 4 of niko böhm's tutorial ("bombs and dynamite") demonstrates a graphical bug at 0:32 where the old position of the player graphic is never cleared after precisely walking through an explosion. as expected trying to walk to this spot again afterward causes the space to be redrawn and the lingering player graphic to be cleared.
Attachments
004.tape
(364 Bytes) Downloaded 6 times
User avatar
Holger
Site Admin
Posts: 4427
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: player graphic sticks around at old position when entering and exiting an explosion precisely

Post by Holger »

First of all, thanks for reporting this graphical glitch, and for providing a tape that clearly demonstrates it.

I have reviewed it, and found that, in fact, it reveals not less than four graphical bugs, and up to two game engine bugs! :shock:

Besides from the obvious graphical bug reported here (the player graphics being stuck and not removed when the player walks into the explosion), the following other graphical bugs can be seen here (when using a self-compiled version of the game, you can press key "1" at tape position around 00:30 to play in slow-motion mode and see things in more detail):

- the field entered by the player where the explosion occurs is not drawn correctly if not empty (*)
- some explosion fields are drawn with different animation frames than other explosion fields
- one explosion field (where the player leaves the explosion) is cleared for a single video frame

(*) for this bug to be visible, replace the "empty" field with a "sand" or "grass" field

The bug from ncrecc's tape (player graphic gets stuck) only happens with exact frame timing, while some of the other bugs happen more often.

I have attached a very simple level and tape to easily demonstrate all four graphical bugs (and which easily enforces that exact timing using CEs triggered by the player at the exact time). Just start the level and keep the "left" and "down" keys pressed simultaneously.

Regarding engine bugs, it could be discussed if the player should be able to enter an explosion. This happens here because the player enters an empty field and is already moving when the bomb explodes. Therefore, the more important question is if the player should be able to leave the explosion again! Probably not! And usually he will just die in the explosion (just play the attached level with only pressing the "down" key, and the player will indeed die in the explosion).

But here, the player immediately leaves the explosion again (that is, the next field is again an "empty" field, but not an "explosion" field as it is the case when continuing to move down).

So, if the player finishes a move and is found at a field that explodes, he should most probably die. On the other hand, there are other edge cases where the player is able to leave an explosion (but in these cases the player was already moving when the explosion occurred).

As the case of "entering and leaving an explosion to a different direction" is really an edge case, possible only with frame-exact timing, I might just keep it (for backwards compatibility, for not making the game engine even more complicated, and maybe also simply for fun). :)
Attachments
057.level
(4.32 KiB) Downloaded 3 times
057.tape
(117 Bytes) Downloaded 4 times
Post Reply