by andrewmcwatters · 6y ago · 0 comments
I should be able to complete the sentence, "Rust is the future of game development because...," but I can't in any meaningful way.
Here are the highlights of the article, instead:
Rust is the future of game development because Rust has the performance of C++ with the convenience of C#.
Rust is the future of game development because Rust has ownership based memory.
Rust is the future of game development because Rust is popular. (The article doesn't say this explicitly, but implies it is.)
Rust is the future of game development because Rust is still an immature language. (This doesn't actually sell the point, and I'm not sure why the author bothers talking about this.)
What's weird, too, is that the article talks about how hard networking is, but _cart has specifically said in the past, "Yup! High level and low level networking is definitely on our radar, but it also isn't our immediate priority."
It may come as a surprise, but you basically have to bake networking into the engine. It's not easy as an afterthought. Rust doesn't help with this. In fact, multiplayer and all its challenges have nothing to do with Rust.
We had modern client-side prediction roughly 20 years ago, and people still don't take multiplayer seriously.
I think multiplayer is an area where you'd want "fearless concurrency". Rust could do well here.
A better argument might be Rust and Vulcan, though. Even still, you can get very far with just using OpenGL.
Is that it doesn't benefit, or is it that the benefits are too hard to achieve given the nature of memory issues with games that like to have global state and are written in C++? A lot of games do a bunch of things every frame and then increment state. Those can all be parallelized as they only depend on the previous frame's state.
Not to be condecending, but you should try making a game and see how well that parallelization idea of yours turns out.
You can't just take any type of game logic and parallelize it either, since there are types of game logic that aren't just dependent on the previous frame. You may be wholly dependent on something that has just occurred earlier in the frame, but has not been networked to clients yet.
So, the phrase "a tremendous amount of game code doesn't benefit from multithreading" is actually true since most game code is in unreal/unity, but it's not a hard constraint for all game engines.
The problem is that most naive "game engines" which provide nothing more than bindings to OpenGL/bgfx, OpenAL, Box2D, etc. and are really just "game libraries," don't even provide things like out-of-the-box multiplayer or level loading, so the idea that they're going to make the leap from providing basically nothing to providing mechanisms for multithreaded game logic, which requires some sort of gamerules/gamemode abstraction first is not something I think you'll see in practice.
Most game libraries or game frameworks like these only provide things like load, update, draw callbacks with some nice bindings.
I'm not sure what you mean? Are you saying bevy's architecture isn't fitting?
Not to mention that you evidently don't _have to_ do this, seeing as how in Unity you're basically forced to work with raw sockets.
> Not to mention that you evidently don't _have to_ do this, seeing as how in Unity you're basically forced to work with raw sockets.
I don't know how old you are, but by the time 1999 rolled around, id Software had produced essentially the same multiplayer client-side prediction model that has been in major use to this day. It hasn't fundamentally changed.
The fact that Unity cannot reproduce 20+ year old tech is a joke, not an example. In fact, UNET was such a joke it basically tried to ignore this fundamentally unchangeable architecture and they ended up canning it in the end.[1]
[1]: https://blogs.unity3d.com/2019/06/13/navigating-unitys-multi...