Sonic the Hedgehog/Game Mechanics and Glitches

From SDA Knowledge Base

Jump to: navigation, search

Game Mechanics

Spindashing

Spindashing has 8 possible speeds, between 8 pixels per frame (p/f) and 12 p/f in half integers. Every time a button is pressed you add 2 to the base value 8, which then subsequently decreases faster the higher the total value is. Because of this, the minimum requirement to get a 12 speed is 6 button presses, commonly referred to as a "6-tap".

Since you always decelerate while rolling unless going down a slope, getting back to running by jumping into ceilings, down slopes or inside loops are things you generally want to do after spindashing.

There's no guaranteed way to get a certain spindash speed, so usually runners do 3-taps or other increments in order to get close to the desired speed.

Universal timer

There's two different timing properties of moving objects in this game. The universal timer is where an object starts moving the instant you start the level, and will therefore be in a certain position at a certain time, every time.

Camera timer

The other kind is this one, which only starts moving once it's brought onto the screen (or near the screen - when the object is first rendered, in any case). Knowing which objects have which timing properties is important to good times when you have to deal with them.

Path switcher

This is an invisible item in the game that allows the levels to work as structured. There are three different levels of background/foreground and Sonic is always in one of them at any one time, and these items seamlessly switch Sonic from background to foreground and vice versa. This is especially necessary for things like loops to work, because if you didn't have them they would just be solid all the time and you wouldn't be able to enter it. Knowing where these are and how they work is key to some tricks in this game.

Mechanics specific to Sonic

Height

Sonic is a bit taller than Tails which means some zips, clips and tricks work differently or not at all. An example of a zip that Sonic can do but not Tails is the one right before the Lava Reef 2 boss skip and an example of a zip Sonic can't do is the Death Egg 2 level wrap. Whenever Sonic is doing a rolljump, he sinks 5 pixels into the ground on the first frame as opposed to Tails who only sinks 1 pixel. This is the main reason Sonic can clip into the ground at the spring in Marble Garden 1 but not Tails.

Insta-shield

In Sonic 3 there's a timer for instashielding that prevents you from doing it more often than about every second or so. This was removed in S&K.

Having used an air ability sets a value in the ram even if you would switch ability mid jump, as is the case with Sonics shields. For example, if you were to instashield into a bubble monitor, the game would prevent you from bouncing until you land, but still make the small bounce you always get when landing after bouncing on an object.

The fire shield instantly sets your horizontal velocity to 8 p/f and vertical velocity to 0. Therefore it's faster to spam it on flat ground as much as possible, but not while having a higher speed.

The electrical shield sets your vertical speed to 5.5 p/f upwards. It also protects against some damaging electrical hazards such as the capacitors in Death Egg, but not the sparks flying off of them.

The bubble shield sets your vertical velocity to 8 downwards and then 7.5 p/f upwards, which means for example that bouncing from a destroyable object will give you more height regardless of starting point, but bouncing from a higher point without an object won't.

Mechanics specific to Knuckles

Landing from a glide

When Knuckles lands from a glide, while it looks like he goes into a crouching animation he actually goes into a separate one, meaning you cannot spindash for 15 frames (1/4 of a second) after landing.

Superglide

Simply jump on an object (an enemy or an item box) and glide just before you hit it. This causes you to translate your falling speed upwards, and since you're gliding you have a much lower rate of acceleration towards the ground. In layman's terms, you end up a lot higher than a standard jump.

Advanced Techniques

Ramp jump

Sonic's jump speed and height are dependent on both your speed going into the jump and the slope of the ground you jump off. Running up a slope causes your jump to become much higher, while running down a slope will make you jump quite flat to the ground, gaining speed. This applies even if the slope is very small.

Loop jump

Similar concept, but inside a loop. If you're moving through the loop from left to right, a loop jump is from the top-left to the bottom-left. It's kinda finicky because if you land at different angles you get different speeds, but in the best case it is faster, and it's also a very convenient way to switch from rolling to running.

Zip

A zip occurs when Sonic is stuck in a wall somehow and presses left or right. Since collision detection is designed to stop you from going into a wall in the first place, pushing left against a wall makes the game push you back to the right so you aren't embedded in it. As a result, when you're already inside a wall holding left or right causes you to travel in the opposite direction much faster than you can attain by normal play.

Level wrap

This is what happens when a zip causes you to bypass the left edge of the screen. The game treats your X-coordinate in memory as a number less than 0 - but position coordinates are unsigned, so instead of a negative number it's a VERY large positive one - which correlates to the end of the stage. This requires some very specific circumstances depending on the level, but it can be used to skip to the end of Oil Ocean 2 and Metropolis 2, as well as Metropolis 3 if playing as Sonic and Tails, or Casino Night 2 if playing as Knuckles.

Screen wrap

Similar concept to the level wrap, but using vertical coordinates instead. In levels that wrap around infinitely vertically (in Sonic 2, only the three acts of Metropolis act in this way), instead of using absolute values for vertical position, it uses values linked to the camera position. The top of the camera is position 0, and anything above it is negative, which since position values are unsigned, is a large positive number, which causes the screen to scroll downwards to that position. In the time it takes to scroll down, any sprite objects cease to exist until they are brought back onto the screen, and your character can move into them.

Physics information

Personal tools