People remember the atmosphere in the code game. And it’s a kind of work. But as the project grows, things start to fall apart. why? And what can we do about it?
I’ll talk about the problem, how I fixed it, and where I’m going from here.
What is “vibe coding”?
First of all, what is vibe coding? Originally created by Andreji Kalpati in a viral tweet, it is defined as “where it completely succumbs to the atmosphere, accepts the index, and even forgets that the code exists.
However, since then it has been used descriptively to mean many different things, from “using AI when coding” to “don’t think about code at all.” In this blog post, I define AI as a high-level programming language to build something. Like any other programming language, this benefits from understanding what’s going on under the hood, but it doesn’t necessarily require it.
This interpretation allows you to create a game without understanding the code, although you know that the basics are still useful.
Context Management
I just said, “As the project grows, things start to fall apart.” This is because there is evidence that the model’s performance starts to deteriorate when the context window is full. This is especially true for game development where the context can grow very quickly and very large.
To address this issue, there are many personal ad hoc solutions, such as many personal ad hoc solutions, such as writing LLM-specific contexts directly in the project file, and more comprehensive solutions such as the Claude Code Development Kit for large-scale context management.
We were unable to find a lightweight, accessible solution that does not rely on knowledge of critical domains. So I created the following: It depends on two basic commands:
/ Peel (prompt) to load context at the start of a conversation
Anecdotally, this works well. However, all related contexts can easily fit into the model’s context window, as they work best when the project remains lean and organized. Claude code is used here, but the same principle is generalized to other models.
Beyond context management tools, platform choice is important. You should also understand that a platform is an AI model, ideally leaving projects lean through high-level abstraction. So, what existing platforms are best for vibe coding?
First Exploration
I first tried three different approaches to the Vibe Coding game: Roblox MCP, Unity MCP, and Web. For each, I tried to build a simple incremental game inspired by grass cutting, using Claude code for each.
Here’s how it turned out:
Trial 1: Roblox MCP
Official Roblox MCP server. This allows AI to interact with Roblox Studio by sending commands to execute the code.
Strong Points:
A great level of abstraction AI using built-in game mechanics allows you to understand the syntax very easily and convert steps into code
Cons:
There are no files. Read data using only code. This causes context management to severely limit the very limited runtime information for AI to work in its own walled garden.
Roblox offers a great layer of abstraction to keep your codebase lean and manageable. This is perfect for vibe coding. However, due to the walled garden and lack of context, it is not feasible in atmosphere coding unless you are in-house at Roblox.
Trial 2: UnityMCP
Unity’s unofficial MCP server. This allows AI to interact with the UNITY editor. Read console, manage assets, and verify scripts.
Strong Points:
Cons:
There are many ways to do everything in a unified way, and it changes frequently across versions. For AI to be confused, it required knowledge of the important domains to communicate how to do things, not what AI performance would do.
Unity is a powerful engine with many features. However, engine complexity and variability make it difficult for AI to produce consistently good results without knowledge of critical user domains.
Trial 3: Web Stack
It uses an open web platform with 3.js for 3D rendering, Rapier for physics, and Bitecs for game logic.
Strong Points:
A much better AI proficiency than game engines.
Cons:
With a relatively low level library, you essentially need to build an engine before building a shortage of an ecosystem for high quality 3D games. The web tends to go towards 2D games and simple 3D experiences
This approach had perhaps the best AI performance due to the vast amount of web development data available during training. However, the low-level nature of the library meant that the game engine had to be essentially built before the game itself could be built. This allows you to work with a much higher level of abstraction, as you did with Roblox.
Although we had to build the engine first, this approach was the only approach that had fun results without heavy domain knowledge.
Comparison overview
Platform AI Performance Abstraction Level Context Management Open Source Roblox
Solution: Vibrator Same
After these experiments I had a clear picture: the web stack had excellent AI performance, but at a low level, while Roblox had full abstraction, but without openness and context management.
So, how about combining the best of both?
Introducing Vibegame, a high-level, declarative game engine built on top of three js, Rapier and Bitecs designed specifically for AI-assisted game development.
Design philosophy
There were three important decisions in Vibegame’s design:
Abstraction: A high-level abstraction with built-in features such as physics, rendering, and general game mechanics. This keeps the codebase lean and manageable. This is inspired by popular high-level sandbox games/games “Engine” such as Roblox, Fortnite Uefn, and Minecraft. Syntax: Declarative XML-like syntax for defining game objects and their properties allows AI to easily understand and generate code. This is similar to HTML/CSS, where AI models are already skilled. Architecture: Scalability and flexibility of Entity Component System (ECS) architecture. ECS separates data (components) from actions (systems), encourages maintaining modules and organisation as projects grow, and encourages atmospheric coding and context management.
The basic game looks like this:
world canvas=“#Game Canvas” Sky=“#87ceeb”>
Static parts Pos=“0 -0.5 0” shape=“box” size=“20 1 20” color=“#90EE90”>Static parts>
Dynamic Part Pos=“-2 4 -3” shape=“ball” size=“1” color=“#FF4500”>Dynamic Part>
world>
canvas id=“Game Canvas”>canvas>
script type=“Module”>
Import * As game from “Vivegum”;
game.run();
script>
See it’s working with this JSFiddle or live demo.
This creates a simple scene with a ground plane and a falling ball. Players, cameras and lighting are automatically created. All of these are modular and can be replaced. You can add any custom components and systems if necessary.
This includes the LLMS.TXT file in the system prompt or initial context that contains documentation about engines designed specifically for AI.
So does it actually work?
yes.
Well, a bit.
This is a game I built to test the construction of a simple incremental glass collection game using Vibegame and Claude Code. It worked very well as it requires minimal domain knowledge to implement core game mechanics.
However, there are still some major caveats.
It’s good for building something that game engines support. In other words, it’s a simple platformer or game that relies solely on basic physics and rendering. However, they are wrestling with interactions, inventory, multiplayer, combat, and more complex things that are not yet implemented in the engine.
So it doesn’t work because of the definition of vibe coding, the one-shot “Make Me A Game” approach. However, while it works very well by definition as a high-level programming language, users need to understand the functionality and limitations of the engine.
Try it yourself
To try it out right away, I created a demo that allows you to develop games directly in your browser using Vibegame using QWEN3-NEXT-80B-A3B-Instruct: Live Demo.
You can also test locally on frontier models like Claude code.
npm create vibegame@Latest my-game
CD My Game NPM Run Dev
Next, paste all the contents of the included LLMS.TXT into Claude.md and provide complete documentation on the engine that AI refers (or specifies its own context management system). This works with other models too.
What’s next?
The engine is currently very bare bones and supports only very basic mechanisms (unless you write from scratch). However, the initial results are promising.
The next steps are:
It fleshs out the engine with more built-in mechanics and approaches the same as the earlier versions of Roblox or UEFN. This will improve the AI
It’s also worth exploring how vibe coding games can take advantage of a more proven engine. For example, by building a high-level Sandbox game editor over Unity or Unreal Engine (similar to the way Fortnite’s Unreal Editor is built on Unreal Engine), AI provides a more controlled environment and leverages the power of an established engine.
You could also see more in-house solutions from key players.
Follow me and follow what’s going on in the space!
link: