r/rust_gamedev • • 17h ago

My AI agents passed every check while the water was broken: a retrospective from my space-frontier adventure sim (Rust + Bevy)

Post image
0 Upvotes

I build my space-frontier adventure sim mostly through a pipeline of AI agents. I write the tasks, they write the code, I look at the frames and decide. Most of the time it works. This week the frames were the only part of the pipeline that told the truth.

I started on visuals and went to polish the water. I went under to see it myself. At -52 m the star dome was right above me and the "atmosphere" sat under my feet. Underwater the game had switched the sky off. Not dimmed or tinted, just gone, with space and stars above me.

The code behind that answered one question: is the camera in water or in air? At the surface it was right every time. At -52 m it answered "air".

Green checks, broken water

Every automated check was green. The water in the game was broken: milky white from some angles, invisible when the camera skimmed the surface, foam too thick.

The cause sat in the foundation. The code that tells the camera where the ground is treated the planet as a flat plane. In a game about round planets. The error was about half a chunk of terrain across.

The first fix held for 1.5-2 m below the water line, then flipped back.

The auto-checks missed it because they rendered water from one angle only. Nobody looked straight down at a river, at a lake, or at a beach from the side.

My favorite part: one agent's self-check pointed at an environment variable that nothing in the code reads. It reported success for a setting that had no effect. The next agent, who actually read the code, admitted it.

To be fair, the agents reproduced my bug report pose exactly: camera 0.32 m above the seabed. Then it turned out my own screenshot was taken with collision off, about a meter inside the ground. The pose was accurate. The floor was not.

The bill

One QA agent burned about 700M tokens on this epic. Useful output: roughly 0.25%. One piece of it alone took 507 calls at ~292k average context, 148M tokens. I pulled that agent off QA.

The fix was smaller than the bug

The real fix did not build a better way to decide whether the camera is underwater. It removed the need for one.

The atmosphere is drawn from an origin point. Underwater that point sat inside the planet and the sky went out. Now any origin between half the planet radius and the radius gets pushed back onto the surface:

p = p * (R + 0.001) / |p| for 0.5R <= |p| < R

Five places in the shaders, plus one CPU copy of the same rule. No new state that says "this camera is underwater now".

After the fix: before/after frames at -49, -141 and -135 m on two planets. A full scan of the planet floor (237,000 chunks) found water at -143.28 m, which my manual check in 8 directions never found.

Still broken

The underwater atmosphere is rebuilt and waits for me to look at three frames. The water shader gets rewritten from scratch after that. The ground check, the flat planet one, is still broken. Separate task.

Green means the checks I wrote passed. Nothing about how the game actually runs. I still look at the frames myself

Screenshot from the lagoon level with the debug grid, water is transparent now:

Devlog with frames and numbers: https://x.com/HeadPocker40580


r/rust_gamedev • • 17h ago

question What exactly happened to LogLog Games?

8 Upvotes

For those who don't know LogLog Games article "Leaving Rust Gamedev"

I'm not a Rust expert; I come from the C++ world. I know the basics of compilers, but I don't understand much of the technical language used in the article.

How is it that they write over 100,000 lines of Rust code and then abandon all that technology for the "greater" iteration offered by C#?.

This makes me doubt whether game development with Rust is worthwhile. Rust has been around for over a decade and I still haven't seen a "Greatest Hit" game; the only somewhat popular project I've come across is Veloren and yet its development remains quite slow, the development of the Bevy Engine is also proving incredibly slow, I know that open-source projects usually progress slowly, but Godot Engine uses C++ and I've seen many more iterations faster than Bevy, even though they have almost the same popularity.

My question is, can ambitious games be made without Rust's friction killing you along the way? Are LogLog Games complaints justified, or are they just excuses to blame the tool instead of themselves?.


r/rust_gamedev • • 12h ago

AI Generated Rust remake of the original 1989 Catacomb in Rust + Vulkan

0 Upvotes

After my last attempt

https://www.reddit.com/r/rust_gamedev/comments/1w14vwb/catacombs_with_rust/

I wanted to understand what can be done with the OpenCode free tier... so I've looked at reporting a game from Dos to Rust.

Generated a remake of the old original 1989 top-down Catacomb (John Carmack / Softdisk) — not the later first-person Catacomb 3-D. This project was completely generated by OpenCode AI, using Rust and Ash for Vulkan rendering.

Original game reference: https://en.wikipedia.org/wiki/Catacomb_(video_game)

(Original source release: https://github.com/CatacombGames/Catacomb)

High-level features implemented:

  • Original-style gameplay: Top-down movement/shooting through 64x64 mazes, charge shot + big shot, potions/healing, bolt and nuke spells, score/body meter, and level progression.
  • Original content/assets: The 10 original shareware levels loaded from decoded level data, original monster/player/missile sprites extracted from the original game data, and the original 18 PC-speaker-style sound effects recreated in-game.
  • Enemies & mechanics: Original monster types/behaviors (goblins, skeletons, ogres, gargoyles, dragons, etc.), wall/door/item interactions (keys, doors, cracked walls, teleporters, chests, secrets), and source-accurate tile/goal handling.
  • Two campaign modes: “Original” (the 10 bundled levels) and “Watabou” (a large pool of imported/generated dungeon layouts adapted to the game’s map format).

  • Rendering & presentation: Pixel-art/EGA-style look, virtual framebuffer scaled to the window/fullscreen, title/splash/menu screens, HUD, and an attract/demo mode.
  • Built-in tools: A level editor (paint tiles/monsters/items, test-play custom levels), a pixel-art monster designer (custom animated sprites with behavior/severity settings), and a PC-speaker sound generator/importer for custom sounds (not really working)
  • Custom content support: Save/load custom levels, monsters, and sounds as JSON files; custom monsters can be used in the editor and injected into play.
  • Dev/portability options: Screenshot/debug flags, deterministic runs, mute/validation toggles, and cross-platform build/run support (Windows/Linux, Vulkan-capable system).

It was fun experiment...but not as much fun as writing the code by hand, to be honest, I have hardly even read the code.

here is the repo

https://github.com/oawad79/catacomb-remake


r/rust_gamedev • • 21h ago

Fog and rope physics in my Rust 2D engine

45 Upvotes

Finally happy with how the fog and rope physics are handled in the game I've been working on, it's built with Rust and wgpu. The fluids use a 2D stable fluids solver in WGSL, and ropes use Verlet integration w/ fixed length links. Would love to hear what you think :)