Giter Club home page Giter Club logo

sonic-1-2-2013-decompilation's Issues

Game doesn't load mappings from gamecontrollerdb.txt

There's no call to load additional mappings, so the game will just use the ones included with SDL2.

This is also the case with the Sonic CD code.

Something like this would load the mappings (place it before SDL_Init)

// try loading an external gamecontroller mapping file
int nummaps = SDL_GameControllerAddMappingsFromFile("gamecontrollerdb.txt");
if (nummaps >= 0)
    printf("loaded %d controller mappings from 'gamecontrollerdb.txt'\n", nummaps);

Other aspect ratio support

Yeah, I know this version isn't designed for anything more than 18:9 of phones but, I think the game shouldn't look this way regardless (using 569x240 internal res on a 2560x1080 display)

Any potential for support?

Clipboard01

Title cards don't adapt to 4:3

They should adapt to 4:3 considering the fact that Christian Whitehead himself debugged the game in 4:3, and the fact that the game came out at a time where most iPads in existence were 4:3

Hangs when selecting Dev Menu on pause screen

First, amazing job! The best way to play Sonic 2 on the PC for sure!

Not something game breaking, but the game hangs when selecting the dev Menu option on the pause menu. The Dev Menu opens but the program just hangs. I don't know if the controller (keyboard in my case) does not work on the menu or if the program really crashed. Was using the release version and Win 10;

S1&2: Jumping immediately after a spindash causes camera jerk

If in a position where camera Y is not against the bottom edge of the stage, when jumping immediately after releasing a spindash (in the time before the camera has finished catching up to Sonic) in either game, the camera starts tracking Sonic's jump at a height that is too low and as a result snaps down rather jarringly at the moment of the jump. This happens in either game.

This does not occur in the original mobile version of either game.

My checksums (both are pre-Sega Forever):
S1 Data.rsdk MD5: 10E320E8B3C1BA3B87B1E8EE01B2492C (v2.0.8)
S2 Data.rdsk MD5: 6F1244F8D6E3822778F69BCE2D1E8558 (v3.1.5)

1up jingle cuts short

If you end up getting 50000 as a result of a score tally from the zone or special stage results screen it'll cut the 1up jingle short and sometimes this also makes further 1up jingles cutting short too.

Not all time attack options correspond to the correct zone (Sonic the Hedgehog 2)

When selecting the time attack mode:

Casino Night Zone Act 1 Results in playing the Hill Top Zone Boss fight.
Casino Night Zone Act 2 results in playing Mystic Cave Zone Act 1.
Chemical Plant Zone Act 2 sends you straight into the Boss fight with visual glitches.
Hill Top Zone Act 1 sends you to Oil Ocean Zone right before the Boss fight.

These are just a few examples, but the bindings for Zones and their respective Acts aren't correct.

Note: I've only tested Sonic the Hedgehog 2 for this bug

S1 and S2: Documentation Update - Transferring saves from mobile version

As these ports are decomplication of the mobile release, I wonder if it would be possible to transfer my progress from the mobile version to these ports.

I had a back-up of a save from both games:

...\Android\data\com.sega.sonic1\SGame.bin
...\Android\data\com.sega.sonic2\SGame.bin

and I saw that the exe was saving its own save as SData.bin, so I simply copied the save backup to the folder and rename it SData.bin (old was kept as SData.bin.bak in case of issues).

As far I can see this work perfectly and all the progress I had on each mobile game is now available on the PC.

It would therefore be worth updating the readme file and/or front-end page to make others aware of this feature.

S1&2: Camera misbehaves during fire shield air dash

If S3 items are enabled from the game options in either game, when using the air dash granted by the fire shield, the camera "falls down" early before Sonic does. This happens in either game.

In the original mobile version of either game, the camera stops tracking Sonic and only starts tracking him again 15 frames (at 60 fps) after initiating the dash.
The pause in horizontal tracking is correctly reflected here, but the vertical behaviour is inconsistent.

