

Sonic Physics Guide - bemmu
http://info.sonicretro.org/Sonic_Physics_Guide?v=0

======
FreakyT
What's really impressive is that an active member of this site, "The Taxman",
completed a near-perfect implementation of these physics, and successfully
collaborated with SEGA to create official updated rereleases of Sonic CD [1],
Sonic 1, and Sonic 2.

[1]
[http://info.sonicretro.org/Sonic_the_Hedgehog_CD_(2011)](http://info.sonicretro.org/Sonic_the_Hedgehog_CD_\(2011\))

~~~
Mahn
These were actually a collaboration of two members of the community, "The
Taxman" and "Stealth". The former did the original Sonic CD iPhone demo which
opened the lines of communication with SEGA, while the later helped in
perfecting the physics and other details of the original games. Stealth had a
more extensive history [1] than The Taxman in disassembling and disecting the
original games and even did an unofficial port of Sonic 1 to GBA (limited to
one level) before.

Stealth is in fact urging SEGA now to consider giving them both green light to
develop a rerelease (remaster really) of Sonic 3/K [2], which would be the
next logical step having done all the prior games, but despite the super high
attention to detail and love the remasters got, SEGA doesn't seem to be
interested, presumably because the remasters didn't do that well commercially.
A shame, because it probably wouldn't be that expensive for SEGA even if they
did it just for the fan service.

[1] [http://info.sonicretro.org/Stealth](http://info.sonicretro.org/Stealth)

[2] [http://sonic3remastered.com/](http://sonic3remastered.com/)

~~~
FreakyT
I'm honestly impressed that SEGA allowed them to work on anything at all. As
someone who used to really enjoy Sonic games, I can't help but resent SEGA for
their seeming fixation on releasing absolutely terrible Sonic games.

For a brief period around 2011, it looked like they were back on track --
staring with Sonic Colors on the Wii, and followed by Sonic Generations and
Sonic 4ep2, they were on a roll releasing excellent games. Then came the
complete garbage that was Sonic Lost World, and it was back downhill from
there...

------
Mahn
In case you are interested in learning more about the original games there are
fully documented and dissected disassemblies available here (Motorola 68k
mostly):
[http://info.sonicretro.org/Disassemblies](http://info.sonicretro.org/Disassemblies)

------
dyarosla
I think the most interesting part of the guide was that the 'physics' engine
is _very pseudo physics- I would not have imagined that to handle running on
walls or ceilings would involve switching the logic to disjoint modes (four
quadrants approach) and moving the base sensors to accommodate the mode. In
fact, I wouldn't imagine that the physics logic would require all the sensors
that it does to get the feel of the game right.

I can only imagine how much tweaking had to be done for all the values to play
nicely and be enjoyable- perhaps a less heuristic-based implementation doesn't
offer as much control or was too process intensive?

Also a surprise to see that angle values were stored directly at grid pixel
locations.

~~~
Mahn
It's certainly true that the CPU (a Motorola 68k clocked at ~7.60 MHz) didn't
leave much space for process intensive operations; one misstep in your code
and the entire game would lag and slowdown. Developers of Sega Genesis games
were in fact discouraged of using DIV (division) instructions because they
took so many cycles. Fortunately most games could do with bit shifts, IIRC the
Sonic games almost never used DIV instructions and did fine.

~~~
pcwalton
Most programs even today don't do many integer divisions (which is why ARM
doesn't even support them, for example). Compilers are really good at
eliminating them.

------
ericfrederich
Neat. I'd love to have a playable Super Mario Brothers game like this:
[https://www.youtube.com/watch?v=KBb9wFP7uZM](https://www.youtube.com/watch?v=KBb9wFP7uZM)

Would you run an emulator in the background and interpret the 2d output to
drive the 3d game or would you extract the physics of the game similar to this
article and just re-implement so you're not relying on an emulator.

