4 ms·
I just recently came across these two videos. Using Rust For Game Development by Catherine West: https://www.youtube.com/watch?v=aKLntZcp27M https://www.youtub
by hectorlorenzo 6y ago
I 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.
- meheleventyone 6y agoYeah the confusion comes because entities are no longer a concrete element of the program but a concept tying components together. It’s just as valid to look at a subset of the components that are referenced by an entity id as a view as it is to look at them all. Like a relational database. And by breaking things into components the granularity of ownership is increased compared with the equivalent concrete representation of the same data. So whilst you can’t reason about ownership of an entity as it primarily exists conceptually the ownership of its constituent parts is well defined.
- neutronicus 6y agoHer talk is basically "Introduction to Entity Component Systems for Rust Programmers," and it has an implicit secondary thesis that implementing the ECS in Rust adds value vs implementing it in e.g. C++. He seems to disagree with that secondary thesis. He thinks she did a good job implementing a toy ECS, but that Rust itself wasn't particularly helpful to her.
- 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').