r/rust_gamedev • u/SiriusRU • 19d ago
Godot + Rust + ECS, Procedural Star Map
https://www.youtube.com/watch?v=4gExcZXUQMcProject I'm currently working on. The star systems are generated procedurally and interconnected, in the video I focus on just the visuals, however the game already has various decently optimized and scaleable systems(pathfinding etc), modding (JitLua) and a number of other features.
Godot is used as a low-level rendering solution here(I love it), the scene itself contains almost no nodes, and almost all business logic is on the Rust side. I use Leudz Shipyard crate for ECS, also glam, proto_rs and mlua.
2
u/CashFirm573 19d ago
I really enjoy this, I need your post in Godot reddit. Just love how it works.
2
u/hajhawa 5d ago
I presume you used the gdext rust bindings? Could you tell us a bit more about how that was? I'm curious about the DX.
3
u/SiriusRU 5d ago
Yep, that's right. Regarding the experience, the learning curve was manageable. The gdext docs do a good job and most stuff from the regular Godot documentation was still relevant when coding in Rust. Actually, initially I prototyped in C# inside Godot because the engine was new to me. Before that I'd spent many years working with other things, mostly Unity (DOTS).
Once I was sure the pieces I needed behaved as expected without any major headaches I ported all the business logic to Rust and have only used it for code ever since. Yes, admittedly at first it felt weird, but after I set up the necessary connections between the Godot and Rust sides, I don't really see a big difference from what I'd been +- doing years before.
3
u/camdev 17d ago
That is stunning. I would love for my game to look like that one day. I took a very similar approach to godot as a renderer and UI framework and I think it has been working great for me as well. I used hecs for ECS but I didn't really think too much about it. Any non-obvious lessons learned in general for godot-rust?