Ball Boy Tiki
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.
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.
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.
1export type BossState = 'IDLE' | 'PATROL' | 'SIU_JUMP' | 'SIU_AIR' | 'SIU_LAND' | 'SIU_DESCEND' | 'CHARGING' | 'STUNNED' | 'TRANSFORMING';


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.

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.