I analysed this 60 fps YouTube video frame-by-frame to check various hypotheses: https://youtu.be/C0FQPNJOYf8. The framerate in this video is not entirely consistent, but some air dashes where the framerate does stay stable for the duration of the camera freeze are at 4:57 and 5:12.
I initially thought that vertical camera movement in the original was locked for a certain number of frames, too, but an occurrence at 5:22 debunks that, where Sonic does an air dash at ground level, where the camera tracks him vertically even during the initial horizontal camera-stop.
I've done some more research and the Sonic Physics Guide at Sonic Retro may shed more light on it: http://info.sonicretro.org/SPG:Camera#Flame_Shield.2FHyper_Sonic_Air_Dash
Having read this page, I believe vertical movement during the air dash may simply be a product of the "vertical border" rule.

My checksums (both are pre-Sega Forever):
S1 Data.rsdk MD5: 10E320E8B3C1BA3B87B1E8EE01B2492C (v2.0.8)
S2 Data.rdsk MD5: 6F1244F8D6E3822778F69BCE2D1E8558 (v3.1.5)

Chemical Plant Zone purple water drawing one line in wrong place

Hello there,

I would like to report what it seems to be a bug on level Chemical Plant Zone. When you're seeing the purple water on your screen, it draws a purple line on top of the window just like this screenshot
Untitled1
but when it's not showing, the purple line disappears.
Untitled2

Dev menu sometimes loads Sonic sprite sheet

I tried testing out the Time Attack mode in both games and the only levels that load correctly are Green Hill Act 1 and Emerald Hill Act 1. Trying to load Emerald Hill Act 2 will load the Boss Attack. Loading Green Hill Act 2 will load one of the special stages. This trend continues for the rest of the levels loaded through time attack. It's consistent too. I've tested this with both the regular versions of the games and both Sega Forever versions of the games. the results are the same. Loading the stages through the Dev Menu works properly with has no issues.

Sonic 1+2 Fullscreen rendering issue: texture seam from top left to bottom right at 1080p

Thanks for the great work on this!

I've tested this on two different AMD machines, and can reproduce it on both - when running at 1080p and using fullscreen mode, the game render texture has a triangle seam bisecting the image from top left to bottom right, which slightly shifts the pixels. This was present on two separate machines - one with a 1080p monitor, and another with a 1440p monitor. Leaving the 1440p monitor at native res, the issue isn't present (maybe it's a direct multiple of the base game res? I haven't done the math) but when switching to 1080p it then behaves exactly like the machine with a native 1080p display: seam is present.

I'm assuming this is because the render buffer is being stretched, but only made up of two triangles? Or maybe it's a just a quirk of the renderer this uses and can be fixed? Think of the PS1 affine texture distortion but not nearly as bad.

Hope that's clear.

Speed Shoes restart the music

Picking up speed shoes restart the BGM instead of speeding up the music from the point where you were at the time.

Controller Input Not Recognized Until Replugging It

When I open the game and try to use my controller, nothing happens. However, if I unplug it and then plug it back in, it works exactly like I'd expect it to. It also works if I have the controller unplugged while launching the application then plug it in while it's running.

OS: Debian Linux (Stable)
Controller: Sony DualShock 3 (PlayStation 3 Controller)

NON-WORKING DATAFILES

If your data file SHA-256 hash (unless otherwise specified) is ONE OF THE FOLLOWING:

  • S1 2.0.5 749D6369867CDD73075959A7832C0394662BB7A5E8C9702C5AF20F8E0D0D979E
  • S1 2.0.4 MD5 6C6881E3DBDE73D4DD0B37F68996A700C1186B1F
  • S2 3.1.0 90991207BFEFA09CF4DD0EE57365DFD2047172D531BE93AFC8FFF196078E034F
  • S2 3.0.2 787E022A40FE2B3017DAE176ECC294CC752E2B765ED486B1C841C0F9F873334F
  • S2 ????? 168B5490771F5C6DB5BCD12A194A2A6367ABC0A4645F165127F6F4831AE097BC

