AI x SFC Player

Posts · · 繁體中文 · 简体中文 · 日本語

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:

WhenEvents
MorningJump rope, beanbag toss, three-legged race
NoonLunch (the game saves)
AfternoonTug of war, big ball, dodgeball
LastThe 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.

From the title to the prize-giving (sound on): the opening, jump rope, beanbag toss, three-legged race, tug of war, big ball, dodgeball and the relay, a short stretch of each, played by the "good" bot on normal difficulty. The final standings are left for you to play. Picture and sound straight from the player's emulator.

How it plays

The opening: in front of the stand, a boy from class Jia teases class Ding
The opening: everyone lines up in front of the stand, and last year's champions, class Jia, start the teasing.
Jump rope: press A when the rope reaches the feet
Jump rope: press A when the rope comes under the feet; three jumpers, 20 seconds each.
Beanbag toss: a beanbag flying towards the basket on a pole
Beanbag toss: pick an angle, judge the power, mind the wind.
Three-legged race: the partner calls one, left; the beat bar at the top
Three-legged race: the partner calls "one, left" and "two, right"; press when the triangle at the top reaches the ring.
Tug of war: the semi-final, class Ding against class Jia
Tug of war: the semi-final against class Jia; press A on the "heave".
Big ball: pushing a big ball past the cones
Big ball: push on the call, steer past the cones with up and down.
Dodgeball: class Jia's thrower lets go
Dodgeball: read the thrower's wind-up to tell which ball is coming.
The relay: the changeover zone
The relay: the last event, double points. Press A in the changeover zone to hand over the baton.
The podium
The prize-giving: who stands on top is for you to find out.

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:

Each event was played 6 times per difficulty and per level, 90 games an event. The table shows how many the “average” bot won:

EventEasyNormalHard
Jump rope6/63/60/6
Beanbag toss6/63/60/6
Three-legged race6/63/60/6
Tug of war6/60/60/6
Big ball6/64/60/6
Dodgeball6/64/62/6
The relay6/66/62/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:

BotDifficultyClass DingBest other classEnding
PerfectNormal3221Champions
AverageNormal2424Champions (a tie goes to Ding)
SloppyEasy16263rd
MasherNormal8284th

How the AI built it

What it cost

AI working timeAbout 150 minutes (plan, demo and full game about 132 minutes; play-test fixes to the feel about 18 minutes)
ModelClaude Opus 5.5, about 330 replies
AI output tokensAbout 380,000
Tokens processedAbout 100 million (mostly cache reads)
Estimated costAbout US$33 (Anthropic API prices, November 2026; subscriptions are billed differently)
Other costsNone: the font is openly licensed; everything else was made for this game

Versions

VersionWhat changed
1.261107.6The relay’s timing windows are wider
1.261107.5The 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.4Three-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.3The 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.2The relay takes a step every quarter note, with wider timing windows
1.261107.1The children in the tug of war are no longer cut off
1.261107.0Demo: jump rope, tug of war and the relay

Not done yet

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