What are the roles of coordinates in game design?

Coordinates are a set of numbers that show the exact position of something. You might have learnt about coordinates in school already alongside something called the x and y axis.

If you did learn this in school, you probably weren't thinking about the crucial role that coordinates play in making video games work. Well, after last week’s lesson, we hope that you now see how important understanding coordinates can be. But… 

Did you know?

Or notice, that our coordinate system in Arcade was slightly different than in Maths class. This is the same for most game design platforms. 

Like in Maths class, in Arcade if we want our player to move horizontally towards the right-hand side of the screen, we change our x value to a positive number. However, unlike in Maths class, if we want our player to move upwards on the screen, we have to change our y value to a negative number.

It is important to remember and note this difference, not just for your game design but also for when you are doing coordinate geometry in Maths! 

Try this out at home

Build our Arcade coordinate map on your floor at home.

What you will need: A4 Paper cut into 6 pieces (or post-its), Scissors, Markers, some props (player, enemy, food), print "Spin the Coordinate Wheel" PDF or draw out your own.

  1. Below is the way the Arcade game screen is set-up. 

  2. Starting in the far corner of your room, place down one piece of paper. Write (0,0) on this one. 
  3. Under this, moving vertically (for Y), place 12 more pieces of paper going down in a line. With the final piece, write (0,120). 
  4. Go back to your (0,0) sheet and this time, move horizontally, placing 16 pieces of paper going across. On the final piece, write (160,0). 
  5. Place 12 pieces of paper under (160,0). On the final piece, write (160,120).
  6. Complete the outline of your "Arcade screen) but linking (0,120) to (160,120) using 15 pieces of paper. Now your outline of Arcade is complete.
  7. Grab your props- your player, enemy and a food. You can play this with someone at home. They can be the enemy, you can be the player and you are both chasing the food.
  8. Place your player at point (160,0), your enemy at (160,120) and your food at (0,60).
  9. Spin a pen on the coordinate wheels sheets (x and y) for your players next position 
  10. Spin a pen on the coordinate wheels sheets (x and y) for your enemies next position 
  11. Spin a pen on the coordinate wheels sheets (x and y) for your foods next position 
  12. Repeat steps 5,6,7 until either the player or the enemy is within touching distance of the food. Once the player or enemy gets the food- game over and reset starting positions.
  13. Get creative! Feel free to also change the starting positions and even the rules of the game. 

Hopefully, if you tried out the above, you have a really good understanding now of how coordinates work. In Lesson Two, we delve into this again and we introduce the concept of sprites moving at speed alongside these coordinates. 

Did you know?

If an object is moving at speed in a given direction, it is called velocity.

So, if you are ready, watch Lesson Two below. Game on! 

So, after this, we have added more words to our Arcade and coding glossary. We should now understand the role of overlaps, conditional statements, logical errors and velocity.

Before you move onto the next lesson, the DreamSpace team have assigned another home challenge. One is with code, and one is with materials in your home (but this activity will prepare you for one of our future lessons). 

  1. Create a moving image by drawing a range of pictures on different pages. So, when you flip through the pages, it gives the illusion that the image is moving.
  2. Try and add in a song to the beginning of your game using code.

Download the PDF below for some Home Challenge support documents including a guide to creating a simple flipbook.