Live data from Hacker News

Leaving Rust gamedev after 3 years

loglog.games

231–240 of 996 posts

Re: Leaving Rust gamedev after 3 years

#231
post #48

I find that Jonathan Blow ranting about Rust game development here https://www.youtube.com/watch?v=4t1K66dMhWk . He adds interesting perspectives to the discussio, how the language makes the Rust game developer resort to arrays and their so called Rust point of views.

Well the problem with Jonathan's argument here is that he's spent the past decade mostly ranting about Rust and working to make a perfect game programming language, instead of making games.

So it turn out that even if he's opinion on Rust is correct, he would still have been much more productive using it than trying to build his own language for a decade…

(But he already shipped his masterpiece and he's a millionaire so he gets to chose his full time hobby as he wishes)

Re: Leaving Rust gamedev after 3 years

#232

I've become wary of commenting on articles that mention the pros and cons of various languages, but I still find it strange that so many people are so strongly focused on what their favourite language can do (usually better than others), instead of the project they're working on. When it should be the other way around. The joke he mentioned about having 50 engines written but only 5 games certainly rings true and I d…

The hardest part of a project is finishing it. I think the main issue is the fun problems to solve happen very early in the project and once those are done it becomes incredibly tedius and boring and I usually lose focus until the project dies. Its difficult to maintain motivation.

Re: Leaving Rust gamedev after 3 years

#233
post #158
post #107

Earlier quoted context omitted.

I know rust, I don't know game development (I've dabbled slightly). If I choose to build a game I either need to make it work in rust* or I need to learn a new language (Unity -> C#, Unreal -> blueprints, Godot -> gdscript). So your advice to "just use Unity/Unreal/Godot" is the opposite of your advice "you should stick with what you know" in my case. I suspect the former is good advice, and the latter is therefore w…

This falls in the "you know that what you know isn't enough to build the thing" bucket, presumably. Even if you're a Rust expert, do you know how to manage game asset content pipelines? Sound and music? Have you done graphics programming at all in Rust? How are you going to store levels in your game, and how are you going to make them? How are you doing multiplayer? etc... You're going to have to learn something new,…

> but picking up C# or gdscript given that you already know programming should be straightforward compared to re-implementing all of those things yourself in Rust.

Right, this is practically my point. I suspect that the tools available from those languages mean that learning one of them would more than pay for itself in the course of developing a (single) game. Many many times over really.

Like, yes, I've dealt with both sound, basic graphics programming (though I'd need to learn a bit more to make a modern looking 3d game), networking, ... in rust. If I had to program my sound system and graphics engine from scratch myself I'd do it in rust (and I believe I'd be more productive in rust than I'd be in while doing so). But I don't have to do everything from scratch, and the best not-from-scratch versions aren't in rust, and the cost of switching to something I don't know just isn't that high.

Also OP is definitely right that rust has some anti-features that would be pain points for game development.

Re: Leaving Rust gamedev after 3 years

#234
post #73

In my experience, fundamentally when you're starting a software project, you need to make a strong up-front decision between two things: 1. I am using technology in order to build this thing. 2. I am building this thing in order to use this technology. Developers often fall in the (2) camp but don't admit it. There's an allure to using the new, sexy tech that will solve all their problems, whether that's Rust, Kubern…

When all you have is a hammer, everything looks like a nail. When all you have is programming expertise, all your game production obstacles look like programming problems. I think everyone in games has met an “engine person” who spends a lot of time iterating on tech, but never quite getting to the creative expression that got them in the game. I think part of it comes a bit from mythologizing breakthrough games like…

Well said, I am weary of all the 'game' programmers that just fetishize working on the tech and particularly rendering.

Re: Leaving Rust gamedev after 3 years

#236
I've experienced a lot of these concerns while building https://github.com/MeoMix/symbiants

I have a simple question that maybe someone smarter than me can answer confidently:

If I want to build something akin to Dwarf Fortress (in terms of simulation complexity) as a browser-first experience - what stack should I choose?

Originally, I prototyped something out using React, PixiJS, and ReactPixi (https://github.com/MeoMix/antfarm). The two main issues I ran into were the performance of React's reconciler processing tens of thousands of entities when most weren't changing (despite heavy memoization) and GC lurching due to excess object allocations. My takeaway was that if I wanted to continue writing in JS/TS that I would need to write non-idiomatic code to avoid excess allocations and abandon React. This approach would result in me effectively creating my own engine to manage state.

I decided to not go that direction. I chose Rust because no GC is a language feature (especially good since GCs in WASM are heavy) and I chose Bevy because it seemed like a fairly structured way to mutate a large amount of code.

Progress has been slow for a lot of the reasons listed in this article. I've written a lot of this off to WASM being a new frontier for game dev, and I'm new to Rust/Bevy/ECS/gamedev, and rationalized my effort by noting there's not a lot of complex simulation games running in browser (that I'm aware of).

