• Stars
    star
    913
  • Rank 49,590 (Top 1.0 %)
  • Language
    C++
  • License
    Other
  • Created over 3 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A complete decompilation of Sonic 1 & Sonic 2 (2013) & Retro Engine (v4)

A complete decompilation of Retro Engine v4 and the menus from Sonic 1 and 2 (2013).

SUPPORT THE OFFICIAL RELEASE OF SONIC 1 & 2

Even if your platform isn't supported by the official releases, you must buy or officially download it for the assets (you don't need to run the official release, you just need the game assets).

If you want to transfer your save(s) from the official mobile version(s), the Android pre-forever file path is Android/data/com.sega.sonic1 or 2/SGame.bin (other versions may have different file paths). Copy that file into the decompilation's folder with the name SData.bin.

Additional Tweaks

  • Added the built in script compiler from RSDKv5U.
  • Added a built in mod loader and API, allowing to easily create and play mods with features such as save file redirection, custom achievements and XML GameConfig data.
  • Custom menu and networking system for Sonic 2 multiplayer, allowing anyone to host and join servers and play 2P VS.
    • Servers may be unreliable; this feature is more or less a proof of concept.
  • Egg Gauntlet Zone is playable in the Time Attack menu in Sonic 2, if you're using a version of the game that includes it.
  • There is now a settings.ini file that the game uses to load all settings, similar to Sonic Mania.
  • The dev menu can now be accessed from anywhere by pressing the ESC key if enabled in the config.
  • The F12 pause, F11 step over & fast forward debug features from Sonic Mania have all been ported and are enabled if devMenu is enabled in the config.
  • A number of additional dev menu debug features have been added:
    • F1 will load the first scene in the Presentation stage list (usually the title screen).
    • F2 and F3 will load the previous and next scene in the current stage list.
    • F5 will reload the current scene, as well as all assets and scripts.
    • F8 and F9 will visualize touch screen and object hitboxes.
    • F10 will activate a palette overlay that shows the game's 8 internal palettes in real time.
  • Added the idle screen dimming feature from Sonic Mania Plus, as well as allowing the user to disable it or set how long it takes for the screen to dim.

How to build

Windows

  • Clone the repo, then follow the instructions in the dependencies readme for Windows to setup dependencies, then build via the visual studio solution.
  • Alternatively, you can grab a prebuilt executable from the releases section.

Windows via MSYS2 (64-bit Only)

Decompilation

  • Download the newest version of the MSYS2 installer from here and install it.
  • Run the MINGW64 prompt (from the windows Start Menu/MSYS2 64-bit/MSYS2 MinGW 64-bit), when the program starts enter pacman -Syuu in the prompt and hit Enter.
  • Press Y when it asks if you want to update packages. If it asks you to close the prompt, do so, then restart it and run the same command again. This updates the packages to their latest versions.
  • Install the dependencies with the following command: pacman -S pkg-config make git mingw-w64-i686-gcc mingw-w64-x86_64-gcc mingw-w64-x86_64-SDL2 mingw-w64-x86_64-libogg mingw-w64-x86_64-libvorbis mingw-w64-x86_64-glew
  • Clone the repo with the following command: git clone --recursive https://github.com/Rubberduckycooly/Sonic-1-2-2013-Decompilation.git
  • Go into the repo you just cloned with cd Sonic-1-2-2013-Decompilation.
  • Run make -f Makefile.msys2 CXX=x86_64-w64-mingw32-g++ CXXFLAGS=-static -j4.
    • -j switch is optional, but will make building faster by running it parallel on multiple cores (8 cores would be -j9).

Windows UWP (Phone, Xbox, etc.)

  • Clone the repo, then follow the instructions in the dependencies readme for Windows and dependencies readme for UWP to setup dependencies.
  • Copy your Data.rsdk file into Sonic1Decomp.UWP or Sonic2Decomp.UWP depending on the game, then build and deploy via RSDKv4.UWP.sln.
  • You may also need to generate visual assets. To do so, open the Package.appxmanifest file in the designer. Under the Visual Assets tab, select an image of your choice, and click generate.

Linux

