Skip to content

Coding Basics with Sprite Lab

CDE1 Available

Coding Basics with Sprite Lab

Build a strong foundation in programming logic using the intuitive block-coding tools in Sprite Lab. Three classes that establish the essential terminology and concepts behind every modern programming language.

Duration

~3 hours

(x3) 1 Hour Sessions

Pathway

Coding & Logic

Difficulty

Beginner

Requirements

No prerequisites required

This is a foundation course open to all students — no prior coding experience needed.

What This Course Unlocks

  • Code.org Sprite Lab account integration
  • Projects you can save, share, and edit at home
  • Foundation for future coding courses (typed languages, robotics)
  • Your Sprite Lab Coding Basics badge

What You'll Learn

  • Navigate the Code.org Sprite Lab workspace
  • Build a scene by adding backgrounds and sprites
  • Use prompt blocks to ask the user questions
  • Capture and store user input using variables
  • Use event blocks to trigger actions
  • Use IF blocks to control how a program responds
  • Create and use functions to keep code clean
  • Understand conditional operators (>, >=, <, <=, !=)
  • Use behaviors to move sprites continuously
  • Combine logic with AND / OR operators

Course Curriculum

  1. 1

    Class 1 — Sprite Lab and the Scene

    Get to know the workspace. Start a new project, add a background, add a sprite, and reposition it on the canvas.

    ~15 min
    New Project in Sprite Lab Add a Background Add a Sprite Reposition the Sprite
  2. 2

    Class 1 — User Input and Variables

    Add a prompt block, save the user's answer in a variable, run it... and notice nothing visible happens yet (we need an event next).

    ~15 min
    Add a Prompt: "What is your name?" Assign Response to a Variable
  3. 3

    Class 1 — Events and Displaying the Response

    Add an event block so the sprite reacts. Make it say the user's actual answer back. Combine text with the variable for a real-feeling response.

    ~15 min
    Add Event: When [variable] Answered [Sprite] Say [Hello, World] Replace Text with the Variable Concatenate Text + Variables
  4. 4

    Class 1 — Challenge: Sprites Chatting

    Two sprites have a real conversation. One asks, the other answers — using the user's typed reply.

    ~15 min
    Sprites Chatting
  5. 5

    Class 2 — Event Blocks Scene + Track Variable Count

    Build a scene with imported backgrounds and sprites. Create a variable to track clicks, then make Left and Right arrow sprites change the count when clicked.

    ~25 min
    Import Backgrounds + Sprites Create Variable bg_count = 0 Print bg_count for Testing Event: When [sprite] Clicked Change bg_count by +1 / -1
  6. 6

    Class 2 — IF Blocks and Backgrounds

    Use IF blocks to actually change the background based on bg_count. Three scenes total. Duplicate for both arrows.

    ~15 min
    IF bg_count = 1 → Scene 1 Duplicate IF Blocks for Right Arrow
  7. 7

    Class 2 — Clean Code with Functions

    You're repeating the same blocks — that's a smell. Move them into a function called bg_change. Call it from each event. Much cleaner!

    ~10 min
    Create Function: bg_change Replace Repeated Blocks
  8. 8

    Class 2 — Challenge: Village Tour

    A piggy sprite walks you through 5 village scenes. Each click changes background, moves the piggy, and updates what it says.

    ~25 min
    Village Tour with Piggy Sprite
  9. 9

    Class 3 — Build an Interactive Maze Game

    Design a maze layout, create a custom sprite costume, add arrow-key movement, track HP, lose HP when touching water, escape via stairs, plus a random wandering enemy.

    ~40 min
    Design the Maze Layout Custom Sprite Costume: Steps Function: maze_1 Arrow-Key Behavior HP Variable + On-Screen Display Touch Water → Lose HP Touch Stairs → Escape Random Wandering Enemy
  10. 10

    Class 3 — Level Up the Maze Game

    Make it harder and more fun. New enemies appear at random locations. Candy sprites give extra HP. Use AND logic for more complex rules.

    ~15 min
    Function: sun_sprite Candy Sprites = +HP AND Operator: HP > 2 AND count < 5
  11. 11

    Class 3 — Extra Challenge

    If HP hits 0, the character becomes a wandering enemy. If they reach the exit, create another level.

    ~10 min
    Character Dies → Becomes Enemy Create Another Level

