Back to Mini Game Engine
Code Studio · Level 9

Game Builder 🎮

Add real game actions. Each item your player collects is worth points — your method updates the score and the inventory, and the screen shows it live.

20-25 min Ages 9-12 Builder JavaScript
Code Editor

Build a player inventory.

Example code
class Player {
  constructor(name) {
    this.name = name;
    this.score = 0;
    this.inventory = [];
  }

  collect(item, points) {
    this.inventory.push(item);
    this.score = this.score + points;
    say(this.name + " found " + item);
  }

  showStatus() {
    say("Score: " + this.score);
    say("Items: " + this.inventory.join(", "));
  }
}

let explorer = new Player("Nova");
explorer.collect("star", 10);
explorer.collect("badge", 5);
explorer.showStatus();
🧩 Tap to add code blocks — build a player, collect for points
Name your player Nova, Bolt, Dragon, Unicorn, Cat, Dog… for an avatar. star badge/shield key
Game Screen

Your game, running live

PLAYER SCORE 0

Run your code to start the game…

INVENTORY

Waiting for your game…