← Camp Home
RBS CODE Β· PROJECT CHOOSER

20 Game Recipes

Click HTML, CSS, JavaScript or Result. Nothing is hidden backwards anymore.

All games use game-tools.js. Put it in the same folder, then place <script src="game-tools.js"></script> before your own JavaScript. The Result tab injects it automatically.
Student JS lines ignores blank lines, comments and lines that are only closing braces. It is a rough measure of how much meaningful game logic the student reads/writes.
JS3

1. Move the Robot

NEW: Reusable keyboard movementTOOLS: moveWithKeys, keepInside
6Student JS lines
HTML
CSS
YOUR JAVASCRIPT
LIVE GAME
Easy upgrades:
Change speed 15 β†’ 30Use WASDAdd a finish target
JS3

2. Coin Collector

NEW: Collision + score + randomTOOLS: moveWithKeys, touching, changeNumber, randomPosition
12Student JS lines
HTML
CSS
YOUR JAVASCRIPT
LIVE GAME
Easy upgrades:
Win at 10Coin worth 5Add a trap
JS3

3. Treasure Rush

NEW: Treasure + danger + win ruleTOOLS: touching, randomPosition, changeNumber, setText
9Student JS lines
HTML
CSS
YOUR JAVASCRIPT
LIVE GAME
Easy upgrades:
Move the trap20-second timerGold gem worth 5
JS3

4. Key + Locked Door

NEW: Remember game state with true/falseTOOLS: touching, hide, setText
11Student JS lines
HTML
CSS
YOUR JAVASCRIPT
LIVE GAME
Easy upgrades:
Two keysFake keyDoor opens level 2
TIMERS

5. Dodge!

NEW: Visible game loopTOOLS: move, randomX, atEdge, touching
9Student JS lines
HTML
CSS
YOUR JAVASCRIPT
LIVE GAME
Easy upgrades:
Speed 7 β†’ 10Add survival scoreAdd another rock
TIMERS

6. Road Racer

NEW: Falling trafficTOOLS: move, randomX, atEdge, touching
9Student JS lines
HTML
CSS
YOUR JAVASCRIPT
LIVE GAME
Easy upgrades:
Count cars passedFaster every 5 pointsTwo enemy cars
TIMERS

7. Timed Treasure Rush

NEW: CountdownTOOLS: startCountdown + JS3 core
11Student JS lines
HTML
CSS
YOUR JAVASCRIPT
LIVE GAME
Easy upgrades:
10-second sprintTrap removes timeBonus gem
TIMERS

8. Monster Chase

NEW: Enemy follows youTOOLS: moveToward, touching
6Student JS lines
HTML
CSS
YOUR JAVASCRIPT
LIVE GAME
Easy upgrades:
Monster speed 2 β†’ 4Collect gems while escapingSafe zone
ARRAY + LOOP

9. Maze Escape

NEW: Many wallsTOOLS: moveIfClear
7Student JS lines
HTML
CSS
YOUR JAVASCRIPT
LIVE GAME
Easy upgrades:
Key inside mazeTimerMoving enemy
ARRAY + LOOP

10. 3 Crystals β†’ Mystery Key

NEW: Inventory + tradeTOOLS: countItem, removeItems, findTouching
15Student JS lines
HTML
CSS
YOUR JAVASCRIPT
LIVE GAME
Easy upgrades:
Door that needs gold key4 crystals but only need 3Different trader prices
ARRAY + LOOP

11. Potion Ingredient Quest

NEW: Different quest itemsTOOLS: hasAllItems, findTouching
13Student JS lines
HTML
CSS
YOUR JAVASCRIPT
LIVE GAME
Easy upgrades:
Two potion recipesRare ingredientPotion opens a path
JS3

12. Mini Shop

NEW: Gold economyTOOLS: changeNumber + if
14Student JS lines
HTML
CSS
YOUR JAVASCRIPT
LIVE GAME
Easy upgrades:
Buy speedBuy livesPrices change
ARRAY

13. Story Quest: Locked Village

NEW: NPC quest stateTOOLS: touching, hide, setText
12Student JS lines
HTML
CSS
YOUR JAVASCRIPT
LIVE GAME
Easy upgrades:
More NPCsChoice of routesSeveral quest stages
JS3

14. Two-Player Race

NEW: Two control setsTOOLS: moveWithKeys, touching
7Student JS lines
HTML
CSS
YOUR JAVASCRIPT
LIVE GAME
Easy upgrades:
Maze raceMoving finishBest of 3
JS3

15. Two-Player Treasure Battle

NEW: Shared target + two scoresTOOLS: moveWithKeys, touching, randomPosition, changeNumber
13Student JS lines
HTML
CSS
YOUR JAVASCRIPT
LIVE GAME
Easy upgrades:
First to 10Trap steals a pointBonus treasure
SMOOTH KEYS

16. Pong

NEW: Hold keys + bouncing speedTOOLS: trackKeys, keyDown, move, touching, atEdge
15Student JS lines
HTML
CSS
YOUR JAVASCRIPT
LIVE GAME
Easy upgrades:
Add scoreBall speeds upSmaller paddles
PLATFORMER

17. Platform Escape

NEW: Gravity + jump + platformsTOOLS: trackKeys, keyDown, applyGravity, standingOnAny, landOnPlatforms
12Student JS lines
HTML
CSS
YOUR JAVASCRIPT
LIVE GAME
Easy upgrades:
Coins on platformsMoving platformsEnemies
DOM+ / ARRAY

18. Space Defender

NEW: Create and move bulletsTOOLS: createSprite, findTouching, move
19Student JS lines
HTML
CSS
YOUR JAVASCRIPT
LIVE GAME
Easy upgrades:
Score hitsAliens moveEnemy bullets
ARRAY + LOOP

19. Dungeon Key Maze

NEW: Maze + inventory + locked doorTOOLS: moveIfClear, touching, hide
14Student JS lines
HTML
CSS
YOUR JAVASCRIPT
LIVE GAME
Easy upgrades:
Several keysTreasure roomsMonster patrol
ARRAY + LOOP

20. Rescue Mission Story Game

NEW: Multi-item questTOOLS: hasAllItems, findTouching, setText
14Student JS lines
HTML
CSS
YOUR JAVASCRIPT
LIVE GAME
Easy upgrades:
NPC cluesShop for foodTimed final escape
↑ TOP