

I’m familiar with the arguments for Rust’s approach. It makes sense for many use cases. I’m not saying it’s wrong, just that there are tradeoffs and that for me, different ones are a better match for gamedev.
Rather than focus on difficulties, though, I can point out some code that was a really nice fit for the language. Top of mind there is my behavior trees implementation. With a few macro invocations, I can define a tree that’s easy to read in source, that statically checks that nodes fit together, that supports full “time-travel” debugging, and that compiles to fully-specialized code. Besides the regular pathfinding and shadowcasting helpers, this file is the core “library” the game is built on.
I just use vim + cargo for development. However, for WildsRL, I’ve built two project-specific tools that have been essential for debugging.
The first is time-travel debugging. When debug is enabled, every entity dumps detailed debug for each turn they take. It includes their current field of view, their knowledge of tiles and entities nearby, any Dijkstra maps they computed, and (since I’m using behavior trees) the latest (Success, Failed, Running, Unused) state for each node in the tree. I have a web UI that can display this debug information, so if I see anything unusual in testing, I can review recent gameplay from any entity’s perspective to see exactly why it did what it did.
The second is autoplay. There are enough interactions between NPC entities that a lot of my code is exercised by just running a small scene (100x100 map, 25 entities) for a few thousand turns. I have unit tests that check for crashes using this mode. However, there aren’t that many crashes - one of the perks of writing in Rust. Arguably more important is that I can enable debug for the autoplay view and examine NPC behavior over many turns. I have another suite of tests that does that, and for all changes, I review any history diffs to check that the changes are what I intended.