Learn

Game mechanics are how the player controls the game and consist of rules regarding the movement of player characters, environment allowances, and the general rules of a game. Game mechanics also includes how a game reacts to player controls which will also follow a set of rules.

These mechanics include:

  • the space of a game: the setting of the game
  • state of the game: this could include player score or health, current level, or other important game variables
  • actions: these are the options available to our player that can affect the game state, such as character movement
  • necessary skills: the skill set the player must have in order to complete the game successfully
  • elements of chance: randomness added to the game, such as random enemy actions or something like a dice roll

To illustrate the concept of game mechanics, let’s take the example of a car racing game.

  • The space of the game would be the race track the cars are on.
  • The state of the game could be the number of laps completed, the number of laps remaining, the elapsed time, and the maximum speed of the car.
  • The actions available to our player could be: accelerate, decelerate, turn, and shift gears.
  • The skills required would be for the player to be good at controlling their car and maneuvering it on the race track.
  • The elements of chance are the random obstacles that appear on the race track that our player must avoid, such as cars or barriers.

It is imperative that we keep the reward and penalty parameters consistent with the desired player experience for our game. Remember to make a player feel good when they do something well and inspire them to do better when they perform poorly.

Instructions

This screenshot of Super Mario Bros. shows Mario jumping to retrieve a mushroom that will make him big. This state mechanic of becoming big is crucial because it allows Mario to be hit twice before losing a life. Other mechanics include:

  • Space: a fast-paced side-scroller with platforms, enemies, and power-ups
  • State: displayed on the top of the screen, including the character Mario, a score of 32950, 17 coins, level 4-1, and 376 seconds left to complete the level
  • Actions: walk, run, jump, and duck
  • Skills: a combination of the above actions help to complete the levels quicker, collect more coins or get more points
  • Randomness: enemies may follow patterns but can move in unpredictable ways, such as Lakitu in the smiling cloud, who throws the spiked shell enemies at Mario throughout this level

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?