Name: Add Written Messages
Description: The game maker can display instructions and messages to the player at the start of the game. You can also add messages when something happens in the game. For example giving new levels a name.
Need for Pattern: Having written messages is a way of giving playing instructions to the player at the start of the game, giving them clues as they progress or just making the game more fun to play by adding story elements.
Related Game Patterns: Add Graphical Elements [related]
Links to other Computing Patterns: , Change Listener
Find the splash block under the Game section and drag one or more blocks to the beginning of the on start block.
You can also get your player to say something when an event happens. For example lets get the player to say Yum when collecting an apple.
Alter the overlap event code block to add in a sprite say block and set the time.
You can give your Levels name that come up before your players play them. To do this you will need to have added different levels to your game.
To start with we will create an Array (which is a kind of list) of the different names of the levels.
Now add a splash message at the start of your createLevel function. Note how you can use the level value to pick the right message from your list.
Test your game to check that your changes have the desired behaviour and that there are no side effects. For example,
you can ask yourself the following questions:
This Game Pattern is one of many allowing you to make improvements to your platform game and to learn coding and wider computing concepts. Find more on the Game Pattern page.