top of page

Starting Out: Variables

Materials: Computer and accounts CoSpaces Edu, your game journal

 

 

 

 

 

 

The problem: Our character will start in a room, what will that room look like? Can you create a room with a locked door and a key? Can you create a hallway with multiple items to unlock a door? Do you know what variables are used for?  Have you ever used an if else statement?

Journal work is in white

This sections goal is to:

​

1. Draw a room design with a hidden key (will the key be behind a painting?, Bed? Under a carpet?)

2. Develop a back story as to why you have appeared there

3. Use a variable to activate an event

4. Use an If/Else statement 

4. Add you own creative elements into the scene 

​

​

​

​

​

 

 

 

 

 

 

 

 

 

 

 

Video 1

CoSpaces work is in yellow

video 2

​

video 3

​

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3. Now lets go a little deeper, lets go down the hall and create an number variable with an "If/Else" statement. The variable starts at 0 but every time the player collects an item that number goes up by one!  If the number equals (=) 3 then the door will open!

mar.jpeg

 

 

 

 

 

 

 

 

Lets level up, that room is pretty boring, what could you add to it to make it more like a real room?  Check out how to do that by pushing the button

Video 4

4. Now that we have set our variable and have that change by one every time something is clicked we need to use an "If/Else" statement to the code.

Video 5

You are gaining some cool new skills, maybe you don't just want one door to open? Perhaps there is a bit of a story developing around that mysterious orange cat that is playing around on the floor.  Test your creation on another student, see what they say about your game design so far.

 

bottom of page