The Language Server Game Architecture
23 November, 2026
Programming a game is the perfect storm of complexity.
Logically, a game must combine data, state, and often complex behavior. Visually, most games include graphics, audio, and an input scheme. Implementing all of these in one coherent system is treacherous.
The solution is to design the logical game and the visual game in isolation. The visual implementation is then free to act as a "dumb terminal". But, realistically, how do you structure a game to accomplish this? I believe the ubiquitous Language Server Protocol (LSP) is the answer.
Recently, I've been experimenting with embedding various scripting languages in Godot. GDScript has many issues, but among the most severe is that it simply cannot run outside Godot. That single restriction immediately violates the stated goal of separation of concerns.
In the course of these experiments, I often encountered small, niche languages that didn't have a stable VS Code extension. I have been programming in VS Code for years and don't plan to give it up just yet. For those languages, I would prompt Claude to set up such an extension for me.
Claude is not a great software architect, but it sure understands JavaScript and VS Code extensions. While working on these extensions, I inevitably encountered LSP, a JSON-based protocol that creates a separation of concerns between language knowledge and an IDE's visualization of that information. Any compatible editor or IDE can provide language intelligence using the same language server implementation.
It took me a little longer than I would have liked to recognize that this is what I was looking for in a game architecture.
At its core, LSP is a fairly rudimentary protocol. The language server encapsulates state and exposes queries and mutations over it. But, interestingly, there is an additional type of communication called a "notification", which the server is not permitted to reject. Notifications occur when the user has already performed an action; the server must simply deal with the new reality instead.
In a game development setting, this is also the missing piece. As a concrete example, consider that the game engine frequently owns the physics simulation. You would still want the logical game to be responsible for computing the outcome of physical interactions, but it is not generally feasible to expect the game logic to reimplement the physics engine. The answer is to inform the game of physics events using LSP-style notifications, expecting subsequent requests to account for that reality.
One way of looking at a program is as a sequence of languages that slowly brings the level of abstraction up to its domain. Low- and high-level languages do this at the machine level, adding garbage collectors and programming paradigms to increase expressiveness. User programs then build on that to reach the final domain, such as "the code editor", "the search engine", "the game".
In that sense, a game is nothing but the language used to describe and interact with it. This perspective makes the adoption of LSP to describe the game all the more fitting, as there is fundamentally no difference between a language server that speaks "Java" and a language server that speaks "chess". The final implementation of logical chess is simply an interface whose state, events, and methods speak the language of "chess": move, castle, surrender, and so forth.
All of this to say: a language server is the ideal architecture for a game, and it has proven itself in the code tools "genre" for years. LSP already codifies what it means to provide language (game) features to a tool (game engine), without making assumptions about that tool's capabilities. It doesn't care if you're analyzing, modifying, or rendering the language, just like a logical game wouldn't care if you're running it for testing, balancing, or in a game engine for its visuals.
I don't think Unity, Godot, or Unreal - the biggest game engines I know of - were designed with this in mind. They would much rather have you encode game logic directly inside the visual scene tree. I wholeheartedly disagree. I wish there were an engine-agnostic framework for writing a game, then picking the right tool to render it.