Decompilation

  • To setup your build enviroment and library dependecies, run the following commands:
    • Ubuntu (Mint, Pop!_OS, etc...): sudo apt install build-essential git libsdl2-dev libvorbis-dev libogg-dev libglew-dev libdecor-0-dev
      • If you're using Debian, add libgbm-dev and libdrm-dev.
    • Fedora Linux: sudo dnf install g++ SDL2-devel libvorbis-devel libogg-devel glew-devel
    • Arch Linux: sudo pacman -S base-devel git sdl2 libvorbis libogg glew
  • Clone the repo and its other dependencies with the following command: git clone --recursive https://github.com/Rubberduckycooly/Sonic-1-2-2013-Decompilation.git
  • Go into the repo you just cloned with cd Sonic-1-2-2013-Decompilation.
  • Run make -j5.
    • If your distro is using gcc 8.x.x, then add the argument LIBS=-lstdc++fs.
    • -j switch is optional, but will make building faster by running it parallel on multiple cores (8 cores would be -j9).

Mac

  • Clone the repo, follow the instructions in the dependencies readme for Mac to setup dependencies, then build via the Xcode project.
  • Alternatively, a Mac build of v1.3.1 by Sappharad can be found here.

Android

  • Clone the repo, then follow the instructions in the dependencies readme for Android.
  • Ensure the symbolic links in android/app/jni are correct. If not, fix them with the following on Windows:
    • mklink /D src ..\..\..
    • mklink /D SDL ..\..\..\dependencies\android\SDL
  • Open android/ in Android Studio, install the NDK and everything else that it asks for, and build.

Unofficial Branches

Follow the installation instructions in the readme of each branch.

Because these branches are unofficial, we can't provide support for them and they may not be up-to-date.

Other Platforms

Currently the only supported platforms are the ones listed above, however the backend uses libogg, libvorbis & SDL2 to power it (as well as tinyxml2 for the mod API and asio for networking), so the codebase is very multiplatform. If you're able to, you can clone this repo and port it to a platform not on the list.

Server

The multiplayer server requires Python 3.8 or later. You can download Python here. To use the server, open Command Prompt in the folder Server.py is located in, then run the command py -3 Server.py [local IPv4 address] [port] debug. You can find your local IPv4 address using the command ipconfig. Note that the C++ server found in the Server folder has been deprecated and no longer works. It has been kept in the repo for reference purposes.

FAQ

You can find the FAQ here.

Special Thanks

  • stร—tic for helping me fix bugs, tweaking up my sometimes sloppy code and generally being really helpful and fun to work with on this project.
  • The Weigman for creating the header you see up here along with similar assets.
  • Everyone in the Retro Engine Modding Server for being supportive of me and for giving me a place to show off these things that I've found.

Contact:

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

More Repositories

1

Sonic-Mania-Decompilation

A complete decompilation of Sonic Mania (2017)
C
596
star
2

Sonic-CD-11-Decompilation

A Full Decompilation of Sonic CD (2011) & Retro Engine (v3)
C++
579
star
3

RSDKv5-Decompilation

A complete decompilation of Retro Engine (v5)
C++
379
star
4

Sonic-1-Sonic-2-2013-Script-Decompilation

122
star
5

Sonic-CD-2011-Script-Decompilation

117
star
6

RSDK-Reverse

A collection of libraries for the RSDK (Retro Engine Software Development Kit) file formats
C#
50
star
7

Sonic-Nexus-Decompilation

a Decompilation of the 2008 Retro-Sonic Engine Demo of Sonic Nexus
C++
33
star
8

RSDKv5-Example-Mods

A set of example mods using RSDKv5
C
30
star
9

GameAPI

Sonic Mania Modding API
C++
25
star
10

RetroED

a general purpose editor for all RSDK versions below RSDKv5
C#
20
star
11

Retro-Engine-Animation-Editor

a tool to edit the animation files for every Retro Engine/Retro Sonic Engine game!
C#
17
star
12

Sonic-1-2-Save-Editor

A save file editor for the Retro Engine Sonic 1 & 2 Remasters
C#
16
star
13

Sonic-Mania-Shader-Decompilation

a decompilation of each of mania's shaders back into HLSL 3.0
GLSL
10
star
14

SonicCD-SaveEditor

A Save file Editor for Sonic CD (2011)
C#
9
star
15

ConfigManiac

an editor for RSDKv5 Config files
C#
8
star
16

ModelManiac

Importer and exporter for RSDK model formats
C#
8
star
17

LinkAPI

a simple-to-use api for developing DLL mods for sonic mania
C
7
star
18

Tile-Maniac

RSDKv5 Collision Editor
C#
7
star
19

PDN-RSDK-GFX-Plugin

A Paint.net plugin that allows direct editing of the RSDK's .gfx files
C#
6
star
20

ObjectTypeFixer

A simple tool to `re-align` Object Types for incase gameconfig object count was changed
C#
4
star