How to add + 2 acts in sonic 2 levels?

Discussion in 'Discussion and Q&A Archive' started by Tornado, Feb 7, 2010.

Thread Status:
Not open for further replies.
  1. Tornado

    Tornado Active Member Member

    Joined:
    Dec 1, 2008
    Messages:
    30
    Location:
    Hydrocity - Angel Island
    How do I expand the number of acts in each zone? I want to leave them with 4 acts as in Sonic 1 without having to use another level ID to load the acts 3 and 4. Can anyone help me? :(
     
  2. EMK-20218

    EMK-20218 The Fuss Maker Exiled

    Joined:
    Aug 8, 2008
    Messages:
    1,067
    Location:
    Jardim Capelinha, São Paulo
    Do a check for the art, and make every Act 4 to load another Titlecard art. Editing the number 3 according the other numbers. The routine must check if is the act 4 loaded for load the other art. This is what i made in my hack. I didn't have expanded the art. I just made it to load another art with the 4 instead of the 3.
     
  3. Thorn

    Thorn wroar Member

    Joined:
    Aug 11, 2007
    Messages:
    70
    You'll want to create a duplicate index for things such as level layout and object position, and particularly what level to load. Have it so that when Sonic clears an Act 2 in the first index, a flag is set and the next level is set to Act 1 of what you just did... but since you're now using alternate indices, you're actually loading a new level. Be sure that level events related to the boss only load in the second index, and have new title card number art and mappings for when that flag is set to make 3 and 4 appear instead of 1 and 2.


    EDIT: eduardo, you forgot that Sonic 2's indices are two entries long per zone, not four. :( It's a bit deeper than that.~
     
    Last edited by a moderator: Feb 7, 2010
  4. EMK-20218

    EMK-20218 The Fuss Maker Exiled

    Joined:
    Aug 8, 2008
    Messages:
    1,067
    Location:
    Jardim Capelinha, São Paulo
    But the Sonic 2's Default titlecard already have the number 3.
     
    Last edited by a moderator: Feb 7, 2010
  5. Thorn

    Thorn wroar Member

    Joined:
    Aug 11, 2007
    Messages:
    70
    ^ Right, but in the code, Metropolis 3 (the only place where the 3 is used) is actually the first act of a separate zone slot that simply shares most of its data with the slot before it. So in all honesty, I suppose he could use the original art and mappings for the first three acts of each level and then load a new set for the fourth, but the fact that he'll have a flag set when the back two acts are used means that it would be simpler to check that one flag for "is the current act in the alternate index?" than it would be to check two flags for "is the current act in the alternate index?" and "is this Act 2 of this zone in that index, i.e. Act 4?". All that would have to be done would be to pull the art and mappings for the 3 from the original file to his new one that also contains a brand new 4. This also alleviates the concern of guessing how much VRAM is available, because a file with 3 and 4 will take up less art space than the original file with 1, 2, and 3 no matter what.
     
  6. EMK-20218

    EMK-20218 The Fuss Maker Exiled

    Joined:
    Aug 8, 2008
    Messages:
    1,067
    Location:
    Jardim Capelinha, São Paulo
    Technically this is what i told him to do. :(
     
Thread Status:
Not open for further replies.