Components of a Game

One of the things you want to ask yourself when you are making a game for the first time is, what are the parts of a game?
Most games have these main aspects:
A start button!
  • You need a way for the user to tell the game to begin.
An introduction- or as we say in coding - “Setting the stage”
  • “Setting the stage” means to have some kind of instructions or intro for your user. You would be pretty confused if you just clicked “Start”, and then had to play without any idea of what you were doing!
  • Usually, the way we set the stage in Scratch is to either have the instructions written on the background OR have a Sprite tell us what we need to do - otherwise known as “spoken” directions.
Some kind of indication that the game has actually started!
  • Most games will have an intro and then it will switch to the actual game! This means that you probably need to switch your stage or background at some point during the game.
An objective in your game
  • An important thing to remember is that your game needs a goal! Choosing what you want the point of your game to be in the beginning stages of development will help a TON during the process of actually creating it.
  • Here are some examples of objectives: “survive” as long as possible without getting hit by the enemy, complete a map or path of some sort, “fight off” an enemy, or a common one, repeat an action that gets harder over time and see how long you can continue without failing.
A score counter
  • The score can come from many different things- time, how many enemies you have beat, how many tokens you’ve collected, etc.
Increasing Difficulty (optional)
  • Games tend to have some kind of difficulty increase throughout the game.
A way for the game to end
  • Once the end goal of your game is reached, or your character has been “defeated”, the game needs to end. It can’t just go on forever!
Show the user their score
  • This is a great place to use the “show” block!
A way for the user to play again!
  • One way to allow your user to replay is to use a key on your keyboard (“r” is a great one to use) to change your game back to the intro stage.
Copyright © 2021 Code 4 Tomorrow. All rights reserved. If you would like to use content from any of our courses, you must obtain our explicit written permission and provide credit. Please contact classes@code4tomorrow.org for inquiries.