A curious little issue to watch out for in Sonic 2 hacks

Discussion in 'Discussion & Q&A' started by Pacca, Jul 13, 2019.

  1. Pacca

    Pacca Having an online identity crisis since 2019 Member

    Joined:
    Jul 5, 2014
    Messages:
    1,175
    Location:
    Limbo
    I recently encountered a very strange little "softlock" of sorts, which essentially traps the player and forces them to kill themselves to restart in Metropolis Zone act 2. It centers around this area here:

    [​IMG]
    Note how the signpost is very, very close to the lower level segment on the x axis.

    In my hack, in all variations of MTZ act 2 (including the untouched vanilla one), running from the left and jumping straight into the wall triggered the signpost art to load, corrupted the art of the lower spring, and locked the camera, forcing you to go to right. When your underneath the signpost in the rotating platforms segment, this traps you on the platforms, and the only way to leave is to die in the lava or time out, then avoid jumping straight into the wall again.

    In vanilla sonic 2, this doesn't occur, but will if you use debug mode to clip ever so slightly into the wall. That wall is literally right on top of where the game checks for the signpost to load and the camera to lock. So if your making a hack that preserves the original level layouts but increases the players speed and/or disables the midair speed cap, you might want to watch out for this one.

    Fixing it is easy; just go to "LevelSize:", and change MTZ2s' x end value from "$1E80" to "$1EA0". It pushes the boundary for the level to load far enough away from the wall to avoid the problem, but also doesn't push it back too much to be noticeable.

    EDIT: On another note, it might be related to the CD styled extended camera too. Either way, worth knowing.
     
    Last edited: Jul 13, 2019
  2. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,902
    Location:
    italy
    Hey, there still are people who got themselves locked above the last loop in HCZ2, so it's always good to put these informations out there.

    Also I still object to the "MTZ" acronym, why should it be "Me Tropolis" when the suffix "-polis" literally means "city" in Greek? If anything, it should be "MPZ", just like Sandopolis should be "SPZ", I don't get who invented those acronyms to begin with and why nobody else objects against them. But I digress.
     
    Bluestreak and Pacca like this.
  3. Pacca

    Pacca Having an online identity crisis since 2019 Member

    Joined:
    Jul 5, 2014
    Messages:
    1,175
    Location:
    Limbo
    I personally prefer MTZ because my hack also includes Marble Zone, and it'd be easy to mix them up otherwise. But again, we digress X3

    EDIT: Missed the other point last time I read. But I also recall Sandopolis being referred to as "SOZ"... I just go with the flow with these things...
     
    Last edited: Jul 13, 2019
    Bluestreak likes this.
  4. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
  5. pixieditzy

    pixieditzy Newcomer Trialist

    Joined:
    Jan 3, 2021
    Messages:
    3
    Location:
    United Kingdom
    Probably because of the way it's pronounced stresses the 'TRO' syllable rather than the 'PO' one, at least I feel like that sounds more natural to say in English.

    You bring up a really good point though seeing how Sandopolis is sometimes abbreviated SPZ. Maybe it just looks more natural in terms of abbreviating it depending on the preceding letter :p
     
  6. Joshwoakes

    Joshwoakes Active Sonic Hacker Member

    Joined:
    Jun 22, 2013
    Messages:
    131
    Location:
    UK, Birmingham, Moseley
    (In response to the top post)

    You also can fix and avoid issues like this by going to the level events code (a.k.a level resize code) and adding specific checks for Sonic's X and Y positions and then make the game load in the both the graphics and the signpost it's self into a reserved object ram slot or by copying what the game does to load a boss but with the signpost and then you can just remove or disable the normal end of level routine for certain levels that you do this for. By doing this, it makes so you don't have to have the signpost as a part of the object layout data and you could put the finish location anywhere in the stage and you could easily have parts of a stage that go under the where the signpost would be without the risk of false triggering the end of the level or triggering unwanted camera locks. However a down side to this, is that you will need to make sure the game will have enough time to load the signpost graphics and you can't have it visible straight away because of this.
     
    silvs64 likes this.