It's not clear to me that I've made the right decision, and just need to take the good with the bad, in order to develop the type of game I want in the type of environment I want.

Re: Leaving Rust gamedev after 3 years

#237
Excellent article. Rust is my favorite language for several uses, but I'm becoming less optimistic about it as a versatile language long-term. An important point regarding the article is that it mixes rust shortfalls, and shortfalls of any language other than C++ for games. I've personally used Bevy for a 3D wave function renderer, but moved away from it in favor of a custom WGPU-engine due to Bevy's complicated ECS DSL.

I am worried because:

  - Games seem like a no-go, as articulated in the article
  - Web usage has been dominated by Async, with no signs of reversing. I have no interest in this. And, there is no promising Django analog or ORM.
  - Emebedded support on Cortex-M, and to a lesser extend RISC-V is good at its core, but the supporting libraries have a mix of A: the game failures listed in the article (Driven by hype, mostly makers, serious companies are not using it), and B: Also being taken over by Async.
This is disappointing to me, because IMO the syntax, tooling, and general language experience of Rust is far better than C and C++.

Re: Leaving Rust gamedev after 3 years

#238
post #94

Earlier quoted context omitted.

I mean.. Java is there. Java 23 is really interesting.

When is Java getting value types? It has been talked about forever now.

Java 23 is not final and I'm hoping this JEP makes it into 23:

https://openjdk.org/jeps/401

I don't follow the JEP process closely enough to know if it will be proposed for 23 or approved. But I think it's coming soon.

Re: Leaving Rust gamedev after 3 years

#239
As someone who's become a core contributor to Bevy lately, while also doing contract work in Unity on the side, I obviously disagree with the idea that Rust isn't up to the task of game dev. The grass isn't greener on the Unity side, with a mountain of technical debt holding the engine back. (They're still using Boehm GC in 2024!) Bevy is a breath of fresh air just because it's relatively new and free of legacy. Using Rust instead of C++ is just one part of that. Bevy has a more modern design throughout: for instance, it has a relatively straightforward path to GPU-driven rendering in an integrated system, without having to deal with three incompatible render pipelines (BiRP, HDRP, URP).

What I find more interesting is the parts of the article that boil down to "Rust isn't the best language for rapid development and iteration speed". And that may well be true! I've long thought that the future of Bevy is an integrated Lua scripting layer [1]. You don't even need to get into arguments about the suitability of the borrow checker: it's clear that artists and designers aren't going to be learning Rust anytime soon. I'd like to see a world in which Rust is there for the low-to-mid-level parts that need performance and reliability, and Lua is there for the high-level logic that needs fast iteration, and it's all a nicely integrated whole.

Long-term, I think this world would actually put Bevy in a better place than the existing engines. Unity forces you into C# for basically everything, which is both too low-level for non-programmers to use and too high-level for performance-critical code (unless you have a source license, which no indie developer has). Unreal requires C++, which is even more difficult than Rust (IMO), or Blueprints, which as a visual programming language is way too high-level for anything but the simplest logic. Godot favors GDScript, which is idiosyncratic for questionable gain. I think Rust and Lua (or something similar) would put Bevy in a Goldilocks spot of having two languages that cover all the low-, mid-, and high-level needs well.

As for the other parts of the article, I disagree with the ECS criticism; ECS has some downsides, but the upsides outweigh the downsides in my view. I do agree that Bevy not having an official editor is an ongoing problem that desperately needs fixing. Personally, I would have prioritized the editor way higher earlier in Bevy's development. There is space_editor [2] now, which is something.

[1]: https://github.com/makspll/bevy_mod_scripting

[2]: https://github.com/rewin123/space_editor

Re: Leaving Rust gamedev after 3 years

#240
post #5

Has there been any progress towards shipping Rust on consoles? I know the specifics are all under NDA, but to my knowledge nobody has even hinted that they've done it yet, even among the studios which are openly using Rust for backend or tooling stuff (e.g. Embark and Treyarch). OP only appears to release their games on PC so it's not a concern for them, but for the majority of developers not being able to fit into c…

Rust has had tier 3 support for the Switch since 1.64, I believe. Someone had actually done it even before that but IIRC NDAs mucked up any movement on making that public.
Post reply on HN