Skip to content

I Cloned Mario With an LLM, and It Surprised Me

I asked an LLM for a Super Mario clone, then gave it a story loosely based on a book about the Spanish Civil War. It was more powerful than I expected. Here is what came back.

AI Claude Code Games October 11, 2026 2 min read
Soft pastel illustration of three brick blocks on a ground line with a flag on a pole and a warm setting sun behind them

This is a clone of Super Mario Bros. I wanted to see what an LLM could do with a game everyone already knows, so I used Claude Code with Opus 5 and asked for a Mario-style platformer in a single HTML file with no dependencies, no build step and no image assets. You can play it here.

What came back

Screenshot of the game: a worker in a flat cap and blue overalls on a cobblestone street at dusk, with brick blocks, a red and black flag, factory chimneys and a setting sun

A full side-scrolling level:

  • Cobblestone streets, brick platforms, question-mark blocks, pits, and a flag at the end
  • Variable jump height, coyote time and jump buffering, which are the things that make a platformer feel like Mario instead of a box sliding around
  • Enemies you can stomp, power-ups that make you grow, and a way to take a hit and shrink instead of dying
  • A parallax skyline with factories and lit tenements
  • A chiptune soundtrack that shifts up a key on each pass

The whole project is one file and one commit. There’s no art folder, because the art is drawn in code. There are no audio files either, because the sound effects and the music are synthesized with the Web Audio API. The repo has nothing else in it.

I’m not going to claim it’s perfect. But the physics felt right far sooner than I expected, and I didn’t have to explain what coyote time is. It already knew that’s what makes a jump feel forgiving.

The story

For the setting I borrowed loosely from Travels Through the Spanish Civil War by Nick Lloyd, which I was reading at the time. I also did Nick’s tour in Barcelona, so the place had stuck with me. The player is a worker in Barcelona in 1936, and the rest of the game takes its look from that. It’s only a loose nod to the book, and the game is still a game.

What I took from it

What struck me was how remarkable it is that an LLM can do this at all. It reproduced a game people know by heart, with the feel intact, and it wrote its own graphics and its own music in code. A while ago that would have taken me a long time to build by hand.

It’s more powerful than I thought it would be. Give it a go and let me know if you reach the flag.

Building something AI-first? Let's talk.

GEO/AIO strategy, MCP and agentic architecture, marketing-engineering ops. Or just say hi.