Developer

How Thomas Ricouard Builds Dark Veil and Its Game Engine with Codex

Built by Thomas Ricouard · · Source: X

Quick answer

Thomas Ricouard is building Dark Veil, a dark fantasy FPS roguelite, and its custom Rust and wgpu engine with Codex. They say it runs natively on macOS and iOS and in a WebGPU-capable browser.

Result: According to Ricouard, a playable game that runs natively on macOS and iOS and in a WebGPU-capable browser, with the current version deployed on ChatGPT Sites.

What they built

Thomas Ricouard is building Dark Veil, a game they describe as somewhere between Doom, Diablo and Balatro. You fight waves of monsters, collect XP and gold, then spend the gold in a shop full of weapons, artifacts and card packs. It is meant to look like an N64 game with modern lighting. According to Ricouard, the game and its custom engine were built with Codex (and Astra) on a personal $200 OpenAI Pro subscription.

How it works

  • Concept art first. Before any code, Ricouard asked Codex to generate four connected concept screens: forest combat, the shop, a booster reveal and a magic fight. They say they kept comparing the playable game against those images to explain what was missing.
  • Custom engine in Rust. They explicitly asked for Rust and a custom WebGPU renderer, with wgpu for rendering, winit for windowing and input, Rapier for physics and egui for UI. The first version was one forest arena with the full loop of combat, loot, shop and next round.
  • Shared code across platforms. For iOS, the shared Rust game compiles into a native library with a small UIKit host around it. Ricouard says touch controls, safe areas, audio, app lifecycle, signing and device testing still had to be done.
  • Procedural assets. Models come from geometry recipes in Rust that Codex writes and changes. Parts and materials are shared, so improving a barrel shape can improve several guns at once. The weapon on a card uses the same geometry as the one in first person.
  • Balance by simulation. Upgrades are cards called Sigils that you can move between equipment, and each one costs part of an item's power budget. To check whether gun damage could keep up with enemies, Ricouard says Codex ran 14,000 simulated campaigns with the actual shop prices, drop rates and Sigil rules.
  • Polish through specific feedback. The shop, HUD, booster opening and foil card shaders went through many rounds. Ricouard says they did not tell Codex how to write the shaders. They decided what they liked and pointed out what was not working.
  • Music. Generated locally with ACE-Step 1.5 and MLX. Codex writes and runs the generation script and saves the prompts, seeds, tempos, keys and durations.

The result

Ricouard says the current version is playable and deployed on ChatGPT Sites, and that the game runs natively on macOS and iOS and in a WebGPU-capable browser. They say the simulations exposed unreliable early access to useful stat Sigils and a sharp jump in boss health, which gave them specific things to test next. They also note that the simulations assume successful clears and cannot tell them whether the game is fun, and that they still make the design calls.

How to build something similar

Our suggestions, not steps from the post:

  • Generate concept images before writing code and save them. Use them later as the reference when you tell the agent what looks wrong.
  • Ask for one small playable slice with the whole game loop first. Add more content only after you have played it a lot.
  • Research the tech stack yourself, then tell the agent which language and libraries to use.
  • Have the agent run simulations against your real game rules so balance questions get answered with numbers, then confirm by playing.

The original post

It's out! You can now read how I'm building Dark Veil + its custom engine with Codex, a game I've been thinking, building, and talking about for the past few weeks! https://x.com/i/article/2110357719899070464 Building Dark Veil, from the first concept images to a playable game on Mac, iPhone, and the web. Disclosure: I built Dark Veil using my personal OpenAI account with a $200 Pro subscription. You can play the current version of the game, deployed on ChatGPT Sites here: https://dark-veil.dimillian.chatgpt.site I wanted to build a game somewhere between Doom, Diablo, and Balatro. You fight waves of monsters, collect XP and gold, then spend the gold in a shop full of weapons, artifacts, and card packs. And I wanted it to look like an N64 game, a bit janky, but with modern lighting. Modern VFX on old bones. With Codex (and Astra), I can go from discussing the art to building the renderer, then spend the next few prompts on shotgun recoil or card animations. The game now runs natively on macOS and iOS, and in a WebGPU-capable browser. I want to walk through how I built it and how I kept improving it. The example prompts below combine and clean up my actual requests. They're starting points you can adapt, not a transcript. Start with the concept art My first prompt asked Codex to use image generation to explore a few states of the game: forest combat, the shop, opening a booster, and a fight with magic. Before writing any code, I wanted to see if I liked the idea. Design four connected concept screens for a dark fantasy FPS roguelite: forest combat, an occult card shop, a booster reveal, and laboratory combat with magic. Combine coarse low-poly silhouettes and tiny N64-style textures with dramatic modern lighting. Use worn metal, bone, oxblood, and tarnished gold. Keep the HUD readable. Carry the same equipment and visual language across all four screens. Save the images and prompts for later comparison. We explored a second, cleaner direction too. I went back to the first one. The rough geometry, dirty textures, dramatic firelight, and ornate cards were what made the game interesting to me. Those images were useful long after that first conversation. Once I could play, I kept comparing the game with them. The ground was too repetitive, the lighting wasn't there yet, and the HUD was far from the gritty look I'd asked for. I could point at the image and explain what was missing. Why I wanted a custom engine I explicitly asked for Rust and a custom WebGPU renderer. This is applying my own knowledge to the model knowledge. Doing your own research (even with the model) beforehand always allow you to get better and more appropriate results! I wanted the geometry, rendering, and gameplay in code that Codex could work on together. With this art style and a small first arena, building those systems ourselves felt like a reasonable experiment. I wasn't trying to make an AAA game. Simple geometry, low-resolution textures, and good lighting gave us a manageable starting point. We could build the tools as we needed them. We still use libraries: wgpu for rendering, winit for windowing and input, Rapier for physics, and egui for UI. We build the game-specific renderer, asset generation, and gameplay systems around them. The first version had one forest arena and the full combat → loot → shop → next round loop. That gave me something to play while we added the rest. Build a playable vertical slice from these concepts using Rust and a custom wgpu renderer. Start with one forest arena, three weapons, a few enemies, a miniboss, and the card shop. Keep simulation and asset generation independent of platform code. Target native desktop and browser builds, with platform-specific input and lifecycle handling at the edges. Add repeatable launch and capture tools, play through the loop, and compare real captures with the concepts. The iOS port is a good example of why this worked out for me. We compile the shared Rust game into a native library
Thomas Ricouard (@Dimillian) · October 14, 2026 · View on X

Want to build something like this?

Join the Shipping Skool community free. Paid members get live bootcamp calls every week.

Join Shipping Skool — Free

More use cases

← All AI agent use cases