Sonic Mania Wii U Port

Discussion in 'Showroom' started by Clownacy, Aug 30, 2022.

  1. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,020
    Last edited: Oct 5, 2022
  2. EddyTF

    EddyTF 단순 한 사람 Member

    Joined:
    Jan 9, 2022
    Messages:
    70
    Location:
    Russia
    It's just fantastic. You're a holy man, bro:)
     
    Last edited: Aug 31, 2022
  3. JGamer2151

    JGamer2151 Well-Known Member/Lurker Member

    Joined:
    Dec 1, 2020
    Messages:
    96
    iOS and Android port when?

    EDIT (8/31/2022): This is really awesome to see this ported over to a eighth-gen Nintendo system that never had an official release of the game, and I hope that other ports to other platforms may happen as well. The sky’s the limit!
     
    Last edited: Sep 1, 2022
  4. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,020
    Hopefully someone else does it: I don't have any experience with porting stuff to smartphones.
     
    Last edited: Aug 31, 2022
    JGamer2151 likes this.
  5. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,020
    v0.5 has been released, fixing crashes and adding support for more controllers: now you can play the game with the Wii U Pro Controller, Wii Classic Controller, Wii Remote & Nunchuk, and the Wii Remote (sideways).
     
    JGamer2151 and DeltaWooloo like this.
  6. B.T.H Yeehaw!

    B.T.H Yeehaw! Newcomer Member

    Joined:
    Jun 20, 2020
    Messages:
    15
    Location:
    City Streets Zone
    If I could, I'd want to add to the project with custom controller and UI sprites. I've tried it out a while ago and it's honestly incredible how smooth it plays!
     
  7. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,020
    v0.6 has been released.

    As well as fixing the Time Attack/Replay menus and hopefully fixing the game's rampant random crashing issue, this version utilises a new homebrew format (.wuhb) which allows it to be ran directly from the Wii U Menu instead of the Homebrew Launcher. Being ran from the Wii U Menu allows the home button to function properly in-game, opening the home menu instead of just exiting the game without warning. Note that '.wuhb' files require the brand new Aroma homebrew environment.
     
    DeltaWooloo and JGamer2151 like this.
  8. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,020
    v0.7 has been released: now the game should run mostly at full speed.

    Where did this speed boost come from? Two things:

    This port leverages the SDL2 library, and one of its responsibilities is displaying the game's framebuffer on the screen. The framebuffer is in the RGB565 format, but SDL2 didn't support displaying RGB565 on the Wii U, so it was converting it to a different format instead. It did this every frame, using up a lot of the CPU. However, the Wii U actually does support RGB565, so I extended SDL2 to make use of it, and now the conversion is skipped.

    The second improvement has to do with V-sync: whenever SDL2 updates the display, it waits for the start of a new frame. However, if the game had lagged so much that a new frame had already begun, it would wait for the next frame instead. It would basically cause the game to run at 30FPS instead of 60FPS, even if it was only lagging a little. Now, it uses adaptive V-sync, which means that it doesn't bother waiting if it's already missed the start of the frame. This way, if the game is only slightly lagging, then it will run at, say, 55FPS instead of 30FPS.
     
    DeltaWooloo and JGamer2151 like this.
  9. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,020
    Last edited: Sep 22, 2022
    DeltaWooloo, ProjectFM and JGamer2151 like this.
  10. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,020
    v1.0.1 has been released, fixing some inaccuracies in the 3D rendering (the polygons were sorted incorrectly), disabling the leftover Special Stage mach debug button unless Debug Mode is enabled, and un-swapping the A and B buttons to match the official Switch port.
     
    DeltaWooloo likes this.
  11. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,020
    v1.0.2 is out: it fixes a crash in the PGZ->SSZ transition, fixes the broken fireflies in SSZ, and reverts the engine from RSDKv5U to RSDKv5 to fix an apparent backwards-compatibility issue with Heavy Shinobi. As the fact that the version number is no longer v0.X should indicate, I think this port is pretty much complete now.

    Fun fact: this port isn't just a straight port of the decompilation, as I've made a few internal improvements here and there. For instance, I replaced the disgusting original MD5 hasher with my own one, and in this update I've even overhauled the audio system, swapping the stb_vorbis Ogg Vorbis decoding library with libvorbis and converting the mixer from F32 (floats) to S16 (integers). It saves around 16MB of RAM, which should be useful for ports to platforms with limited RAM.
     
    JGamer2151 and Nik Pi like this.
  12. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,020
    DeltaWooloo likes this.
  13. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,020
    v1.0.4 is out. This is just a quick maintenance release that updates the base decompilations. In particular, the pause menu in Mean Bean no longer has an erroneous 'restart' option. Additionally there have been some small accuracy improvements to the code here and there.
     
    DeltaWooloo likes this.
  14. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,020
    v1.0.5 is out. While playtesting, I noticed a bug in the pinball bonus stage that turned out to be the result of an inaccuracy in the decompilation: if you collect multiple types of shield and then leave the bonus stage, then you'll return to the main game with a strange buggy 'null' shield, which lacks graphics and does not grant any extra abilities, but does still protect you from a single hit. Also, I noticed that the pinball stage's crane game never has any 1UP prizes in Mania Mode. This update fixes both of these issues.
     
    DeltaWooloo likes this.
  15. DashTurbo780

    DashTurbo780 Newcomer Trialist

    Joined:
    Dec 31, 2015
    Messages:
    21
    Location:
    Pittsburgh, PA
    The Wii U was so massively underutilized during it's run, if Nintendo did a better job advertising it or chose another name then it probably could have outlasted the Switch.
     
  16. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,020
    v1.0.6 is out. Like the last couple of releases, this updates the base decompilation, fixing several more bugs and inaccuracies in the game.
     
    DeltaWooloo and TheInvisibleSun like this.
  17. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,020
    v1.0.7 is out. Full-speed special stages are finally here!

    The credit for this goes to Mefiresu, who ported Mania to the Wii. Mefiresu discovered that Mania needlessly clears several large buffers every frame, and that the function which is used to clear these buffers is incredibly slow on the Wii and Wii U. By not clearing these buffers, such a massive performance gain is made that I could play through all 14 special stages and not once notice any lag!

    Another noteworthy fix is that destroying a Badnik no longer causes the game to momentarily stutter. This had been driving me crazy for the longest time, but I never realised that the fix was so simple: for some reason, the decompilation calls a debug logging function whenever anything stat-related occurs. Because the game tracks how many Badniks are destroyed, the logging function is called every time a Badnik is destroyed. This logging function is expensive, causing it to make the game lag. Since debug logging is useless to players, I've disabled it entirely. Now the game should be as smooth as butter!
     
    Last edited: Sep 5, 2023
    DeltaWooloo and JGamer2151 like this.