Skip to content
◆ Ball Boy Tiki/README.md·~/projects/ballboytiki
● Game · 2d platformer

Ball Boy Tiki

role year 2026

A Mario-style browser platformer where my friend Tiki, a Messi fan, has to beat Ronaldo. Levels come from a built-in editor and a .NET API.

ReactTypeScriptVite.NETMySQL
9
Boss states
31
Editor block types
410
Lines in BossCR7.ts

My friend Tiki is a Messi fan. So I made him a game where the final boss is Ronaldo, to make Ronaldo the more cool person, haha.

Ball Boy Tiki is a Mario-style platformer that runs in the browser. You play as Tiki, a ball boy, and your job is to get the ball back. It started as a football inside joke between the two of us. Then it kept growing: worlds, dialogue, enemies shaped like energy drink cans, a level editor and a boss fight.

The CR7 fight, then a few bricks going down in the level editor.

Ronaldo, then the GOAT

The boss fight is sick. It was also the hardest part to build, and not because of one nasty bug. It was all the different things he does and the different stages he goes through.

CR7 lives in BossCR7.ts as a state machine with nine states. He patrols. He does a SIU jump, which is four states on its own: the jump, the air time, the landing and the descent. He charges at you. He gets stunned. And when phase two kicks in, he transforms from his human form into the GOAT. Each state has its own timer and its own rules for what comes next, and getting them to hand over to each other cleanly took most of the effort.

src/engine/BossCR7.ts
1export type BossState = 'IDLE' | 'PATROL' | 'SIU_JUMP' | 'SIU_AIR' | 'SIU_LAND' | 'SIU_DESCEND' | 'CHARGING' | 'STUNNED' | 'TRANSFORMING';
Dialogue box with Ronaldo saying "You think you can be the best ball boy in the world?" while Tiki faces the GOAT on a stone floor.
He opens with a question. Then it's "I am the King! I am the GOAT!" and a SIUUUUUU.
Tiki facing the GOAT in the stone arena, with the closed gate behind him and the "CR7 - THE GOAT" health bar at the top.
The gate shuts behind you once the fight starts.

The editor is such a flex

None of the levels are hardcoded. I built the editor into the game itself. Pick a block from the palette, click to place it, right-click to delete, drag to scroll. Double-click a block and you can give it dialogue, and a dialogue line can fire an event. START_BOSS is one of them, and it's how the fight gets triggered. There are 31 block types, from grass and pipes to NPCs, linked teleporters, background zones with their own music, and the boss himself.

Save, and the level goes to a .NET API as one JSON string in a MySQL Levels table, next to a world number, a level number and a published flag. When you pick a level on the world map, the game asks the API for it and builds the map from that JSON. A new level or a whole new world shows up without touching the frontend.

The level editor: block palette on the left, a level with the TEMU ANFIELD house, coins, a gate, and a staircase of bricks being placed.
Click to place, right-click to delete. Save sends it to the API.

Did Tiki beat it?

He played it. His review: it was actually really hard, haha. I'm counting that as a win.

It's done for now. It was always more of a joke than a product, and the live version is offline. The shots and clips on this page come from a local run with a couple of levels rebuilt for it, since I no longer have access to the original database.

9
Boss states
31
Editor block types
410
Lines in BossCR7.ts