An adventure in coding

Siege

Coming later

Designed for kids age 10 to 12

Two kids smiling over a fantasy map with wizard and dragon miniatures, a catapult, dice and a laptop, drawn in pen and ink. The girl points at a wizard figure on the board in front of her.

Designed for ages 10–12

Write the code for a turn-based stronghold conquest game played over our own classroom network, with chat you can use while you play!

The courses run in order: Summoning, then Parry, then Siege. Siege builds on Parry and covers more advanced JavaScript. You'll use ready-made code tools to build a chat, then teach the computer to referee: checking the rules and rolling the dice.

You'll also model the map and players.

Planned outline

More advanced JavaScript, then a networked final project

  1. Review functions

    Warm up with a toolbox of ready-made code

  2. Connect players

    Send messages between computers

  3. Build a chat app

    Send and receive messages

  4. Model the map

    Objects for strongholds and players

  5. Let the server referee

    Server-side dice and rule checks

  6. Run turns and timers

    Phases, delays, and whose turn it is

  7. Save your work

    Organize your code and save your game

  8. Then: the final project

    Networked stronghold conquest, with chat

Final project

Build networked Siege

Write a turn-based stronghold conquest game played over our own classroom network, with chat. The server checks the rules and rolls the dice.

Optional bonus

HTML controls

Read page controls and respond to events on the page.

How long

A short weekly course

Sessions of about an hour and a half

What you need

Windows laptops

We'll supply them, with Notepad and a web browser. Or bring your own.

Builds on

Parry

Summoning, then Parry, then Siege. More advanced JavaScript.

A first look

You'll warm up with ready-made code tools. Then you'll learn how two computers talk to each other.

// send a message to everyone
sendMessage("Your turn!");
  • Warm up with ready-made code tools
  • Build a chat app
  • The server referees dice and rules

Contact us for information about scheduling in your school or area.