don't click here

Sonic VR

Discussion in 'Engineering & Reverse Engineering' started by ColinC10, Sep 18, 2011.

  1. MarkoMan

    MarkoMan

    In memory of Dreds... Member
    294
    0
    0
    Queens, NY
    Sonic 2 Turbo
    Well, with the TAS up, I guess my suggestion to make a timer that counts up instead of down in terms of ranking is too late...

    Wow @ multiple choice. I figured out the bottom path easy, but it has never occurred to me ever that Sonic can't be crushed by jumping... amazing detail.

    Now, I can beat this.
     
  2. Tamkis

    Tamkis

    Banned
    116
    0
    0
    Pennsylvania
    Megaman 2: The Robotnik Wars, Unnamed S3&K hack
    You know, I kind of figured that your base game engine was Sonic 1 & 2, since one of the levels had a sonic 2 enemy from WFZ and Sonic 1 elements :).

    Great hack as always, ColinC10! I really liked how you used many elements from Sonic 1 & Sonic 2 in one level, something I've always wanted to see. Multiple choice was hard, and High Jump was even harder (still haven't completed it). That's the only level I have left to complete. The Music selection is catchy and appropriate, as well as the backgrounds. Good luck competing against Flamewing for the Best Hack Trophy in the contest.

    BTW, have you or anyone else have tried this hack on real hardware with a flashcart? I'm really curious as to see if it would work, what with the ROM using streamed PCM music and being 6MB in size.
     
  3. Sik

    Sik

    Sik is pronounced as "seek", not as "sick". Tech Member
    6,718
    1
    0
    being an asshole =P
    Considering most flashcarts cap at 5MB, nope, it wouldn't, just because of the cartridge. This is because mapper support in flashcarts is only enough to get Super Street Fighter 2 running and nothing more (this also means that bank switching only works in the last two pages).
     
  4. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,971
    76
    28
    USA
    rom-properties
    The 512 KB code limitation is actually due to an error in Gens, and isn't a limitation in hardware. The problem in this case is that Starscream (Gens' 68000 emulator) has two fetch functions: one for instruction fetch and one for data fetch. The data fetch function is properly managed by Gens' SSF2 mapper, but the instruction fetch function is not. Hence, if you have any banks swapped out, executing code there will act like the bank isn't swapped, which can cause weird issues. (I recommended the first 512 KB because that's guaranteed to not be swapped.)

    I will eventually fix this limitation in Gens/GS II. I don't think Kega or Regen have this issue, and the real system obviously doesn't.

    If you end up putting code in a swappable area, that's fine. It'll break on older Gens, but it'll give me a test case to fix the SSF2 instruction fetch mapping in Gens/GS II. :)

    (tl;dr version; if you execute code in a ROM bank that's been swapped with another bank, it will break on Gens and most Gens derivatives, but should work on Kega, Regen, and actual hardware.)
     
  5. Sik

    Sik

    Sik is pronounced as "seek", not as "sick". Tech Member
    6,718
    1
    0
    being an asshole =P
    Nope, but Regen won't be able to run the hack properly anyways since it only allows 5MB instead of 6MB. In fact, I don't know if it's still hardcoded to Super Street Fighter II (I got AamirM to add support for that S3D hack that used the mapper, but that required a custom build and I don't know if the changes made their way into the current version). If that's the case then the mapper won't work with anything but that ROM, period.
     
  6. Mr. Mash

    Mr. Mash

    All fanbases are awful Member
    1,440
    0
    0
    drawing
    I can't do the high jump :(
     
  7. ColinC10

    ColinC10

    Tech Member
    Great, thanks for the explanation. Here's a memory map of Sonic VR, taken straight from my notes. As you can see, I didn't manage to fit all the code into the first 512KB (bank 0). However, my "music playing area" is in banks 1-3, so these are the ones that get swapped in and out. The rest of the game code comes after this in bank 4, so I don't think I'll actually hit this issue. Is that right?

    Code (Text):
    1.  
    2. ;0          0x000000 - 0x07FFFF Sonic 2 code, Sonic VR sound driver, art & 01_mermaid
    3. ;1  0xA130F3:   0x080000 - 0x0FFFFF 01_mermaid
    4. ;2  0xA130F5:       0x100000 - 0x17FFFF 01_mermaid
    5. ;3  0xA130F7:       0x180000 - 0x1FFFFF 01_mermaid
    6. ;4  0xA130F9:       0x200000 - 0x27FFFF Sonic 1 objects, Sonic VR code, art & 03_mess
    7. ;5  0xA130FB:       0x280000 - 0x2FFFFF 03_mess
    8. ;6  0xA130FD:       0x300000 - 0x37FFFF 03_mess
    9. ;7  0xA130FF:       0x380000 - 0x3FFFFF 00_helix_nebula
    10. ;8          0x400000 - 0x47FFFF 00_helix_nebula
    11. ;9          0x480000 - 0x4FFFFF 00_helix_nebula & 02_blackout_city
    12. ;A          0x500000 - 0x57FFFF 02_blackout_city
    13. ;B          0x580000 - 0x5FFFFF 02_blackout_city
    14.  
    By the way, if anybody's considering using bankswitching in their own hack, it's really easy to do (although it doesn't seem to be well documented online for some reason, which is why I'm mentioning it here). The ROM is divided into 512KB banks, so a ROM with the maximum size of 4MB will have banks 0-7. These are represented by the odd numbered 0xA130F# registers you can see above. If I want to get to banks 8-$B (the remaining four banks between 4MB and 6MB), I just move the bank number that I want to access into the register that corresponds to the address range I want to use to access it. For example, to play track 0 - Helix Nebula, I just do this:

    Code (Text):
    1.         move.b  #7,($A130F3).l
    2.         move.b  #8,($A130F5).l
    3.         move.b  #9,($A130F7).l
    4.  
    And then tell the sound driver to start playing from address 0x080000. Simple!

    The register 0xA130F1 doesn't appear on the list above because the first bank can't be switched. However, if you've used SRAM in your hack you'll have seen it before. That's because it's used for a slightly different type of bankswitching - setting a 1 here will cause the address range 0x200000-0x3FFFFF to represent RAM instead of ROM, allowing you to write values here to be saved in SRAM. Set 0xA130F1 back to 0 to have this address range behave as normal again.
     
  8. Sik

    Sik

    Sik is pronounced as "seek", not as "sick". Tech Member
    6,718
    1
    0
    being an asshole =P
    http://emudocs.org/Genesis/ssf2.txt

    Explanation is wrong. Bit #0 sets whether ROM is visible (clear) or RAM (set), bit #1 sets whether RAM is writeable (clear) or not (set).
     
  9. TheBarAdmin

    TheBarAdmin

    Member
    107
    0
    16
    Impressive.

    The main concept behind this is original and fun! The way you set up the level gimmicks and play around with the physics is very creative (and I assume these are all from sonic 1 and 2 so far). This could serve as inspiration to make more varied and fun level designs. =)
     
  10. ColinC10

    ColinC10

    Tech Member
    Yes, I did find that file eventually, hence why I've directly copy/pasted some of my notes above from it. And not mentioning the write-protect functionality doesn't make my explanation "wrong", just "simplified"! :rolleyes:
     
  11. Shade Vortex

    Shade Vortex

    The Black Vortex Member
    567
    40
    28
    USA, WA.
    Twitch Streams
    This is actually a pretty novel idea, and it has a good difficulty curve to it. Starts out basic, and gets more complicated pretty much each mission. It's made me actually think about how to accomplish some of them, so it's definitely teaching me to play it in ways I probably never would have thought of playing Sonic games or levels in. I like how the missions basically require extensive knowledge of how to abuse the physics to your advantage, especially stuff like high jump- I didn't even think I'd be able to do something like that, had it not been for this hack.

    Great job, I commend you for your efforts. This does get frustrating at the end though, so it's great for those who love a challenge.
     
  12. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,971
    76
    28
    USA
    rom-properties
    Yeah, it looks like it shouldn't hit the Gens limitation.
     
  13. nineko

    nineko

    I am the Holy Cat Tech Member
    6,298
    475
    63
    italy
    Why this hack didn't have a wiki page yet is beyond me.
    Sonic VR
     
  14. Jaseman

    Jaseman

    The programmer has a nap! Hold out! Programmer! Member
    954
    1
    18
    I love this hack (but the last world is kicking my ASS) but I do have one thing to note: Doesn't boot on Gensoid on Android (my phone is my primary Genesis emulator). I'd imagine this has something to do with the bankswitching, but thought it was notable.
     
  15. Sonic 65

    Sonic 65

    Tech Member
    This is some awesome stuff, man. It's probably the best "bite-sized challenge" type game I've played, actually (including commercial titles like Super Meat Boy). I love the use of level gimmicks, how manipulating the physics is integrated into level design, how the game turns things that you would just casually dismiss in a regular Sonic game (like Buzz Bombers) into legitimate threats...it's just really clever overall. The Anamanaguchi music is a cool touch too but Helix Nebula should have been last instead of first. =P

    I still can't figure out that god damn High Jump, though. It's that and the last level left.
     
  16. qiuu

    qiuu

    Tech Member
    144
    9
    18
    Blue Ball & Blocks
    I'm a bit late to the party, only now trying out the recent releases, but anyway...
    I tend to enjoy experimental hacks, and this one was no difference, especially as I like to play some hardcore platformer every now and then. The 'digital' art together with the music gave it a very nice athmosphere.

    I think this is the kind of project I'd enjoy doing as well, so I can totally understand your sentiment. It allows for a lot more experimentation and creativity than something like, say, Sonic 1 and 2, which was pretty goal-oriented and I can imagine partly tedious to do. Here you got some programmer art (simple but aesthetic), spiced up with nice visual effects, and then you can get going trying out whatever you feel like. And I also enjoyed playing this a lot more than Sonic 1 and 2, which, while technically more impressive due to the sheer amount of work that had to be put into it, doesn't have much new and interesting content to offer to me. I wonder what kind of hack you're gonna come up with next yeah, I wouldn't mind something in the same spirit. :)

    The only level which I found a bit frustrating was the last one, because my success rate at hitting the 8 pixel platform and not getting flung into the spikes by the red springs wasn't too good, so I had to repeat the first sections a lot. Apart from a few like precision platforming, most levels were pretty nifty where the solution wasn't just executing a couple of obvious moves, but finding some way to doing it that isn't overly difficult to execute. The penultimate level turned out surprisingly simple once I started using the spindash, almost felt kinda cheap doing it.
    I think the one downside of using the Sonic engine for this that comes with everything being rather macroscopic (I.e. large on the screen, thus not much fitting within the screen) is that you don't always see where you're going, especially when going downwards, which turned the part with the springs and the spikes at the ceiling into a bit of a guessing game.
     
  17. DustArma

    DustArma

    Member
    1,337
    10
    18
    Santiago, Chile
    Learning Python.

    I noticed that too as I posted earlier, it causes Gensoid to crash and it likely won't get fixed on the emulator side, AFAIK Gensoid's development is dead, it was pulled from the market and the last time it was updated was around April I think.

    If you have a powerful device (1GHz+) get GenPlusDroid on the market, it's free and is far more accurate than Gensoid.
     
  18. Mr Lange

    Mr Lange

    A wise guy eh. I know how to DEAL with wise guys. Member
    1,286
    11
    18
    The Land of Waldos
    Sonic Utopia, Sonic Overture
    I absolutely love this hack and everything about it. I was disappointed in not finding anything after completing the game.
    Who did the music for this? Nevermind, first page has the answer.

    Also if there are any interests in continuing this hack, I'd love to develop more levels for it. I have... ideas... *rubs hands maniacally*
     
  19. ColinC10

    ColinC10

    Tech Member
    Hi qiuu, good to hear from you. When making Sonic 1 and 2 I had an Excel spreadsheet with a list of tasks and estimated durations on it - that fact alone should give you some idea of how enjoyable it was. Having said that though, I always saw that project as a stepping stone to other things, rather than a finished product. I ran out of time to do much more with the first version so I had to release it in the rather uninspiring "two games stitched together" format. However, now that the ground work's done I can get the benefits in other hacks like Sonic VR. The objects were all ready to go, the "split screen palette" trick became the level fade in/out sequence, and the menus were deliberately basic. I just needed a small amount of work on art and backgrounds and then I could spend the rest of the time doing the fun part of designing devious levels with witty names!


    Don't worry, that's deliberate. Like many of the levels, it's simply a puzzle that you found the solution to.


    That's a really good point you make about the relative screen size in Sonic games, as it's something I had to constantly keep in mind for this hack. I'm glad somebody else has noticed it and it wasn't just me! No doubt Sega very much intended this as a way to increase the sensation of speed. However, it can limit what you can actually get away with in terms of design, particularly if you want the player to look around their surroundings and think before acting. I'm not surprised you've had this difficulty as well, since the hack you're working on is very puzzle-based. This was the first time I had made levels from scratch, and I was shocked by the amount of effort it takes to make layouts that are fair to the player, in that they can react to obstacles in time and don't have to make awkward leaps of faith. The fact that the levels in Sonic VR are deliberately challenging and one-hit-kill makes it even harder to get right.

    Take the level Margin of Error for example, which is a series of halfpipes connected by corridors that have spikes on the floor and ceiling. You have to get enough speed up to cross the floor spikes and land safely in the next halfpipe, but not go so fast that you fly into the ceiling ones. It's a really simple design, but it took me ages to find the right starting point for the player, because of this issue of not being able to see very far compared to the distances Sonic can travel. The original starting point for this level was in the bottom of the first halfpipe. You'd begin by spindashing to the right and immediately see the floor spikes. But then your next reaction is to charge up a full speed spindash to clear the spikes, only to hit the ones on the ceiling that you didn't see!

    A better option is to start in a corridor to the left, high enough up the wall so that dropping into the halfpipe gives you enough momentum to roll down and along the bottom, up past the floor spikes, and finally reaching the same height as the ceiling spikes on the opposite side. I've then shown the player all they need to know, so it's over to them to mess it up! However, there's no guarantee that the player won't make a blind jump out into space and completely negate this by landing on the bottom of the halfpipe, or worse, on the floor spikes. The solution I eventually came up with was to put the player in a corridor to the left, but place a Casino Night bumper at the entrance. This forces the player to drop slowly into the halfpipe and get the full tour of the area like I want, and hopefully also reminds them of the similar-looking area in Spring Yard zone so they're already expecting a halfpipe with corridors on either side.

    There are a bunch of other levels where it's really important to show the player what they're up against, some of which I think I managed to get right, and others I didn't. In the last level, for the spikes on the ceiling part that you mention, I messed up at the very last minute by lowering the springs slightly. The reason was to avoid too many objects in a row because of sprite flickering, but it means you can't see the spikes any more and thus have no reference point to judge distances with. Sorry about that! Hopefully I'll make fewer mistakes next time round, as I've definitely learned a lot about level design over the past couple of months.
     
  20. Dunno whether or not you all have seen this yet, but this hack is MegaGWolf's latest Showcase. He really seems to enjoy it.

    http://www.youtube.com/watch?v=ngJxcLlerWE