Live data from Hacker News

Game dev in Rust: a year later

users.rust-lang.org

41–50 of 71 posts

Re: Game dev in Rust: a year later

#41

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 pr…

While not cargo level, vcpkg and conan + cmake help a lot, with much better compilation times, due to support for native libraries.

Still looking forward to the day cargo offers similar capabilities, without having to follow something like the whole Bevy setup.

Re: Game dev in Rust: a year later

#43
I'm keen to try re-making my little 2.5D Ray-caster engine [0][1] in Rust.

Current implementation/s are both in C, only ~500 lines of poor code.

I tried a refactor and broke my ray-caster lol, C has been a blast but so many footguns man.

Heres the repo/s

[0] - https://github.com/con-dog/sdl-test/blob/main/README.md

[1] - https://github.com/con-dog/sdl-textured/blob/main/README.md

Re: Game dev in Rust: a year later

#44

Earlier quoted context omitted.

> 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. Tinyglade uses Bevy though. Granted it doesn't use all of Bevy but given who made it and how advanced the tiny glade renderer is, no commercial engine would have offered out of the box the rendering features the devs wanted for their project anyway. > Game de…

> A significant fraction of games today is actually written in C# (Unity) and most games don't need to push the hardware at all. ??? Unity is a C++ engine, C# is just used for scripting...

> just used for scripting...

AKA writing games. Many people writing games with Unity go far beyond what anyone reasonable would call “scripting”, writing code that consume a significant part of the performance budget.

Re: Game dev in Rust: a year later

#45

Earlier quoted context omitted.

> A significant fraction of games today is actually written in C# (Unity) and most games don't need to push the hardware at all. ??? Unity is a C++ engine, C# is just used for scripting...

> just used for scripting... AKA writing games. Many people writing games with Unity go far beyond what anyone reasonable would call “scripting”, writing code that consume a significant part of the performance budget.

Not sure why you have scripting in quotations or are implying that it's somehow bad. You're not modifying the engine code or writing a renderer from scratch when programming a game in Unity so yeah, it's scripting by every definition.

Re: Game dev in Rust: a year later

#46
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

Veloren [1] is also an actual game. [1] https://veloren.net/

My son (9) loves Veloren!

Re: Game dev in Rust: a year later

#47
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

like most market before The Big Thing (tm) releases. It's just part of the iterations. Unity was IOS only for a few years, and ofc Epic was an in-house engine for a decade.

mature, battle tested engines don't pop up overnight.

Re: Game dev in Rust: a year later

#48
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…

despite being in the same industry, engine programmers =/= game designers. You may as well be comparing a network engineer to a front end web dev.

As for "actual games": indie dev with mature tools is hard enough as is to properly ship. and many don't make money. Making the kind of game that would attract attention requires funding that these communities often lack.

Re: Game dev in Rust: a year later

#49
post #34
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 are plenty of passion projects that have been successful. So this is not an excuse. I've abandoned rust because I don't find it useable to me with unneeded complexity to code. Also with graphics most of the code was not safe. So believing only took me that far.

so the retort is survivor's bias? Hollow knight was a game jam game, so my 2d autorunner definitely coulda made 8m dollars, right?

>I've abandoned rust because I don't find it useable to me with unneeded complexity to code.

I don't want to be too dismissive, but if you dont care about code safety, Rust is the absolute worst language to choose for game development. Yes, it's a lot more work upfront and iterative game development wants to break things quickly to figure out a good game loop.

I want to make a game myself in Rust one day and I know for certain that my scripting will definitely not be in Rust.

Re: Game dev in Rust: a year later

#50
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…

> also noting that the safety aspect is already taken care by Java/C#/Verse/Blueprints/Lua/Python/JS scritping.

it sure isn't safe enough. and "safe" in this context isn't just "my game will almost never crash" (plenty of Unity games crash, even non-il2cpp ones). But if that's good enough, then tha's understandable.

Very very few games (even AAA) are doing those old school assembly hacks to eek out power, so it's basically a non-factor.

Post reply on HN