Earlier quoted context omitted.
> I'd expected some AAA title to be written in Rust by now. I'm disinclined to believe that any AAA game will be written in Rust (one is free to insert "because Rust's gamedev ecosystem is immature" or "because AAA game development is increasingly conservative and risk-averse" at their discretion), yet I'm curious what led you to believe this. C++ became available in 1985, and didn't become popular for gamedev until…
I sometimes wonder if the problem with rust is that we have not yet had a major set of projects which drive solutions to common dev problems. Go had google driving adoption, which in turn drove open source efforts. The language had to remain grounded to not interfere with the doing of building back-end services. Rust had mozilla/servo which was ultimately unsuccessful. While there are more than a few companies uinf r…
Leaving Rust gamedev after 3 years
621–630 of 996 posts
Re: Leaving Rust gamedev after 3 years
#622- The very first thing that comes to mind is why actually use Rust for gamedev. From the article it seems like the author got into Rust through Godot, but that does not explain why commit to use Rust for a full game. What was the reasoning behind picking Rust?
- It feels to me that there's a mix of criticism to Rust as a language, Rust as a community and libraries/frameworks written in Rust (in particular Bevy). Personally I think these are completely separated matters so I would like to know why the author treats them all as a unit.
- I've always got the impression that gamedevs try to have their cake and eat it too which is almost always impossible: they want to have quick iterations and write "simple code" while having low level control of everything (ex. manual memory management, usage of pointers, etc.). For example, the author mentions wanting access to methods like "play_sound()" but at the same time mentions that some patterns are unacceptable given the "overhead [...] due to memory locality". I've never heard of an ecosystem where you can have everything without any compromises.
- In particular, I get the impression that the author has a lot of troubles with ECS and instead it tries to bend it to work in a OOP fashion (for example, through the usage of "fat components" as he calls them or preferring virtual dispatch over `match` statements). He claims that he has put in a "lot of time" in trying to make it work but I get the impression that this effort was mostly wasted in trying to bend the language and libraries into something that just won't work out. It's like trying to use a circular saw to polish mechanical watch pieces: an exercise in frustration. At some point in time I'm sure he asked himself why to keep on pushing on, and I would like to know why he continued to be committed to such process.
- The author claims multiple times that they work in a single threaded environment where they should not care about concurrent access so they should not pay the price in the type system. I agree that this should be the case but then it proceeds to list examples that show a different situation. One of them is the claim that they cannot use a "god" context to pass down every dependency due to the borrow checker, listing code that tries to hold a reference to a "camera" system while passing the context to the "player" system. In particular this does not make sense because: 1) If you're in a single threaded environment you don't have two systems using the same context at the same time (because there is no "at the same time"); 2) if the "player" system does not need the camera then it won't change it, and if it does not change it then there is no need to take a reference to it earlier, you can just take it after the "player" system has finished. I know that coming up with brief examples is extremely difficult but either the example does not properly represent the reality, or the author is actually working in a multi threaded environment (maybe without actually knowing about it).
As an observation, the author mentions multiple times that Rust pushes you to write "good code" and I fundamentally disagree. "Good code" is very contextual, just like the idea of "simple code" where he checks for all collisions and plays a sound in 3 lines (is this actually "simple"?), so instead I would say that Rust forces you to write "correct code", that is, code that won't (or is unlikely to) fail at runtime. I believe this is a very important distinction that you always need to keep in mind when evaluating a tool such as a programming language.
Finally, I do believe though that Rust is a bad choice if what you're interested in is to build games quickly without consideration for performance (and you most likely don't need to care in 2d games) and their decision is very reasonable: C# and Unity are just aligned better with what the author is actually interested in doing.
Re: Leaving Rust gamedev after 3 years
#623Earlier quoted context omitted.
I don't think anyone ever claimed that Bevy is finished. As for audacious unverifiable claims: it's quite verifiable that Bevy never used DirectX 9, DirectX 10, shadow volumes, HLSL, Cg, Vulkan, or Metal (I'm not sure about OpenGL or GLSL; those were before I got involved with the project). It chose the better path (wgpu) early on. That's all I was saying.
It can't be "built the right way" if it isn't finished. We actually don't know if it can be built the right way until it is finished.
Re: Leaving Rust gamedev after 3 years
#624Earlier quoted context omitted.
I've been playing around with an idea about OOP for awhile, not sure if it'll ring true or not but I'll run it up the flagpole for feedback. I think FP is a great way to program actions and agency but OOP is a great way to model the world. I like Rust's trait system because the polymorphism is based on what you want an object to do not what it is . But when you're creating models of the world it's usually really conv…
I shall recommend this talk for you https://www.youtube.com/watch?v=rX0ItVEVjHc
Re: Leaving Rust gamedev after 3 years
#625Earlier quoted context omitted.
Since every other language now has higher order functions and lexical closures and things like that Lisp isn't as special as it used to be. Now it's mostly just a really ugly version of those languages but with a weird emphasis on recursion and a very fancy macro facility. I find I can move between dynamic languages and Scheme pretty easily.
as someone who writes elixir all day, I really love what lisp is but I feel lisp's major weakness is that it makes everythign unergonomic in order to make macros very ergonomic. You will never find another language in which writing macros is easier. the problem is it comes at the cost of doing everything else a bit of a pain in the ass. I love elixir because it feels like the syntax clojure would have if it had a syn…
That is simply false. The ergonomics of editing Lisp is also superb.
There is a consistent, logical way to break any Lisp expression into any number of lines of text. The more you break Lisp into multiple lines, the more clearly the tree structure of the code is revealed.
The absence of ambiguity helps readability: not having to guess which expressions are children of what operator.
Lisp code sometimes makes up for the parentheses by omitting superfluous punctuation like commas and semicolons. To add two terms, we need ( ) and +. But that's all we need to add 17 terms also.
Imagine if the Unix shell required commas between arguments:
ls, -l, *.c
that's how Lisp programmers feel when back in a non-Lisp.Re: Leaving Rust gamedev after 3 years
#626Earlier quoted context omitted.
I sometimes wonder if the problem with rust is that we have not yet had a major set of projects which drive solutions to common dev problems. Go had google driving adoption, which in turn drove open source efforts. The language had to remain grounded to not interfere with the doing of building back-end services. Rust had mozilla/servo which was ultimately unsuccessful. While there are more than a few companies uinf r…
? I believe the Rust efforts in Firefox were largely successful. I think Servo was for experimental purposes and large parts were then added to Firefox with Quantum: https://en.wikipedia.org/wiki/Gecko_(software)#Quantum
Re: Leaving Rust gamedev after 3 years
#627Earlier quoted context omitted.
> I think about Starcraft from 1998, created when virtually all PCs only had one core, and its 200 unit per faction cap. Blizzard hasn't increased this cap because it doesn't necessarily make the game more fun. Ah... Starcraft. It's 200 supply per player (hero units take 0 supply, zerglings are 0.5, and the supply cost goes up to 8 for battlecruisers for example). The limit is enforced when building a unit from a bui…
Complete distraction of a question -- for that video clip, what is the song playing at the time stamp you selected? Is that in-game music? I figure not.
Re: Leaving Rust gamedev after 3 years
#628As a game developer for about two decades, I've never considered Rust to be a good programming language choice. My priorities are reasonable performances and the fastest iteration time possible. Gameplay code should be flexible, we have tons and tons of edge cases _by design_ because this is the best way to create interesting games. Compilation time is very important, but also a flexible enough programming structure,…
> a flexible enough programming structure, moving things around and changing your mind about the most desirable approach several times a day is common during heavy development phases. That's the kind of code for which Rust-like languages shine. Rich type systems make it easy to change your mind about things and make large changes to your code with confidence. (Whether Rust tooling is actually at a level to take advan…
I don't think this is true. Rust makes it easy to get the refactor right (generally speaking 100% right). But that's not what they're describing. They're describing where the ability to make the refactor fast, even if it doesn't work correctly (in the formal sense of correctly). That is to say, memory leaks and race conditions and all sorts of horrible nastiness may be tolerable during the dev process in exchange for trying out an idea more quickly.
This is, of course, significantly more work at the end to patch up all of the things you did, but if you don't have to do the full work on 99/100 iterations, or got to try out more iterations because of the quick turnaround time, that would be considered a win here.
Re: Leaving Rust gamedev after 3 years
#629Just waiting for someone to write a 5000 word essay on why they are moving from Rust to do data science stuff. Totally puzzled by everyone trying to get on to the Rust bandwagon on DS/DE, when being able to iterate and make changes fast is why Python rules even though it is dog slow.
Re: Leaving Rust gamedev after 3 years
#630Earlier quoted context omitted.
> Architecting these sorts of services properly can assist in making tool choices that drastically boost maintainability and feature delivery, especially for small teams I hate hearing this argument, because it glosses over the hard realities of building products, even if it sounds good on paper. Companies don't often have the resources to hire people that can do this early on, or the time to do this early on even if…
I have a personal experience that is literally the polar opposite of everything you just described. Atypical, yes, but on the other hand, testimonials about life in most other software teams describe an unnecessary mess of middle-management and bureaucratic cruft. I'm sure at many companies there are many roadblocks in the way between their developers and a better product, but my company doesn't have them. Not a star…