4 ms·
It'd be very interesting to read real-world experiences of experienced game programmers with the language itself; all the discussions around the net are purely
by pizza234 6y ago
It'd be very interesting to read real-world experiences of experienced game programmers with the language itself; all the discussions around the net are purely academic.
Long ago I've read on Reddit a programmer posted his detailed experience of the problems they've found on a non-trivial game, but I can't find it. I also wonder if anything changed.
- yagizdegirmenci 6y agoEmbark Studio has a great blog post about this. Inside Rust at Embark: https://medium.com/embarkstudios/inside-rust-at-embark-b82c06d1d9f4 https://medium.com/embarkstudios/inside-rust-at-embark-b82c0...
- hectorlorenzo 6y agoI just recently came across these two videos. Using Rust For Game Development by Catherine West: https://www.youtube.com/watch?v=aKLntZcp27M https://www.youtube.com/watch?v=aKLntZcp27M Counter-rant from Jonathan Blow: https://www.youtube.com/watch?v=4t1K66dMhWk https://www.youtube.com/watch?v=4t1K66dMhWk
- beigeoak 6y agoIdk who that guy is in the counter-rant portion, but if he can make a 1-hour long video against a language, why doesn't he make his own language instead or write his own game engine in his own language or something like that? I highly doubt he would get sub 1-second compile times, like he claims at 1:03:52. Talk is cheap, SAD!
- adwn 6y ago> Counter-rant from Jonathan Blow I've just watched the first 20 minutes of that video. So far, it's all "yeah, she's basically right". When does he get to the point? I.e., what does he actually object to?
- gameswithgo 6y agotldnr is that Rust guides the programmer only halfway to the solid engineering solution, the programmer is on their own to make the arena solution safe. its a pedantic nitpick, as is his way. also keep in mind that of late Blows focus has been single player video games made by very small very talented teams. A domain where the benefits of Rust are very small, possibly even a net loss compared to the fast compiling language they use now.
- deleted 6y ago[deleted]
- indy 6y agoAn issue that Jonathan Blow had was that one of the touted benefits of Rust is it's ownership semantics, yet the ECS (Entity Component System) that the talk demonstrated was effectively bypassing that.
- adwn 6y ago> ownership semantics, yet the ECS (Entity Component System) that the talk demonstrated was effectively bypassing that. I don't see how that's the case [1]. The entities are owned by the ECS (or the game state, or whatever), not by each other. Entities can conceptually reference each other, but not own each other. The only time this is problematic, is when one entity is destroyed while another one is still holding a reference to it. At the beginning of the video, he discussed basically all approaches to solve that problem: 1) Raw pointers. Bad for obvious reasons. 2) Smart pointers which keep the referenced object alive. No good, he says, because one entity should not keep another one alive, if the game logic says it should be removed. 3) Weak pointers which are safely invalidated when the referenced entity is removed. No good, he says, because keeping track of back-references is inefficient. 4) Weak pointers which check whether the referenced entity is still alive before accessing it. Which is exactly what the ECS does. Rust's ownership semantics still help here, because entities are unambiguously owned by the ECS, which returns a type-safe None value when you try to access a deleted entity. [1] I'm not arguing against you, indy; I understand that you paraphrased Blow's argument.
- badsectoracula 6y agoI'm not sure if it was that first video or i saw/read about this approach somewhere else (i'm almost certain that i heard about it years before that video though), but my reaction was pretty much the same as Jon Blow's (though not so long winded :-P): aren't you just working around the borrow checker and making your own allocator with its own faux pointers via indices? Sure, it wont crash the game if your index is invalid, but you'll still access the wrong data - which can end up with hard or weird bugs and corrupted state (e.g. in savegames and/or editor).
- andrewflnr 6y agoYeah, that's pretty much working as intended. The first priority of Rust's safety is crashes and security. Any other bugs that get squashed are a bonus, and you can't expect it to get all of them (whatever any overly enthusiastic evangelists might say).
- Thaxll 6y agoThe sutdio Catherine West worked for stopped using Rust and went back to C++ fyi. https://www.reddit.com/r/programming/comments/atyzz4/halley_a_lightweight_game_engine_written_in_c14/eh69lz7/ https://www.reddit.com/r/programming/comments/atyzz4/halley_...
- ImprobableTruth 6y ago... because Catherine West left for personal reasons and so it was easier to shift the project over to their existing and already working C++ engine (that they were continuously developing and using, so they didn't really 'go back').
- meheleventyone 6y agoYou might be thinking of Chucklefish who’ve done some talks and write ups about using Rust for their projects. IIRC they’ve since stopped. Catherine West their TD did a talk a few years ago. Also: https://prev.rust-lang.org/pdfs/Rust-Chucklefish-Whitepaper.pdf https://prev.rust-lang.org/pdfs/Rust-Chucklefish-Whitepaper....
- yrgulation 6y agoI suppose the question is what problems is rust aiming to solve in game development. From my experience languages are rarely the issue in game dev.
- pol4ko 6y agoAccording to this study [0] you are correct. The problems related are mostly management while the technical ones rarely cite language issues. [0] https://arxiv.org/abs/2009.02440 https://arxiv.org/abs/2009.02440
- MaulingMonkey 6y agohttps://michaelfairley.com/blog/i-made-a-game-in-rust/ https://michaelfairley.com/blog/i-made-a-game-in-rust/ perhaps?
- Impossible 6y agoRust roguelike tutorial https://bfnightly.bracketproductions.com/ https://bfnightly.bracketproductions.com/ walks through building a small roguelike in Rust. The author has an upcoming book on Rust 2D game development that's in beta https://pragprog.com/titles/hwrust/hands-on-rust/ https://pragprog.com/titles/hwrust/hands-on-rust/ that seems to be a more fleshed out version of the original tutorial