Sonic 2 Time Attack

Discussion in 'Staff Projects' started by redhotsonic, Nov 24, 2012.

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

    redhotsonic Also known as RHS Retired Staff

    Joined:
    Aug 10, 2007
    Messages:
    2,968
    Location:
    England
    Hello, guys. It's Sonic the Hedgehog 2's 20th birthday today! Whooo! (Well in Japan, it was 3 days ago, but where I come from, it's today) And to celebrate, I bring you...


    Sonic the Hedgehog 2 - Time Attack


    Note: To download this game and to skip the details, go near the bottom of this post, although I do advise you read this first.


    Sonic the Hedgehog 2 - Time Attack, AKA, Sonic 2 Time Attack, AKA, S2TA, is a hack of Sonic the Hedgehog 2. But as you may have guessed, it's a Time Attack edition. The object of the game is to play the regular levels/acts contained in Sonic 2, but to do it as fast as you can. Once you've past the signpost at the end of the level (or opened the Egg Prison), the timer will stop, and it may record your time. It depends if you were faster. I do know there is a Sonic 1 version of this done by Cinossu (which is a lot more advanced), but from my knowledge, no one has done a Sonic 2 version, so here I go.


    If it's your first time playing, then all levels/acts will have a Best Time of 9'59"99. So, on your first go on each level/act, no matter what you get, it will record it. You can then try to beat your new time, or move on. When you're on a level, the HUD will always display your Best Time, your current time, and the number of rings. If you beat your Best Time, it will record your newer time. If you do not beat it, it will not record it; simple.


    When starting the game, there are 3 options; Stage select (level select), Your Times menu, and Options. All these are accessible at any time during menus. The "Your Times" menu is where you can view all your best times between two pages (couldn't make them all fit to one page without it looking decently clear).


    Features

    • A new HUD that displays your Best Time, your current time, and number of rings.
    • A 10 second warning. When playing a level, if you're 10 seconds away from reaching your best time, a "ding-ding" will play every second until you either finish the level and beat that time, or go over the Best time (or die, or pause, whatever).
    • A fail sound, for if you failed to beat your best time. It will play as soon as the timer reaches/passes your best time.
    • A new "End of Level" results screen. It will play a "fail" sound if you failed to beat your Best Time. If you beat your Best time, it will record your new time and play a "whirl" sound to notify you of the change. (If you're lucky enough to get the exact same time as your best time, it will still play the "fail" sound)
    • Sonic with Tails as a sidekick as only character selection. Otherwise, I'll have too many times to record and too much space on SRAM.
    • The 10 Second Penalty. Because people could invite a friend to control Tails as a sidekick and help get a faster time in varies of ways, a 10 second penalty will apply if any button is pressed on Controller 2. A siren sound will play to warn you of your mistake (unless the jump button was pressed as that SFX has more priority, but the penalty will still apply). You can then keep control of Tails and the penalty won't apply another 10 seconds. Once the CPU has control of Tails again, the 10 second penalty can happen again, so don't press anything on controller 2 unless you want that penalty again.
    • Check-point mode; on or off. If off, there are no check-points. If you die in a level, the game will go back to level select screen. If on, there are check-points. If you die, you will restart from the last check-point you touched. Although, the timer will resume from when you died, and not from when you hit the check-point.
    • Super Sonic mode; on or off. If off, Sonic can never turn Super. If on, once you've collected 50 rings and jump, Sonic will turn Super. There are two separate time recordings for both modes; "Normal Sonic Times" and "Super Sonic Times".
    • Kill Me mode; on or off. If off, during gameplay, if you fail to beat your best time, you will hear the fail sound, but can continue to play the act. If on, during gameplay, if you fail to beat your time, you will hear the fail sound but will die instantly.
    • Mode Show. When you start a level/act, in the bottom right corner, it will briefly display what modes you have enabled. It will display if you have Check-points, Super Sonic, or Kill me on or off. It will then brush away to the right hand side.
    • Extra-lives have gone. There's no HUD for it, and no way of getting extra lives. The 1-up monitor has been replaced with blank monitors (as I didn't want to interrupt too much with gameplay by removing them). Extra-lives are pointless in this game. If you have Check-point mode off, you only have one life. If you have it on, you have unlimited lives.
    • Score has gone. Because this game is about getting a fast time, I took the Score HUD away. I need more HUD room for the centi-seconds (and for the World Record Time; which is not present in this build). The points art that comes out of badniks and bumpers have been removed.
    • SCZ and Special Stages removed. As you can't go faster than they already go, these were pointless (everyone's times would be the same practically).
    • WFZ and DEZ's ending slightly edited. So the "End of Level" results screen would still make an appearance.
    • DEZ is not playable with Super Sonic Mode on. Simply because, there are no rings.
    • Speed cap has NOT been removed. So the game plays more like the original Sonic 2.
    • Multiple bug fixes, which includes way to stop people cheating.
    • Centi-seconds added, which also hit every digit.
    • Exit out of level function. When playing a level, to get out, pause the game, then press A. The game will then exit the level and back to Stage Select.
    • Options menu changed. To add the new options; Check-Point Mode, Super Sonic Mode, and Kill Me Mode. They're all set to “off” at first. The changes you make here are saved to the SRAM, so when you next start the game, your options will be set to when you left them.
    • Level Select slightly edited. It will also tell you if you're in Normal Sonic Mode or Super Sonic Mode. Please note, in Super Sonic Mode, you cannot access DEZ.
    • Your Times Menu. A menu to display all your best times; Normal Sonic Times, Super Sonic Times and World Record Times (not accessible in this build).
    • Strike System added. Multiple checks every frame to see if you're cheating or not. If it suspects you've cheated, the game will lock-up and the "Game Over" jingle will play.
    • Save-State Denial System added. At any point, you can make a save-state. But, if you make a save-state in the middle of the level, you will NOT be able to load it. If you do, the game will instantly lock-up and the "Game Over" jingle will play. You can however make save-states in level select, etc, and still load them. However, if you do, when entering the level, the "Best Time" art may appear glitched, and it is never beatable. If this occurs, just reset the game.
    • S3K Priority Manager added, to speed the game up a little, due to the Strike System slowing the game a little.
    • Other speed ups and optimisations here and there.
    • SRAM protector. At the beginning of the game (before the SEGA), it checks the SRAM to see if you've edited it in any way. If not, the game starts. But if you have, you'll be presented with a red screen and the game just sitting there. At this point, with NO warning, all your times and save data will be erased. Reset the game, and the game will start up with all times back to 9'59"99. So do not try to edit your times in the SRAM file; THIS IS YOUR ONLY WARNING!
    • Lots of RAM addresses have been moved about and jumbled. To make hacking/cheating the game harder to pull off.
    • Lots of ROM data have been moved about and jumbled. To make hacking/cheating the game harder to pull off.
    • Delete Saved Data and Times option. To get to this, on the Title screen, highlight options, then hold A+B+C and press Start. You'll come to a screen, and it will ask you to confirm if you want to delete everything. If not, select no and press start, and it will go back to the Title screen. Otherwise, select yes. A picture of Dr. Eggman will appear and the "Game Over" jingle will play to signal all your data has gone and the game will lock-up. You then must reset the game to continue on. For security, if you come to this screen, "No" is already highlighted.
    • Replay data. Whatever level you play, it will always record your input (except controller 2). To play the replay, highlight the level and act you just played, Hold A+B+C and press start. It will play your replay (if you try playing the replay on another level, you will hear the fail sound). To exit replays, just press start. This is a WIP. The replays never start perfectly in-sync and therefor, things can go wrong.
    • World Record Times. These will show all the times from everyone. The idea is when you've made a best time, you submit it online. World Record times holds all the best for each level. Please be aware that this is not accessbile in this build.






    World Record time (future plan)


    In the future, the idea of this project is to share your best times to the world by sharing your records online. It is unknown as yet if the online times will be held on the "Retro Channel" or on a separate online database.


    The idea is that hopefully, this database will extract all your times from the SRAM, and then submit it to an online database, to see where you stand. This program will also "hopefully" extract the best time from each level/act and save it to your SRAM. Not as your time, but as the "World Record Time". Then in a future build, from the game, you can see the best times in the world by going to "Your Times" menu and picking "World Record Times".


    Three reasons why "World Record Times" isn't in this build:

    • It's still unknown if it'll be hosted on the Sonic Retro channel or on a separate database.
    • If "Retro Channel" is selected, then that needs to be completed
    • I wanted to get this game ready for Sonic 2's 20th birthday so ran out of time finishing this.





    Replays


    Recording your own replays in this game is easy; it's automatic. Play a level, and finish the level, and when you return to the level select, your replay data has been recorded. Hold A, B and C and press start on the level/act you just played, and it will replay it for you. The best thing about it is, you can save these replays and play it again later on! Replay data is held between RAM address $FFFFF100 - $FFFFF5FF. Once you've done a level and back to level select, rip the data between this RAM address and save it. That way, later on, you can re-insert this data back into $FFFFF100 and watch your replay again. Best of all, you can share your replay with everyone else!


    THIS IS A WORK-IN-PROGRESS, so please be aware of:

    • The replays are never in sync. This is the main bug. If you move straight away when recording, then replays are generally 1 frame behind (best I could get it). If you start recording late (don't move as soon as the title card moves out), replays can generally start early. This is the best I could get it. It's either this, or always have replays start late. Because it's never in-sync, replays can go wrong (generally when using platforms).
    • When you play replays, it will NEVER save your time. So don't think you can send a very fast replay to someone else giving them a fast time. They can watch it, but it will not record.
    • Be aware of CNZ prize slots and CPZ tubes, etc. These are random all the time. You could record a replay of going one way in the tube, but the replay shows you going another way, making the replay more than likely fail and out-of-sync.
    • Please be aware, if you enter the "Your times menu", your replay data held in $F100 will be gone; as "Your Times menu" uses this space also.
    • Entering options will also erase replay data.
    • To exit replays, press start.
    • Replays will only be recorded if you finish the level.
    • If you commit the 10 second penalty by pressing something on controller 2, you cannot create a replay
    • Replays will not be created if Check-point mode is on (unless you did not die).
    • For replay file, click here. Whilst you're on Stage select (make sure your in normal Sonic mode), load the data into $FFFFF100 and highlight EHZ1, hold A, B and C and press start. Watch my replay! With a time of 0'21"81




    If you try to cheat


    If you try to cheat, the game will lock-up and the "Game Over" jingle will play. But if the game locks-up and you believe you haven't done anything that you consider as "cheating" then please, take a screenshot and fill this little form in:



    Code:
    RAM address $FFFFFEDC ($XXXX word-length) =
    
    Check-point mode (on/off) =
    
    Level and Act number (XXZ1/XXZ2) = 


    Just submit your screenshot and form in this thread.


    If you're SRAM gets deleted (red screen) and you are 100% you did not tamper with the SRAM file, let me know immediately! This hasn't happened yet, but thought I'd mention, just in case.


    Emulators to use


    Kega is the best to use for this game. Regen is also good but it has the SRAM bug (with the emulator itself, not the game). I haven't tried any other emulator.


    DOWNLOAD


    Anyway, here is the ROM (compressed to ZIP or RAR, your choice).


    For ZIP file, click here


    For RAR file, click here


    For BIN file, click here


    25th November 2012

    • You could still do replays if you committed the 10-second penalty with Tails. It will now never record the replay if you commit the penalty.
    • Super Sonic art glitch fixed
    • When check-point mode was on, if you entered CNZ1/2, it would turn Check-point mode off, due to the CNZ slots. This has now been fixed.




    30th November 2012

    • There was a bug. With checkpoint mode on, if you hit a checkpoint then die, the game would lock up. Fixed.
    • It is now possible to soft-reset the game, so that way, you won't think you've "broken" the ROM. A Hard-reset is still preferable.
    • The door in CPZ2 is now fixed. It will no longer open for Tails (unless you have control of him). This means you can't cheat at the beginning of CPZ2.
    • The platform-through-lava glitch in MTZ and HTZ has now been fixed.
    • You can now collect your fallen rings when in the lava in MTZ and HTZ.
    • A change to recording replays with Check-point mode. If you die in checkpoint mode after hitting a check-point, replays will not record. If you don't die with checkpoint mode, it will. You must still finish the level though.
    • Savestate denial system slightly edited.
    • A few code changes here and there




    And



    and here are some screenshots, just in case you like to see before you try:

    [​IMG]


    [​IMG]


    ...which changes to...


    [​IMG]


    [​IMG]


    Now play the game and post your best times here (and screenshots) and compete with fellow members! Enjoy!


    Thanks


    Thanks to ValleyBell for testing the game and finding bugs. Also for helping me out with the SRAM protector.


    Thanks to SpirituInsanum for testing the game and finding bugs.


    To anyone who contributed to the SCHG on Sonic Retro or created any other bug-fixing guies anywhere; so I could fix the bugs in this game.


    And finally, everyone else, for playing and enjoying the game.
     
    Last edited by a moderator: Nov 30, 2012
  2. DJaftershock

    DJaftershock TWO-DEE-ECKS-GOLD Member

    Joined:
    Nov 20, 2012
    Messages:
    96
    Location:
    The United Kingdom
    The coolest thing about this hack for me was actually the amount of work and time you seemed to put in to make sure that no-one could get a 0'00'00 time by hacking a savestate. I love hacks that implement anti-cheating methods and this hack really reminded me of Sonic the Hedgehog: SAGE 2010 edition because of how similar the concept is. While SAGE 2010 seems to be a score-attack heavy hack though, this one is strictly speed-run only. What I was wondering is that since Retro Channel is a possibilty in this hack, do you also intend to add achievements for certain stuff?
     
  3. redhotsonic

    redhotsonic Also known as RHS Retired Staff

    Joined:
    Aug 10, 2007
    Messages:
    2,968
    Location:
    England

    Haven't thought about it, but probably not. As this game just concentrates on getting a fast time.


    Anyway, the game has been updated. Links are still the same. Just a few bug fixes:

    • You could still do replays if you committed the 10-second penalty with Tails. It will now never record the replay if you commit the penalty.
    • Super Sonic art glitch fixed
    • When check-point mode was on, if you entered CNZ1/2, it would turn Check-point mode off, due to the CNZ slots. This has now been fixed.




    THE GOOD THING IS that if you downloaded the old one, then you download this new one, your times should remain unaffected! Let me know immediately if not.


    DOWNLOAD


    For ZIP file, click here


    For RAR file, click here


    For BIN file, click here


    Cheers


    redhotsonic
     
  4. DJaftershock

    DJaftershock TWO-DEE-ECKS-GOLD Member

    Joined:
    Nov 20, 2012
    Messages:
    96
    Location:
    The United Kingdom
    The times all reset to 9"59'99, and there's a weird glitch on this version in Gens. I went to EHZ2 and decided I was gonna mess around with the savestate thing. The game locked up as I thought it would, so I reset. All I got was a white screen and static. I don't know if it's just Gens, but it's not going away and it's kinda creepy
     
  5. redhotsonic

    redhotsonic Also known as RHS Retired Staff

    Joined:
    Aug 10, 2007
    Messages:
    2,968
    Location:
    England
    Can you explain where you saved the savestate to?


    I just used Gens and played the old download, made a time in EHZ1 and 2. Downloaded newest one and both times are still there. Saved a state in EHZ2, went on, loaded it, game froze like meant to, resetted. Everything okay, times still there. No white screen or static.
     
    Last edited by a moderator: Nov 25, 2012
  6. DJaftershock

    DJaftershock TWO-DEE-ECKS-GOLD Member

    Joined:
    Nov 20, 2012
    Messages:
    96
    Location:
    The United Kingdom
    It was just a quick save, I ran to the end of the stage, beat Robotnik, stood to the left of the Egg Capsule thingeridunno then loaded it again. It froze WITHOUT playing the Game Over tune and that was the end of a working hack.
     
  7. redhotsonic

    redhotsonic Also known as RHS Retired Staff

    Joined:
    Aug 10, 2007
    Messages:
    2,968
    Location:
    England
    I cant create this glitch; even with gens. Delete the sram data then start again. The hack itself shouldn't be damaged.
     
  8. DJaftershock

    DJaftershock TWO-DEE-ECKS-GOLD Member

    Joined:
    Nov 20, 2012
    Messages:
    96
    Location:
    The United Kingdom
    Alright, the hack's fixed. I didn't know that you could delete the SRAM data, I thought that would give you the time-reset-red-screen thing.


    (And saying goodbye to half of my trial.)
     
  9. redhotsonic

    redhotsonic Also known as RHS Retired Staff

    Joined:
    Aug 10, 2007
    Messages:
    2,968
    Location:
    England
    UPDATE!


    DOWNLOAD


    The game was last updated on 30th November 2012.


    Anyway, here is the ROM (compressed to ZIP or RAR, your choice).


    For ZIP file, click here


    For RAR file, click here


    For BIN file, click here


    Fixed bugs in recent download:


    30th November 2012

    • There was a bug. With checkpoint mode on, if you hit a checkpoint then die, the game would lock up. Fixed.
    • It is now possible to soft-reset the game, so that way, you won't think you've "broken" the ROM. A Hard-reset is still preferable. ThisIsMyTaunt, this may be the reasoning for you thinking you "broke your ROM"?
    • The door in CPZ2 is now fixed. It will no longer open for Tails (unless you have control of him). This means you can't cheat at the beginning of CPZ2.
    • The platform-through-lava glitch in MTZ and HTZ has now been fixed.
    • You can now collect your fallen rings when in the lava in MTZ and HTZ.
    • A change to recording replays with Check-point mode. If you die in checkpoint mode after hitting a check-point, replays will not record. If you don't die with checkpoint mode, it will. You must still finish the level though.
    • Savestate denial system slightly edited.
    • A few code changes here and there



    AFTER DOWNLOADING THIS, YOUR SAVED TIMES SHOULD REMAIN UNAFFECTED. PLEASE TELL ME IMMEDIATELY IF YOU LOSE THEM


    Anyway people, I will post some of my times later on! Come on! Share your times by pictures now! And get them replays in! That's an order!


    EDIT:


    [​IMG]


    And here are two new replay files! Make sure you're on level select. Load the RAM data into $FFFFF100. Then go to EHZ1, hold A, B and C, and watch my Normal replay!


    Normal Sonic Replay on Emerald Hill Zone act 1 at 0'22"76


    Then afterwards, go to options and select Super Sonic mode. Load the next RAM data into $FFFFF100. Then go to EHZ1, hold A, B and C, and watch my Super replay!


    Super Sonic Replay on Emerald Hill Zone act 1 at 0'22"59


    Now, can you show you're better with a replay?
     
    Last edited by a moderator: Dec 1, 2012
Thread Status:
Not open for further replies.