v0.1 ⌊ALPHA⌉
On this page
  1. Jumping
  2. Related
  3. References
  4. Sources

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

  1. ^ abSonic doesn't move on the press frame; Sonic_Jump drops its return address, skipping the rest of the grounded routine, SpeedToPos included. T3sonicretro/s1disasm · _incObj/01 Sonic.asm L1236, L317–323Sonic Retro, “Sonic Physics Guide: Jumping” · Bugs when Jumping
  2. ^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
  3. ^Sonic's jump speed, son_jumpspeed, is $680 subpixels per frame (6.5 px/frame) out of water. T3sonicretro/s1disasm · _incObj/01 Sonic.asm L8, L1218Sonic Retro, “Sonic Physics Guide: Jumping” · Constants
  4. ^Sonic_Jump adds the jump speed along the ground normal (CalcSine of angle − $40); on flat ground that is exactly -$680 to 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
  5. ^ObjectFall's gravity equate adds $38 subpixels/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
  6. ^During a jump, with no jump button held, Sonic_JumpHeight clamps 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
  7. ^ObjectFall adds 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
  8. ^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
  9. ^Sonic gets no grace window after leaving a ledge: only the grounded modes, Sonic_MdNormal and Sonic_MdRoll, call Sonic_Jump. T3sonicretro/s1disasm · _incObj/01 Sonic.asm L113–116, L318, L348

Sources

Code

Secondary