Makecode Arcade
Beginner
50 mins
Teacher/Student led
+90 XP

From Blocks to Text in Makecode Arcade

Students continue their MakeCode Arcade project by creating a player sprite and adding arrow-key control, using PRIMM to predict, build, run and debug a working program.

Teacher Class Feed

Load previous activity

    1 - Start: What We're Building ~5 mins

    Quick recap: last time we made a start on this MakeCode Arcade project — who can remember one thing a sprite is? Today we'll keep building Crafting Pixel Characters: you'll design your own pixel character and make it move with the arrow keys. Open the project you saved earlier and have your device ready — we'll predict first, then build, run and fix.

    2 - Predict Before You Run ~10 mins

    Before anyone runs anything, look at what we are about to build and commit to a prediction. What will the program do when it runs? What will you see on screen first, and what will happen when you press an arrow key? Say your prediction to your partner so we can check it later.

    3 - Creating a New Project ~7 mins

    Start by creating a new project on MakeCode Arcade. You can do this by going to the MakeCode Arcade website here and clicking on 'New Project'.

    4 - Creating a Sprite ~6 mins

    Now let's create a sprite for your character. This is the pixel art that represents your character in the game. Add the following code:

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

    In the img`...` section, you can draw your character using the pixel editor that appears when you click it. Make your character unique to you!

    5 - Animating the Sprite ~6 mins

    Let's make your character move! We will use the controller blocks to allow your character to move when the arrow keys are pressed. Add the following code:

    controller.moveSprite(mySprite)

    Now you can control your sprite using the arrow keys in the simulator.

    123learn · Online learning platform

    Unlock the full learning experience

    You're previewing this lesson. Get full access to this lesson and hundreds more — each one ready to teach, with interactive activities, printable resources and pupil progress tracking built in.

    Hundreds of curriculum-aligned lessons
    Interactive activities in every lesson
    Printable resources & progress tracking
    Copyright Notice
    This lesson is copyright of Coding Ireland 2017 - 2025. 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