94 ms·
Leaving Rust gamedev after 3 years
- RobKohr 2y agoThank you for this. I have been having some engine indecision. I am more of a programmer, so I was thinking that learning rust and bevy would be superior to learning godot, but it seemed like a really deep rabbit hole to go down, and I was concerned from the lack of actual games that were coming out of it. Your blog post really explained the reason why quite clearly, thus eliminating a journey that would be fraught with difficulty and seemingly with little return. I am going to go with godot and hopefully that works out for me. Thank you again for sharing your experience.
- maximilianburke 2y agoI would love to be able to bypass the orphan rule for internal crates.
- JoshTriplett 2y agoI 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 wrapper. Usually, whichever library is less popular ends up adding optional support for the more popular library. This is, for instance, one reason why it's really really hard to write a replacement for serde: you'd have to get every crate currently providing optional serde support to provide optional support for your library as well. In other ecosystems, you'd either add quick-and-dirty support in your application, or you'd write (and perhaps publish) an A-B crate that implements support for using A and B together. This should be possible in Rust.
- maximilianburke 2y agoOh, 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?
- mrkeen 2y agoHi from Haskell land! Haskell went through this as well. Orphans used to be allowed and I certainly saw their appeal. The problem is that the compiler might see two different implementations of ToString for MyType in different source files. The compiler could probably make a check for that if it were compiling both files at once, but if you want to be able to compile source files separately and only recompile files which have changed, etc., I think it gets harder to spot. > someone has to hack around that with a newtype wrapper Don't think of it as hacking around it. It's the blessed approach. Newtype wrapping is giving a proper names to the behaviours, so that they don't get mixed up.
- HL33tibCe7 2y ago> The problem you're having is only a problem because you haven't tried hard enough. You just need to read another 50,000 word fasterthanlime essay. Then you'll not have problems any more. > That being said, there is an overwhelming force in the Rust community that when anyone mentions they're having problems with Rust the language on a fundamental level, the answer is "you just don't get it yet, I promise once you get good enough things will make sense". Not only this, but they openly mock other language communities for not drinking the koolaid. I like Rust, and the Rust community, and fasterthanlime, for what it's worth. But I think these points raised in the article are very much valid.
- Keyframe 2y agothis reminds me of Lispen of ye olde.. wait untill it clicks, man!
- msla 2y agoLisp is pretty normal if you're accustomed to, like, Python: It's a GC'd procedural language.
- kleiba 2y agoHaha, nice one! :-) (can only assume you're joking)
- Pxtl 2y agoSince 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.
- deleted 2y ago[deleted]
- syndicatedjelly 2y agoThe thing that the Rust community thinks sets them apart (their community), is really the thing holding them back.
- hot_gril 2y agoI don't think it holds them back. Rust is just not an amazing special tool for game dev it seems, doesn't matter how the community behaves. It's still a solid choice for systems.
- jsheard 2y agoHas 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 console toolchains would be an immediate dealbreaker. I have no first hand information but what I've heard from hanging around people who would know is that Sony insists that developers only use their official LLVM/Clang fork which is customised for their weird ABI.
- Klonoar 2y agoRust 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.
- jsheard 2y agoYeah, that Switch support was added by the homebrew side of the fence though so I don't know if it's something that developers would be able to use in an officially licensed game. Nintendo might not care so much as long as the game works, as mentioned it's Sony in particular that I've heard is picky about which compilers their developers use.
- Klonoar 2y agoAh, good point - was context I didn't have.
- deleted 2y ago[deleted]
- api 2y ago> Making a fun & interesting games is about rapid prototyping and iteration, Rust's values are everything but that I feel like this is the core of the author's frustration. Rust is a systems language. It's for writing tight fast C-like code but safely and with a much more powerful type system. The facilities you need to do this are somewhat at odds with what you want for rapid iteration. Seems like Rust was the wrong tool for the job.
- zooq_ai 2y agoExactly!
- amelius 2y agoC/C++ -> move fast and break things Rust -> move slowly and don't break anything
- persnickety 2y agoIn my experience, Rust -> move faster than C/C++ because you don't have to keep fixing things.
- SleepyMyroslav 2y agoIf they tried to use C++ it would have ended absolutely the same way. As someone who works in gamedev I can assure you C++ is same bad choice for 2 man indie project. In search of fast iteration times games have moved away from writing code in low level languages. Hardware for casual games is much bigger and faster than anything small team is able to make.
- api 2y agoYes, and if you want move fast and don't break things you need a higher level language like Go, Java, C#, etc. I'm pretty fast in Rust but not as fast as Go, mostly because Rust's type system and borrow semantics come with a higher cognitive load. I find both to be faster than C++. Rust is faster because I have to worry less about blowing my feet off with memory errors. I can't think of anything to recommend C++ now that Rust exists.
- chimen 2y agoRust is the "frontend wave" of the backends. All the woke kids gravitate towards it. A suffix of "Written in Rust" is a thing here so I'm throwing away my internet points now.
- cmrdporcupine 2y ago... complains about people using tropes and tired cliches in posts while using the worst of them, themself
- chimen 2y agoI do not complain. I've seen this trend multiple times by now. First time was with Ruby on Rails I think [1], then the cancer that led us to write JS to output HTML and all the good stuff that came and still manages to pour from npm. Every now and then you can spot the "fashion" out of these things. Rust is good and has earned its place. I just despise cult-like followings for these languages and technologies. [1] https://www.youtube.com/watch?v=YZeZsZEEpno&themeRefresh=1 https://www.youtube.com/watch?v=YZeZsZEEpno&themeRefresh=1
- cmrdporcupine 2y agoThere's no need for you to blather about "woke" and drag in US culture wars nonsense. It's distasteful, glib, and frankly not very intelligent, and just subtracts from whatever your point was.
- chimen 2y agoAs I said above, cult-like. They will swiftly call you names if you even dare to question their beliefs. Thank you for proving me right kind sir.
- obdev 2y agoYour post is "flagged" to oblivion, just like my earlier post questioning the "inclusive" culture of the Rust community. What is it called when a person or group's actions don't match their words?
- zooq_ai 2y agotl;dr -- Rust is not the language for startups who want fast iterations and are still finding it's pmf. It is perfect for rewrites of popular system software which already has millions of users and running in production because once a software becomes mature and at million user scale, safety and security becomes paramount
- swatcoder 2y ago> for rewrites of popular system software which already has millions of users and running in production Hopefully, it's perfect for more than that. Rewriting a system that's already acheived that scale is a contentious decision, to say the least. Many of our colleagues have been lost to and scarred by well-meaning attempts to rewrite those systems in the past, including many who were sure it was the right choice for "safety and security" themselves. For every conceptual safeguard new tooling might give you, you invite countless and sometimes catastrophic regressions in actual application logic in writing new implementations. It can work out, but no tool can expect to live only on that kind of work. I'm sure Rust has much broader applicability than that. Or I hope so at least.
- ykonstant 2y agoAt million user scale, feature parity and compatibility is truly paramount and, `rg` aside, Rust utils don't have a great story to tell there. Such software has evolved in the course of decades and its (usually despair-inducing) code is tailored for dealing with a tremendous number of edge cases, platforms and architectures. Rewrites in Rust tend to write "the cool parts" and indeed write them better and faster, but that is just not good enough for replacing the standard tools.
- adrianN 2y ago> 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.
- elteto 2y agoI copied this exact same snippet and was going to comment the exact same thing. Why choose Rust if you don’t care about maintainability and long term stability? Those are core values of the language! The language choice was wrong from the start. C++ is king for games so if you care more about delivering features and fast prototyping why not go with that? Maybe Rust is not a good language for rapid iteration in the game industry. And that’s ok I think.
- gfodor 2y agoC++ is king for game engines, but many games opt for languages like Lua or Unreal Blueprints because C++ is to those as Rust is to C++ Personally I like Javascript
- elteto 2y agoRight. Yes, you are correct. I assumed C++ was the language they replaced with Rust because they wanted to write lower level stuff, like their own engines (and they mention doing that). It makes even less sense to use Rust to replace one of the higher level languages like C#.
- zozbot234 2y agoRust is not antithetical to iteration-based programming, it just makes you write a lot of heavy boilerplate to explicitly support that kind of style. The flip side of that is once the 'iteration'/'prototyping' phase is over, you can actually refactor the prototype into high-quality production code, instead of either throwing it away altogether and rewriting it from scratch (spoiler alert: this doesn't really happen most of the time, because it's viewed as pointless waste) or just putting it in production as-is (which is what people actually do, even though it's obviously a disaster in the longer run).
- dmitrygr 2y agoThe Rust community is one of the top arguments against rust. I've never before been so condescended to as when attempting to ask questions there. Their lack of care for perf also drives me up a wall. Anytime they propose adding an extra layer of indirection to get around the borrow checker, I have to explain yet again that with the way modern CPUs work, extra layers of indirection have serious cache-related perf costs. Then I get told that I am yet again doing it wrong, computers are fast enough, and I am worrying about the wrong thing.
- JoshTriplett 2y ago> when attempting to ask questions there Could you please give an indication of which venues you've encountered this kind of condescension in? I don't tend to see this in the spaces I frequent, but I know it is happening, and I wish it weren't. We try, sometimes, to provide some official messaging discouraging this kind of condescension, but perhaps there's something more we can do.
- mrkeen 2y agoI think I found it: >> Their lack of care for perf >> I have to explain yet again
- LocalGauge 2y agoMy understanding is that he rather asked for specific examples (maybe post on reddit, rustlang forum), maybe I am wrong. I think giving actual examples would be more beneficial so we see the actual context clearly.
- gg2222 2y agoIn my view, here's an example from this HN comment section: https://news.ycombinator.com/item?id=40177534 https://news.ycombinator.com/item?id=40177534 If this is the kind of attitude I would get from using Rust and having to be part of the Rust community, then I think I will pass.
- hu3 2y ago
- throwaway63467 2y agoUnity is so good and quite affordable, basically there’s zero upfront risk of using it. Similar for Unreal Engine. And then there are tons of other open-source engines like Godot that are also quite good. Rust is great from lots of stuff but game development or building UIs isn’t among that (yet).
- airstrike 2y agoTo be fair, building UIs with iced-rs is getting better by the minute. My favorite showcase for using that library is this IRC client called halloy: https://github.com/squidowl/halloy https://github.com/squidowl/halloy
- TulliusCicero 2y ago> Unity is so good and quite affordable, basically there’s zero upfront risk of using it. Other than the absurd license changing shenanigans they tried to shove through recently. Hopefully they learned their lesson.
- VS1999 2y agoUnity learned that they have to turn the temperature up slower. They kept the new license that everyone was mad about but just made it so you can keep your current license if it's cheaper for you. No doubt they'll be tweaking these values over time.
- TulliusCicero 2y agoYeah, that's definitely a concern I have. Well, projected concern I guess, I'm using Godot myself rather than Unity, mostly because I found Unity way more confusing when I tried to learn it. But not needing to worry about licensing with Godot is certainly a nice bonus.
- DannyWebbie 2y agoIt was changed to being able to keep the old license if you don't upgrade to Unity 6 or beyond. They added 2.5% revenue share as an option to the flat runtime fee to make sure you can't end up in a situation where you are losing money per user just from the runtime fee alone. Unity by default charges for whichever ends up cheaper. https://unity.com/pricing-updates https://unity.com/pricing-updates
- nu11ptr 2y agoAs much as I love Rust I sometimes wonder if I'd be more productive in a simpler language. If I wrote it every day I'm not sure that would be true, but as a hobbyist coming back to Rust sometimes takes me a bit to get back in the zone. Also, still not a fan of async, as it is woefully incomplete and fairly complicated in some use cases. That said, I just can't go back to Go with nil pointers and lack of decent enums/ADTs/pattern matching either. I long for the "in between" language, but with an amazing 3rd party ecosystem as both Rust/Go have. NOTE: I'm not a game dev
- BoorishBears 2y agoIsn't that just Swift/Kotlin?
- nu11ptr 2y agoThe problem with languages is they don't compose. Iow, one missing feature needed automatically invalidates the language entirely. Swift is targeted at Apple platforms and cross platform is an after thought. Kotlin targets JVM and while it is cool in concept, I hate it as a user (and Kotlin native isn't near as mature). If were considering something else at this stage I'd probably put my time into F#, but even it has its cons. NOTE: By "compose" I mean that if I want feature A, B and C from lang X (has A and B), Y (has B and C) and Z (has A and C), but there is no way to get A, B and C in one language without creating a brand new one. I cannot mix and match features from different languages.
- Scramblejams 2y agoAnd if we're still talking about gamedev, F# would probably make the GC too sad. (When are we getting a low latency collector in the CLR? But I digress...)
- nu11ptr 2y agoYeah I'm not a game dev and don't write anything with low latency requirements. Almost all my code is in the "thoughput" camp.
- bfors 2y agoLike the author states, the "written in Rust" bonus many projects get does not apply to games. Most of the games I consider to be the most fun are built on an absolute rats nest dumpster fire of code (see: https://www.youtube.com/watch?v=k238XpMMn38 https://www.youtube.com/watch?v=k238XpMMn38). Sometimes bugs even expand game mechanics and make them more fun and expressive. That being said I'll definitely check out Unrelaxing Quacks, it looks great.
- bdw5204 2y agoMy impression of Rust is that it's a very opinionated language that wants everybody to program in a specific way that emphasizes memory safety above everything. That's a good idea, I think, for the systems programming use cases that it was intended for. I don't see that as a particularly useful thing to value for game development. The part in the article about the Rust borrow checker constantly forcing refactors sounds extremely obnoxious to deal with. I'd think that an ideal game dev language would be programmer time efficient, reasonably performant and designed for skilled programmers who can handle a language filled with footguns. Basically a better version of C such as a selective subset of C++ or a Golang without garbage collection. I just don't think the kinds of security bugs you get from C/C++ "unsafe" code are that big of a deal for games but they would be for a web site or an enterprise database.
- baby 2y agoIMO it’s not opinionated enough. Golang for example doesn’t let you customize go fmt, while Rust does. Rust also has many ways to do things in general (mod.rs vs name_of_folder.rs for example) and seems to not want to provide a useful baseline for most projects via its standard library (unlike Golang). But to go back to our subject: Rust is a great language and that’s all you need. I wish I could use it with unity.
- tick_tock_tick 2y agoThe mod vs folder rs stuff is just embarrassing for Rust. I have no idea why they support more then 1 method.
- metaltyphoon 2y agoThe do it because the first one sucked ass and the second is a huge improvement but you still have to support the old way.
- sullyj3 2y agoWhich is which and why?
- _eojb 2y agoThis is a very brave post to write given how incendiary responses to rust criticism can be, but this matches my experience entirely.
- cogman10 2y ago> incendiary responses to rust criticism can be I've not experienced this. Do you have examples of the rust community flaming someone for having negative opinions about the language?
- chimen 2y ago[flagged]
- cmrdporcupine 2y agoYou were flagged for no such thing. You were flagged for a pointless quip about "woke"ness. Other people repeated more civil and reasonably argued forms of your same point about the language and its community and received no such downvotes. No need to play martyr.
- chimen 2y ago[flagged]
- Dylan16807 2y agoIf you blame the wrong reason for downvotes, expect to be corrected. Your complaint here is invalid. Try criticizing Rust next time, if you want to demonstrate that criticizing Rust gets downvotes. You were throwing out insults in your very first comment.
- tick_tock_tick 2y agoI'd go read their mailing list and Reddit forms; especially when people run into issues doing stuff that's very simple in other languages. Never seen a more toxic programming community. Hopefully they calm down, or really get drown out, once there are a real number of jobs for people using Rust. Right now the evangelists outnumber the rank and file who are just using a language to get work done.
- telekid 2y agoThis article describes almost exactly why I think gradual typing is actually a good thing. Type checkers shouldn't get in the way of your code compiling. Yes, the language has to be designed with this property from the beginning. Yes, you should always enforce complete checking in CI. But you should also be able to try half-baked ideas.
- zogrodea 2y agoThere are at least a few nascent statically typed languages (as in, full static typing rather than gradual) which nevertheless let code with type errors compile for the sake of testing. The two that I know of are Darklang [0] and Roc [1] which aim to let you compile code with type errors for the same reason you suggest. [0] "Dark is designed for continuous delivery. As such, we don’t like requiring you to make large scale changes across your program, like changing a type everywhere. Instead, we want you to quickly discover that bad ideas won’t work, without first requiring you to propagate the type changes throughout your program." https://blog.darklang.com/real-problems-with-functional-languages/ https://blog.darklang.com/real-problems-with-functional-lang... [1] "If you like, you can run a program that has compile-time errors like this. (If the program reaches the error at runtime, it will crash.)" https://www.roc-lang.org/friendly https://www.roc-lang.org/friendly
- valcron1000 2y agoLet me introduce you to `-fdefer-type-errors` in GHC Haskell: https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/defer_type_errors.html https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/defe...
- zogrodea 2y agoThat's pretty cool! Wouldn't have guessed that Haskell would has had this feature since 2015.
- duped 2y ago> Type checkers shouldn't get in the way of your code compiling. I don't get it, what's the point of type checking if not to reject invalid programs? The point of a type system isn't simply to add annotations to a programmer (and some type systems can omit them entirely) but to define the subset of programs that are correct within the set of all the programs that can be expressed. I understand (and have used in production) optionally/gradually typed languages, and without fail codebases will opt for using types up front and not ignoring type check failure because they are always incorrect. A type error is the compiler/run time telling you "I don't understand what you told me" so why do you want to ignore that? And if the point is that you want to be able to change the type signature of something without having to refactor giant chunks of code, then that suggests your code is structured poorly to begin with. It should be easy to pull in what you need and play with it without affecting everything else if you haven't done a bad job of architecting the codebase.
- pron 2y agoAll low-level languages (by which I mean languages that offer control over all/most memory allocation) inherently suffer from low abstraction, i.e. there are fewer implementations of a particular interface or, conversely, more changes to the implementation require changes to the interface itself or to its client [1]. This is why even though writing a program in many low-level languages can be not much more expensive than writing the program in a high-level language (one where memory management is entirely or largely automatic), costs accrue in maintenance. Now, a language like Rust makes some aspects better because it ensures that the maintenance (refactoring) is done correctly -- reducing the risk of mistakes -- but it comes at a cost: you must explain your handling of memory (before and after the refactor) to the compiler (plus, the compiler doesn't understand all patterns). I think it's too soon to empirically compare this cost to the gain in reduced risk and determine when each option is more or less advantageous (and perhaps it is also a matter of personal programmer preference), the fact remains that maintenance of programs in all low-level languages is always more costly than maintenance of programs written in high-level languages because of the low abstraction inherent to all low-level languages. When writing in a low-level language some may prefer the Rust approach while others may prefer less restrictive ones [2], but people choosing any low-level language should be aware of the added maintenance cost they're invariably signing up for. Sadly, this cost only becomes apparent at later stages of the project. [1]: Some people claim that memory is just like any other resource (e.g. file descriptors), but this is incorrect. Memory and processing are fundamental to the very nature of abstract algorithms, and differences in how memory is handled change the available range of algorithms. E.g. finite state machines, queue automata, and Turing machines differ only in how memory is handled and accessed. In short -- memory and processing are special resources and are not the same as IO resources. [2]: I'm personally not a big fan of Rust's approach -- and I particularly dislike C++'s and Rust's "zero-cost abstraction", which is the attempt to make the low abstraction ability invisible in the final code without changing its fundamental aspects -- but I recognise that people's opinions differ on this matter. I also reject the claim that there's no middle ground between Rust and C that offers an intermediate tradeoff between them, i.e. that there is no safety premium to a language that offers some of Rust's safety guarantees but not all of them, such as Zig, or offers better and effective assurance of some properties without a sound guarantee.
- mtlynch 2y agoDo they say what they replaced Rust with? I scanned through a few times and couldn't figure it out.
- shmerl 2y ago> games are single threaded. Huh. Not games like Cyberpunk 2077 and it's good that they are not.
- kleiba 2y agoDid you read the part where they said that they're a two-person indie game studio with a development cycle of 3-12 months max?
- shmerl 2y agoThat's not an argument against parallelism in game design in general.
- kleiba 2y agoNo, but in practice. Because the type of game you produce in that time frame isn't typically the one that needs to worry about parallelizing multiple compute units.
- dmitsuki 2y agoAlmost all parallelism in game engines is for very specific parts of the engine and almost none of the gameplay stuff is paralellizable. What people who haven't actually had to go through and solve the problems presented in game engines often times misunderstand is that when your game is running poorly because everything is happening on a single thread, almost all of this speed issue is because of rendering. Then physics. These are very hard problems to solve and it's more complicated than "use an ECS" to solve them.
- shmerl 2y ago> almost none of the gameplay stuff is paralellizable Define gameplay. If you have some simulation happening as part of the gameplay, parallelizing it can be quite useful vs killing one CPU core on it. Physics is just one common example, but not everything is about physics. You can simulate whatever.
- WalterBright 2y ago> Making a fun & interesting games is about rapid prototyping and iteration, Rust's values are everything but that I found this to be true of C after many, many years coding in C. I noticed that the first selection of data layout stayed throughout the life of the code (with a lot of tweaks, additions, etc.). But didn't really think that much about it. Until I started writing code in D. It was easy to change the data layout, and I did for experimenting. For example, changing a reference type to a value type, and vice versa. This was easy in D. It's just too much work in C, so it didn't happen. The reason is simple: p->b v.b To switch between a ref and a value type, you've got to search/replace the -> into ., and the . into ->, and not disturb the dots and arrows of the other types. When dealing with 100,000 lines of code, this is a non-starter. But with D, both reference and value types are used as: p.b v.b making it easy to switch between the two, and also switching function parameters from values back and forth with references.
- spintin 2y agoWhen ever I watch someone coding C(++) all they do is compile and then add remove * and & or change between -> and . when the compiler complains. Multiply that by all the C(++) coders on the planet and we have lost a billion man hours...
- dist1ll 2y agoThat's a good example. I actually think dot syntax is really under-utilized sometimes. Although personally, I'd prefer that if v was a reference/pointer to a struct, that v.b simply performs a pointer offset, instead of auto-dereferencing like ->.
- lylejantzi3rd 2y agoYou could hack the C compiler! https://github.com/tsoding/tic-tac-toe-auto-deref https://github.com/tsoding/tic-tac-toe-auto-deref https://www.youtube.com/watch?v=yKI-VOBBFu8 https://www.youtube.com/watch?v=yKI-VOBBFu8
- p0nce 2y agoI agree, and D with the GC lets me prototype quickly. Its type system gets progressively stricter with constraints, for code that survives. I wouldn't want all the type system to apply to prototype code or a nascent program.
- tormeh 2y agoGaming 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.
- qiine 2y ago> * I don't see Rust becoming a truly great language for games unless it's blessed by Epic or Unity. Which will never happen
- mrkeen 2y ago> There's decades of work to catch up on First you gotta get OpenGL going, with its horrible stateful API, give up on it and go to DirectX9. Do a complete rewrite when DirectX10 comes out. Get your real-time lighting happening with shadow volumes, run into patent issues and get strong-armed into putting Creative sound into your game. Cycle between GLSL, HLSL, and Cg. End up switching to shadow mapping anyway. Drop Linux and Mac support. Start over with Vulkan/Metal. I don't think Rust needs to relive most of that.
- pcwalton 2y agoExactly. Bevy has the advantage of being built using the "right way" from the start. This makes an enormous difference in the ease of hacking on rendering code. Ironically, the main thing holding Bevy back is the bickering at the W3C. WebGPU is still not widely supported, so we have to support WebGL 2 (with reduced functionality in some cases), and that adds a lot of complexity.
- TheRoque 2y ago> Bevy has the advantage of being built using the "right way" from the start I think the article is precisely criticizing this type of comment... You make people believe that Bevy is some kind of safe bet for the future, that it took inspiration from the greatest to build even better foundations for a game engine... And it seems common in the Rust community: make audacious unverifiable claims to enroll other "believers". But it's easy to claim when the tool itself has a fraction of the functionalities of Unreal, Unity or Even Godot. Heck, last time I used it (about 2 years ago) there wasn't even any built-in physics stuff. You have to install plugins from every corner, some require old Bevy versions, some other require newer versions... It's seriously unusable to just "get things done"
- popcar2 2y ago> Rust gamedev ecosystem lives on hype I've been saying this for years. I've tried to get into Rust multiple times the past few years and one of the things I've tried was gamedev with Rust (specifically the library ggez when it was still being worked on, and a little bit of Bevy). I admittedly never got far, but I gave it a solid shot. My experience was instantly terrible. Slow compile times and iterations, huge package downloads (my project folder was roughly 1gb for a simple 2D project), and of course Rust itself was difficult to get into with lifetimes and having to wrap and unwrap my variables constantly and getting into wrestling matches with the borrow checker. I kept telling myself that everyone loves Rust and the community loves to rave about anything Rust-related and maybe I just don't get it, but it took some time to realize that no... It's just a terrible choice for it. I even tried to make UI with eGUI and was still miserable. Rust is a systems programming language but the community is trying to convince everyone should be used for general purpose stuff. And my other biggest problem is that they keep painting other non-Rust things as being fundamentally flawed for not being Rust. "It's not memory safe" is the biggest one thrown around, but when was the last time memory safety was actually a big problem in games? Unity uses C# which is garbage collected, Godot uses its own scripting language which makes it nigh impossible to leak memory, Unreal AFAIK has its own tools that makes memory management trivial. Rust game development feels like a solution looking for a problem to fix. I am curious about Bevy when it becomes mature and has its own editor, but for now I'm just not convinced gamedev with Rust will ever take off.
- colund 2y agoI find that Jonathan Blow ranting about Rust game development here https://www.youtube.com/watch?v=4t1K66dMhWk 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.
- littlestymaar 2y agoWell 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)
- Xeamek 2y agoHe is actively developing his new game in parallel to creating the language. Not to mention smaller projects like 'Braid- anniversary edition'.
- astrange 2y agoIsn't the traditional advice that if you try to write both a game engine and a game that you'll get neither?
- Xeamek 2y agoI mean, it's not like there are no games in existence that shipped with a custom engine. Even in hindsight it's hard to judge whether building your own engine was good or bad decision, and we are nowhere near "the hindsight" level of knowledge.
- BaculumMeumEst 2y agoThen it's a good thing not everyone listens to traditional advice.
- klaussilveira 2y ago&str vs String. Oh boy.
- brabel 2y agohttps://raw.githubusercontent.com/lesterli/blockchain/master/images/rust/strings_rust_c.jpg https://raw.githubusercontent.com/lesterli/blockchain/master...
- whytevuhuni 2y agoThis is missing a few useful ones, like Box<str>, Arc<str>, Cow<'a, str>, SmallVec<u8>, transmuted newtype references like &UserId, and of course the string type you implemented yourself because the previous ones were not good enough.
- andrepd 2y agoYeah, if std::string vs std::string_view is "a major hurdle"... I don't know what so say
- ziddoap 2y agoWhere did you see "a major hurdle" written?
- Capricorn2481 2y agoYou are doing exactly what is being criticized in the Rust community. Bad faith reads of someone who spent significant time getting into the language.
- Ygg2 2y ago> Orphan rule should be optional That has got to be the most "I didn't think this through" take ever. While it's a known pain in the ass. Not having it is a bigger pain. The moment you allow this, you have to find a way to pick between several implementation - and they don't always have sane names. Orphan rules prevent this from happening.
- JoshTriplett 2y agoSomeone who has experienced real problems as a result of a specific mechanism is not required to solve every single problem with alternatives to that mechanism before saying "this mechanism has caused me real problems and it'd be nice if there were a better alternative that didn't cause those problems". > The moment you allow this, you have to find a way to pick between several implementation - and they don't always have sane names. There are other possible solutions that don't involve that. For instance, many applications would be quite happy with "There can be only one implementation", giving a compiler error if there's more than one. A slightly more sophisticated rule would be "Identical implementations are allowed and treated as a single implementation". This would be really convenient in combination with some kind of "standalone deriving" mechanism, which would generate identical implementations wherever it was used.
- Ygg2 2y agoDisclaimer: I'm aware you guys are working on relaxing orphan rules, and I wish you the best of luck. But as an outsider, orphan rule doesn't seem to be going anywhere soon. And if the original poster had said that I would be ok. Instead what they said is: > It's a great example of something I'd call "muh safety", desire for perfection and complete avoidance of all problems at all costs, even if it means significantly worse developer ergonomics. This implies the writer didn't assume what happens if you "turn-off" orphan rules. I.e. you don't trade perfection for developer ergonomics, you trade one set of developer (ability to write any trait for any type) ergonomics for another (having to battle two incompatible trait implementations from crates you don't own). Either you have to manually specify how nearly every implementation is pulled (horrible developer ergonomics) or, even worse, you go into monkey patching territory. > For instance, many applications would be quite happy with "There can be only one implementation", giving a compiler error if there's more than one. Ok. But you still need a resolution mechanism to fix the error. Which implies manually solving ambiguity. And how do you solve it for blanket implementations?
- desiderantes 2y agoThat logo is huge on mobile so I can't read the first few bullet points.
- darthdeus 2y agoAuthor here, sorry about that, I just deployed a fix, should be readable now. If it's not, here's the first few points - Once you get good at Rust all of these problems will go away - Rust being great at big refactorings solves a largely self-inflicted issues with the borrow checker - Indirection only solves some problems, and always at the cost of dev ergonomics - ECS solves the wrong kind problem - Generalized systems don't lead to fun gameplay - Making a fun & interesting games is about rapid prototyping and iteration, Rust's values are everything but that - Procedural macros are not even "we have reflection at home" - ... the list corresponds to the titles of sections in the article.
- fidotron 2y agoStarting 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 optimisation, but also with a sense of misplaced religious purity regarding the evils of state and the merits of functional programming. There never was any OOP law that your inheritance hierarchy had to be insane, or that you had to create classes for absolutely every last thing. Now we have people hitting the opposite extreme where everything has to go through the same function switched on a pattern matched enum. One of the core problems with Rust is it lacks the mechanisms to allow moving adequately out of this tarpit. I still think Rust might have a place at the lowest level core where it is all about shuffling arrays of things through compute units, but for the higher level pieces it is clearly the wrong thing to be using.
- fire_lake 2y agoIsn’t the trait system exactly the way out of this tar pit?
- fidotron 2y agoObviously that is the intention, but the absence of libraries that manage to replicate what people manage fairly easily in other paradigms does show it's not sufficient. golang is similar in this regard - it has interfaces and you can compose type structs, but the results become an unwieldy mess unless the developers are staggeringly disciplined, in which case they'll have a better time in something else anyway.
- kibwen 2y ago> 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 position, because global mutable state makes concurrency (and reasoning about your code in general) completely intractable.
- blowski 2y agoOh we’re at that point of the hype cycle are we?
- Capricorn2481 2y agoWe've always been here. People just didn't listen.
- mjr00 2y agoIn 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, Kubernetes, LLMs, etc. If you're in the (1) camp, you should stick with what you know; and if you know that what you know isn't enough to build the thing, you should use whatever is most common and straightforward, not something off the beaten path. Games seem to be the biggest trap, because solo devs often end up building a game engine when they set out to build a game. If you really want to build a game, just use Unity/Unreal/Godot, I promise it'll go better for you.
- gpm 2y agoI 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 wrong. * For the sake of argument, we can pretend I only know rust. In reality I know a fair number of other languages as well, but the list doesn't happen to include C# or "random game engine specific scripting language", which seems to be the options if we're going with an established engine for big 3d games.
- mjr00 2y agoThis 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, and it's a bit of a judgment call, 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. Unless, of course, you do know a bunch of great Rust game development libraries that solve all those problems--in which case yeah, building a game in Rust might be the best choice. It's not impossible!
- WhereIsTheTruth 2y agoOP should give D a try, my game fully recompile in less than 1sec, and i can consume most of the C gamedev ecosystem without effort and seamlessly
- nielsbot 2y agoInteresting to me to have [iteration speed] <--> [maintainability] spelled out as opposite ends of a spectrum... and that sometimes [iteration speed] is the right thing to optimize for.
- LarsDu88 2y agoI've done hobby gamedev in Bevy/Rust, Godot/C#, and Unity C#. It's honestly somewhat baffling to me that folks will choose Rust for gamedev right now. The state of the open sourced tools are just not there yet, especially when compared to Godot, and at the same time these games are running on PC hardware which tends to get faster every year. Also for ECS... one thing I tended to realize is that when developing a game, pigeonholing everything into an ECS can seriously tend to get in the way. A lot of (efficiently written) game code is best handled in an infrequent event-driven way. An ECS backed game engine like Bevy can make big mobs more efficient, but few games will actually leverage this effectively for fun gameplay and at the same time modern PCs are fast as hell. 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. Now should a gamedev today, 26 years later, making a 2d isometric game for the PC be worried about performant multithreading????
- TillE 2y agoCPUs are way way faster, but RAM latency has barely improved in the past couple decades. That's why cache-optimized systems like ECS can still be a dramatic improvement when you're simulating a lot of stuff. Like, thousands of active objects.
- pixelesque 2y agoThey can be improvements, but you can do Data-Oriented Programming without ECS systems, i.e. Structure Of Arrays, which is what we often using in Rendering/Simulation for VFX for SIMD/GPU compute... But similarly, ECSs can be slower, if they don't have some optimisations, i.e. spatial data structure lookups: just using a generic ECS "database" system without any first-class spatial knowledge / acceleration structure lookup ability, is likely going to be slower.
- pixelesque 2y agoLikewise - I've been learning Rust for four years now (significant C/C++/Python/Lua experience), and have written some reasonably complex apps in it, but I really just didn't get the Bevy / ECS "hype"... I've tried to write several different types of games using it (with Bevy) in the past three years, and it just feels like shoe-horning something in. But the biggest complaint I have with Bevy is that with all the refactoring that's been needed with the Bevy version upgrades: getting the code to compile again after the version upgrades has normally been fairly easy - but it then often didn't work correctly, and I'd have to spend time debugging the ECS system to work out what was wrong. i.e. the "if it compiles, it'll almost certainly work" bonus of generic Rust code totally seems to fall down within Bevy. I obviously understand that it's an in-development framework, in its early days, so some of that's on me for choosing it, but still, it's been a very painful experience, and I feel I've wasted a fairly significant amount of time over the past few years attempting it.
- mrkeen 2y ago> As far as a game is concerned, there is only one audio system, one input system, one physics world, one deltaTime, one renderer, one asset loader. I thought this way when I was doing Java dev around 10 years ago. I thought it excused the singleton pattern. I was wrong! You should always be able to construct an object by explicitly passing dependencies to it. Especially for testing. It really is no fun if your renderer starts talking to your asset loader and timer directly.
- DarkNova6 2y agoAll praise our almighty lord that is dependency injection
- Xeamek 2y agoNo. You don't need ability to DI every single functionality. And you can still do DI with global state, just with less granularity.
- astrange 2y agoPeople should get more into integration tests. If you start out thinking you need to separate everything for unit testability, you instantly get architecture astronaut-ism, where your architecture is entirely based on fake testability instead of the thing it's actually meant to do in production.
- deleted 2y ago[deleted]
- Capricorn2481 2y agoUnit testing in Game dev is largely useless.
- rendaw 2y agoI agree with a lot here, but I think the author is overplaying "get things done fast" or underplaying "stable, performant code". I like indie games, but I've played enough games that crashed if I look at them wrong or chug despite being low poly early 2000s things that I now hesitate to buy indie games. Some of the examples seemed like maybe rust was preventing a weird unexpected feedback or clobbering iteration state or whatever. I don't think the author disagrees here and is mostly talking about awful runtime alternatives (refcell, etc) but I just wanted to say it for balance.
- fbn79 2y agoHonestly I have not read all the article. What language they are going to use instead of Rust?
- karolist 2y agoC# with Unity.
- imiric 2y agoThis is a sobering read. Thank you for sharing. This sums it up for me: > Rust as both language and community is so preoccupied with avoiding problems at all cost that it completely loses sight of what matters, delivering an experience that is so good that whatever problems are there aren't really important. This doesn't mean "ship crap games", it means focusing on the game being a good game, not on the code being good code. I think this can be easily extrapolated to projects outside of game development as well. User experience is ultimately all that matters. If you're in prototyping stages of whatever it is you're building, and games spend a lot of time in this phase, then your focus should always be on testing what the user experience will be like, rather than absolute code correctness, maintainability, and everything else that makes a long-term project successful. The fact Rust seemingly can't deliver this rapid prototyping workflow should be a large factor when deciding which language to use. I've been using Go as my main language for the better part of a decade now, and I think it strikes the perfect balance of code quality and rapid prototyping. It's far from the side of absolute freedom of a language like Python, which becomes a nightmare to work with after the prototyping phase is over (though this might have improved in the past few years), but it's also far from languages like Rust, and allows me to be very productive, very quickly, while also being easy to pick up for newcomers. I probably wouldn't pick it for GUI or game development either, though, but for things like CLI, network and web tooling, it's perfect.
- timeon 2y ago> User experience is ultimately all that matters. It should be but current state of web will show you that it is often not.
- dimgl 2y agoReally? Why web?
- hyperbrainer 2y agoAds, popups, horrible laggy UI all to make money. It is not user experience, just money
- attheicearcade 2y agoAbsolutely agree with the comments on ECS and Bevy in particular. I tried getting to grips with it for some time, doing things the Bevy way, and it just felt like a big step backwards because it’s not suitable for most things. The renderer was really slow at the time too, although I imagine that has improved. Switched to plain rust + vulkan (via ash) + dear imgui and haven’t looked back.
- vacuity 2y agoSome of those issues with Bevy might have more to do with its immaturity. It still needs at least a few years to be a solid choice for all sorts of games, in my opinion. I do think the hype should be toned down; people shouldn't feel pressured to worship Bevy or Rust or whatever is the hot new thing.
- martin-t 2y agoAs someone in a similar position (also ~3 years doing gamedev in Rust but only free time + open source), I feel very similarly. There's low hanging fruit i've been complaining about for years where Rust is protecting us from ourselves - orphan rules, global state, ... Look, we're adults, we can make decisions with tredeoffs. Compile times are a tougher one, I understand that Rust does analysis that is more complex than many langs and i feel ungrateful to people who spend their free time improving Rust. But also i don't think the complexity justifies all of it. Make dynamic linking easier, reduce how much needs to be recompiled, compile generics to dynamic dispatch in debug builds, etc. - there's gotta be a ton of stuff that can investigated. ECS just plain sucks. People use it because what they want at first is some way to have relationships between entities. References/pointers are the obvious solution in most langs but in rust, they're obviously out. The second option is Vec and indices but that falls apart as soon as you start removing entities. The next step up the ladder of complexity should be generational arenas but for some reason people immediately reach for the big guns - ECS. And it infests their game with two things that make gamedev a slog - dynamic typing and boilerplate. Boilerplate is obvious to anyone who has done gamedev the "obvious" way before. What could be projectile.shooter.score += 1 is multiple lines which (depending on your particular choice of ECS) usually involve generics. You shift your focus from tweaking your game logic and tuning the experience to typing out boiletplate. Dynamic typing means entities are no longer structs with fields where you can understand how they relate to each other at a glance but instead any component can be anywhere, entities are no longer real, refactoring always causes silent bugs. However, by far the biggest issue is the community's handling of criticism. There are practically no experienced gamedevs coming to Rust from other langs so there's nobody to give Rustaceans a reality check. Rust gamedevs are almost always writing their first game (or, yes, engine). And there's nothing wrong with that, i was writing my first game at one point too. But their attitude is that they chose Rust because they heard it's the best and they got invested in the language because it's hard(er) to learn and now with all this investment if they hear rust or their particular favorite engine might not be that great, it feels like wasted effort so they get emotional and defensive. I've personally chatted with over half a dozen other gamedevs who came to rust with years of experience under their belt and a common pattern is that they avoid the rust (gamedev) community because they're beat down by the negativity heaped upon them every time they try to discuss the negatives. It doesn't matter they take every effort to offer constructive criticism, it becomes a social instead of technical topic. I came to Rust because i care about code correctness and, well, quality (of tooling, docs, testing). And Rust delivers there on a lot of that. But i also wanted to write games of a larger scale than can be done in one person. My hope was that there'd be other people with the same values who wanna build cool games together. Instead there's a low single digit number of serious open source projects and a bunch of small one man games and a a whole lot of loud people who seem to think gamedev is about hyping up an engine like it's a sports team. Myself, I apparently chose the wrong engines for my games in both cases. Not because they're bad technically. In fact, having 5 years of gamedev experience before Rust, i think my choices are better from a technical perspective but there's just not the critical mass to build a serious open source game around them.
- deleted 2y ago[deleted]
- npalli 2y agoBy the time the Rust developer is finished with their refactoring, the C++/C#/Java/JavaScript developer has implemented many different gameplay features, played the game a bunch and tried them all out, and has a better understanding of which direction should their game be taking. Man, slower than C++, that's pretty damning.
- Animats 2y agoThat's a good article. He's right about many things. I've been writing a metaverse client in Rust for several years now. Works with Second Life and Open Simulator servers. Here's some video.[1] It's about 45,000 lines of safe Rust. Notes: * There are very few people doing serious 3D game work in Rust. There's Veloren, and my stuff, and maybe a few others. No big, popular titles. I'd expected some AAA title to be written in Rust by now. That hasn't happened, and it's probably not going to happen, for the reasons the author gives. * He's right about the pain of refactoring and the difficulties of interconnecting different parts of the program. It's quite common for some change to require extensive plumbing work. If the client that talks to the servers needs to talk to the 2D GUI, it has to queue an event. * The rendering situation is almost adequate, but the stack isn't finished and reliable yet. The 2D GUI systems are weak and require too much code per dialog box. * I tend to agree about the "async contamination" problem. The "async" system is optimized for someone who needs to run a very large web server, with a huge number of clients sending in requests. I've been pushing back against it creeping into areas that don't really need it. * I have less trouble with compile times than he does, because the metaverse client has no built-in "gameplay". A metaverse client is more like a 3D web browser than a game. All the objects and their behaviors come from the server. I can edit my part of the world from inside the live world. If the color or behavior or model of something needs to be changed, that's not something that requires a client recompile. The people using C# and Unity on the same problem are making much faster progress. [1] https://video.hardlimit.com/w/7usCE3v2RrWK6nuoSr4NHJ https://video.hardlimit.com/w/7usCE3v2RrWK6nuoSr4NHJ
- int0x29 2y ago> * There are very few people doing serious 3D game work in Rust. There's Veloren, and my stuff, and maybe a few others. No big, popular titles. I'd expected some AAA title to be written in Rust by now. That hasn't happened, and it's probably not going to happen, for the reasons the author gives. At one point the studio behind the Finals was writing game server code in Rust with an Unreal engine client. Not sure if that's true still
- droopyEyelids 2y agoBackend 3d code?
- overflyer 2y agoZig zig zig zig zig :D
- melodyogonna 2y agoRust being the best alternative to C++ is why I'm wildly rooting for Mojo. This language sacrifices a lot in ergonomics and UX to the alter of safety. And the Rust community never fails to interject with "Well, Akshually..." whenever you complain.
- FrustratedMonky 2y agoI've been thinking of embarking on a Rust/GUI/Game. Guess, this will save some grief. Is Rust the future? Will this situation improve? I've been wanting to like Rust, but this seems to be indictment.
- layer8 2y agoIt’s unlikely to improve anytime soon, and there are no indications that Rust will be the future of game programming.
- lelanthran 2y ago> Is Rust the future? Will this situation improve? I don't follow this too closely, but I have not seen any indications that any of the frustrations expressed in the article are on a Rust roadmap. IOW, just about everything in that article is a `WONTFIX` or `NOTABUG` for the Rust maintainers.
- fwsgonzo 2y agoI see some of those things could perhaps be solved by implementing parts of the game in a sandbox. I know that's work: I'm doing it myself. But all the work with the host-guest boundary (let's not call it bindings, please), is worth it in the end. I have a C++ game client, a C++ game server, and a shared C++ game script that is transferred to all clients, running in a RISC-V emulator. That means the script will fundamentally execute the same way on all clients, and the server. I have no idea what everyone else is doing. This is what I'm doing now, and the more fleshed out it's becoming, the more I actually like it this way. I don't think I could easily "go back" to other solutions.
- erikbye 2y agoRust... 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 absolutely not fail? Controllers for air planes? Traffic controllers? Radar? Power grid? Google, fb, amazon, etc. use C/C++ to squeeze the most performance out of anything I/O heavy, and security is not an issue that deep in the stack, that's not the exploitation layer.
- h4x0rr 2y ago[flagged]
- Karellen 2y ago> Personally I think operating systems (kernels) should be as performant as possible, and C/C++ has been good enough for decades. If that how you want your OS, that's fair enough. But I think a lot of people are happy to trade (to some degree, at least) performance for security, and would prefer that their OSs are as secure as possible first, and as performant as they can be second.
- dgellow 2y agoRust is already in Windows: https://www.reddit.com/r/rust/comments/12yg3cp/microsoft_rewriting_core_windows_libraries_in_rust/ https://www.reddit.com/r/rust/comments/12yg3cp/microsoft_rew... Linux added Rust support: https://docs.kernel.org/rust/ https://docs.kernel.org/rust/
- erikbye 2y agoWell aware, and it affects none of my points.
- dgellow 2y agoYou asked: > What systems are we talking about that benefits from Rust? Advanced weapon systems that should absolutely not fail? Controllers for air planes? Traffic controllers? Radar? Power grid? You seem to be listing niche, specialised systems where a failure would be critical. But a simpler answer that is missing: mainstream operating systems — as I said, both Windows and Linux have been investing in Rust. Mainly as a way to increase memory safety.
- indigoabstract 2y agoI'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 don't think the language is the main problem preventing people from getting their projects done..
- avery17 2y agoThe 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.
- indigoabstract 2y agoRight. If someone could come up with a pill or something to maintain motivation and make all the bugs and hairy annoying details feel fresh again, just like the feeling of starting over, I would certainly part with my money. But there's no such thing unfortunately.
- fearthetelomere 2y agoAdderall? I'm only half-joking :)
- TulliusCicero 2y agoInteresting, I almost find it the opposite right now. Learning the engine is a pain in the ass -- it's not particularly hard, just tedious to learn all the APIs and quirks -- and then when you're initially building the thing, "it's not fun yet" for a quite a while. But then once you have the fundamentals down, you can add more abilities and characters and other features, that's the fun shit. I was working on the AI last night, and since I already had one functioning AI agent, it was pretty easy to spin up variations that behaved in moderately different ways, which was very fun! I've only been dabbling though, and still sort of in the prototype stage, not quite a full game yet but getting there. Maybe I'll feel more like you suggest deeper into development.
- lastgeniusua 2y ago> The most fundamental issue is that the borrow checker forces a refactor at the most inconvenient times. Rust users consider this to be a positive, because it makes them "write good code", but the more time I spend with the language the more I doubt how much of this is true. Good code is written by iterating on an idea and trying things out, and while the borrow checker can force more iterations, that does not mean that this is a desirable way to write code. I've often found that being unable to just move on for now and solve my problem and fix it later was what was truly hurting my ability to write good code. The latter part of this is true for any strongly statically typed language (with Rust expanding this to lifetimes), which negates the beginning of this paragraph -- once you get things compiled, you won't need to refactor, unless you are changing major parts of your interfaces. There are plenty of languages that do not have this problem because it is a design choice, hardly something Rust can "fix", it's what makes it Rust.
- samatman 2y agoThis is the opposite of my experience with other strongly typed languages. They're easier to refactor, because when you change the types, say you delete a field, everywhere that field was used is a compile error. Clean them up and on your way. The borrow checker is an entirely different beast. People forget that safe Rust allows a subset of programs. Finding the subset which does what you want can range from easy, to hair-pullingly gnarly, to provably impossible.
- lugu 2y agoThe author is asking for a "give me a break" feature. I would say that in a strongly typed functional language, this is akin to mutating objects. The author seems to wish for an unsafe option to locally turn off the borrower check. Is it something Rust could not offer?
- aapoalas 2y agoYou can always dip into raw pointers and come back up for a reference, or eg. do a transmute to a static lifetime. Absolutely not okay according to the language rules but it will compile and will probably also run without an issue if you're not doing something wrong in your code (eg. Wanting to keep a reference to a string while you also mutate it.) I'm actually surprised that the author didn't seem to consider this much of an option.
- modernerd 2y agoAllan Blomquist's tooling demo they mention is incredible, go watch it: https://www.youtube.com/watch?v=72y2EC5fkcE 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/ 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.)
- darkteflon 2y agoYeah, this is the bit that stood out for me, too. Does anyone knowledgeable here have a sense for whether there are any insurmountable roadblocks to bringing hot reload to Godot?
- throwawee 2y agoGodot 4 already has hot reloading.
- GardenLetter27 2y agoNot for shaders while the game is running? https://github.com/godotengine/godot-proposals/issues/5269 https://github.com/godotengine/godot-proposals/issues/5269
- EamonnMR 2y agoFor testing shaders you can use the editor, at least.
- _flux 2y ago
- mikhmha 2y agoInteresting read! If I had not picked Elixir + Godot for the multiplayer game I'm making, then I would've gone with Rust for the whole thing. The old naive version of me would've tried doing it in C++ + Unreal but I knew better this time around. I think multiplayer game devs are sleeping on Elixir! It has made the network side of things so much easier and intuitive with fast prototyping and built in monitoring - so many lifetime issues are easily found and addressed. I'm pairing Elixir with Godot, Godot is used for the frontend game client. And its crazy because I thought the game client part would be the "hard" part as it would be a new skillset to learn, but Godot makes the actual game part very easy. GDScript is easy to learn, and the way Godot uses "signals" is very similar to the backend code in Elixir with message passing so its not a huge cognitive shift to switch between server/client code. I get that BEAM doesn't lend well to highly computational tasks, but I just don't see how thats an issue for many types of multiplayer games? If you aren't making some crazy simulation game, then most of the backend computation is more around managing client state and doing "accounting" every tick as inputs are processed. The most computational task I've had is server-side NPC Pathfinding, which I was able to quickly offload onto seperate processes that chug along at their own rhythm.
- daelon 2y agoI would love to read more about these Godot/Elixir adventures. Do you have a blog or a repo I could look through?
- mikhmha 2y agoNo blog unfortunately, the notes are all on paper. I have github page for the game where I ramble a bit: https://github.com/mikhmha/SWARMMO https://github.com/mikhmha/SWARMMO But I'm planning to release the game for testing next month! Its a browser "MMO" game too so its going to be easy to try out. And then I'll have time to write some more detailed technical notes online.
- stephc_int13 2y agoAs 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, moving things around and changing your mind about the most desirable approach several times a day is common during heavy development phases. We almost never have specifications, almost nothing is set until the game is done. It is a different story for game engines, renderers, physics, audio, asset loaders etc. those are much closer to system programming but this is also not where we usually spend the most time, as a professional you're supposed to either use off-the-shelf engines or already made frameworks and libraries. Also, ECS is, IMHO, a useful pattern for some systems, but it is a pain in the butt to use with gameplay or UI code.
- mrkeen 2y ago> My priorities are reasonable performances and the fastest iteration time possible. I bought Mount & Blade II Bannerlord in 2020-03-30. I love it to death, but come on... // 2024-02-01 $ curl https://www.taleworlds.com/en/News/552 | grep "Fixed a crash that" | wc -l 29 // 2023-12-21 $ curl https://www.taleworlds.com/en/News/549 | grep "Fixed a crash that" | wc -l 6 // 2023-12-14 $ curl https://www.taleworlds.com/en/News/547 | grep "Fixed a crash that" | wc -l 101 Maybe feeling like you're iterating fast isn't the same as getting to the destination faster. Edit: Lol guys calm down with the down-vote party. I was counting crashes, not bugs: $ curl https://www.taleworlds.com/en/News/547 | grep "Fixed a bug that" | wc -l 308 Does your C++ not crash, just theirs?
- tedajax 2y agoThis comment is nonsense
- stephc_int13 2y agoYeah this is a common problem in the industry, we rarely have enough time to refactor what should be considered prototype-level code into robust code.
- nottorp 2y agoNow they need to try blockchain :)
- SeanAnderson 2y agoI've experienced a lot of these concerns while building https://github.com/MeoMix/symbiants 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 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.
- unclad5968 2y agoI personally would use C++ with SDL2, but I use c++ a lot already so I'm biased. Emscripten would allow you to target WASM.
- valcron1000 2y agoIf you're targeting the browser first why not use a browser first library like PhaserJS [0]?. I don't see a reason to work around with WASM; HTML5 canvas might be everything that you need. [0] https://phaser.io/ https://phaser.io/
- SeanAnderson 2y agoI'm aware of Phaser and evaluated it, but didn't try prototyping something out using it. My primary concerns were: lack of any coherent plan towards supporting WebGPU, TS bindings being best effort rather than being written natively in TS, and, crucially, Phaser4 being stuck in development hell. Phaser 4 was announced in 2019, https://www.patreon.com/posts/28467752 https://www.patreon.com/posts/28467752, and hasn't shipped. Current version on GitHub is v3.8. It made me deeply uncomfortable planning to build ontop of an engine that's stalled out for 5 years. I would not reasonably expect to be given support for WebGPU ever and I strongly feel that WebGPU is going to be the defining way web games are written in the coming year(s). I also wasn't able to find any super compelling games written using Phaser. Since I evaluated it, it appears that Vampire Survivors was written using it, but then they abandoned Phaser and adopted Unity in v1.6.
- the__alchemist 2y agoExcellent 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++.
- hot_gril 2y agoWhy is async such a dealbreaker for this guy? Especially for web dev.
- vacuity 2y agoI think the async Rust shortcomings are largely solvable, but I sympathize with everyone running into the numerous problems right now.
- hot_gril 2y agoWhat's bad about it? Last time I used Rust was before that feature existed.
- vacuity 2y agoHigh cognitive complexity, incongruity with other language features, interface virality (the bemoaned "function coloring problem"). I think much of the downsides are more a result of slow moving language design than intractable fixtures.
- pcwalton 2y agoAs 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 https://github.com/makspll/bevy_mod_scripting [2]: https://github.com/rewin123/space_editor https://github.com/rewin123/space_editor
- Xeamek 2y agoI mean, if you agree that the ideal for bevy would be lua integration, you are kinda agree with the author that Rust itself is suboptimal (at least in layer of game scropting), don't You?
- npalli 2y agoJust 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.
- bb010g 2y agoI'd expect a move from Rust to Julia over a move to Python.
- dbacar 2y agoWhy do you think it is dog slow? Most of the ds/de libraries are in C/C++, with python just calling. I personally checked JSON parsing with Go/Rust/Python. Guess who won.
- npalli 2y agoSo, python is not slow if you don't use python and depend on C/C++. Got it. LOL.
- ArkimPhiri 2y agoTried Rust for a very simple game, it didn't just feel right. It's like the language itself is begging you not to use it for game dev. Lol
- Nevermark 2y agoThe TLDR I got from that: Normal coding has two concerns: 1. What behavior do I want? 2. How am I implementing that behavior? Experimenting with #1 is slowed down by the current end point of #2. Sometimes not at all, sometimes a lot, depending on luck and how #2 anticipated the class of experiment I am trying. Rust adds: 3. How can the implementation code be organized so its stringent safety checks are validated? Now experimenting with #1 is complicated by two dimensions of design history instead of one. And the latter dimension being two steps of abstraction/design-dependency away from concern #1, is going to be very brittle. Never used Rust, but that sounds painful.
- Klonoar 2y agoI've been writing Rust professionally (and predominantly) for ~5+ years now, with brief detours in game dev. I'll defer to others who are dedicated game devs, but overall I think this article is well written and a healthy thing for Rust overall. We need this kind of breakdown if things are going to continue to improve. I'd say I only have two somewhat arbitrary comments on this piece: > Rust on the other hand often feels like when you talk to a teenager about their preference about anything. What comes out are often very strong opinions and not a lot of nuance. This is a rabbit hole of a topic so I don't want to go too deep into it, but this isn't a Rust-specific issue (though it may be a current Rust issue). I've seen this same pattern play out across so many languages over the years, from Lisp to Rust to everything in between. A very unscientific and definitely not charitable way I've thought about this over the years is that programming, by nature, is an OCD person's dream. We wind up with a pretty large chunk of people who seemingly move language to language in the hype cycles in search of some weird nirvana level that is likely just unobtainable. I feel like Rust has slowly started shedding this as the community has grown/matured and some people have moved on to the next hype cycle but I often find myself wishing it'd happen faster. I write Rust because when I sleep at night, I just don't get woken up by being paged for nearly as many weird edge cases. The Rust I write often has a litany of compromises because I want to just get shit done and move on with my life, and the remaining guarantees are still good enough. The number of times I've had to tell people to leave it be is definitely higher than it should be. > I know that just by saying "global state" I'm immediately triggering many people who have strong opinions on this being wrong. I feel this is one of those things where the Rust community has created a really harmful and unpractical rules to put on projects/people. This isn't really a Rust-specific thing, though I can't fault the author for including it. People have been beating the drum of "no globals" for as long as I can remember... and simultaneously, as long as I can remember, game devs have come out of the woodwork to politely explain that the programming they do is often under very different constraints. I still periodically use global state for things because it's just faster at points, and no, I've never cared if people get annoyed by it. Anyway, here's to hoping this leads to positives for the community.
- chaosprint 2y agoI've worked on Ambient Engine and now on the Bevy engine. I totally agree with these points, very valuable. I only make some comments from my professional (audio) perspective: We need the highlight author's affirmation of cli. Rust's tui (ratatui) is great. I used it to make Glicol-cli [1]. If you are a Linux user, you are welcome to test the music production of the code. Speaking of game audio, I actually think rust is perfect for audio. I have also continued to develop Glicol [2] recently, and my recent goal (starting tomorrow) is the bevy_glicol plug-in. I want to solve bevy's audio problem on the browser. All in all, even though I've had my share of pain with ecs, I still think rust is very valuable for game and app development, maybe not multiplayer AAA, maybe practical apps. [1] https://github.com/glicol/glicol-cli https://github.com/glicol/glicol-cli [2] https://github.com/chaosprint/glicol https://github.com/chaosprint/glicol
- pcthrowaway 2y agoThis looks very cool. Are there more videos of glicol being used live?
- chaosprint 2y agohttps://youtube.com/playlist?list=PLT4REhRBWaOOrLQxCg5Uw97gEpN-woo1c&si=yY3CRU3eSM9qz5EG https://youtube.com/playlist?list=PLT4REhRBWaOOrLQxCg5Uw97gE...
- _obviously 2y agoClearly he needs a framework for making games in Rust instead of iterating through rust primitives.
- netbioserror 2y agoI use Nim at work. It is a joy. I replaced a prototype Rust application which was confirmedly not a joy. None of Rust's highly opinionated safety semantics necessarily imply a better end product, and often make delivering an end product much more difficult. Rust has use cases, but it is a specialized hammer for a specific domain of nails. It is not the cure-all everyone wants it to be. If you're asking if you should use Rust and you don't have a highly specific embedded use case, you should probably just use a language with decent RC or GC. As an additional bonus, 99.9% of the code you write in a GC language never has to be about memory at all. Business logic, clean and bare.
- celdon25 2y ago> As an additional bonus, 99.9% of the code you write in a GC language never has to be about memory at all. This is a bit of an oversimplification. If you are sloppy with "memory management" (unnecessary object lifetimes, unnecessary duplication, etc) even in a GC language, it is possible to have noticeable performance impacts. I'm not saying these languages aren't the right tool for the job, but it is not a free pass to ignore hardware limitations.
- netbioserror 2y agoYes, but that's only true for long-running applications. Most gigantic monolithic web server applications, for example, do not need to be gigantic monolithic web server applications. My Nim CLI application does a subset of common tasks, outputs to stdout, and is invoked by our PHP server for each task. It (and the Rust and C programs it replaced) can barely blip a fraction of a percent amount of system memory in the worst case. Why did it need to be in C or Rust? It was never necessary, and I've been able to load it with features they never had but always wanted, in astoundingly short order. Architecting these sorts of services properly can assist in making tool choices that drastically boost maintainability and feature delivery, especially for small teams; meanwhile, entire classes of problems melt away.
- celdon25 2y ago> 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 they do have the talent. And it might not be correct to do so when you have uncertain future requirements. If that talent is you, you might not even be trusted to make those kinds of decisions until a year or two of tenure. And you might have junior (or even 'senior') devs on the side making changes that make this harder to do, without anyone realizing it. So the reality is that you can't expect systems to be "architected properly" and you get what you get. It's an incremental process.
- dj_mc_merlin 2y ago> Secondly, procedural macros are incredibly difficult to write, and most people end up using very heavy helper crates lisp lisp lisp lisp lisp lisp lisp lisp
- alkonaut 2y ago> wait I can't add this new thing because things will no longer compile, and there's no workaround other than code restructuring I definitely think that's a great feature. I want to learn on day 2 that the design is a dead end, not on day 101 when I ship on day 100 and there was a race condition on day 2 I never noticed. But the thing about gamedev (I guess - I'm not a game developer) is that the code being great and doing what you hope it will do isn't 100% of the job as it is in other disciplines. In gamedev you may want to run the code, and the way it runs (fun, feel, whatever) might be bad even though it compiles, works according to a spec and so on. So while I'm usually happy to write code for a week and never run it - game development feels like it's all about the iteration. That said, game development is also game engine development. And Rust seems absolutely perfect for engine development (you need "fearless" concurrency and performance and there are zero mainstream languages that will do that other than rust). For people who feel it's too rigid or hard to iterate with perhaps hybrid could work. Like Rust + Lua or something sounds like it could be worth trying.
- taeric 2y agoI think the point is that there are few "code related" dead ends in game code with good game play that can't be dealt with using enough effort. There are plenty of "game play related" dead ends that no amount of clean code can help out. To that end, whatever can help you explore the game play the fastest is what you want.
- alkonaut 2y agoQuick iteration perhaps isn't the biggest strength of C++ either. Rust does have some friction when it comes to "I'll try this with a dirty impl and if it flies, then I cam make a clean one later". I guess if that friction is worth it will depend on how much faster you get on other things, e.g. refactoring without spending a lot of effort worrying about introducing hard-to-spot bugs like races, or - worse - having to spend valuable time fixing those bugs instead of adding fun to the game.
- taeric 2y ago
- cshenton 2y agoMy 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.
- Klonoar 2y ago> 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 could improve.
- logicprog 2y agoYeah, in general with large and Powerful libraries or frameworks, I find that pure API documentation, even if very thorough and well explained on an individual function or data structure level, is just simply not enough. I also want a reference manual type experience, where that API reference is integrated with explanations of the reasoning behind how the framework was designed, and how to actually think about using it, and examples of many common things you might want to do that integrate well together. The gold standard for this in my opinion is the opengl Red Book.
- logicprog 2y agoThis, and the fact that correctness and safety and stability aren't quite as important in game development, or even game engine development, as they are in other fields where rust is applicable, is why I purposefully happily use the powerful, futureful, well established, copiously documented C or C++ libraries I need, instead of tge Rust alternatives, for almost everything. It works extremely well for me because I get to leverage the power and amazing ecosystem around things like dear imgui or sdl2 or opengl or physx, while being able to use rust, which grants me essentially a cleaner, even more modern version of C++ with all of the features I love from ocaml, in a way that restricts any weird crash or memory safety errors to the places where I interface with the lower level libraries, and sometimes not even there, depending on how high level the bindings are. It's honestly pretty nice for me.
- taeric 2y agoOh my, this has to be my favorite quote in a blog in a long long time. "... many if not most of the problems don't go away if one isn't willing to constantly refactor their code and treat programming as a puzzle solving process, rather than just a tool to get things done." I have thought it was just me for a long time, but many of the popular styles of programming that we push definitely seem to require constant refactors in the pursuit of a solution. And I definitely see more tire spinning for the sake of the build than I do for whatever it was folks were building. Great quote.
- the_af 2y agoIt is a great quote! I think multiple refactors in pursuit of a solution can be a good thing. As your thinking/design evolves, so does the shape of the solution. The main problem, I think, is that this goes against specifically gamedev. In gamedev whether the solution is the best or more resilient is secondary to extremely fast iteration and delivering something. Like the author says, sometimes "clunky but good enough for now" is what you need to get it over with (for the moment) an iterate rapidly over the gameplay elements you should spend most of your time on. Gameplay, not correctness or reliability or maintainability, is the most important thing in a game.
- scotty79 2y ago> because the thing you might need to do is not available in the place where you're doing the thing I noticed this with Rust. That sometimes Rust forces you to pull some things up the call stack in order to access them. Even if the semantics of what you do is the same Rust doesn't let you have things in arbitrary places. It's super weird and possibly annoying when you hit it for the first time but if you stop and think about it, the place where Rust forces you to put it is a really good place from architectural standpoint. It basically prevents you from taking parts of a thing and delegating responsibility for them to some children, which seems restrictive, but it provides you with consistent structure of where to look for things that are responsible for something. Rust is restrictive in so many subtle ways (and some obvious ones) but I haven't seen one where it leads to worse outcomes. Maybe I have too little experience.
- Sleaker 2y agoGreat article, but on ECS I thought the primary point of using it was locality of memory so that you don't get cache misses during iteration of elements. Yes you are preferring composition over inheritance but I thought that was more of a side-benefit to the main thing ECS was trying to solve.
- qaq 2y agoWonder if Mojo will become a good option as it matures
- logicprog 2y agoI only skimmed this article, but, despite it being very negative about Rust, I almost 100% agree with it: Rust is a HORRIBLE choice for game dev. I might quibble with how they outline the costs and benefits of some of the design patterns that rust forces you into, for instance I think command lists are actually incredibly useful and perfectly fine as a game development thing and not the huge problem they consider them to be, and generational arenas basically solve any pointer ownership problems in game development in my opinion, but they are right in the main. I know, because I've tried it. Once. I would #never* recommend Rust to game developers, especially not indie ones. In fact I'd recommend against it strenuously! And this is precisely because Rust is explicitly and knowingly focused on correctness, safety, perfectly clean code, etc at the cost of iteration speed and flexibility and dynamicism, and that's bad for designing game mechanics and even just getting a game done — games have an inherently short life span and development cycle, so safety and correctness and code quality don't matter a whole lot. It's okay if they crash, etc, as long as they work enough to play. It's okay if the code is ugly, you probably won't be working on it for very long. This is even moreso the case, as the author says, because in writing a game you really want to be able to iterate quickly and just. Do shit as an experiment, even if it's temporary, to see how it feels. On the other hand, who I would recommend Rust to is the people writing game engines, where you really will probably be working on that code for years to come, where stability and correctness is pretty important, and so where Rust's strengths will really shine — but crucially, even then, I'd tell them to make it a real engine, not a game framework like Bevy, by adding a highly flexible, dynamic scripting language like Lua or even C#, and a data format for specifying scenes and entities, and an editor. That way you don't write your game in Rust at all!
- logicprog 2y agoQuick note: I'm actually very slowly prototyping something like this here: https://github.com/alexispurslane/embryo-engine/ https://github.com/alexispurslane/embryo-engine/ I'm disabled so I don't have a lot of energy to work on it often, but, especially once I nail down the last few design issues, I'd really love help, or even just a few eyes on the project to encourage me ;)
- 2y ago
- golergka 2y agoI've been working in gamedev since 2007 and toyed with Rust since 2014. I simply don't think that majority of games, especially indie games, have performance requirements high enough to justify using anything other than a high-level, garbage collected language. Of course, some titles like Factorio are outliers. But for majority of games time you would spend to work with manual memory management in C or borrow checker in Rust would better be spent on other things.
- bittwiddle 2y agoI've found Rust very pleasant for building little games. I've mostly been using SDL + a my own little shim so I can target web through wasm & canvas. I had professionally worked with C++ for a long time so getting comfortable with Rust wasn't too bad. https://www.bittwiddlegames.com/ https://www.bittwiddlegames.com/ You can see a web build at https://www.bittwiddlegames.com/lambda-spellcrafting-academy/demo https://www.bittwiddlegames.com/lambda-spellcrafting-academy...
- pornel 2y agoI think these comments are fair. It's true that Rust is rigid. I've had great success with Rust, but on projects where I knew exactly what I needed to build. Rust's focus on code correctness is great for maintenance of projects, where the priority is in keeping them stable and not causing regressions. So while I'd say Rust is pretty quick for refactoring of something like a device driver, it's far away from the hot-reloaded time traveling live tinkering IDE.
- thefaux 2y agoMy favorite thing about rust is when rust devs say that the slow compile things aren't a big deal and then show how that just by dropping a few dependencies you can get hello world down from 90 seconds to 30 seconds.
- 0xfedbee 2y agoRust is a terrible language for everything except a few niche tools.
- james4k 2y agoI've been leaning into Rust almost purely to escape from the mess that is C/C++ tooling which always makes considering a new dependency a time sink. Can someone explain the obsession with combining ECS with generational arenas?
- epolanski 2y agoYou can feel the paranoia of the author stating 20000 times it's his opinion, giving context, etc just cause he knows the langstans reaction.
- eftychis 2y agoI respectfully disagree with the author's title choice. My first impression is, of course, that the issue is there is no production Game or GUI framework around. The author seems to complain mainly about the choices of frameworks and how bad or opinionated they are. I agree. Even Egui is too opinionated, but it makes sense on some level. It is no problem to use bindings to some software written in C++. Rust was created to solve this exact problem: rewrite big projects that were written in C++, by slow mutation in Rust. Honestly, I would add further that until the Unreal Engine uses Rust, we should not expect widespread Rust adoption. It will likely start with a company creating its own really custom game engine, the game becoming a bestseller, and it will spread iteratively over the years from there. Or maybe there will be a better option beyond Rust at that point. This is the status quo: https://www.youtube.com/shorts/_zwKHgtQpc8 https://www.youtube.com/shorts/_zwKHgtQpc8 Let us be realistic. Beyond that: One should see Rust as writing C with someone watching over you to remind you that you need to know the writer for each memory value. It picks up work off you. Or it should. If it doesn't, yes that is a problem, and we/you are doing it wrong. But yes, if you are doing something that the borrow checker complains about, in other languages, either that semantic difference would have been hidden, or you would be paying for it later. There, the author makes a point that he wants the code to work now. That is possible, and you can hotwire bad code in Rust, too. But I am sure that code is why we end up with games like Jedi Survivor. There is no fundamental inability of Rust to do the things the author demands. If you want dynamic loading, use https://crates.io/crates/libloading https://crates.io/crates/libloading (And you don't need to use the library). Do you want a global state? I will disagree with you, but take a look at, e.g., how the Dioxus project is doing it. Again I think that is always a terrible mistake, and people are thinking really of using an arena or a registry really.
- mgaunard 2y ago[flagged]
- deleted 2y ago[deleted]
- modeless 2y agoI decided that Rust wasn't for me after a week long side project. But I doubted myself for a long time, as Rust seemed like such a great idea for so many reasons and it seemed like a bunch of other people were using it successfully. So I'm glad to see this article and know that it wasn't just me.
- qweqwe14 2y agoThis is a decent article, but although the points themselves are valid, I think there's a core "issue" with (indie) gamedev itself. The vibe that I'm getting is that it's filled with people that don't particularly care about programming, they just want to get stuff done(TM), this is also highlighted by the fact that they are willing to write completely inadequate code just to see things working. Rust is not that, and that's a good thing. More generally, I'd say that in gamedev anything goes, as long as it's fun and isn't too buggy. Rust is not, and never will be able to accomodate that mindset, which again, is a good thing if you think for 2 seconds and consider what Rust is actually aimed at, which is safe systems programming. You can have the core engine written in Rust and have a scriptable language on top of it, there aren't any major pain points in this regard. The scriptable language will be able to provide all of this hot-reloading-anything-goes-yes-sir bullshit that we all know and love. tl;dr: Use the right tool for the job. A language designed for safe systems programming can't do non-safe non-systems programming very well. Who knew! Virtually all of the points outlined in the article stem from the above.
- TheRoque 2y agoIt's a weird concept to "care about programming". Same as "inadequate code". I find this statement really condescending and completely confirms some of the cliché quotes that the author write in this article
- qweqwe14 2y agoBy "care about programming" I basically mean writing maintainable code. By "inadequate code" I mean code that does what the author wants at this point in time, but is completely unmaintainable and just bad. Sloppy practices, etc
- yesuk 2y agoSome people "care about shipping a product" others "care about programming". That is why virtually no videogame is made with Rust.
- zac23or 2y agoI also had the same bad experience with Rust outside of Gamedev. Probably a lot of other people too, but people don't talk about it much, because the Rust community is the most religious programming language community I've ever seen in my life. Before Rust, the Scala community was also pretty bizarre (Java too for a while), but nothing was on Rust's level. The worst part about Rust isn't technical, it's the crazy community. You can see in the article that the author tries to explain everything at every point, trying to escape the problem "If you don't understand something in Rust, you're holding Rust wrong." Of course, there are many people in the Rust community who are not religious and try to improve the language, but my general feeling after reading a lot about Rust is to stay very far from the church of Rust. The best response to this type of community is humor, like this video about a Rust Senior developer https://www.youtube.com/watch?v=TGfQu0bQTKc https://www.youtube.com/watch?v=TGfQu0bQTKc
- Klonoar 2y agoI mean, your comment is actually contributing to the problem. You can 100% criticize the community - and thus push them to clean up that shit - without straying into characterizing it like that. It's fanning the flames and just doesn't really help.
- Capricorn2481 2y ago> You can 100% criticize the community - and thus push them to clean up that shit - without straying into characterizing it like that Like what? To criticize a community, you have to characterize it. And of course they didn't say everyone was like this. > Of course, there are many people in the Rust community who are not religious and try to improve the language
- Klonoar 2y agoEnding with "The church of Rust" alone is farther than is necessary and not a helpful characterization. Programming/tech religious wars are a two way street, we don't need to push them along. ;P
- ryukoposting 2y agoJesus, now that's what I call comprehensive. On the "hot reloading" remark: I believe that, to some extent, compiled languages that lean into metaprogramming are innately at odds with the concept of hot reloading. You're spitting out a (mostly) monolithic binary - rewriting that on the fly just isn't going to be reliable beyond an extremely basic level, and shoving it all into some kind of VM for the purposes of hot reloading introduces variance and general performance overhead that both mean that the "hot reload" environment is no longer an accurate depiction of the real application's behavior.
- misswaterfairy 2y agoI'd be interested to hear the author's take on Nim [1], which seems to be better suited for game development than Rust by staying out of the dev's way [2], and supports hot-reloading (at least in Unreal Engine 5) [3]? [1] https://nim-lang.org/ https://nim-lang.org/ [2] https://youtu.be/d2VRuZo2pdA?si=E3N62oUJ-clXozCg https://youtu.be/d2VRuZo2pdA?si=E3N62oUJ-clXozCg [3] https://www.youtube.com/watch?v=Cdr4-cOsAWA https://www.youtube.com/watch?v=Cdr4-cOsAWA
- andrewstuart 2y agoYou might not need memory safety.
- qweqwe14 2y agoYou do need memory safety for multiplayer games, though. Either that or you should use a GC language, which frankly is good enough for most indie games.
- andrewstuart 2y agoC minus minus is needed to strip away as much as possible from C++
- harpiaharpyja 2y agoI wonder if Rust is just much better suited for making game engines than it is for making games. The relative abundance of game engines made in Rust compared to actual games is a bit of a meme, but I think there's something to it. Maybe Rust's feature set is just not the best fit for gamedev, for reasons outlined in TFA. Maybe it means that game engines built in Rust (which I do feel Rust is well suited for) should try to integrate an interpreter for some higher level language, IDK.
- brundolf 2y agoThis is a fantastic article. Thorough, nuanced, well-articulated, and rooted in lots of real experience
- lakomen 2y agoYup. Rust is too complicated. You don't think about getting the job done, you think about language specific crap that is just overhead. And it's ugly to look at. I tried to like it, but I can't. It doesn't align with my way of thinking.
- whateveracct 2y agohah Rust didn't get gamedev (success at all costs) and it's a disaster
- pc2g4d 2y agoWhen I set out to learn Rust about a decade ago, I chose to write a game - a clone of "Empire" that I call Umpire. It's a different task to re-implement an already-designed language rather than designing and implementing at the same time. Nevertheless I have run into a number of the difficulties mentioned in the article, and arrived at my own solutions - foremost passing around global UUIDs rather than actual `&` references, and enforcing existence constraints at runtime. I've experienced the protracted pain of major refactors when assumptions baked into my data model proved false. In some regards these refactors wore some of the shine off of Rust for me as well. BUT I'm still glad the game is implemented in Rust, exactly because of Rust's dual emphasis on safety and performance. The AI I'm developing requires generation of massive quantities of self-play data. That the engine is as fast as it is helps greatly. Rust's strength in ML means my AI training and game code can share important types, ensuring consistency. The effectiveness of Rust for writing CLI tools (mentioned in the article) has lent itself to a number of game-specific command-line interfaces that are of high quality. Rust's memory safety became critical once I decided to network the game. I don't want `umpired` to be any more exploitable than it needs to be. My constraints have been very different than the OP's; obviously it makes sense for their studio given their experience to move away from Rust. But I think Rust still has a place in games. * https://en.wikipedia.org/wiki/Empire:_Wargame_of_the_Century https://en.wikipedia.org/wiki/Empire:_Wargame_of_the_Century * https://github.com/joshhansen/Umpire https://github.com/joshhansen/Umpire
- eterevsky 2y ago> Rust's strength in ML Most of ML frameworks that I know are implemented in Python and C++. I tried looking at ML in Rust a few years ago and didn't find anything useful. Has it changed?
- pc2g4d 2y agoYou can use libtorch directly via `tch-rs`, and at present I'm porting over to Burn (see https://burn.dev https://burn.dev) which appears incredibly promising. My impression is it's in a good place, if of course not close to the ecosystem of Python/C++. At very least I've gotten my nn models training and running without too much difficulty. (I'm moving to Burn for the thread safety - their `Tensor` impl is `Sync` - libtorch doesn't have such a guarantee.) Burn has Candle as one of its backends, which I understand is also quite popular.
- devilsAdv0cate 2y ago[dead]
- valcron1000 2y agoVery interesting article but I feel the need to question some things. - 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.
- z3phyr 2y agoRust is good for software following a strict spec and design doc. A lot of what I do is exploratory in nature. Rust sucks there, fighting me. Best kind of languages in those cases are Lisp, Python and (unironically) C with Visual Studio debugger.
- LoganDark 2y agoI think there's a certain type of mind that can truly appreciate Rust as a language and enjoy developing with it. When I see quotes like, > I wasn't thinking "what's the right way to get a random generator in here" or "can I assume this being single threaded" or "am I in a nested query and what if my archetypes overlap", and I also didn't get a compiler error afterwards, and I also didn't get a runtime borrow checker crash. I used a dumb language in a dumb engine and just thought about the game the whole time I was writing the code. and, > The prevalence of perfectionism and obsession with "the correct way" in the Rust ecosystem often makes me feel that the language attracts people who are newer to programming, and are easily impressionable. I see someone who simply does not think about those kinds of things when writing code. And that's completely, entirely fair. Rust is not for them, then. But they seem to act like it's an issue with the language that it does not serve them specifically, and their way of thinking in particular, not even pertaining to game development. Because the thing is, I don't suffer from the issue they're describing. I don't find it difficult or distracting to think of edge cases and implementation details when I am writing out a solution. In fact, I can't help it. I love Rust, because its strong typing and strict static analysis actually support and justify my way of thinking. They're not obstacles for me to overcome, certainly not like how it's described here. When I use a language like JavaScript, people tell me that I care too much about details or that I don't need static type information because I can just assume. JavaScript is not for me, because it doesn't support my way of thinking. It is terrible and sloppy and completely unchecked. It's absolutely great for banging things out without giving a care in the world about a single implementation detail that isn't relevant to the actual problem at hand. It's terrible if you actually do care about those implementation details, because nobody else who writes JavaScript does. Everything you interact with is going to be just as shoddy as the language itself. (I have a job writing JavaScript, so this doesn't mean that I can't use the language. It just means I do not like it. I do like TypeScript.) So this might just be a fit issue. I haven't read the rest of the article yet, because this stuck out to me. I see some other HN comments talking about async code and GUI libraries, and those are all completely valid concerns, but in the article these valid shortcomings are seemingly mixed with what I'm going to call "neurotype issues". In other words, I suppose the author just isn't autistic enough. It has nothing to do with being new to programming or not. And that's fine. It's just not an issue with the language that it doesn't serve you as well as it serves others. After all, Haskell is the same way. I'd say most programming languages are the same way.
- solidsnack9000 2y agoOther languages allow much easier workarounds for immediate problems without necessarily sacrificing code quality. I really wish the author had followed this with a list and an explanation.
- hendler 2y agoI don't use Rust for game dev but I do for low level libraries and find it easier than C++ to get started. I have enjoyed it more than Java and like it for different reasons than Go, but it feels good to program in. As for the design patterns that a complex game requires, if you are considering Rust for game dev and ecs design patterns it might be useful to check out projects that are Rust centric like https://spacetimedb.com/ https://spacetimedb.com/.
- blindriver 2y agoCan you not curate an opinionated subset of C that enforces all of Rust's rules so that you can have a safe variant of C, just by removing flexibility and enforcing some programming patterns?
- deepsun 2y ago> being unable to just move on for now and solve my problem and fix it later Same thing about Golang "unused variable" and "unused import". So many times I just exploring a lib and trying things out with no intention to leave it as is, but no, Go forces to "write good code".
- ShinTakuya 2y agoI mean, I'm no fan of Golang (I actually kinda hate it), but this is easily solved with a blank identifier (underscore `_`) or by commenting the line. Both of which makes it blindingly obvious when doing code review. Golang falls in the camp of enabling fast iteration while also enforcing some sane basics. Letting off an unused variable/import with a warning is a recipe for insanity, anyone who has opened a badly maintained Java codebase will tell you this.
- resonious 2y agoThis author is done more serious Rust code than I have, but I wonder: why not just abuse `clone`, `unwrap`, `Arc`, or even `transmute`? Rust does try to force you to refactor sometimes, but you have the option to fight back.
- zozbot234 2y agoIt's possible to abuse 'transmute' but .clone(), .unwrap(), Arc<> are full-blown language features, so using them is not 'abuse' of any kind. They're part of how Rust supports quick iterative development, along with Any (for dynamic objects with downcast) and still others.
- robertlagrant 2y agoWell, I needed something to do while I wait for the next Vampire Survivors addon. Purchased the full bundle. Good luck, game devs.
- lyu07282 2y ago> ECS in Rust has this tendency of turning from something that is considered a tool in other language to become almost a religious belief. I think bevy ui is the best example to give, it's like nobody ever did a ui framework with a pure ECS before. You can conclude either that's because it makes no sense to do that or that's because nobody has ever came up with the right way to do that. The bevy community thinks it's the latter. It's especially concerning because they constantly talk about the editor, even though they don't even have any of the fundamental pieces for a gui framework in place. In bevy ui there is no way to create a reusable ui component, there are ways to do it but they all suck. So it's not even a matter of a lack of widgets or something, the problem is you can't even write a reusable widget, there is no foundation for a ui framework, and there isn't even a real plan to change it because nobody knows how to write a gui framework with a pure ECS. But even if they figured that out, things like text input fields can't be properly implemented because there is no proper text rendering engine in bevy so they have to rewrite that first. Except that all rust text render/layout solutions in rust (it has to be pure rust because wasm/because it's rust) are still very experimental and immature. It's a huge pain in the ass, people write games in rust because they want to write rust, not because they want to write games.
- bvssvni 2y agoI tried to get Jonathan Blow engaged in the Rust RFC process to improve productivity for gamedevs. However, he thought it was a better idea to start working on his own language (Jai). When I did some research for the Piston project, I learned that there was a productivity technique called "meta parsing" which was used in late 60s to develop the first modern computer. This was before C. The language was Tree-Meta. Viewpoint Research Institute upgraded it to OMeta. I thought OMeta was too complex, so I developed Piston-Meta, an alternative for Rust using a simple data structure: Start node, end node, text, bool and f64.
- wly_cdgr 2y agoCongrats on the game launch. Funny way to promote it. Good luck, hope you get some sales!
- James_K 2y agoThere 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.
- spacechild1 2y ago100% agree. I am amazed how Rust is constantly touted as a general purpose programming language. In theory that's true, but in practice it only makes sense for projects where you would otherwise reach for C++.
- andai 2y agoI think the crux is this heading: Making a fun & interesting games is about rapid prototyping and iteration, Rust's values are everything but that Jon Blow said that in one of his talks: Rust treats all code as production code. For most of the duration of a project, that's counterproductive, because it introduces a significant amount of unnecessary friction. For most of a game's development, you're trying to figure out what the game's supposed to be. Only later does it crystallize. Rust doesn't recognize the non-crystalline phase, or rather explicitly rejects it as invalid.
- hyperbrainer 2y agoReally well written, and well explained without any bait
- pmarreck 2y agoI've always been fascinated by games and I've always loved programming but except for the beginning I've never combined the two. And the issue with game dev and functional languages not seeming to jive with each other always seemed (from the outside) to mostly be one of established norms conflicting with each other on both sides. I'd love to have time to explore this; for example one complaint the author makes is about passing around the game state but then also needing to pass around sub-parts of it and Rust complaining; this would be trivial or a non-problem in Elixir, but I know that's because there's no mutable state and in Rust's case it must deal with mutable state regions because all of game dev assumes that's available (or it must be by necessity for performance reasons).
- juped 2y agoThat's Rust for you - as much language-level derangement as people hated about 90s Java, but without the memory safety benefits of Java.
- 0dayz 2y agoThis article hits every note of frustration I've gotten with rust. It honestly feels that if you want a somewhat memory safe language for more general purpose use cases good'ol fashion Ada or maybe ziggs (or if carbon ever become a thing) seem 100% more approachable than rust for gamedev or gui. The only way I see rust becoming dominant in gamedev/ui is by sheer brute force.
- FrustratedMonky 2y agoSeems like a few contradictory ideas here. Rust is supposed to be a better safer C/C++. Then lot of comments here that games are best done in C++. So why can't Rust be used for games? What is really missing beyond an improved ecosystem of tools. All also built on Rust.
- melodyogonna 2y agoThis is not a matter of tools though, did you read the article? The main pain point is that Rust semantically makes fast iteration impossible
- FrustratedMonky 2y agoDid I read the article? You?. But the conversation in the thread is making point that Rust does lack tooling, libraries, that would make lacking fast iteration a valid trade off. And a common theme is that C++ is better, and last I checked it is also not great at fast iteration.
- GardenLetter27 2y agoThis is a fantastic article. Personally, I found using Godot with some parts in Rust via gdext quite enjoyable. You can avoid dealing with GDScript for important parts of the code and have access to OS threads if you want them, etc. - but can also prototype features in GDScript and write the UI, etc. there for fast testing, and keep a good separation of UI and graphics presentation vs. the actual game logic.
- slifin 2y agoI'm amazed that we still willingly put heavy compute into compile steps The trade off is always reload ability We have CI, we have LSP places we can put heavy checks without sacrificing our ability to hot reload fast In some checkers you can put in your own custom checks too
- jokoon 2y agothe hype is starting to come down
- the_real_cher 2y agoIs rust becoming like react where there was a ton of hype around it and then years later it's falling by the wayside?
- lakomen 2y agoI forgot, when you say anything remotely negative about Rust or Ruby on HN, the idiots get butthurt
- skolng 2y ago894 comments here. similar in several posts on reddit. and only 1 review of his game on steam. shit's brutal.
- interstice 2y agoReading the part about global state reminds me of some of my thoughts building backend web apps. Not having global namespace pollution is fine, but not having any global registry of some sort can make things far harder for the size that most things are going to be.
- efnx 2y agoThey should open source their game engine. That way we can learn from their mistakes. How can we be sure this is a shortcoming of the language and not the APIs the author is working with? Anyway - no one is going to ship a game written in Rust with this attitude. To the other folks out there happily writing their games in Rust - don't be distracted! All it takes is one success story to prove the concept :)
- dxuh 2y agoI don't have nearly the same amount of experience with Rust (just a few months of hobby coding), but whenever people looked at me, all surprised, that I don't like Rust that much I always just said "Safety is not the most important thing for everything. For the stuff I am doing I'd rather be quick", but this article is the most thorough way of explaining that I have seen with lots of extra stuff I had no idea about before. Also the extra random gamedev links in the middle were great, but it took me well over a full, focused hour to read. It is thorough, but some more brevity might have helped, I think.
- cultureswitch 2y agoI'm a Rust enthusiast and really surprised to discover so many people are apparently trying make games in pure Rust. I think Rust is an amazing language for building a generic game engine, but a pretty crappy one for actually implementing a finished game. Isn't it basically standard practice to have an engine written in a systems-level language with generality, reliability and performance as the top objectives, and the game itself written in a scripting/interpreted language that allows very quick iteration? And it can even in many cases be a pretty horrendous home-brewed language. Despite having people without the computer-science knowledge to create a good language (and yes, inventing a new language is one of these things that leads to horrible results if you just learn on the job). This structure will still get you there easier and faster than trying to implement the whole game in a systems language.
- masfoobar 2y agoI am happy to be honest that I have not spent much time of rust, other than browsing sample code and reading about user experience, the borrow checker, etc. For me, I could not see myself using rust especially for game development. Some of the points raised are my concerns, especially wanting to chuck something together (to improve later) only to fight the compiler, etc. I would be interested to know what language they choose moving forward. It seems the contenders are likely to be:- C - because, you can, C++ - ditto, D - I think it is largely ignored, and there is the betterC flag Zig - Seems interesting, Odin - Also interesting Anyway... going to enjoy reading the comments, now.