From SRB2 Wiki
Jump to: navigation, search
SPRYA0.png SPRRA0.png SPRBA0.png

Springs are common objects in Sonic games that propel the player upward and/or forward at a high speed. In SRB2, there are three types of springs that propel the player at different strengths; from low to high these are colored blue, yellow and red. Depending on the type of spring, they propel the player either upward (e.g. Yellow Spring), downward, diagonally upward and forward (e.g. Diagonal Yellow Spring) or diagonally downward and forward.

The height to which a spring can propel the player is impacted by two things: A player who is about 50 fracunits below a ledge will be automatically be pulled up to that ledge, increasing the practical height to which a vertical spring can propel the player. The pull-up effect increases with the player's speed, so the effect will be larger for stronger springs. Additionally, any object that is underwater and breaks the water surface will be given a speed boost that is proportional to their current speed. This means that underwater springs, especially stronger springs, will propel the player to a much larger height if they allow the player to break the water surface.

Apart from the player, pushable Objects such as the Gargoyle or Snowman can also be propelled by springs in the same manner. This is shown especially in Deep Sea Zone.

Springs in SRB2

  • Thing type 550: Yellow Spring – Propels the player approximately 450 fracunits into the air.
  • Thing type 551: Red Spring – Propels the player approximately 1080 fracunits into the air.
  • Thing type 552: Blue Spring – Propels the player approximately 166 fracunits into the air.
  • Thing type 555: Diagonal Yellow Spring – Setting the Ambush flag on this and other diagonal springs will rotate it clockwise by 22.5 degrees.
  • Thing type 556: Diagonal Red Spring

Spring Shells are similar to springs in that they use the SOC properties listed below in exactly the same fashion for exactly the same purpose, but they do not in fact have MF_SPRING set; only part of them acts like a spring to players/pushables, the rest acts like a standard enemy Object instead. However, the yellow versions will spawn yellow springs when destroyed.

Custom springs

It is possible to make custom springs for SRB2 with the use of SOCs. To make an Object behave like a spring, it needs to be given the MF_SPRING flag. The following Object properties control the spring's behavior:

  • RaiseState: The spring will go into this state when the player touches it. Springs that make a sound when touched should use an action that plays the appropriate sound in this state.
  • Mass: Indicates the vertical thrust of a spring. Negative values indicate downward thrust. To determine the Mass value that needs to be set in order to propel the player to a certain height, take the desired height in fracunits, take its square root and multiply it with the constant FRACUNIT (65536). For example, a spring with a Mass value of 16*FRACUNIT propels the player to a height of 256 fracunits.
  • Damage: Indicates the horizontal thrust of a spring. For purely vertical springs, leave this at zero.
  • PainChance: If set to 0, the player will change to their falling animation after bouncing on a spring (which is the default behavior as seen with SRB2's springs). If set to any other value, the player will change to their jumping animation, able to perform any aerial actions they would be able to perform if they jumped, such as their special ability.
  Object types [view]
General EnemyBossPushableSpringMonitorNiGHTS power-upProjectileAmbient sound effect
Special PlayerShieldsFreed animalsEmblemOverlay
Related links List of Object types