Monday, December 11, 2017

Sonic Eraser

Following up on the topic of Hydrocity Zone's water jets, there's something that's always bugged me. Just before you're flung up in the air by a vertical jet, it sends you through one of these: a translucent white tube that crosses over another path through the stage.


These things are level chunks, and they're usually flanked by collision change objects that set Sonic's priority flag. This is because the level blocks themselves have their priority flag set too, presumably so they overlap Sonic as he rides up the tube. Using debug mode to avoid the collision change object shows how this would look.


However, for some unfathomable reason, once the vertical water jet object spawns, it sets both Sonic and Tails' current animation to $1C:
    move.b  #$1C,($FFFFB020).w
    move.b  #$1C,($FFFFB06A).w
    move.l  #loc_30338,(a0)
So what does animation $1C do? It simply displays mapping frame 0 for 120 frames, or two seconds. Mapping frame 0 is a blank frame which is usually reserved for when the player is blinking from having taken damage.
byte_12C15:     dc.b  $77,   0, $FF
In other words, right before Sonic goes through the tube, the water jet makes him invisible for two seconds, completely destroying the point of making the tube translucent and giving it high priority.


I have no explanation for this; the event appears to play out fine if you remove the offending lines of code. Maybe there was a bug here that was hastily covered up, before being fixed properly?

6 comments:

  1. I do see that Sonic disappears a bit before entering the tube.

    ReplyDelete
  2. might be to cover up the fact that the characters can awkwardly poke out of the tube sometimes

    ReplyDelete
    Replies
    1. It later occurred to me that they did it to hide the player's shield/invincibility stars for some reason.

      Delete
  3. I know this is an old post, but mapping frame $00 isn't used for blinking when you're hurt, Sonic literally just doesn't draw at all during blinking, as can be seen in Sonic_Display:

    ReplyDelete
  4. like its a shame that sonic dissapers enturing the tube if its gonna do that at least have a up date where it dosen't do that

    ReplyDelete