RSDKModding / Sonic-Mania-Decompilation

A complete decompilation of Sonic Mania (2017)
Other
632 stars 116 forks source link

SUPPORT THE OFFICIAL RELEASE OF SONIC MANIA (PLUS)

Even if your platform isn't supported by the above official releases, you must buy it for the assets. The Netflix Games version is NOT supported.

DO NOT USE THIS DECOMPILATION PROJECT AS A MEANS TO PIRATE SONIC MANIA (PLUS)

We do not condone using this project as a means for piracy in any form. This project was made with love and care for the source material and was created for purely educational purposes, and would not exist without the work of Sega, Headcannon, and Evening Star.

If you want to transfer your save from the official PC versions, you can just copy your savedata into the folder containing the decompilation!

Additional Tweaks

How to Build

This project uses CMake, a versatile building system that supports many different compilers and platforms. You can download CMake here. (Make sure to enable the feature to add CMake to the system PATH during the installation if you're on Windows!)

Get the source code

In order to clone the repository, you need to install Git, which you can get here.

Clone the repo recursively, using: git clone --recursive https://github.com/RSDKModding/Sonic-Mania-Decompilation

If you've already cloned the repo, run this command inside of the repository: git submodule update --init --recursive

Getting dependencies

This repo includes everything you need for Sonic Mania + RSDKv5(U). If you wish to compile only Sonic Mania, you can skip to the compilation steps below.

Windows

To handle dependencies, you'll need to install Visual Studio Community (make sure to install the Desktop development with C++ package during the installation) and vcpkg (You only need to follow 1 - Set up vcpkg).

After installing those, run the following in Command Prompt (make sure to replace [vcpkg root] with the path to the vcpkg installation!):

Finally, follow the compilation steps below using -DCMAKE_TOOLCHAIN_FILE=[vcpkg root]/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static as arguments for cmake -B build.

Linux

Install the following dependencies: then follow the compilation steps below:

(make sure to install GL shaders!)

Switch

Setup devKitPro, then run the following:

Finally, follow the compilation steps below using -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake as arguments for cmake -B build.

(make sure to install GL shaders!)

Android

Ensure you clone the repo recursively, then follow the RSDK build instructions here.

Compiling

Compiling is as simple as typing the following in the root repository directory:

cmake -B build
cmake --build build --config release

The resulting build for Mania will be located somewhere in build/ depending on your system. If building with RSDKv5(U), the resulting Mania and RSDK executable will likely be in build/dependencies/RSDKv5/.

The following cmake arguments are available when compiling:

RSDKv5 flags

Sonic Mania flags

Other Platforms

The only directly supported platforms are those listed above. Since Mania is very easy to build, requiring no additional dependencies, virtually any platform that can run RSDKv5 can compile Mania easily.

However, there are a multitude of ports listed in the RSDKv5 repository.

FAQ

Q: Why aren't videos/filters working while using GL?

A: There's a mod for it that you have to make. Refer to the following directions:

Create the following directory structure inside your mods directory:

GLShaders/
| Data/
| | ...
| mod.ini

Inside mods/GLShaders/Data/, copy the RSDKv5/Shaders directory, and inside the mod.ini, paste this:

Name=GLShaders
Description=GL3 shaders
Author=Ducky
Version=1.0.0
TargetVersion=5

Q: I found a bug!

A: Submit an issue in the Issues tab and we might look into it. Keep in mind that this is a decompilation, so bugs that exist in official releases will most likely not be fixed here.

Q: Will you add support for the Netflix Games version of Mania?

A: No. There are several reasons for this: the APIs introduced in the port that we'd have to deal with, the pressure of having to maintain support for a version that's being frequently updated, concerns over piracy, and a general disinterest in the port. If you want to play the decomp on mobile with touch controls, there's a mod for that you can use instead.

Q: Will you do a decompilation for Sonic CD (2011) and/or Sonic 1/2 (2013)?

A: I already have! You can find Sonic CD here and Sonic 1/2 here.

Q: Are there anymore decompilation projects in the works, such as Sonic Origins/Sonic 3 & Knuckles?

A: Absolutely not. This project took about 1 and a half years to do, and doing Sonic 3 & Knuckles would take equally as long, if not longer, as it's not only larger in scope, but Origins' hybrid codebase makes it harder to read. Between our other decompilation projects and this one, we're done with decompiling, at least for the time being. We would also like to expand our horizons beyond Sonic going forward, and we don't wish to spend forever just playing catchup with Sega's official releases. Please do not expect any more decompilations from us, Sonic or otherwise!

Special Thanks

Contact:

Join the Retro Engine Modding Discord Server for any extra questions you may need to know about the decompilation or modding it.