Live data from Hacker News

Leaving Rust gamedev after 3 years

loglog.games

201–210 of 996 posts

Re: Leaving Rust gamedev after 3 years

#201

I would love to be able to bypass the orphan rule for internal crates.

I would love to make it possible to bypass the orphan rule in general , including for crates published on crates.io. This is an important issue for ecosystem scaling, in many different ways. It means that if you have a library A providing a trait and a library B providing a type, either A has to add optional support for B or B has to add optional support for A, or someone has to hack around that with a newtype wrappe…

Oh, 100%, I'd be happy with that too.

Is the orphan rule a result of some technical limitation? Or just the idea that it's "unclean" to implement someone elses traits for someone elses types?

Re: Leaving Rust gamedev after 3 years

#202

Earlier quoted context omitted.

From the website: > From startups to large corporations, from embedded devices to scalable web services, Rust is a great fit. Are these "systems"? FWIW "systems" does not appear on the Rust home page. From wikipedia: > Rust is a multi-paradigm, general-purpose programming language that emphasizes performance, type safety, and concurrency.

>performance, type safety, and concurrency So... a systems programming language? x)

If all software programs are _systems_, yes :)

Re: Leaving Rust gamedev after 3 years

#203
post #14

> I'd argue as far as maintainability being the wrong value for indie games, as what we should strive for is iteration speed. That seems to be the crucial point. Rust is optimized for writing complex systems software in large teams. That’s not a great fit for a small team hacking on something that is at least in part an art project. You wouldn’t choose something like Ada for that either.

I've ended up with similar thoughts about automated testing in games too.

I really enjoy having automated tests and automated tests solve problems. Like, I absolutely love our molecule test suite for our infrastructure code and it gives us huge value. The smoke tests we have for the infrastructure running after deployments are amazing. It's liberating in an environment of rapid and chaotic changes everywhere, complex interdependencies, as well as pressure on top.

However, if I try to transfer that kinda approach to a game it just... fails?

But the realization is: In games, many behaviors and systems are actually far simpler and less intertwined in arcane ways, and code changes actually less frequently and dramatically than at work.

I could see structured testing in e.g. turn based strategy games and such, so you can test that the culture per turn is correctly calculated based off of many different situations and such.

But in many smaller projects I've had, you write some janky code, make sure the enemy behaves as expected... and never touch or change that piece of code ever again. And it just doesn't break, because no fundamental part below it ever changes, because then the entire house of card would fall apart.

It feels dang weird, but it works very well for smaller projects.

Re: Leaving Rust gamedev after 3 years

#204

Rust... what is it good for? "Systems programming" ... Rust is not good for raw performance. Neither for prototyping and iteration. Personally I think operating systems (kernels) should be as performant as possible, and C/C++ has been good enough for decades. Anyone really unhappy with Linux/BSD/Windows/macOS performance? What systems are we talking about that benefits from Rust? Advanced weapon systems that should a…

Rust is already in Windows: https://www.reddit.com/r/rust/comments/12yg3cp/microsoft_rew...

Linux added Rust support: https://docs.kernel.org/rust/

Re: Leaving Rust gamedev after 3 years

#205
Allan Blomquist's tooling demo they mention is incredible, go watch it:

https://www.youtube.com/watch?v=72y2EC5fkcE

Really sells the value of having a tight developer feedback loop: it shows hot reloading for code and graphics, a reversible debugger, live profiling with flame graphs, a data inspector with data breakpoints, time travel inspection with a scrub bar, session sharing and replay with the same scrub bar and direct links from the call stack to a breakpoint, and more.

Above the many niggles they had with Rust itself, this greatly helps me understand why Rust left them wanting more from their working environment. They say they've switched back to Unity with https://hotreload.net/ to try to capture some of that, and now I see why. (It's a shame that hot reloading tooling in Rust wasn't ready for them yet, but I see why they've moved on instead of waiting/contributing.)

Re: Leaving Rust gamedev after 3 years

#206
post #44

Gaming is C++ first and foremost. All other languages suck, except when used to script game engines (C# in Unity, etc.). There's no practical reason to choose Rust or anything else. I don't think Rust is particularly bad or good here. There's decades of work to catch up on. I don't see Rust becoming a truly great language for games unless it's blessed by Epic or Unity.

> * I don't see Rust becoming a truly great language for games unless it's blessed by Epic or Unity.

Which will never happen

Re: Leaving Rust gamedev after 3 years

#207

Starting by saying I fundamentally agree wrt iteration speed. This is ultimately why [C/C++]/Lua was such a thing for a while, and it seems quite plausible that you could benefit from a core engine in rust bound to a scripting language. But ultimately I sense the subtext here is much the same as with other Rust problems: the object oriented baby has been thrown out with the bathwater, often in the name of premature o…

This makes a lot of sense. Wonder if Bevy will add support for GDScript or C# or something. I think it's generally opposed in the interest of ensuring the Rust devex is as good as possible, but it's coming eventually, I think.

Re: Leaving Rust gamedev after 3 years

#208

Rust... what is it good for? "Systems programming" ... Rust is not good for raw performance. Neither for prototyping and iteration. Personally I think operating systems (kernels) should be as performant as possible, and C/C++ has been good enough for decades. Anyone really unhappy with Linux/BSD/Windows/macOS performance? What systems are we talking about that benefits from Rust? Advanced weapon systems that should a…

Rust is already in Windows: https://www.reddit.com/r/rust/comments/12yg3cp/microsoft_rew... Linux added Rust support: https://docs.kernel.org/rust/

Well aware, and it affects none of my points.

Re: Leaving Rust gamedev after 3 years

#209

Earlier quoted context omitted.

I'm a Rust fan (mostly for embedded firmware with minimal deps), but even after 10 years of playing with the language it's not clear to me that advanced GUI or gamedev fits well with the borrow checker. It requires a significant paradigm shift in architecture, and I'm not convinced it's worth making that shift, especially if your application can tolerate a garbage collector (which many games and most UI apps can).

https://dioxuslabs.com/blog/release-050 Seems promising, very React-esque with little boilerplate

I hope Rust does gain mature options for its GUI ecosystem, but the author of the article makes a very good point that in other languages, there would be mature options in use already. "Seems promising" is too little, too late.

Re: Leaving Rust gamedev after 3 years

#210
post #187

Starting by saying I fundamentally agree wrt iteration speed. This is ultimately why [C/C++]/Lua was such a thing for a while, and it seems quite plausible that you could benefit from a core engine in rust bound to a scripting language. But ultimately I sense the subtext here is much the same as with other Rust problems: the object oriented baby has been thrown out with the bathwater, often in the name of premature o…

> but also with a sense of misplaced religious purity regarding the evils of state To clarify, Rust isn't against state at all. Rust bends over backwards to make mutation possible, when it would have been far easier (and slower, and less usable) to have a fully-immutable language. What Rust is against is global mutable state, and an aversion to global mutable state isn't a religious position, it's a pragmatic positio…

1000%, and this is something gamedevs (and, for quite some time, webdevs) are guilty of in the name of speed for quite some time. In both web and game dev, it's come back to bite when it's time to debug.

Concurrency is hard, and anything with a ton of user interaction or communication across multiple parties induces concurrency (never block the main thread and all).

Post reply on HN