4
AleCx04
2y

I am a fan of Rust, whilst I do not consider it a good contender for the "low level" area that I am privy to (game dev) I still find it an absolute joy of a language to learn, and use.

So this example here made me lol:

https://youtube.com/watch/...

Comments
  • 1
    have you used unsafe blocks yet?
  • 3
    Not a game dev, but did some visual simulation stuff before. What do you think is missing?
  • 3
    Why do you not think it's a good low level language?
  • 0
    @12bitfloat I did not say that it was not a good low level language, I said that it is not one for the area in which I am concerned with, which is game development.
  • 0
    @jassole I am not one professionally, more as a hobby game developer (I am a Web Dev by day)

    I have used Rust to play around inside of WebAssembly for example to draw some stuff, it works great there, and I use it at work for proof of concept CLI's. It is not lacking anything other than widespread support and documentation in terms of game dev. Which is not something that I have a difficult time finding in c++.

    Even on a game engine level, I am not sure how much I would be able to get away with in Rust without loosing all of its most impressive features and instead using unsafe blocks everywhere. At that point I have much more material on c++
  • 1
    @AleCx04 the point of unsafe is not that you should use it everywhere. You're supposed to create safe wrappers and abstractions with them. Then if something goes wrong, you'll know where to look.

    Like, your statement doesn't make a lot of sense if you consider that C++ is unsafe everywhere!

    Also, unsafe is not some cheat code where you are allowed to break every rule. Pretty much the only thing you can do in unsafe is calling other unsafe code and dereferencing pointers. Dereference the wrong pointer and bam, UB
  • 0
    @Geoxion agreed 1000%
    @AleCx04 even game engines/frameworks use unsafe blocks very successfully. It's not something to be avoided but be careful about. You wouldn't deref a pointer in plain C++ either, would you?
  • 0
    @thebiochemic @Geoxion what I am saying is that c++ is unsafe, but the major libraries out there use c++ or c for game development, not Rust. A lot of the things that we get away with in terms of game development deal with exactly that: unsafe code.

    I am not saying that I wouldn't love to see Rust dominate in this side of the industry, I am saying that compared to the level of resources available in C/C++, Rust just doesn't cut it there, yet. Hopefully it changes.
  • 0
    @AleCx04 Idk man, if we're going the popularity route, then we probably all should start coding in python 🤣

    On a more serious note:
    Right now i'm working with bevy and i'm enjoying it much more than any other engine i ever worked in (including frameworks like allegro, ogre, but also engines like Unity and even custom written ones in C++, Java, C and even Rust)

    Ah and btw Bevy also uses unsafe blocks.
  • 0
    it's just kinda weird to me, that youre saying it's not a good contender for low level, but gloss over it's system, thats in place for low level access 🤷
  • 0
    @thebiochemic the issue here seems to be reading comprehension. I am not saying it is not a proper low level language, but at the time being it is not a good contender for an area in which another language currently reigns supreme. Also, this is not a metric of popularity, but a matter of fact (Python has no dice in this particular area)

    C/C++ are the kings in the game space arena, the biggest engines that dominate the market are running on said engines. Bevy is cool, I have played with it, but the next Final Fantasy is not going to be written on it, and neither will Tears of the Kingdom.
  • 2
    I think you're conflating two things. The reason why the next big game isn't gonna be written in Rust is not (primarily) due to the language, but due to there not being a big engine that is written in Rust.

    If you look at Unreal, that started out as a much simpler engine in the 90's. To be competitive you need so many resources nowadays. All big engines I know by name are pretty old already. I think one of the newer ones is Frostbite from around 2008 or so.

    Not that people aren't trying: https://embark.dev/

    This is a studio by one of the Dice Battlefield devs. They're the major driver of the game dev community in Rust now.
  • 0
    @AleCx04 your very first sentence was "... whilst i do not consider it a good contender for the low level area, that i'm privy to ...". I'm pretty sure it's not reading comprehension; no reason to get personal here.

    And yes, you're right: The next big game will be either written in UE or in Unity, if you only consider PC. If you take a look on the entire Game Market, the picture suddenly does look different and PC and Console combined take up less than 50 percent of the Market.
    Now you'll find games built with Java, Swift, C#, etc.
  • 3
    Only thing missing is the will and the budget to create the next AAA game on Rust which often is a wasteful endeavour considering existing game engines already written in C++.

    There isn't much advantages other than maintenance for sufficiently battle-hardened engines like Unreal, Unity.

    It's mostly perf thats driving game language towards either C++ or Rust. Unity is doing that on .Net too lol.

    Not that it's missing something on the language level.
  • 0
    @Geoxion Literally before this commment:

    "C/C++ are the kings in the game space arena, the biggest engines that dominate the market are running on said engines. Bevy is cool, I have played with it, but the next Final Fantasy is not going to be written on it, and neither will Tears of the Kingdom."

    Embark does look absolutely fantastic though
  • 0
Add Comment