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

Speed cap

Sonic 2 partially fixed Sonic 1's very restrictive speed cap, but it still activates in limited situations. Specifically, the following conditions have to be met:

  • Sonic is not on the ground
  • Sonic has air control
  • Sonic is travelling above the normal maximum running speed on flat ground
  • The player holds the button corresponding to the direction of travel

If all these conditions are met, Sonic's horizontal speed reverts to the normal maximum running speed 6 p/f. Surprisingly, this is actually beneficial in some levels, see Chemical Plant 1 and 2, and Metropolis 1.

In Sonic 2, Sonic 3 and Sonic & Knuckles, the speed cap can be overcome by other means of acceleration such as boosters, slope jumps and running down hills. The games will handle this higher speed as the new speed cap until you slow down below the normal cap.

Given the right conditions, running would allow you to accelerate indefinitely. Rolling however has a set speed cap of 16 p/f no matter the situation in all games.

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