then they will crash upon loading a level and hang on the title screen (if S2.)

Dev Menu locks the game (tested Sonic 1)

When opening the dev menu, I lose control over the application. Can't exit the menu or do anything.

Sonic 3.3.0 SHA-1: fde41461d57be5136bae6288c2696e8142848141

Sonic 1 2.0.4 Does not work.

Sonic 1 2.0.4: SHA-1 - 6c6881e3dbde73d4dd0b37f68996a700c1186b1f

Title screen loads but crashes once level tries to load. Time Attack crashes when any level is chosen. You can add this version to the pinned issue.

Is there any way to start the game on a specific scene?

I don't know if this fits here, but is there any way to start the game on a specific scene (for example, starting the game on level select)? I can see there are 2 keys on the config file (StartingScene and StartingCatergory) that seem to do this, but I don't know how to make it work.

S1 & S2 : Tails Still joins you In Sonic Alone File

if you start up a game with sonic alone, pause and exit to the main menu, start up a game with sonic & tails then exit to main menu again, start up a game with sonic alone again and tails still joins you anyways

edit : i've tried testing this on sonic 1 to see if it would happen again and i was right

No controller input (DirectInput)

I tried rebinding the controller inputs from the SDL config in settings.ini to match my controller's but it does not react in game or in the menu.

Turned Dev Mode off
No other application was running that took the controller input
It involves the SEGA Mega Drive/Genesis Mini 3B Controller (that is compatible with Windows natively as a DInput device, that should work with SDL)

Also, there seems to be no way of mapping axis?

My config:
A = 3
B = 2
C = 6
Start = 10
Up/Down/Left/Right should be -a4, +a4, -a3, +a3 but they get zeroed out upon initialising. (D-Pad is X/Y axis based, no buttons)

Also tried having them set at a lower button number to take a 0-index start into account, made no difference.

Edit:
For clarity, according to Windows, the following button layout is present with the 3B Controller:
A = 3, B = 2, C = 6, Start = 10, Up = Y up, Down = Y down, Left = X left, Right = X right. Only one analog stick was visible.

StartingScene and StartingCategory not working

Every time I set StartingCategory and StartingScene to some ID and start the game, I get sent to the start menu instead of the specified scene. After this, StartingCategory and StartingScene automatically get set to true. I have tried different IDs and got the same result every time.

S1 & S2: Can't get Elemental Shields (S3 items) into Time Attack

In the core games, if you change the options to S3 items in game, and then Game Over, when you go to Time Attack, the Elemental Shields are accessible in Time Attack. If you select Sonic + Tails and do the same thing, you also get Sonic + Tails in Time Attack.

In this version, doing the same thing does not get you the Elemental Shields in Time Attack, but it does give you Sonic + Tails.

Ideally the game options would just extend to Time Attack mode so there would be no need to Game Over at all.

Should prevent the computer from sleeping on Linux

I was playing and my screen started to dim to prepare the computer to go to sleep, that's because the graphics server noticed no input (I was playing with a gamepad and it doesn't check that). There are ways to make an app ask the OS to not go to sleep while it runs (e.g. video players do that) and we should do it here too.

S1: Disabling spindash does not disable it

Attempting to disable the spindash in the game options does not actually disable it.
This happens with the dev menu enabled or disabled, even when item type is set to exclusively S1.

MD5 of my Data.rsdk: 10E320E8B3C1BA3B87B1E8EE01B2492C (v2.0.8, pre-Sega Forever)

21:9 Softlocks and other playability issues

image
I was messing around to see what ridiculous resolutions I could run this at when I stumbled across this. Sonic's been walking in place for a couple minutes now. ScreenWidth is set to 570 (for 21:9 aspect) in this screenshot. Obviously this is not a big deal given the game was designed for 16:9 screens, but it's worth noting.

Softlocks:

  • Player dies after breaking the Egg Capsule in SYZ3 if ScreenWidth is above 432
  • Player walks in place at end of EHZ1, CPZ1, ARZ1, CNZ1, HTZ1, MCZ1, OOZ1, MZ1, MZ2 if ScreenWidth is above 504

