Sonic the Hedgehog
Sega's 1991 Mega Drive/Genesis platformer that began the Sonic series.
On this page
The atlas reads Sonic the Hedgehog through Sonic Retro’s s1disasm, a buildable community disassembly. The atlas checked every claim against the code, then against the Sonic Physics Guide, Sonic Retro’s write-up of the classic games’ physics. The guide agrees with the code on every point compared here, down to the motionless press frame1 and the 5 px2 shift when Sonic curls up.
#Jumping
Sonic jumps along the ground’s normal, so on flat ground all 6.5 px/frame ($680)3 goes upward4. He doesn’t move on the press frame1. One gravity of 0.21875 px/frame² ($38)5 applies, held or not. Variable jump height comes from the release, which clamps a fast rise to −4 px/frame (-$400)6.
Speeds are 8.8 and positions 16.16 fixed point, a 1/256 px subpixel resolution7. Nothing limits how fast Sonic falls8. Jumps start only from the ground modes, so Sonic has no coyote time9.
References
- ^ abSonic doesn't move on the press frame;
Sonic_Jumpdrops its return address, skipping the rest of the grounded routine,SpeedToPosincluded. T3sonicretro/s1disasm · _incObj/01 Sonic.asm L1236, L317–323Sonic Retro, “Sonic Physics Guide: Jumping” · Bugs when Jumping - ^A standing jump curls Sonic up, shrinking his height radius from 19 to 14 and adding 5 to Y, so his feet stay put. T3sonicretro/s1disasm · _incObj/01 Sonic.asm L1250–1254, _Constants.asm L312–314Sonic Retro, “Sonic Physics Guide: Characters” · Sonic
- ^Sonic's jump speed,
son_jumpspeed, is$680subpixels per frame (6.5 px/frame) out of water. T3sonicretro/s1disasm · _incObj/01 Sonic.asm L8, L1218Sonic Retro, “Sonic Physics Guide: Jumping” · Constants - ^
Sonic_Jumpadds the jump speed along the ground normal (CalcSineof angle −$40); on flat ground that is exactly-$680to Y speed, nothing to X. T3sonicretro/s1disasm · _incObj/01 Sonic.asm L1224–1233, _incObj/sub CalcSine.asm L53Sonic Retro, “Sonic Physics Guide: Jumping” · Jump Velocity - ^
ObjectFall's gravity equate adds$38subpixels/frame to an airborne object's downward speed each frame, Sonic's included. T3sonicretro/s1disasm · _incObj/sub ObjectFall & SpeedToPos.asm L5, _incObj/01 Sonic.asm L363Sonic Retro, “Sonic Physics Guide: Air State” · Constants - ^During a jump, with no jump button held,
Sonic_JumpHeightclamps any rise faster than 4 px/frame to exactly-$400. T3sonicretro/s1disasm · _incObj/01 Sonic.asm L1273–1288Sonic Retro, “Sonic Physics Guide: Jumping” · Variable Jump Height - ^
ObjectFalladds the pre-gravity speed, shifted left 8 bits, to the 32-bit position, so positions are 16.16 and speeds 8.8 fixed point. T3sonicretro/s1disasm · _incObj/sub ObjectFall & SpeedToPos.asm L16–20Sonic Retro, “Sonic Physics Guide: Calculations (Pixel and Subpixel)” · Pixel and Subpixel - ^Sonic 1 never caps falling speed in the air; with
FixBugs = 0,Sonic_JumpHeight's only cap is upward (-$FC0) and skipped after jumps. T3sonicretro/s1disasm · _incObj/01 Sonic.asm L1291–1302Sonic Retro, “Sonic Physics Guide: Air State” · Top Y Speed - ^Sonic gets no grace window after leaving a ledge: only the grounded modes,
Sonic_MdNormalandSonic_MdRoll, callSonic_Jump. T3sonicretro/s1disasm · _incObj/01 Sonic.asm L113–116, L318, L348
Sources
Code
- Sonic Retro contributors. 2026. “s1disasm: Sonic the Hedgehog (16-bit) disassembly (sonicretro/s1disasm).” Commit 15dfa3a. sonicretro/s1disasm @ 15dfa3a · licence, all uses
Secondary
- Sonic Retro contributors. 2023. “Sonic Physics Guide: Jumping.” Sonic Retro. original · archived · licence, all uses
- Sonic Retro contributors. n.d. “Sonic Physics Guide: Characters.” Sonic Retro. original · archived · licence, all uses
- Sonic Retro contributors. n.d. “Sonic Physics Guide: Air State.” Sonic Retro. original · archived · licence, all uses
- Sonic Retro contributors. n.d. “Sonic Physics Guide: Calculations (Pixel and Subpixel).” Sonic Retro. original · archived · licence, all uses