Sports Day: a school sports day made with AI, from jump rope and tug of war to the relay, played to the music in your browser
This time we wanted a sports game, about something almost everyone in Taiwan has been through: the primary school sports day. The stand where the principal speaks, strings of flags, a tent for each class with parents cheering, a lunch box at noon, and the relay at the end of the day, worth double points.
The four classes have the names schools there often use: 甲, 乙, 丙 and 丁, the first four of the old Chinese ordinal signs, roughly A, B, C and D. You are class 丁 (Ding), last overall last year and out to turn it around; last year’s champion was class 甲 (Jia). There are seven events in the day:
| When | Events |
|---|---|
| Morning | Jump rope, beanbag toss, three-legged race |
| Noon | Lunch (the game saves) |
| Afternoon | Tug of war, big ball, dodgeball |
| Last | The relay (double points) |
After each event the classes are ranked: 4 points for first, then 3, 2 and 1. At the end the prize-giving shows the totals, with one of three endings depending on how your day went. The school, the classes and everyone in it are made up.
The game is called 加油!運動會 (SPORTS DAY). It is a game for a retro TV game console, and the whole game file is 2 MB. The rules, code, pictures, characters and ten songs were made by an AI. The AI worked for about 150 minutes, about US$33 at API prices. The game text is in Chinese.
Play it in your browser: aixsfc.app/player/?load=sportsday. It is free; to share it, send your friends this address.
How it plays









