Sonic-Mania-Decompilation icon indicating copy to clipboard operation
Sonic-Mania-Decompilation copied to clipboard

Water_State_Bubbler has incorrect behavior.

Open LittlePlanetCD opened this issue 1 year ago • 1 comments

In the steam version of Mania (as well as Sonic 3), there's a very small chance where Water_State_Bubbler can create a VERY small bugged bubble instead of a big one:

image

this does not happen on the decomp.

LittlePlanetCD avatar Mar 31 '24 18:03 LittlePlanetCD

Gotta love unintentional bug fixes.

bubbleSizes is a table of values with pre-determined final bubble size frames in the bubble clusters, a bubble is to increase in frame count until reaching this final frame. One of these gets turned to a breathable bubble through a dice roll and, should it fail, the last bubble is guaranteed to be breathable. Tiny frame 0 bubbles are NOT a part of this, only frames 2 and 4 are used (side tangent : this is technically incorrect since these are the same values used in the other remasters where the frames fit 1:1 with the original games and mania vastly increased the number of frames. Additionally, one value in the table was changed to a mid bubble, likely because they thought not enough of those were spawning per cluster).

Megadrive ASM version, which uses subtypes to determine the bubble size instead of relying on the frame number : image RSDK 4 version (rearranged for comparison) : image Mania decomp : image

What may be causing it :

bubbleType1 is somehow a negative number, meaning it bypasses the big bubble failsafe flag and reads a bubble frame that's located out of bounds, explaining the invalid final size.

VAdaPEGA avatar Apr 10 '24 10:04 VAdaPEGA