Live data from Hacker News

Game dev in Rust: a year later

users.rust-lang.org

11–20 of 71 posts

Re: Game dev in Rust: a year later

#11

I'm learning Rust at the moment (I'm going to join a new team that uses Rust). I'd say it's quite fun and I'm not good enough to have a strong opinion on the language, but I have a few thoughts though. So far, I find the language design not super elegant. There are restrictive ownership rules, which are fine, but then a myriad of data structures that let you circumvent these rules. It feels somewhat ad-hoc. Regarding…

> necessarily a better choice than modern C++ for someone starting a new project.

Almost certainly but it depends on what you're making. If it's something that requires huge object graphs and GC then you'll probably have a bad time in Rust.

The compiler guarantees, dependency management, and modern toolchain is miles ahead of C++. I find that you have to be a wizard in multiple areas that don't necessarily involve programming when you're working on a C++ project. This comes on top of being a wizard in the language itself since it's huge and the std library has warts due to the "ABI compatibility over everything" mindset.

Re: Game dev in Rust: a year later

#12
post #2

Tiny Glade ( https://store.steampowered.com/app/2198150/Tiny_Glade/ ) is an impressive example of a game written in Rust. Apart from that exception, Rust game development seems more about releasing half baked crates than actual games

Does anyone know what engine it uses? Bevy, or maybe a proprietary engine?

Re: Game dev in Rust: a year later

#13
post #2

Tiny Glade ( https://store.steampowered.com/app/2198150/Tiny_Glade/ ) is an impressive example of a game written in Rust. Apart from that exception, Rust game development seems more about releasing half baked crates than actual games

Does anyone know what engine it uses? Bevy, or maybe a proprietary engine?

Bevy, but interestingly it doesn't seem to use wgpu but a custom made rendering solution.

Re: Game dev in Rust: a year later

#14
post #7
post #2

Tiny Glade ( https://store.steampowered.com/app/2198150/Tiny_Glade/ ) is an impressive example of a game written in Rust. Apart from that exception, Rust game development seems more about releasing half baked crates than actual games

> Rust game development seems more about releasing half baked crates than actual games It's because these are mostly passion projects by hobbyists. A lot of the stuff is written by undergrad students with a lot of time on their hands, and once they graduate and move into professional life they no longer have the time and the projects get abandoned. Creating high quality, reusable components (like game engines) takes…

There's nothing wrong with writing your own game engine rather than going for Unreal or Unity, in fact that's one way of creating a truly unique game.

My comment about "half baked" referred to the crates that people release instead of actual games.

The Rust game dev community might be wise to steer away from the "we gave up on developing our game, but hey Rustaceans, here are some crates you might find useful!" approach

Re: Game dev in Rust: a year later

#15
post #4
post #2

Tiny Glade ( https://store.steampowered.com/app/2198150/Tiny_Glade/ ) is an impressive example of a game written in Rust. Apart from that exception, Rust game development seems more about releasing half baked crates than actual games

Which follows the pattern of only partially using the ecosystem and doing the relevant parts themselves. Bevy is the most advanced Rust engine, and it doesn't work well if games that succeeded commercially, did so by not using most of the ecosystem to start with. Game development, what could be more unsafe than Assembly coding and taking advantage of hardware tricks pushing the hardware to the limits, aren't going to…

The weird thing is that there are already working interpreters of other scripting languages written in Rust, e.g. Boa (Javascript), mlua (Lua). But all Rust game engines seem to insist on one single language approach.

Re: Game dev in Rust: a year later

#16
post #14
post #7

Earlier quoted context omitted.

> Rust game development seems more about releasing half baked crates than actual games It's because these are mostly passion projects by hobbyists. A lot of the stuff is written by undergrad students with a lot of time on their hands, and once they graduate and move into professional life they no longer have the time and the projects get abandoned. Creating high quality, reusable components (like game engines) takes…

There's nothing wrong with writing your own game engine rather than going for Unreal or Unity, in fact that's one way of creating a truly unique game. My comment about "half baked" referred to the crates that people release instead of actual games. The Rust game dev community might be wise to steer away from the "we gave up on developing our game, but hey Rustaceans, here are some crates you might find useful!" appro…

[deleted]

Re: Game dev in Rust: a year later

#17
post #9

Earlier quoted context omitted.

The promise is to write the whole game in Rust, rather than having a split between C++ and a scripting language. The most common example of this is Unity with C++/C#. Having one language makes certain debugging tasks easier and can lead to faster execution. Using only one language is difficult in C++ due to the lack of garbage collection. What the Rust community is finding out is that it is also difficult in Rust due…

Doing whole games in C++ has been a thing for decades, granted with plenty Assembly in the mix, since Watcom C++ days in MS-DOS, or PlayStation being the first console with a C and C++ SDK. There was no garbage collection in all those 8 and 16 bit home computers and game consoles programmed in straight Assembly. If Rust can't top this, then its value for game development community isn't as great as many think it is.

I added the Lua scripting layer to FS2Open. It’s very useful for not-quite-coders. There are a lot of projects where the founders end up doing everything because the other contributors don’t stick around permanently.

Re: Game dev in Rust: a year later

#18
post #9

Earlier quoted context omitted.

The promise is to write the whole game in Rust, rather than having a split between C++ and a scripting language. The most common example of this is Unity with C++/C#. Having one language makes certain debugging tasks easier and can lead to faster execution. Using only one language is difficult in C++ due to the lack of garbage collection. What the Rust community is finding out is that it is also difficult in Rust due…

Doing whole games in C++ has been a thing for decades, granted with plenty Assembly in the mix, since Watcom C++ days in MS-DOS, or PlayStation being the first console with a C and C++ SDK. There was no garbage collection in all those 8 and 16 bit home computers and game consoles programmed in straight Assembly. If Rust can't top this, then its value for game development community isn't as great as many think it is.

Of course it can be and has been done, but it takes much more developer time than writing less efficient code in a managed language.

Re: Game dev in Rust: a year later

#19
post #9

Earlier quoted context omitted.

Doing whole games in C++ has been a thing for decades, granted with plenty Assembly in the mix, since Watcom C++ days in MS-DOS, or PlayStation being the first console with a C and C++ SDK. There was no garbage collection in all those 8 and 16 bit home computers and game consoles programmed in straight Assembly. If Rust can't top this, then its value for game development community isn't as great as many think it is.

Of course it can be and has been done, but it takes much more developer time than writing less efficient code in a managed language.

Now take in consideration that when using a single language, doing in Rust takes much longer than C++, even without taking into consideration the existing middleware engines, and support for hot code reloading.

Also that stuff like SDL and SFML are pretty much the go tool for DYI folks, and Khronos standards are all based in C and C++.

Additionally, if a managed language is good enough, and does support compilation to native code via AOT, and the middleware tooling, it makes Rust's selling point even weaker.

Which is what you see in how Unity/HPC#/NativeAOT, FNA/clang, Swift, Java/Kotlin (on Android see XR), already offer today.

Re: Game dev in Rust: a year later

#20
post #17
post #9

Earlier quoted context omitted.

Doing whole games in C++ has been a thing for decades, granted with plenty Assembly in the mix, since Watcom C++ days in MS-DOS, or PlayStation being the first console with a C and C++ SDK. There was no garbage collection in all those 8 and 16 bit home computers and game consoles programmed in straight Assembly. If Rust can't top this, then its value for game development community isn't as great as many think it is.

I added the Lua scripting layer to FS2Open. It’s very useful for not-quite-coders. There are a lot of projects where the founders end up doing everything because the other contributors don’t stick around permanently.

That is how Lua got famous in first place, scripting language for games.
Post reply on HN