I vibe-coded a 2D Game Engine in 2 days. Written in C. It’s amazing what you can do with AI agents these days.

I’ve been experimenting with spec-driven development with Claude Code as the coder and Codex as the reviewer. And I wondered, what happens if I don’t read the code and put all my faith in these agents? We made a long spec describing what I wanted, divided it into milestones, and I let the agents rip. After 2 days of prompting, here it is. I did not write a single line on this one, nor did I read the code (it’s probably horrendous). The engine is far from usable though. Nevertheless, it’s amazing how with proper guidance these agents can build in a short amount of time.

Libraries used:

  • flecs ECS
  • SDL for rendering, input, image, sound, font
  • nuklear for Editor GUI
  • cJSON for serialization
  • cglm
  • 2D assets from Kenney.

Obviously there are a TON of bugs and edge cases. This kind of workflow has serious issues, especially with debugging. These agents were generating 5000-6000 lines of C code each day while I do the visual inspection and “taste” testing. This velocity is a recipe for disaster. It was a fun experiment though.

Features

  • Shared engine library (DLL) used by both the editor and standalone runtime
  • Three build targets: engine library, standalone runtime player, and editor
  • ECS architecture. Data-oriented.
  • Editor GUI menu bar and panels (entities, assets, inspector, log)
  • 2D viewport with transform gizmos (move, rotate, scale)
  • Importing textures, audio, fonts, and .tmj from Tiled
  • Saving and loading scenes
  • collision, audio, sprite animation, debug overlay, logging system
  • Export game as .exe
  • Opening and creating a new project
  • Windows only

Missing features

  • custom user game code and hot reloading
  • Rigid-body physics
  • event system
  • Parent/child entity hierarchy
  • Prefab system
  • Undo/redo

Send me a message.


Recent Posts: