Sheathless: a wuxia RPG made with AI, from Guangzhou to the Qiantang tidal bore, playable in your browser
This time the brief was a turn-based RPG in the style of 1990s Chinese RPGs, set in old China. The story begins in Guangzhou. On a typhoon night, He Yuanzhou, a fifteen-year-old boatman’s son, pulls half a sword out of the mud by the Pearl River. A sword spirit called Sheathless (無鞘) lives in it and teaches him to fly the sword. But the sword’s power is not free: every time he uses it, something has to be paid back.
Yuanzhou and two companions travel north through Baiyun Mountain, Danxia Mountain, Meiguan Pass, the Fuchun River, Lin’an and West Lake, all the way to the Qiantang River. The places are real; the people and the story are made up.
The game is called Sheathless (無鞘). It is a game for a retro TV game console, only 2 MB in all, with a prologue, five chapters, a finale and an epilogue, and it can be played through to the end. The story, code, maps, characters, enemies and music were all made by an AI. The AI worked for about 160 minutes, which comes to about US$53 at API prices.
Play it in your browser: aixsfc.app/player/?load=tidesword. It is free; to share it, send your friends this address. The game is in Chinese.
The story and the maps
| Chapter | Places | What happens |
|---|---|---|
| Prologue: Typhoon Night | Pearl River bank, Haizhu Rock | Finding the broken sword; flying it for the first time |
| 1: Guangzhou | Guangzhou, a pirates’ warehouse, the Nanhai God Temple | Rescuing Qingyi; chasing the pirates |
| 2 to 5 | Baiyun Mountain, Danxia Mountain, Meiguan Pass, the Fuchun River, Lin’an, West Lake, the Qiantang River | Play it and see |
| Finale and epilogue | ? | Play it and see |
There are 18 maps in all, drawn from five tile sets (Guangzhou, mountain roads, the Jiangnan water towns, Lin’an, Qiantang), each with its own tiles and a day and a night set of colours.
How it plays






- Walking and talking: the arrow keys walk, A looks and talks, holding B runs. Some conversations ask you to choose.
- Fights: turn-based, with attack, skills, items, defend and run. HP and MP, single and group attacks, healing, curing poison, reviving a fallen companion, critical hits and poison.
- The party: Yuanzhou, Qingyi and Zheng Jiu, each learning their own skills as they level up. Yuanzhou attacks with the flying sword, Qingyi heals and revives, Zheng Jiu stands in front to protect the others. The level cap is 20.
- Bosses: 6 boss fights, plus one story fight the game goes on after even if you lose.
- Also: shops, inns, chests, a menu (status, skills, items, save), battery saves, and an automatic save at the start of each chapter.
A demo first, then the rest
The AI first wrote the outline of the story, the characters and the places, and we agreed on the ending before it started. The first round was a demo: the prologue and chapter 1, with 6 maps, 8 kinds of enemy and 9 songs, up to the chapter 1 boss.
We played the demo in the player on aixsfc.app, and the AI changed a few things from what we found. For example, on a map where the goal was hard to see, it drew the thing to look for, so players know where to go. Then it went on to finish the story, adding 12 maps, 17 kinds of enemy and 5 songs.
The demo’s engine only had room for one region’s pictures, so before the later chapters the AI changed the engine:
- Tiles per map: a region’s tiles, how they combine, and their colours are sent to video memory when you enter a map. Before, all maps shared one set of at most 512 tiles.
- Characters per map: the characters a map uses are packed into 8 KB and loaded when you enter it.
- Enemy pictures per fight: only the enemies in this fight, and their colours, are loaded.
With all the chapters done, we played it again from the start, and from what we found the AI added descriptions of skills and items, messages saying what a skill or item did when used from the menu, and fixed a few places where a player could get stuck.
How the AI built it
- Story: the story, maps and dialogue are written as data and compiled into an event script with 38 commands, run by an interpreter in the game. The maps are drawn by code as well, by placing pieces such as houses, temples, pagodas, piers and bridges.
- Text boxes: HDMA sets a window for each scan line, and colour maths darkens the picture inside it, so the boxes look like translucent dark panels. The Chinese font is the Cubic 11 pixel font, with only the characters the game uses: about 1,100 glyphs.
- Art: map tiles, characters and enemies are all drawn by code, pixel by pixel. Characters start from a 16×16 chibi template with hair buns, bamboo hats, official caps, headscarves or beards on top. The battle backgrounds and the title picture are ink-wash landscapes made by code.
- Music: 14 songs written in MML with our sfc-make tools. The sound driver could only hold one song, so this game adds a command to change songs: the sound processor goes back to its start-up upload routine and the game sends the next song.
- Size: about 8,100 lines of 65C816 assembly and about 3,000 lines of JavaScript for the generators and test tools. A 2 MB game file with an 8 KB battery save.
How we checked it can be finished
- Story: a headless emulator with button scripts triggered every scene from the title to the end: each chapter’s story, the boss fights, the finale and the epilogue were all checked on screen.
- Maps: a check tool walks each map from every entrance and makes sure every exit, story trigger and character can be reached.
- Difficulty: a battle simulator uses the game’s own formulas and fights 2000 battles at the expected level. Each chapter ends at about level 12, 14, 16 and 18, and at the expected level the bosses are beaten in about half to nine in ten fights. The simulated player is simple; a real one should do better.
What it cost
| AI working time | about 160 minutes (the demo about 111 minutes, the later chapters about 33 minutes, fixes after play-testing the whole game about 16 minutes) |
| Model | Claude Opus 5.5, about 420 replies |
| AI output tokens | about 630,000 |
| Tokens processed | about 150 million (mostly cache reads) |
| Estimated cost | about US$53 (at Anthropic API prices, November 2026; subscriptions are billed differently) |
| Anything else | nothing: the font is openly licensed, and everything else was made for this game |
Versions
| Version | What changed |
|---|---|
| 1.261106.0 | In shops, the money line at the bottom is no longer cut off by the description |
| 1.261105.9 | The game saves itself whenever you walk into another map; after a lost fight you go on from the last save |
| 1.261105.8 | The title screen shows the version number |
| 1.261105.7 | Chapter 1, Guangzhou: the west gate guard leaves as soon as you hear about the warehouse, without leaving the map |
| 1.261105.6 | Levelling up cures poison and sleep |
| 1.261105.5 | Using a skill or item from the menu says what it did; poison from a fight lasts after it, sleep ends with it |
| 1.261105.4 | Items used from the menu work as they should (e.g. the revival pill); item lists have pages; skills and items have descriptions |
| 1.261105.3 | The full game: chapters 2 to 5, the finale and the epilogue |
| 1.261105.2 | The goal on Haizhu Rock is easier to see; attacks hit the chosen enemy; night fights no longer look garbled |
| 1.261105.1 | Renamed Sheathless; the raft in the prologue is easier to find |
| 1.261105.0 | The demo: the prologue and chapter 1 |
Not done yet
- All the art is drawn by code; the hero, the bosses and the backgrounds could be replaced with finer pictures.
- Companions don’t follow the hero on the map, and the party isn’t drawn in fights yet.
- The difficulty of the later chapters has only been tuned with the simulator; it needs more people to play it through.
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, ACh-K, SIL Open Font License 1.1.
- Places: Guangzhou, Baiyun Mountain, Danxia Mountain, Meiguan Pass, the Fuchun River, Yan Ziling’s Fishing Terrace, Lin’an (Hangzhou), West Lake, Lingyin Temple, Feilai Peak, the Liuhe Pagoda and the Qiantang tidal bore are real places; the people and the story are fiction.
- Code, story, maps, characters, enemies, music: made from scratch for this game.