Why Rust isn't taking over C++ if it's far superior and better ?
Why Rust isn't taking over C++ if it's far superior and better ? I don't mean just for game programming for os programming or ms office photoshop kind of applications programming or even NASA like etc Can you explain why Rust isn't getting more popular than C++ ?
Also do you believe it would be possible today to create a AAA game studio with just Rust and open source software like Blender and Linux (without windows or vm's) or the artist will need or cry for Photoshop and the rest of the adobe suite ??? or things will take too long or we will lack drivers for drawing tools like pen tablets ?
Would it be possible to build a full AAA Game Studio with just open source software like Blender, Gimp, Linux etc ? or the artist community will miss the Adobe suite too much and the drivers for hardware like tablet and pen for drawing and all the rest like windows, photoshop and the others software for characters plugins etc ?
About this post
- Posted
- Archived
- Score
- 0 · 40% up
- Kind
- Text
- ID
- 17ilaur
34 comments
I'd say because it isn't "far superior and better" lol
So many things to get started on here it's going to be tough
Reason #1 for Rust not being use widespread is the knowledge sphere
You have to be really good at Rust to write a good Rust program
Graphics integration is another - most bindings are in C - and while some patchwork can be done it will be inherently troublesome as you will need to write them again piping Rust into C and by merit of that running most of that code #unsafe
Pipelines are established already in some studios, even some with their own engines already - you'll need to write those pipelines again or provide better - efficient - tooling to have those work great with your custom bespoke Rust engine
There are reasons studios pick Unreal - most of it's pipelines and it's code is readily available for any kind of integration - having mostly the graphics and pipeline out of the question it becomes less of a friction to get into prototyping and working on "the actual" game
Not to mention that Rust compiling happens on the hardware you want to run the software on That will prove tricky with some consoles (most are Unix, Linux based though) but you'll need the OS bindings still and the specific platform SDK/DK's to work with your bespoke engine
Rust is good though don't get me wrong - but it's only good if you really can get into the problem space you're solving
If you don't know the answers how can you then justify where to allocate e.g. some of the memory you'll need to load models, sound, shaders (and their cache) - do you decompress on Heap or in Stack?
I want it to happen as much as the next person, that's why I love we are having Bevy
But Bevy in order to get good and usable by most majority, need to have tools, editors etc. or better yet - you wrote your own that is unique to your game or your needs
There may come general purpose tools and engines written in Rust
But not now, today - but down the line - in the future yes
I have a separate question. Why do people chose c++ over python, is it because C++ can do more, or is more low level, mainly?
Python is slow. Very slow. Often this doesn't matter, but for a lot of things like games, it does. C++ is not the fastest, but it's very fast, and there's decades-long knowledge/experience at many big studios with it.
For the most part, it's simply because it's much faster.
But don't misunderstand, python is generally more than fast enough for a lot of things. The difference in speed isn't a factor until you start to deal with really large scale projects or things need to do a ton of calculations/tasks in every handful of milliseconds, like games.
Because it's just as hard as C++, if not harder, but the documentation for every crate is godawful. They make you read thousands of lines of examples with literally no comments just to uncover the features in a crate. Sometimes they update the examples for a beta version that isn't even out yet and the example doesn't compile.
I just spent a week trying to get a very basic API running. Even something truly necessary like seeing an error is buried in a random example. Imagine trying to make a server when you can't see the routes or params being accessed and also can't see responses from the database. I've used Rails, like every PHP framework, Flask, Django, Express, and others. I was up and running in like 30 minutes with all of them. But in Rust you get to play the "use a random person's library with no documentation and breaking API changes with every version" game. That's why it's not popular. I like the language and have a need for speed but I'll probably be giving up soon.
I actually had a lot more success with Bevy. But building anything with it felt like writing my own engine. All the basic stuff was pretty okay until I got to networking and literally everyone was using random libararies for it and there were like 12 of them. I wasted a few days on that too. No documentation again. Actually one guy had a crate with phenomenal documentation, the only I've seen with any documentation at all, but I couldn't use it because it was only for peer to peer. I still wasted a while before figuring out I couldn't use it. Fuck.
Sounds horrible
It's not about the language but the eco-system around the language then, but yeah Rust is still lacking in this departement because it's relatively new
No, sorry. The language is hideous. It's more verbose than other languages, even C++.
Take a look at the API documentation and find stuff like this everywhere:
impl<'r, R, T1, T2, T3, T4, T5, T6, T7, T8> FromRow<'r, R> for (T1, T2, T3, T4, T5, T6, T7, T8)
where
R: Row,
usize: ColumnIndex<R>,
T1: Decode<'r, <R as Row>::Database> + Type<<R as Row>::Database>,
T2: Decode<'r, <R as Row>::Database> + Type<<R as Row>::Database>,
T3: Decode<'r, <R as Row>::Database> + Type<<R as Row>::Database>,
T4: Decode<'r, <R as Row>::Database> + Type<<R as Row>::Database>,
T5: Decode<'r, <R as Row>::Database> + Type<<R as Row>::Database>,
T6: Decode<'r, <R as Row>::Database> + Type<<R as Row>::Database>,
T7: Decode<'r, <R as Row>::Database> + Type<<R as Row>::Database>,
T8: Decode<'r, <R as Row>::Database> + Type<<R as Row>::Database>,
source
fn from_row(row: &'r R) -> Result<(T1, T2, T3, T4, T5, T6, T7, T8), Error>
It's going to puke that into your lap every time there's an error and you'll see a barrage of gibberish every time you look up a method name. Here's one from Bevy when you forget an ampersand (lol). Lifetimes, annotations, macros, and traits everywhere. It feels like a Frankenstein monster of a language, with code sawed apart and stitched back together. I've also found a lot of ways to make it crash, which surprised me because the language uses Optionals and Results everywhere, making it feel safe. So although it protects from memory errors, I feel like the complexity of the language causes logic errors that lead to crashes.
The other problem is not that the community is young... it's that the community does not write documentation. C had RTFM but the manual was good. Rust has "read the code" with zero explanation, not even a summary. It seems like they love Discord groups. I joined a few but the people there also have no idea what each crate does. They seem very knowledgeable. I've seen their conversations about very low-level networking topics or writing engine code. They've clearly studied it in depth, yet when people asked about the networking crates, there wasn't a single person who knew what even the most popular ones were for. That's really crazy. If professionals can't figure out which crate to use, then how many hours of reading uncommented code is it going to take to answer the question yourself?
With that said, the Rust intro book is very good and the performance is good. In fact, Rust makes it extremely easy to write code that you can feel confidently is the most performant it could possibly be and also not have to deal with pointers. But yes, the moment you use anything in the ecosystem it quickly feels like a waste of time. The language is so complicated that it can't afford to have bad documentation.
I'm artist, basically, currently non open source art tools are just far superior to open source ones. For instance Blender actually seems decent. But if you're a professional artist used to doing extremely high quality 3d work in say Maya and zbrush, blender is a step backwards in terms of the quality and speed your able to do things. Gimp is actually terrible, you will spend 5X the amount of time to produce something 1/10th of the quality of what you can do with photoshop. Krita actually looks decent, however I think it's still missing a lot of features of photoshop, Illustrator is another very powerful tool and I just don't see any kind of decent open source equivalent at all. Nothing that really comes close to the quality of work you can do in vectors with illustrator. And the same with Unreal. It is a very powerful artist tool with extremity high quality lighting, shaders, tools. And the open source equivalents just don't come close to the same quality of tools graphics and lighting.
Basically what all this translates to, if you're a professional artist and you're used to doing extremely high quality work. And suddenly your forced to only use open source art tools. The quality of your work will go down significantly while the time it takes to do that work goes up.
so basically it's just better to pay the license per seat of each artist for a AAA game (let's say 150 artist) and it would be better to put the programmer on linux and the artist on windows since the industry standard software don't run on linux
For AAA titles probably. For everyone else I think it's highly circumstantial, it really depends on the project, the artists and such. Quite a bit of work you certainly can get away with blender. I have 1 friend who uses blender pretty much exclusively for digital painting.
If you're doing something like arch viz. or non game photorealistic rendering you definitely need proprietary tools atm, like maya / 3d studio max + v-ray. Then if you're using proprietary art tools quite a few do run on linux natively or through wine. I use linux, I'm currently using mainly unreal 5 and maya, which both have linux versions. zbrush apparently works through wine. 3D Max is windows only however, and is pretty heavily used by the games industry I think.
A friend of mine is a 2D animator and his favourite tool is toon boom, which also appears to have a linux version. Adobe isn't viable on linux for studios however as even though you CAN get some versions running through wine the licensing tool doesn't. But there are apparently some paid but much cheaper photoshop alternative which might run in linux. I know quite a few graphic designers and things will be a bit like, you'll have to pull adobe illustrator out of their cold dead hands.
So probably linux is sort of viable as an os for artists, even with some proprietary tools, but it's dependant on the type of work.
Gimp argh!!!
C++ rocks, you can make it anything you wish, low level, high level, its wicked fast and C/C++ is one of the most efficient languages there is for power consumption, so that's why C/C++ rules the embedded world with countless billions of devices. C/C++ will be running on hardware 100 years from now, I bet rust won't.
Where did you get that from? How can a language be more "power efficient", especially between two compiled languages which compile down to the same assembly instructions? I'd appreciate a source on this
When you code in C for example, the generated ASM is very short, C++, due to more checks, virtual functions, etc. generates more code, so less energy efficient. So, the point is if you write a loop in C, C++, JS, python, etc. and then look at the power requirements of the final EXECUTED code, the number of cycyles, etc., C is currently the most power efficient language. These studies are well known in embedded engineering for example, since when we develop hardware, we want to use a language that gives us most bang for the buck and is power efficient to save battery, or reduce heat. There are lots of these studies, but here's one to show you how BAD something like python is!
https://thenewstack.io/which-programming-languages-use-the-least-electricity/
Rust is only better if security is a very high importance goal for you. In every other scenario, Rust is just different, and it's much harder to find people that know it well. For most games, security just isn't that big of a concern. Especially so if you're on consoles, which is the prime target for AAA games. They're already walled off and much more secure than a standard PC.
If you're working with consoles, the tools only run on Windows. You can do without tools like Photoshop if you want, but you'll be at a disadvantage vs studios that do use them. Why intentionally avoid the top of the line tools?
I noticed your same post in the unreal engine sub, and out of curiosity just looked at your post history to see you posted across idk how many subs. I can't figure out if you're trying to troll lol.
trying to start a AAA studio you can learn a lot on reddit on different subject
Deleted before we saved it.
https://arewegameyet.rs/
My guess is that for most studios it's way easier to use a language/engine that's much more commonly used than to put lots of work into one that's maybe not sooo much better and has less background.
I had a look at Bevy because it looked really interesting and thought the Rust programming language it uses looked rather confusing. I'd probably argue it looks more complicated than C++ which is already more complicated to use than C# which is the language I prefer to use.
It's very hard to change industry standards
The ergonomics of it aren't great in my opinion. And what you're getting with all that friction is better memory safety which you really don't need when it comes to games.
I don't see it gaining much traction unless C++ catastrophically fails.
It is: https://insights.stackoverflow.com/trends?tags=c%2B%2B%2Crust
Extrapolate those lines. Rust is growing exponentially while C++ is in a linear decline. When they meet, Rust has taken over C++ and C++ is on its way to being a niche technology.
Where are you going to find Rust talent? How much will it cost? How long will retooling the dev pipeline take? What’s the break-even timeline?