Run Claude Code for free with Ollama and build a Breakout game

Kevin installs Ollama and Claude Code on Windows, connects them to the local Gemma 4 12B model, and builds then upgrades a playable Breakout game with no subscription or API cost.

Kevin Stratvert · YouTube · published Nov 10, 2026 · Software & DevOps

Run Claude Code for free with Ollama and build a Breakout game — video by Kevin Stratvert▶ Watch on YouTube
Prompt
Build me a simple Breakout arcade game in a single index.html: mouse-controlled paddle, bouncing ball, bricks that give points, and a restart button. Then improve the existing game (don't start over) with a glowing ball and particle effects when bricks break.

Visual breakdown

Kevin installs Ollama to run a free AI model on your own computer, installs Claude Code, and connects the two so Claude Code uses a local model (Gemma 4 12B) instead of Anthropic's. With it he builds a playable Breakout game from one prompt, then improves it.

The problem: Claude Code normally needs a subscription or per-token API usage; he wants to use it without paying for either.

From zero to a game built by a local model

  1. Install OllamaCopy the install command from ollama.com into PowerShell, check with ollama --version
  2. Raise context lengthIn the Ollama app settings set context to 64K; larger uses more memory
  3. Install Claude CodeRun the PowerShell install command from the Claude Code site, check with claude --version
  4. Make project folderCreate a breakout game folder and change into it
  5. Connect to local modelRun the Ollama launch command, pick Gemma 4 12B; Ollama downloads it and Claude Code starts
  6. Prompt the gameAsk in plain language for an arcade Breakout game; files land in the folder
  7. Playable gameOpen index.html in the browser; then ask for improvements to the existing game
InstallSetup stepsLocal AI modelResult

Choosing a local model

  1. Smaller models run on less powerful computers
  2. Larger models are usually more capable but need more memory
  3. Models ending in cloud run in the cloud, not locally
  4. He tested Gemma 4 12B and it worked well for this game

By the numbers

64Kcontext length set
24 secto improve the game

Do it yourself on Windows

Mac and Linux also work; he demos on Windows with PowerShell.

  1. Install Ollama from ollama.com and check ollama --version
  2. Open the Ollama app, Settings, and raise context length (he uses 64K)
  3. Install Claude Code with the command from its site and check claude --version
  4. Make a project folder and cd into it
  5. Run the Ollama command that connects Claude Code and pick a local model
  6. Describe the game you want, then open index.html in your browser
  7. Ask Claude Code to improve the existing game instead of making a new one

Type /exit to leave; rerun the same command in the folder to continue later.

Caveats

  • Performance depends on your own hardware.
  • Local models like Gemma 4 aren't always as capable as Anthropic's Claude models, especially on complex projects.
  • You may need to experiment with different prompts or models.
  • A bigger context window uses more memory, so lower it if your computer struggles.
  • If Windows doesn't recognize claude, add Claude Code to your path (he gives a command in the description).

Distilled from the video’s captions

How to try it

  1. Open Claude Code.
  2. Copy the prompt and fill in the [placeholders].
  3. Watch Kevin Stratvert's video for the full walkthrough and setup.

Related use cases

Share