- Play to the music. Most events test rhythm and timing, not how fast you can tap. Tug of war, the three-legged race and the big ball have a beat bar at the top: press when the triangle reaches the ring. In the relay and the three-legged race the foot due shows at the bottom left and turns gold when it is time. Mashing the buttons breaks the rhythm and loses.
- Jump rope: press A when the rope comes under the feet. Each jump speeds the rope up; trip, and it starts slow again. Three jumpers, 20 seconds each, added up.
- Beanbag toss: up and down pick the angle, A starts the power meter, A again throws. Each beanbag gets its own wind: a low angle is less affected by it but needs exact power; a high one goes in more easily but drifts.
- Three-legged race: the partner calls “one” for left and “two” for right. Keep in step and the strides get longer; the wrong foot and both of you fall over.
- Tug of war: press A on the “heave”. In time, again and again, and the whole class’s strength adds up. The semi-final is against class Jia; win it and you are in the final.
- Big ball: press A on the call to push, and steer through 12 pairs of cones with up and down; hit a cone and the ball stops. Timed.
- Dodgeball: watch the thrower’s wind-up. Arms up means a high ball: press down to duck. Low and leaning means a low ball: press B to jump. Arm drawn back means one at the chest: press A to catch it, which also brings a classmate back into the game.
- The relay: press left and right in turn on the beat of the steps; in time, you speed up. Press A in the changeover zone to pass the baton; too early and it drops.
- Three difficulties and free practice. Easy (younger children, playing with a parent), normal and hard differ only in how wide the timing windows are and how strong the other classes are. Free practice plays any single event, good for taking turns.
A demo first, then the rest
The AI first wrote a plan: seven events, the order of the day, and for each event how it plays and which buttons it uses. The demo came first, with jump rope, tug of war and the relay, from the opening to the prize-giving. The other four events followed to make the full day.
A sports game is very different from the role-playing and stealth games we made before, so this time none of the earlier game engines were reused, only what has nothing to do with the genre: the Chinese font and text box, the sound driver and the build tools.
After play-testing, the changes were mostly about feel. The relay first took a step every eighth note, which was too fast, so it became one step every quarter note, with wider timing windows. The three-legged race got a beat bar, and dodgeball stopped counting keys pressed before the throw. One fix was about timing: the AI measured in the emulator which frame each beat of the music falls on, and set every event’s judged beat a little after the beat you hear. The player’s sound delay was also made steady, where before it drifted.
How we checked the difficulty
The AI wrote bot players. They read the beat straight from the game’s memory and then press a little off on purpose, by skill level. There are five levels:
- Perfect: always on the beat.
- Good: always inside the timing window.
- Average: off by up to the window plus 2 frames, missing about one press in four.
- Sloppy: off by up to twice the window.
- Masher: no rhythm, just pressing.
Each event was played 6 times per difficulty and per level, 90 games an event. The table shows how many the “average” bot won:
| Event | Easy | Normal | Hard |
|---|---|---|---|
| Jump rope | 6/6 | 3/6 | 0/6 |
| Beanbag toss | 6/6 | 3/6 | 0/6 |
| Three-legged race | 6/6 | 3/6 | 0/6 |
| Tug of war | 6/6 | 0/6 | 0/6 |
| Big ball | 6/6 | 4/6 | 0/6 |
| Dodgeball | 6/6 | 4/6 | 2/6 |
| The relay | 6/6 | 6/6 | 2/6 |
The “good” bot wins nearly every game in every event at every difficulty, and the masher wins none. The beanbag toss has no beat: the bot works out the range of power that lands in the basket with the same flight rules as the game, then misses by its level.
The bots also played the whole day, from the title to the prize-giving, and reached all three endings:
| Bot | Difficulty | Class Ding | Best other class | Ending |
|---|---|---|---|---|
| Perfect | Normal | 32 | 21 | Champions |
| Average | Normal | 24 | 24 | Champions (a tie goes to Ding) |
| Sloppy | Easy | 16 | 26 | 3rd |
| Masher | Normal | 8 | 28 | 4th |
How the AI built it
- One module per event. Each of the seven events has its own rules, opponents and screen, written in 65C816 assembly, sharing the text box, the scoreboard and the prize-giving. The other classes do not follow a script: they are simulated by the same rules as the player, according to each class’s strength.
- The beat follows the music. Each event has a metronome that counts frames (about 60 a second); a beat is 32 or 40 frames, exactly one quarter note of its song. No text is redrawn during an event, because a redraw takes longer than a frame and the beat would slip one frame behind.
- Lining up the beat without ears. The emulator records the sound of every frame; the frames where it suddenly gets louder (a drum, the start of a note) are compared with the metronome, and measured again after every change.
- Every picture is drawn by code. The sports ground is one 512-pixel-wide picture whose ends join up: flags, classrooms, the stand, four class tents with parents, a four-lane track. In the relay the sky, the school building and the track scroll at different speeds (HDMA). The children have 8 side-on and 5 front poses, and each class has its own colours.
- Ten new songs. Title, jump rope, tug of war, the relay, lunch, the prize-giving, beanbag toss, three-legged race, big ball and dodgeball, written in MML (music written as text) and turned into the console’s sound data.
What it cost
| AI working time | About 150 minutes (plan, demo and full game about 132 minutes; play-test fixes to the feel about 18 minutes) |
| Model | Claude Opus 5.5, about 330 replies |
| AI output tokens | About 380,000 |
| Tokens processed | About 100 million (mostly cache reads) |
| Estimated cost | About US$33 (Anthropic API prices, November 2026; subscriptions are billed differently) |
| Other costs | None: the font is openly licensed; everything else was made for this game |
Versions
| Version | What changed |
|---|---|
| 1.261107.6 | The relay’s timing windows are wider |
| 1.261107.5 | The beats line up with the music, and the cues turn gold inside the timing window; a beat bar in the three-legged race; dodgeball ignores keys pressed before the throw |
| 1.261107.4 | Three-legged race: the partner’s call is a white speech bubble, “one, left” / “two, right”, and the foot due shows on the grass |
| 1.261107.3 | The full day: beanbag toss, three-legged race, big ball and dodgeball added; in the relay the other foot counts as a step too |
| 1.261107.2 | The relay takes a step every quarter note, with wider timing windows |
| 1.261107.1 | The children in the tug of war are no longer cut off |
| 1.261107.0 | Demo: jump rope, tug of war and the relay |
Not done yet
- The difficulty was worked out with bots; how it feels to people needs more players.
- The rhythm events have not been tried carefully on touch screens; their timing windows may need tuning there.
To make your own game with AI, run npx https://aixsfc.app/skill/aixsfc.tgz in an empty folder and start claude; see the home page.
Sources and licences
- Font: Cubic 11 (俐方體11號) by ACh-K, SIL Open Font License 1.1.
- The school, the classes and everyone in it: made up.
- Code, rules, pictures, characters and music: made from scratch for this game.