Sprite Lab is a coding environment built by Code.org (the same people who run the famous “Hour of Code”). It runs in any web browser — nothing to install.

Instead of typing code (which is what older programmers do), you drag and snap blocks. Each block represents a real coding concept:

  • A “when clicked” block is a real event
  • A “set variable” block is a real variable
  • An “if this then that” block is a real conditional
  • A “do this group of stuff” block is a real function

Once you understand these blocks, switching to typed code (like JavaScript or Python) later is way easier.

By the end of CDE1, you’ll have made:

  • A chatting story with two talking sprites
  • A village tour with five different scenes and a guide sprite
  • A real maze game with HP, enemies, candies, and (if you go for the challenge) multiple levels

You’ll be able to keep these projects forever in your Code.org account — and share them with friends!

  • Yourself
  • A water bottle (recommended)
  • Optional: a Code.org account (free) so you can save and share your projects. Your instructor can help set this up.

You do not need a laptop. FundedYouth provides workstations.

Time commitment: Three 1-hour classes, in person. We recommend taking them in order: Class 1, Class 2, Class 3.

Age: Ages 8 and up. Sprite Lab is specifically designed for this age range — it’s the same tool used in elementary and middle school coding classes nationwide.

Cost: Enrolling is free. Sessions may use FYBIT Credits — see the credits page. Basic Members get the first four courses (including CDE1) free.

What your kid will leave with: Three working projects — a chatting story, a village tour, and a maze game — plus the foundational concepts behind all modern programming.

“Is this real coding, or just kid coding?” This is real coding. Variables, events, conditionals, and functions are the four most important concepts in every programming language. The blocks are just a friendlier way to learn them. Kids who finish CDE1 are well-positioned to learn JavaScript, Python, Swift, or any other typed language.

Account note: Code.org accounts are free. Kids under 13 need a parent or teacher to create the account. Your instructor can walk you through this in class, or you can do it ahead of time at studio.code.org.

Signing up multiple kids? See the Login & Signup guide — there’s a clever email trick that works with just one inbox.

Is Sprite Lab the same as Scratch? They’re cousins. Both use drag-and-drop blocks. Scratch is made by MIT, Sprite Lab is made by Code.org. The ideas you learn transfer between them — and to typed languages too.

Can I keep my projects? Yes! Sprite Lab projects save to your Code.org account. You can share them, edit them at home, and show them off.

Do I have to finish all three classes? We strongly recommend it — each class builds on the one before. But each class also ends with a complete project, so even if you only take Class 1, you’ll walk away with something you made.

Can I make a game like Minecraft or Roblox? Not in CDE1 — those are huge, complex games. But you will learn the same building blocks the people who make those games use every day. Big projects are just lots of small projects stacked together.

What if I make a mistake? That’s the best part of coding — mistakes are how you learn. Sprite Lab has a giant “Undo” button. Your instructor is there to help you spot what went wrong and fix it.

Can I make my character look different? Yes! You can pick from a huge library of sprites, or create custom costumes (you’ll do this in Class 3 for the maze game).

More coding courses are in development. CDE1 is the foundation for the rest of the Coding & Logic pathway.

In the meantime, students who finish CDE1 often enjoy:

  • The 3D Printing pathway (3DP1 and 3DP2)
  • The CAD pathway (3DM1)
  • The capstone (MVP1)
  1. Sign in to the Portal
  2. Open Student → Browse
  3. Find CDE1 and click Enroll (this is free)
  4. Open the Sessions menu and register for an in-person session

Back to all courses →