Game Arcade
Advanced
60 mins
Teacher/Student led
165 points
What you need:
Chromebook/Laptop/PC or iPad/Tablet

Prison Break

In this step-by-step lesson, students will learn to create a maze game called 'Prison Break' using MakeCode Arcade. They will design a character, create a maze for the character to navigate, set a goal, and add a timer to increase the challenge. The lesson includes creating a new project, sprite creation, movement controls, drawing a maze, setting walls, camera controls, goal setting, win conditions, and a countdown timer.
Learning Goals Learning Outcomes Teacher Notes Lesson Files

Live Class Feed

This is a live feed of the latest activity by your students on this lesson. It will update in real-time as they work on the lesson.
Load previous activity

    1 - Introduction to Prison Break Game

    Welcome to the 'Prison Break' game creation lesson! In this lesson, you will learn how to create a fun and exciting maze game using MakeCode Arcade. You will create a character, design a maze for the character to navigate, and set a goal for the character to reach. You will also learn how to add a timer to make the game more challenging. Let's get started and have some fun!


    2 - Create a new Arcade project

    Go to the https://arcade.makecode.com website and create a new project.

    3 - Create a sprite

    Next create a sprite for your character that you will control and navigate through the maze.

    Add the following code to your project and then design a character using the sprite editor.

    let mySprite = sprites.create(img`
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . 7 7 . . . . . . . . 
        . . . . 7 7 7 7 7 . . . . . . . 
        . . . . 7 7 7 5 7 7 . . . . . . 
        . . . . 7 7 7 7 7 7 . . . . . . 
        . . . . 7 7 7 7 7 7 . . . . . . 
        . . . . . . 7 7 . . . . . . . . 
        . . . . . . 7 7 . . . . . . . . 
        . . . . . 7 7 7 7 7 . . . . . . 
        . . . . . . 7 . . . . . . . . . 
        . . . . . . 7 . . . . . . . . . 
        . . . . . 7 7 7 . . . . . . . . 
        . . . . 7 7 . 7 7 . . . . . . . 
        . . . . . . . . . . . . . . . . 
        `, SpriteKind.Player)

    4 - Move with the buttons

    Now let's control our player with the buttons.

    Add the following new code:

    let mySprite = sprites.create(img`
        . . . . . . . . . . . . . . . . 
        . . . . . . . 7 7 . . . . . . . 
        . . . . . 7 7 7 7 7 7 . . . . . 
        . . . . . 7 7 7 7 7 7 . . . . . 
        . . . . . 7 7 7 . 7 7 . . . . . 
        . . . . . 7 7 7 7 7 7 . . . . . 
        . . . . . 7 7 7 7 7 7 . . . . . 
        . . . . . . 7 7 7 7 . . . . . . 
        . . . . . . . 7 . . . . . . . . 
        . . . . 7 7 7 7 7 7 7 . . . . . 
        . . . . . . . 7 . . . . . . . . 
        . . . . . . . 7 . . . . . . . . 
        . . . . . . 7 7 7 7 7 . . . . . 
        . . . . . 7 7 . . . 7 7 . . . . 
        `, SpriteKind.Player)
    controller.moveSprite(mySprite)
    
    
    Once you've added the new code, test that you can move your player sprite with the joystick or your keyboard arrow keys.

    5 - Draw your maze

    Now let's draw the maze that our character will need to go through.

    Add the following new code:

    let mySprite = sprites.create(img`
        . . . . . . . . . . . . . . . . 
        . . . . . . . 7 7 . . . . . . . 
        . . . . . 7 7 7 7 7 7 . . . . . 
        . . . . . 7 7 7 7 7 7 . . . . . 
        . . . . . 7 7 7 . 7 7 . . . . . 
        . . . . . 7 7 7 7 7 7 . . . . . 
        . . . . . 7 7 7 7 7 7 . . . . . 
        . . . . . . 7 7 7 7 . . . . . . 
        . . . . . . . 7 . . . . . . . . 
        . . . . 7 7 7 7 7 7 7 . . . . . 
        . . . . . . . 7 . . . . . . . . 
        . . . . . . . 7 . . . . . . . . 
        . . . . . . 7 7 7 7 7 . . . . . 
        . . . . . 7 7 . . . 7 7 . . . . 
        `, SpriteKind.Player)
    controller.moveSprite(mySprite)
    tiles.setCurrentTilemap(tilemap`level6`)
    
    

    Then click on the grey box in the set tilemap to block, this will open up the tile map editor which you can use to create a simple maze.

    You should now have a maze in your game. Make your character move around the maze and you will notice that your character can walk through the walls.



    Unlock the Full Learning Experience

    Get ready to embark on an incredible learning journey! Get access to this lesson and hundreds more in our Digital Skills Curriculum.

    Copyright Notice
    This lesson is copyright of Coding Ireland. Unauthorised use, copying or distribution is not allowed.
    🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more