MiniLang After DOOM — A Self-Hosted Compiler, Quake, and a Growing Software Ecosystem

Back in March, I wrote about a small experiment that had gotten slightly out of hand: building my own programming language with ChatGPT, and then using it to run DOOM.

The original question was simple: Can I build a programming language with AI? The next question was, of course, Can it run DOOM? 🙂

Well, DOOM worked. But apparently I wasn’t quite finished. Since then, I have kept extending the language, its compilers, its libraries, and — probably the most fun part — the software written in it. The result is now a rather unexpected collection of game engines, tools, applications, and even a database server.

So this is a follow-up to my first article. What can MiniLang actually do today, and what have I built with it?

The biggest change: MiniLang can now compile itself

There is one sentence in my original post that is now wonderfully outdated: MiniLang is not self-hosted yet.

It is now.

The MiniLangCompilerML compiler is written in MiniLang and can compile its own source code into a new native compiler. The build process checks the self-hosting stages, including byte-identical output at the fixed point. That was one of my original long-term goals, and it is especially satisfying to see it work.

The original Python compiler has not disappeared. It remains the reference implementation and bootstrap path. Having two compiler implementations is useful: I can compare their behavior, run the same tests, and catch regressions that might otherwise be rather difficult to spot.

Both compilers generate native x86-64 executables — PE files for Windows and ELF files for Linux — rather than wrapping source code in an interpreter. The current documented release is 1.3.10, with fixed variable types and expanded typed numeric code generation. You can download the native compiler packages and start experimenting without installing Python.

To put it differently: I no longer need the Python compiler just to compile an ordinary MiniLang program. I can use a compiler built in MiniLang. That still feels a little strange in a good way. 🙂

What can MiniLang actually do now?

MiniLang started as a small, dynamically typed language with functions, arrays, strings, and a relatively simple syntax. It still tries to stay approachable, but it has become much more capable.

Today the language has classes, interfaces, inheritance, virtual methods, constructors, access modifiers, structs, enums, closures, packages, and imports. It supports optional type contracts for parameters, return values, and fields, as well as fixed-type variables and typed arrays. There are iterators, user-defined operators, and defer for resource cleanup. In other words, there are now quite a few things I definitely did not expect to need when I wrote the first interpreter. 🙂

Here is a small example of the newer object-oriented syntax:

interface Named
  function name() returns string
end interface

class Game implements Named
  title as string = "MiniDoom"

  function name() returns string
    return this.title
  end function
end class

function main(args)
  var game as Game = Game(title = "MiniQuake")
  print game.name()
  return 0
end function

The standard library has grown along with the language. There is file I/O, networking, TLS, cryptography, threads, tasks and synchronization, garbage collection, native-library bindings, and audio/video APIs. MiniLang also provides typed inline x64 assembly for situations where a higher-level abstraction is not enough. The compiler has gained optimizations, profiling support, and a separate object/link pipeline for larger projects.

Of course, none of this magically means that MiniLang beats C or C++ in every benchmark. Performance is an ongoing engineering problem, especially with dynamically typed values and garbage collection. But the useful question for me is no longer whether MiniLang can execute a toy example. It is whether it can handle real programs with real workloads.

And that brings us back to games.

DOOM was only the beginning

The original MiniDoom has continued to evolve. It now runs on Windows and Linux, offers the classic software renderer and an OpenGL renderer, supports the original DOOM and DOOM II game data, and includes its own UDP multiplayer implementation for cooperative and deathmatch games with up to four players. There is even an in-game console and an optional high-resolution rendering cache.

MiniDoom running DOOM II with the original software renderer
MiniDoom: DOOM II MAP01 using the classic renderer.
MiniDoom running DOOM II using the OpenGL renderer
The same level using MiniDoom’s OpenGL renderer. Both are actual project screenshots.

Then I asked another not entirely reasonable question: If DOOM works, why not Quake?

MiniQuake — Quake 1 in MiniLang

MiniQuake ports the original Quake/GLQuake engine to MiniLang. It runs on Windows and Linux and works with the original Quake data formats, including BSP levels, models, and QuakeC game logic. One important goal is preserving the original network Protocol 15, rather than merely making something that happens to look like Quake.

There are modern presentation options as well — smoother models, lighting, shadows, and high-resolution output — while keeping the old game recognizable. The repository even contains a large gallery of screenshots from the original levels and mission packs.

