VibeGame: Exploring Vibe Coding Games

The article explores the concept of 'vibe coding' in game development, addressing the challenges of context management and introducing VibeGame as a high-level solution for AI-assisted creation.
People are trying to vibe code games. And it kind of works, at first. However, as the project grows, things begin to fall apart. Why? And what can we do about it?
I'll talk about the problem, how I fixed it, and where to go from here.
First, what is vibe coding? It's originally coined by Andrej Karpathy in a viral tweet where it's defined as where you "fully give in to the vibes, embrace exponentials and forget the code even exists".
However, since then, it's used descriptively to mean a lot of different things, anywhere from just "using AI when coding" to "not thinking about the code at all". In this blog post, I'll define it as: using AI as a high-level programming language to build something. Like other programming languages, this benefits from understanding what's going on under the hood, but doesn't necessarily require it.
With this interpretation, you could make a game without understanding code, though knowing the fundamentals still helps.
Earlier I mentioned that "as the project grows, things begin to fall apart". This is because there is evidence that as the context window fills up, model performance begins to degrade. This is especially true for game development, where the context can grow very large, very quickly.
To address this issue, there are many personal ad-hoc solutions, such as writing LLM-specific context directly in the project files, or more comprehensive solutions like Claude Code Development Kit for large-scale context management.
I couldn't find a lightweight, accessible solution, which doesn't rely on significant domain knowledge. So I made one: 🧅 Shallot, a simple, lightweight, unopinionated context management system for Claude Code. It relies on two basic commands:
/peel [prompt]
to load context at the beginning of a conversation
/nourish
to update context at the end of a conversation
Anecdotally, this works well. However, it works best when the project stays lean and well-organized, so all relevant context can easily fit in the model's context window. While Claude Code is used here, the same principles generalize to other models.
Beyond context management tools, platform choice is critical. The platform should ideally naturally keep projects lean through high-level abstractions, while also being something AI models understand well. So, what existing platforms are best suited for vibe coding?
I initially tried 3 different approaches to vibe coding games: Roblox MCP, Unity MCP, and web. For each, I tried to build a simple incremental game inspired by Grass Cutting Incremental, using Claude Code for each.
Here's how it went:
| Platform | AI Performance | Abstraction Level | Context Management | Open Source | |---|---|---|---|---| | Roblox | ⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐ | ❌ | | Unity | ⭐ | ⭐⭐ | ⭐⭐⭐ | ❌ | | Web | ⭐⭐⭐⭐⭐ | ⭐ | ⭐⭐⭐⭐⭐ | ✅ |
Roblox MCP: The official MCP server from Roblox. This allows AI to interact with Roblox Studio by sending commands to run code. Pros: Excellent level of abstraction. Cons: No files, limited context management.
Unity MCP: The unofficial MCP server for Unity. Pros: Full file system access. Cons: High complexity, AI gets confused easily, requires significant domain knowledge.
Web: The open web platform using three.js. Pros: Superior AI proficiency, full file system access. Cons: Low-level libraries, requires building an engine first.
Introducing VibeGame, a high-level declarative game engine built on top of three.js, rapier, and bitecs, designed specifically for AI-assisted game development. It uses an XML-like syntax and ECS architecture to keep codebases lean and AI-friendly.
A basic game looks like this:
<world canvas="#game-canvas" sky="#87ceeb">
<static-part pos="0 -0.5 0" shape="box" size="20 1 20" color="#90ee90"></static-part>
<dynamic-part pos="-2 4 -3" shape="sphere" size="1" color="#ff4500"></dynamic-part>
</world>
In conclusion, while vibe coding with VibeGame works well for simple mechanics, it still faces challenges with complex, unimplemented features. It marks a shift towards AI as a high-level interface for creation.
Source: Hugging Face Blog














