Learn to code with your friends!

A turn-based multiplayer game that introduces programming

Best played on a laptop or desktop computer with a keyboard. The game is not designed for phones or tablets.

See it in action

Control your animal with code to collect coins and gems.

Animal Coding gameplay: four animals on a farm stage with the code editor on the right

Watch the introduction

New to Animal Coding? Start here.

A quick video tour of the game. Each stage also begins with its own short introduction video.

Open in Google Drive

How to play

Roll, code, collect

Players take turns. The stage ends when all coins and gems are collected or every player reaches the turn limit, and the player with the highest score wins.

1

Roll the dice

On your turn, roll the dice to get action points.

2

Write your code

Write code to move your animal and pick up items, then run it and watch your animal go.

3

Collect and win

Collect as many coins and gems as you can. Highest score at the end of the stage wins.

Getting started

  1. On the title screen, click Config.
  2. Enter the player names. For fewer than four players, leave the extra name fields blank.
  3. Choose a Code Editor: Text to type code, or Blocks (beta) to drag and drop blocks.
  4. Click OK, then click Start.

Keyboard shortcuts

KeyAction
SpaceRoll the dice
Ctrl-SpaceInsert code (Text editor)
Ctrl-RRun code
Ctrl-SSkip a turn
EscapeStop running code
F1Show game options

Stages and play time

Four stages, one new idea at a time

Each stage begins with a short introduction video.
Plan for at least 90 minutes to play all four stages.

StageTopicCommands introducedPlay time
Stage 1
Commands
Sequence
move_forward()turn_left()turn_right()pick_up()
10–15 min
Stage 2
Loops
Iteration
eat()for
10–15 min
Stage 3
Conditional statements
Selection
if (path_ahead)if (path_to_the_left)if (path_to_the_right)
10–15 min
Stage 4
Functions
steal()function
30+ min
Stage 2 example
move_forward();
eat();

for(i = 0; i < 10; i++){
  move_forward();
  pick_up();
}

turn_right();
move_forward();

Type it or build it with blocks

Pick the Text editor to type real code, or the Blocks editor (beta) to drag and drop the same code as blocks.

Technical requirements

  • Browser: tested with Mozilla Firefox, Google Chrome, and Safari.
  • Device: a laptop or desktop computer with a keyboard. The game does not work well on iPads.

For educators

Bring Animal Coding to your classroom

Classroom setup

Form groups of 2–4 students. Each group shares one PC or laptop and plays together, with each student controlling one of the animals with code.

Who is this for?

The game introduces text-based programming to secondary and higher education students. It works well:

  • For fun events such as Computer Science Education Week.
  • As a first experience with text-based programming for students who have already used block-based programming.
  • To reinforce what students have learned in a block-based programming environment.

Younger students

For younger students, the Computer Science Teachers Association (CSTA) Standards recommend block-based programming (e.g., Code.org or Scratch) to introduce basic programming concepts first. The game’s Blocks editor shows the same code as drag-and-drop blocks, which can help students move from blocks to text.

Note: The Blocks editor is still in beta. The stage introduction videos currently teach text-based programming, so students using Blocks may need extra guidance from the teacher.

Research

This game was developed as part of dissertation research. A link to the associated academic publication will be provided once it is available.

Ready for stage one?

Gather up to four players, pick your animals and write your first line of code.

Play the Game