sonic 2 More Levels in Level select, and Tails can FLY

Discussion in 'Discussion and Q&A Archive' started by warr1or2, Dec 5, 2011.

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

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    417
    Location:
    Town Creek, AL
    How do I add Levels to Sonic 2's stage select? the only thing I managed is going to the Level Select's Sound Test, pushing Start takes you to a level (Scrapped the corrupt level and went to a MAZE level). Also am trying to give tails the ability to Fly.



    but only made him do an extra jump with the Flight Animation. I used a guide on how to add the jumpdash to sonic 2, erasing parts of the code to get it to work, as well as changing velocitys.
     
    Last edited by a moderator: Dec 13, 2011
  2. Dark Lips

    Dark Lips Well-Known Member Member

    Joined:
    Nov 14, 2008
    Messages:
    293
    Location:
    Wolverhampton UK
    This is a very good question that I would like to know too? any ideas guys?
     
  3. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    417
    Location:
    Town Creek, AL
    [​IMG] Great. When adding a Super Tails, I had to cancel some of Tails_Fly code to get Tails_Super to somewhat work even with some of it's code cancelled. i have all of the code in, it gives me this. Do I have to change something in the S2.Macro.asm file or something so I can have ALL of it's code there?
     
  4. Dark Lips

    Dark Lips Well-Known Member Member

    Joined:
    Nov 14, 2008
    Messages:
    293
    Location:
    Wolverhampton UK
    The Short jump distance warnings are due to having code jump to a label that directly follows it... its bad program flow so try not to do it if possible and if you must do it use a NOP as a spacer/filler. The best way to check for tails flight and super tails would be to have a check in tails jump height that checks for super and if not super check for tails flight... at least thats how I have done it in my Sonic 1 hack.
     
  5. DanielHall

    DanielHall Well-Known Member Member

    Joined:
    Jan 18, 2010
    Messages:
    860
    Location:
    North Wales
    I think I know what the problem is. Replace the .s branches with .w


    Or, use NOP as filler between them. I think they use the same amount of space, it's just down to preference.
     
    Last edited by a moderator: Dec 7, 2011
  6. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    The biggest question in this topic really is what on earth is wrong with the rings counter? =P


    As for making Tails fly, you can use Sonic 3 for help. It may also help you get Tails to carry other characters.
     
  7. Dark Lips

    Dark Lips Well-Known Member Member

    Joined:
    Nov 14, 2008
    Messages:
    293
    Location:
    Wolverhampton UK
    That is exactly what I have done... it took some experimentation but after changing some of it to the s2 counterparts and plenty of testing I got it working.
     
  8. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    417
    Location:
    Town Creek, AL
    Cheat Engine used for testing purposes.


    And what about taking sound from sonic 3's music binary to load the correct sound, or at least make the sound in use in the video to repeat.

    I'll give that a shot. haven't really thought of using NOP as a filler (have seen it but didn't know it's use.)


    though still wondering about the level select. (Currently working on EHZ1 as normal at the moment, EHZ2 which is somewhat of a replica of EHZ1 but different layout in which i'm currently working on, EHZ3 which is a replica of EHZ2, and EHZ4 which is EHZ2, and want to add them to level select)
     
    Last edited by a moderator: Dec 8, 2011
  9. amphobius

    amphobius spreader of the pink text Member

    Joined:
    Feb 24, 2008
    Messages:
    970
    Location:
    United Kingdom
    As for Tails flying, you should take a look at Sonic 3K's disassembly and see how it does it. Modifying a jump-dash code isn't going to help at all.
     
  10. SpirituInsanum

    SpirituInsanum Well-Known Member Member

    Joined:
    Feb 11, 2010
    Messages:
    642
    Why not? Set a status bit somewhere on the double jump, when it's set, make a branch in the falling routine with lower falling acceleration and check if a button as been pressed again, reset on floor and wherever it's necessary, and it's roughly done. There are ways to optimize it better and several things to tweak, especially for collisions, but it can definitely work.
     
  11. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    I've already said that, except replace S3K with S3 =P

     
  12. Dark Lips

    Dark Lips Well-Known Member Member

    Joined:
    Nov 14, 2008
    Messages:
    293
    Location:
    Wolverhampton UK
    Hi there, this is a related question hence not making a new thread... so anyway I have been experimenting with adding stuff to the empty zone slots in sonic 2 the only problem is I dont know what ID number is assigned to which slot for example I have looked at the list in the s2 level select order code and the level order playlist and there are id's like $200 and $201 I hae tried changing these randomly but I just keep getting crap versions of existing levels.



    Code:
    
    Misc_9454:
    
    dc.w  0	  ; 0 Emerald Hill 1
    
    dc.w  1 ; 1 Emerald Hill 2
    
    dc.w  ????	  ;  add my new zone here ???	  
    
    dc.w  $D00 ; 2 Chemical Plant 1
    
    dc.w  $D01 ; 3 Chemical Plant 2
    
    dc.w  $F00 ; 4 Aquatic Ruin 1
    
    dc.w  $F01 ; 5 Aquatic Ruin 2
    
    dc.w  $200	  ; 6 Wood Zone 1
    
    dc.w  $201	  ; 7 Wood Zone 2
    
    dc.w  $C00 ; 6 Casino Night 1
    
    dc.w  $C01 ; 7 Casino Night 2
    
    dc.w  $700 ; 8 Hill Top 1
    
    dc.w  $701 ; 9 Hill Top 2
    
    dc.w  $B00 ; 10 Mystic Cave 1
    
    dc.w  $B01 ; 11 Mystic Cave 2
    
    dc.w  $800	  ; 12 Hidden Palace 1
    
    dc.w  $801	  ; 13 Hidden Palace 2
    
    dc.w  $A00 ; 12 Oil Ocean 1
    
    dc.w  $A01 ; 13 Oil Ocean 2
    
    dc.w  $400 ; 14 Metropolis 1
    
    dc.w  $401 ; 15 Metropolis 2
    
    dc.w  $500 ; 16 Metropolis 3
    
    dc.w $1000 ; 17 Sky Chase
    
    dc.w  $600 ; 18 Wing Fortress
    
    dc.w  $E00 ; 19 Death Egg
    
    dc.w $4000 ; 20 special
    
    dc.w $FFFF ; 21 Sound Test
    
    
    [/CODE]
     
    Last edited by a moderator: Dec 10, 2011
  13. Spanner

    Spanner The Tool Member

    Joined:
    Aug 9, 2007
    Messages:
    2,570
    1 - Lev01


    2 - WZ


    3 - Lev03


    8 - HPZ


    9 - Lev09


    In order to use these levels properly you'll need to change the art, collision and level data. You should be able to find those things easily.
     
  14. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    417
    Location:
    Town Creek, AL
    This might help me with the level select loading deal...

     
    Last edited by a moderator: Dec 15, 2011
  15. Dark Lips

    Dark Lips Well-Known Member Member

    Joined:
    Nov 14, 2008
    Messages:
    293
    Location:
    Wolverhampton UK
    I am going to take a step by step look at the level select to see how I can add to it - I know how to change the existing entries so I can make ehz load any level slot i like but thats only good for while i am testing and not a long term soloutin. Does anybody hae any ideas about what part of the level select code needs studying?
     
  16. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    417
    Location:
    Town Creek, AL
    First off Misc_9454: Is only level select pointers code. I used this code when having the sound test load my EHZ maze which is dc.w $FFFF ; 21 Sound Test. I changed it to dc.w $100 on the sound test. adding another between levels, example dc.w 1 ; 1 Emerald Hill 2


    dc.w ???? ; add my new zone here ???


    dc
    .w $D00 ; 2 Chemical Plant 1


    it would only make a "bump" to say. in other words, chemical plant 1 would load lvlA1 and ARZ loads CPZ. tried it myself. which is why i'm wondering on adding levels to the level select. (I only copy pasted from another disassembly to get WZ and HPZ to load.
     
  17. Dark Lips

    Dark Lips Well-Known Member Member

    Joined:
    Nov 14, 2008
    Messages:
    293
    Location:
    Wolverhampton UK
    It would seem that we would need to make new mappings for the text we want and then use the above method to make the new selection take us to the selected level... in order to do this we need to figure out how to make the levelselet routine know we have added new text and a new pointer to the new level.
     
  18. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    417
    Location:
    Town Creek, AL
    dc.w $FFFF ; 21 Sound Test (Lips2k8, change this or any act 2 to load your level for right now. You may be right on the whole routine ordeal. Maybe i'll look at it myself)
     
Thread Status:
Not open for further replies.