Player
The player is a special type of Object that the user controls and plays as in SRB2. The player responds to a set of configurable controls that allow it to move or perform an action such as jumping. In Single Player, one or two players can be present, the second player being controlled by a bot with limited AI if present. In multiplayer mode, however, multiple players can simultaneously be playing the game, either as a team or against each other, depending on the gametype being played.
In SRB2, as in most Sonic games, the player normally has only a single health point and will die instantly on contact with a harmful Object or hazard – these include enemies, bosses, projectiles, spikes, lasers, lava, etc. The player can collect rings as protection from hazards, which will be spilled on contact with them. Some power-ups such as shields or invincibility can also protect the player from hazards as well as prevent them from spilling rings. However, some hazards will instantanously kill the player regardless of rings or power-ups – e.g. crushers, death pits, drowning underwater.
The player itself has many attributes associated with it – the most important of these are displayed directly on the HUD: the player's ring count, the player's score, the time passed since the start of the level, and the number of lives the player has left. Additional attributes may be displayed depending on the gametype or the type of level being played. Unlike in Doom, SRB2 is usually played with a third person perspective, with the assistance of a chase camera to follow the player around – this allows players to see themselves on the screen directly, unlike in first person view.
Player Starts determine where the player is initially spawned (or respawned) in a map, though the exact function of them differs depending on the type of player start and the current gametype. However, in Single Player, Co-op, Race, and Competition, the player may respawn at a Star Post if one was activated before the player previously died, allowing the player to progress through the level without necessarily having to repeat from the beginning on death.
The exact abilities and movement speeds of the player depend on the character skin the player has chosen to play with – in unmodified SRB2, the main characters available are Sonic, Tails, and Knuckles. In multiplayer gametypes, the player can also switch their skin color; the exceptions to this are Team Match and CTF, where the player can only be colored Red or Blue.
Object/state data
The Object type for the player is known as MT_PLAYER
. The following properties of this Object type have special significance to the game:
SeeState
– Starting state for the animation displayed in the multiplayer character select menuAttackSound
– Sound played when the thok ability is usedPainState
– State for the player's pain and sliding animationDeathState
– Starting state for the player's death animationPainChance
– Default Object type for thokitemDamage
– Default Object type for spinitemRaiseState
– Default Object type for revitem
|
States – MT_PLAYER | ||||||||
---|---|---|---|---|---|---|---|---|
State | Sprite prefix | Sprite subset | Frame flags | Duration (tics) | Action | Var1 | Var2 | Next state |
S_PLAY_STND | SPR_PLAY | SPR2_STND | FF_ANIMATE | 105 | none | 0 | 7 | S_PLAY_WAIT |
S_PLAY_WAIT | SPR_PLAY | SPR2_WAIT | FF_ANIMATE | -1 | none | 0 | 16 | S_NULL |
S_PLAY_WALK | SPR_PLAY | SPR2_WALK | 4 | none | 0 | 0 | S_PLAY_WALK | |
S_PLAY_SKID | SPR_PLAY | SPR2_SKID | 1 | none | 0 | 0 | S_PLAY_WALK | |
S_PLAY_RUN | SPR_PLAY | SPR2_RUN | 2 | none | 0 | 0 | S_PLAY_RUN | |
S_PLAY_DASH | SPR_PLAY | SPR2_DASH | 2 | none | 0 | 0 | S_PLAY_DASH | |
S_PLAY_PAIN | SPR_PLAY | SPR2_PAIN | FF_ANIMATE | 350 | none | 0 | 4 | S_PLAY_FALL |
S_PLAY_STUN | SPR_PLAY | SPR2_STUN | FF_ANIMATE | 350 | none | 0 | 4 | S_PLAY_FALL |
S_PLAY_DEAD | SPR_PLAY | SPR2_DEAD | FF_ANIMATE | -1 | none | 0 | 4 | S_NULL |
S_PLAY_DRWN | SPR_PLAY | SPR2_DRWN | FF_ANIMATE | -1 | none | 0 | 4 | S_NULL |
S_PLAY_ROLL | SPR_PLAY | SPR2_ROLL | 1 | none | 0 | 0 | S_PLAY_ROLL | |
S_PLAY_GASP | SPR_PLAY | SPR2_GASP | FF_ANIMATE | 14 | none | 0 | 4 | S_PLAY_WALK |
S_PLAY_JUMP | SPR_PLAY | SPR2_JUMP | 1 | none | 0 | 0 | S_PLAY_JUMP | |
S_PLAY_SPRING | SPR_PLAY | SPR2_SPNG | 2 | none | 0 | 0 | S_PLAY_SPRING | |
S_PLAY_FALL | SPR_PLAY | SPR2_FALL | 2 | none | 0 | 0 | S_PLAY_FALL | |
S_PLAY_EDGE | SPR_PLAY | SPR2_EDGE | 12 | none | 0 | 0 | S_PLAY_EDGE | |
S_PLAY_RIDE | SPR_PLAY | SPR2_RIDE | 4 | none | 0 | 0 | S_PLAY_RIDE | |
S_PLAY_SPINDASH | SPR_PLAY | SPR2_SPIN | 2 | none | 0 | 0 | S_PLAY_SPINDASH | |
S_PLAY_FLY | SPR_PLAY | SPR2_FLY | 2 | none | 0 | 0 | S_PLAY_FLY | |
S_PLAY_SWIM | SPR_PLAY | SPR2_SWIM | 4 | none | 0 | 0 | S_PLAY_SWIM | |
S_PLAY_FLY_TIRED | SPR_PLAY | SPR2_TIRE | 12 | none | 0 | 0 | S_PLAY_FLY_TIRED | |
S_PLAY_GLIDE | SPR_PLAY | SPR2_GLID | 2 | none | 0 | 0 | S_PLAY_GLIDE | |
S_PLAY_GLIDE_LANDING | SPR_PLAY | SPR2_LAND | 7 | none | 0 | 0 | S_PLAY_STND | |
S_PLAY_CLING | SPR_PLAY | SPR2_CLNG | FF_ANIMATE | -1 | none | 0 | 4 | S_NULL |
S_PLAY_CLIMB | SPR_PLAY | SPR2_CLMB | 5 | none | 0 | 0 | S_PLAY_CLIMB | |
S_PLAY_FLOAT | SPR_PLAY | SPR2_FLT | 7 | none | 0 | 0 | S_PLAY_FLOAT | |
S_PLAY_FLOAT_RUN | SPR_PLAY | SPR2_FRUN | 7 | none | 0 | 0 | S_PLAY_FLOAT_RUN | |
S_PLAY_BOUNCE | SPR_PLAY | SPR2_BNCE | FF_ANIMATE | -1 | none | 0 | 0 | S_NULL |
S_PLAY_BOUNCE_LANDING | SPR_PLAY | SPR2_LAND | FF_SPR2ENDSTATE | 2 | none | S_PLAY_BOUNCE | 0 | S_PLAY_BOUNCE_LANDING |
S_PLAY_FIRE | SPR_PLAY | SPR2_FIRE | FF_SPR2ENDSTATE | 2 | none | S_PLAY_FIRE_FINISH | 0 | S_PLAY_FIRE |
S_PLAY_FIRE_FINISH | SPR_PLAY | SPR2_FIRE | 15 | none | S_PLAY_STND | 0 | S_PLAY_STND | |
S_PLAY_TWINSPIN | SPR_PLAY | SPR2_TWIN | FF_SPR2ENDSTATE | 2 | none | S_PLAY_JUMP | 0 | S_PLAY_TWINSPIN |
S_PLAY_MELEE | SPR_PLAY | SPR2_MLEE | FF_SPR2ENDSTATE | 2 | none | S_PLAY_MELEE_FINISH | 0 | S_PLAY_MELEE |
S_PLAY_MELEE_FINISH | SPR_PLAY | SPR2_MLEE | 70 | none | 0 | 0 | S_PLAY_FALL | |
S_PLAY_MELEE_LANDING | SPR_PLAY | SPR2_MLEL | 35 | none | 0 | 0 | S_PLAY_WALK | |
S_PLAY_SUPER_TRANS1 | SPR_PLAY | SPR2_TRNS | FF_SPR2SUPER|FF_ANIMATE | 7 | none | 0 | 4 | S_PLAY_SUPER_TRANS2 |
S_PLAY_SUPER_TRANS2 | SPR_PLAY | SPR2_TRNS | FF_SPR2SUPER | 3 | none | 0 | 0 | S_PLAY_SUPER_TRANS3 |
S_PLAY_SUPER_TRANS3 | SPR_PLAY | SPR2_TRNS | FF_SPR2SUPER|FF_FULLBRIGHT | 2 | none | 0 | 0 | S_PLAY_SUPER_TRANS4 |
S_PLAY_SUPER_TRANS4 | SPR_PLAY | SPR2_TRNS | FF_SPR2SUPER|FF_FULLBRIGHT | 2 | none | 0 | 0 | S_PLAY_SUPER_TRANS5 |
S_PLAY_SUPER_TRANS5 | SPR_PLAY | SPR2_TRNS | FF_SPR2SUPER|FF_FULLBRIGHT | 2 | none | 0 | 0 | S_PLAY_SUPER_TRANS6 |
S_PLAY_SUPER_TRANS6 | SPR_PLAY | SPR2_TRNS | FF_SPR2SUPER|FF_FULLBRIGHT | 19 | A_FadeOverlay | 0 | 0 | S_PLAY_FALL |
Related links
Object types | [view] | |
General | Enemy • Boss • Pushable • Spring • Monitor • NiGHTS power-up • Projectile • Ambient sound effect | |
Special | Player • Shields • Flickies • Overlay | |
Related links | List of Object types |