Live data from Hacker News

rg3d: Rust 3D game engine with an FPS demo game and scene editor

github.com

81–90 of 143 posts

Re: rg3d: Rust 3D game engine with an FPS demo game and scene editor

#81
post #73

Earlier quoted context omitted.

that's true and I am very excited for ranges. sadly I am still waiting for c++17 to be switched on in my build system :/ still there's lots of other stuff that's more verbose in c++ than rust, often because it was bolted on much later. think about getting individual elements out of a tuple. in c++: `std::get (tuple)` for each desired element or `std::tie(elt0, std::ignore, elt2) = tuple;` in rust: `tuple.0`, not sure…

C++ has structured destruction now.

Structured bindings work for simple cases, but Rust's are much simpler and more powerful.

Re: rg3d: Rust 3D game engine with an FPS demo game and scene editor

#82
post #59

Earlier quoted context omitted.

Using C alongside static analysis like Frama-C is also quite safe, one could say.

It's not just safety though. It's just...all of it. I legit don't enjoy writing C. Rust is fun to write 90% of the time.

That's a completely fair point, but very subjective. There are lots of people (myself included) who feel exactly the opposite way.

Re: rg3d: Rust 3D game engine with an FPS demo game and scene editor

#83
post #3

What I love about this engine, is that I can really easily read the code and reason what it does. I'd guess that given an hour or so of study I would feel reasonably confident in trying to modify it.

The same is also true of the author's previous engine [1], written in C99. Would love to get the author's take on the costs and benefits of switching to Rust on the basis of what's effectively a reasonably sized real world case study, at least as far as individual projects go.

[1] https://github.com/mrDIMAS/DmitrysEngine

Re: rg3d: Rust 3D game engine with an FPS demo game and scene editor

#85
post #70
post #63

Earlier quoted context omitted.

The game and the editor are massively helps to find right approaches in development. All my previous attempts to write engines (in other languages) were bad because all they had is just some very simple demos with some meshes and lights. You never know which features engine should have until you need them. Many engines trying to have best possible graphics and does not pay attention to other very important things, li…

As they say, you don't write an engine - you write a game, and the engine comes out of it. Impressive work!

Not if you write Handmade Hero.

Re: rg3d: Rust 3D game engine with an FPS demo game and scene editor

#86
post #30

Earlier quoted context omitted.

I don't see why Rust would be cleaner than modern C++ codebase.

Theoretically yes, practically it's a different story. Sure you can write clean modern cpp (the act of which is harder than writing clean Rust), but if your dependencies are still "C with classes", you are forced to particular patterns.

FWIW some people -e.g. me :-P- consider "C with classes" much more readable than modern C++.

Re: rg3d: Rust 3D game engine with an FPS demo game and scene editor

#87
post #49

Quite cool! This is the kind of stuff that might drive adoption among game devs.

I doubt projects like this would help. For big developers, 99.99% of the time they are already riding on existing codebases (even when they call it by different names for marketing reasons) - the last two AAA games i worked at have codebases more than a decade old, one actually two decades old. While technically they could add rust as an extra language, in practice this wont happen both because the vast majority of game developers are conservative in terms of languages but also because it creates extra barriers (most people who write C++ code in games barely know C++ - the wizkids that everyone has in mind when hearing about high octane game engines are a tiny minority compared to everyone else who touches a game's codebase) which make it harder to hire new people (unlike other disciplines in gamedev, decent programmers aren't as easy to find). Also everyone hates how slow C++ is to compile and last time i checked rust is even worse.

For smaller developers projects like this still wont help drive adoption since smaller developers have the freedom to decide on their own what language they'd use (assuming they aren't already using an existing codebase, some of the stuff above also apply to smaller developers) and they'd already be using rust if they thought it'd help. In general i believe that developers who have enough knowledge to make their own engine in other languages and be able to make their engine in rust, would be able to tell if rust is a good choice or not.

Or to put it in another way, i doubt projects like this will help drive adoption for rust among game developers because the developers have either already decided what language to use (be it rust or something else) or are not in a position to decide what language to use.

(yeah sure, there might be an exception or two out there, but there are hundreds -if not thousands- of engines... after all Remedy, a AAA studio, used D in their engine yet you do not see much of an uptake of D among game developers even though technically D would be easier to grok by C++ programmers, integrate with existing engines with its C++ interop and even provides features like compile time code evaluation and generation for features that i've seen C++ projects use overcompilated macros and external build time generators that rely on brittle code comments to work)

Re: rg3d: Rust 3D game engine with an FPS demo game and scene editor

#88

Earlier quoted context omitted.

Theoretically yes, practically it's a different story. Sure you can write clean modern cpp (the act of which is harder than writing clean Rust), but if your dependencies are still "C with classes", you are forced to particular patterns.

FWIW some people -e.g. me :-P- consider "C with classes" much more readable than modern C++.

I'm somewhere in the middle but then again, that's a Cpp problem.

Re: rg3d: Rust 3D game engine with an FPS demo game and scene editor

#89

Earlier quoted context omitted.

You need to look at this as result/time. Godot has been around for six years, the others for much longer. This has been around for a year and again, it's a one person project. What do you expect?

Well, I'm talking from the point of view of a user. Why would I choose this engine over Godot, Unity, Unreal? Just because it's a single-person project?

Who asked you to choose this engine over Godot, Unity or Unreal? And why would others make a choice for you? Such a choice would only be up to you based on your own requirements, nobody else can make that choice.

Also this post is really about showing off an engine made in Rust, a "hack" so to speak. You are in Hacker News where people post (usually technical) things that others might find interesting - but not necessarily useful. Consider we get posts about people writing software for retro computers, just for the fun of it.

Re: rg3d: Rust 3D game engine with an FPS demo game and scene editor

#90
post #49

Quite cool! This is the kind of stuff that might drive adoption among game devs.

I doubt projects like this would help. For big developers, 99.99% of the time they are already riding on existing codebases (even when they call it by different names for marketing reasons) - the last two AAA games i worked at have codebases more than a decade old, one actually two decades old. While technically they could add rust as an extra language, in practice this wont happen both because the vast majority of g…

How would it not help? Someone might see this and realize that Rust is a viable game dev option and adopt it for their next game.

In my experience, Rust is relatively fast on recompilation, possibly faster than C++.

Rust is a much younger language so you have to wait.

Post reply on HN