Other issues:

  • Player MAY die after passing the level end sign in SYZ2 if ScreenWidth is above 444
  • Mystic Cave, Oil Ocean bosses may be completely skipped if ScreenWidth is above 512

S2: Invisible rising lava in HTZ2

In Hill Top Zone Act 2, in Sonic 2, enter the vertical cave with the rising lava. The shaking effects do start, and the lava does collide with & damage the player character, but said lava is invisible. I do not know what causes this issue - a similar area in Act 1 has visible lava.

S1 Credits Crash

After the Star Light Zone fadeaway, Nakamura's name popped up, but the next cutscene (Scrap Brain) failed to load and my game crashed.

I have a recording of this occurring here: https://youtu.be/mg4FFN7tzfg (Xbox Game Bar made it look crappy, my b on that end)

I also attached the log if that helps.
log.txt

(Sonic 2): Super Knuckles speed and jump persisting after opening animal capsule

I was only able to pull this off twice, once in CPZ2 and once in CNZ2, but after popping the capsule after the boss while Super, Knuckles reverted to normal while still having the same speed and jump as Super Knuckles. I think this might have to do with gliding/falling onto the capsule, as I was not able to pull it off in HTZ2 when I jumped on the capsule normally. I don't know if this affects other characters as well.

S2 Oil Ocean Zone Boss Battle crashes the game.

The boss fight was going on as usual, but when i defeated Robotnik, i quickly went to the capsule pod to push the button so i could finish the stage, but the game crashed as soon as i pushed the button.

Maybe it was because Robotnik hadn't gotten out of his "explosion state" or whatever. Or maybe i was too fast.

No disabling of logging

When I try to run either Sonic 1 or 2, the game will keep a log file despite having turned off the dev menu in the settings.ini.

This feature is available in your Sonic CD decompilation, as 'EngineDebugMode=false'. Would love to see this added as well!

S1: specific tube interactions temporarily remove player control

When entering a tube at a low enough speed to be pushed back out while holding the "inwards" direction, control is temporarily removed from the player upon exiting the tube.

Illustrated below, I am holding left for the entire duration of the GIF, yet you can see that Sonic stands still for a while upon exiting the tube despite the direction being held.
tube

In the original mobile version you can move immediately after exiting the tube.

(Using Data.rsdk from v2.0.8)

Game is a stutter-fest, any way currently to address that?

I'm running the game in Fullscreen mode and tried with vsync both enabled and disabled, as well as limiting my framerate to 60 via RTSS, but the game stutters a lot. Happens in both Sonic 1 and Sonic 2.

Is there some setting I should be enabling to get smooth, stutter-free 60fps, or is this currently being worked on?

"Knuckles & Tails" Glitch (but weirder)

Actually this glitch can be done in the original mobile port, but here it is much weirder.

I first chose Sonic and Tails, ran through several levels, deleted the save file. Then I decided to play for Knuckles, but the same Sonic and Tails appeared again. I played around a bit, went to the same save file again and I'm playing as Knuckles and Tails now.

After I went back to the menu, Sonic and Tails were already displayed in the save select and you are already playing for them.

S1: Sprites glitched on dev menu

Whenever you pause the game on any level in Sonic 1, then go to the dev menu, the sprites for the letters will become garbled up sonic sprites, and the game locks up.

S1 : LZ's Underwater Pallete is sort of visible above your screen

i played labyrinth zone and i noticed something odd, above my screen Labyrinth's underwater pallete is sort of visible, i suggest having a closer look at the screenshot i provided, i gave a red arrow to show where the underwater pallete was at, have a closer look at it

underwaterpalleteabove

Hide the mouse pointer on fullscreen

IDK about other OSes but on Linux we can still see the mouse pointer when it's on the window, which is acceptable when the window is floating or maximized, but feels odd when it's fullscreened. We probably should hide the pointer on fullscreen.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.