What are tilemaps?

Tilemaps allow you to develop levels, and define playspaces for the characters in your games to roam around. Tilemaps provide us with an easy opportunity to design two dimensional maps. In Arcade, the typical tilemap size is 16 pixel x 16 pixel images (or tiles).

The other advantage of tilemaps is that we don't have to design each pixel of our game as we can create some templates with tilemaps pretty quickly and combine them in the way we want for our game. 

Did you know?

Mario Bros (which evolved to Super Mario Bros) used tilemaps for their games. This allowed them to implement the game logic they needed but also helped with the games performance. 

Before, we learn more about tilemaps in lesson three, try to understand the logic of the pseudocode (i.e. code that is not using a specific programming language) below in this unplugged challenge. 

Try this out at home

What you will need: Pen, paper

  1. Observe the image below:
  2. Right now, if the tilemap above was displayed it would be 12 black tiles x 8 black tiles. Can you rewrite the pseudocode so that the tileMap would display the following:

                  a) A 6 x 6 red square on a black background

                 b) A black + dividing the tilemap into four yellow sections 

                 c) A yellow star on a black background

                 d) Your first initial in black and second initial in yellow on a red background. 

    Note: If you have 3 different coloured pens, pencils or markers to do this challenge, it will be much clearer. You can change the above to let the colours you have equal a number (0, 1, 2) instead

Our solutions to the above can be found in the PDF file attached here. Well done!

Now that we can draw tilemaps using pseudocode, you should have no problem jumping straight into lesson three below to learn about the importance that tilemaps will now play in your Arcade game. 

So, now that you have learned about tilemaps, strings, projectiles, and inputs, can you complete the home challenge before moving onto the next lesson? The DreamSpace team want you to add a different command in your game now for when you press button B.