Earlier quoted context omitted.
No, actually that was just javascript. Programming environments with threading models don't have to live that way. Separate threads can communicate through channels and do quite well for themselves. See how it works is, you do something like let data = file.read(); and the it just sits there on that line until the read is done and then your data has the actual bytes in it and you just use them and go on with your lif…
> you do something like let data = file.read(); and the it just sits there on that line until the read is done and then your data has the actual bytes in it and you just use them and go on with your life. That's exactly how async/await works, except that it translates to state machines under the hood which gives you great performance. No need to mess with threading models, at all.
Leaving Rust gamedev after 3 years
871–880 of 996 posts
Re: Leaving Rust gamedev after 3 years
#872There are vanishingly few reasons why anyone wouldn't use a garbage collected language in modern software. I think a lot of the people using rust haven't realised how much this limits its utility. As a result of this, the language has been presented as much more widely applicable than it actually is.
Re: Leaving Rust gamedev after 3 years
#873Earlier quoted context omitted.
Disappointing to hear this after battling the same nonsense in JS for years.
Rust is a language made and used by Dunning-Kruger people who violently react to having to learn the prior art. What did you really expect?
Re: Leaving Rust gamedev after 3 years
#874Earlier quoted context omitted.
To be fair, many (non-game dev) Rust projects I have seen/used do provide great user experience precisely because they are laser-focused on performance and have blown existing alternatives out of the water. (Think ripgrep, fzf, etc.) Prototyping is certainly necessary but it shouldn't be at the cost of runtime performance – at least not too much –, because it will typically be very difficult to improve performance af…
> ripgrep, fzf I think these are great examples of where prototyping and rapid iteration are really not needed at all, and hence Rust shines here. Writing a game is completely different.
I do rapid prototyping all the time.
I'm not saying Rust is good for game dev, but the idea that Rust cannot be used for rapid prototyping in any context is a myth.
Re: Leaving Rust gamedev after 3 years
#875My experience is that the ecosystem is a mess, have hit winit, wgpu, and countless bevy bugs, iteration times are abysmal, documentation is nonexistent. In the time it would take me to make a game in popular Rust tooling I could build the game and engine from scratch in C and also have something that would crash less.
Re: Leaving Rust gamedev after 3 years
#876Re: Leaving Rust gamedev after 3 years
#877Earlier quoted context omitted.
No, the original article said that you don't get parallelism from Bevy in practice: > Unfortunately, after all the work that one has to put into ordering their systems it's not like there is going to be much left to parallelize. And in practice, what little one might gain from this will amount to parallelizing a purely data driven system that could've been done trivially with data parallelism using rayon. It's not sa…
The article is not saying that Bevy does not parallelize but that the impredictability of parallelism (both in ordering and in timing) forces the developer to add enough dependency constraints that there is not much left to parallelize.
Re: Leaving Rust gamedev after 3 years
#878My experience is that the ecosystem is a mess, have hit winit, wgpu, and countless bevy bugs, iteration times are abysmal, documentation is nonexistent. In the time it would take me to make a game in popular Rust tooling I could build the game and engine from scratch in C and also have something that would crash less.
> documentation is nonexistent You know, I think this point is important to get right: there are generally docs, Rust does a very good job of making it easy to write docs. What doesn't always exist are guides that explain how to piece things together. Sometimes you wind up needing to really know the inner platform to piece together things in Rust, and while I love the language, this is one area where the community co…
Re: Leaving Rust gamedev after 3 years
#879Earlier quoted context omitted.
The do it because the first one sucked ass and the second is a huge improvement but you still have to support the old way.
Which is which and why?
Re: Leaving Rust gamedev after 3 years
#880Earlier quoted context omitted.
A type error means a type error, and nothing more. Type errors do not mean "incorrectness." Here is an example of something you can't do in rust, but can do in other statically typed languages. ```rust struct Type1 { id: u32 } struct Type2 { id: u32 } fn main() { let obj1 = Type1 { id: 1 }; let obj2: Type2 = obj1; // compile error, Type1 is not Type2 } ``` This code works perfectly fine. These two structs have the sa…
[text deleted because it was based on a incorrecf recollection of the details of Rust features.]
> one is for things that are structurally identitical but semantically distinct where confusing them creates a semantic error, the other is for alternate (usually, more concise) names for an existing type
This is not always true. Sometimes there are cases where you have different type aliases and want to use them interchangeably. Now you have to refactor them to inherit from some general type that didn't exist before. I also could count on one hand the amount of times this has caught a genuine bug even with diligent domain modeling (Which I would argue is overhyped).