MiniQuake showing the original E1M1 level
MiniQuake running E1M1. Yes, that is a native MiniLang program.

MiniQuake2 — taking the next step

Then came MiniQuake2, based on Quake II 3.19. It targets native Windows x64 and implements the engine and baseq2 game with the original formats, Game API v3, and Protocol 34 compatibility as design goals. The current repository includes gameplay captures of all 39 single-player campaign maps.

MiniQuake2 running the Quake II Outer Base level
MiniQuake2 running Outer Base (base1).

Beyond ports: building a game framework

Porting existing engines is a rather good way to find out which features a language is missing. But I also wanted a reusable foundation for writing new games without having to start with window creation, input handling and rendering every single time.

MiniPixels is my pixel-oriented game framework for native Windows and Linux applications. It already handles sprites, animation, scene stacks, collision, configurable input, audio, localized text and asset packaging. There are software and OpenGL-based presentation paths, and the repository includes examples ranging from moving sprites to a scrolling world and a little jump-and-run game. It is still a prototype, but a useful one. 🙂

MiniPixels example game showing its 2D rendering
One of the MiniPixels example games.

It turns out that MiniLang can do more than games

Probably the best proof that this has become a language ecosystem is the amount of software that has nothing to do with shooting monsters.

MiniSQL is a relational database system written in MiniLang. This is not just a SQL parser sitting on top of another database. It has its own paged storage, B+ tree indexes, write-ahead log, transactions, crash recovery, query optimizer, server and clients. SQL features include joins, views, recursive CTEs, window functions, triggers and stored procedures. The development tree also includes a new binary storage format and expanded MySQL-style procedure support. There is an extensive English user manual. The documented 106-phase Windows acceptance gate applies to the earlier baseline; newer changes have their own focused tests. It has not been independently audited for production use.

MiniIDE is a lightweight native Windows IDE, itself written in MiniLang. It supports source editing, syntax highlighting, project management, compiler diagnostics, symbol navigation, building, running and testing programs. No Electron shell is needed. There is also MiniDoc, a documentation generator written in MiniLang that produces searchable offline HTML and linked Markdown API documentation, dependency graphs and source-code metrics such as complexity and duplication. It uses the self-hosted compiler frontend and is already used to document other MiniLang projects. I quite like the idea that the language now provides tools to help develop and document itself.

MiniGui makes it easier to build desktop interfaces. The application layout can be described declaratively in .mson, while application logic stays in MiniLang. It generates native Windows or Linux GUI applications using the corresponding platform runtime.

MiniGui's native desktop example
A native desktop UI generated with MiniGui.

These are very different workloads. A game engine, a transactional database, an IDE and a documentation generator do not stress the same parts of a compiler. That is precisely why building them is useful.

What have I learned since the first article?

The conclusion of my previous article was that AI-assisted programming only works at this scale if you have structure, tests, and a lot of patience. I would double down on that today.

Generative AI helped write, translate, review, and optimize a tremendous amount of code. But it also made mistakes — sometimes very creative ones. Large ports have plenty of places where something can look right while being completely wrong underneath: networking protocols, audio timing, memory ownership, compiler semantics, file formats, and performance regressions.

The practical loop hasn’t changed much: implement something, test it, compare it with the original behavior, fix it, add a regression test, and repeat. I have also learned to distinguish carefully between “it compiles”, “it runs”, “it is playable”, and “it is actually compatible and reliable”. Those are four quite different milestones.

I am not claiming that MiniLang is the best programming language, or that all of these projects are finished. Quite a few are explicitly experimental. But they are real source repositories containing real implementations, and they give me something much more useful than a synthetic benchmark: concrete problems to solve.

Where to get everything?

The easiest starting point is the MiniLangProject organization on GitHub. The two compiler repositories are MiniLangCompilerML (self-hosted, with native release packages) and MiniLangCompilerPy (the reference compiler). The language reference and OOP guide are good places to look if you want to try writing your own program.

The game projects contain screenshots, build instructions, test notes, and the details of what currently works. For the commercial game ports, you generally need your own legally obtained original game data; the repositories do not distribute it.

Back in March, this was about getting a little interpreter to run, and then getting DOOM to run on top of it.

Today, it is about seeing just how much software one small language can support.

Apparently, DOOM was only the beginning. 🙂