Live data from Hacker News

Leaving Rust gamedev after 3 years

loglog.games

401–410 of 996 posts

Re: Leaving Rust gamedev after 3 years

#401
post #382

> wait I can't add this new thing because things will no longer compile, and there's no workaround other than code restructuring I definitely think that's a great feature. I want to learn on day 2 that the design is a dead end, not on day 101 when I ship on day 100 and there was a race condition on day 2 I never noticed. But the thing about gamedev (I guess - I'm not a game developer) is that the code being great and…

I think the point is that there are few "code related" dead ends in game code with good game play that can't be dealt with using enough effort. There are plenty of "game play related" dead ends that no amount of clean code can help out. To that end, whatever can help you explore the game play the fastest is what you want.

Quick iteration perhaps isn't the biggest strength of C++ either. Rust does have some friction when it comes to "I'll try this with a dirty impl and if it flies, then I cam make a clean one later". I guess if that friction is worth it will depend on how much faster you get on other things, e.g. refactoring without spending a lot of effort worrying about introducing hard-to-spot bugs like races, or - worse - having to spend valuable time fixing those bugs instead of adding fun to the game.

Re: Leaving Rust gamedev after 3 years

#402

Earlier quoted context omitted.

> incendiary responses to rust criticism can be I've not experienced this. Do you have examples of the rust community flaming someone for having negative opinions about the language?

I'd go read their mailing list and Reddit forms; especially when people run into issues doing stuff that's very simple in other languages. Never seen a more toxic programming community. Hopefully they calm down, or really get drown out, once there are a real number of jobs for people using Rust. Right now the evangelists outnumber the rank and file who are just using a language to get work done.

If it helps, they can't possibly be as toxic as Lisp programmers used to be, where more or less any online conversation would start with someone new asking a question and Erik Naggum replying that they were a moron who should die.

Re: Leaving Rust gamedev after 3 years

#403
I've found Rust very pleasant for building little games. I've mostly been using SDL + a my own little shim so I can target web through wasm & canvas.

I had professionally worked with C++ for a long time so getting comfortable with Rust wasn't too bad.

https://www.bittwiddlegames.com/ You can see a web build at https://www.bittwiddlegames.com/lambda-spellcrafting-academy...

Re: Leaving Rust gamedev after 3 years

#404

That's a good article. He's right about many things. I've been writing a metaverse client in Rust for several years now. Works with Second Life and Open Simulator servers. Here's some video.[1] It's about 45,000 lines of safe Rust. Notes: * There are very few people doing serious 3D game work in Rust. There's Veloren, and my stuff, and maybe a few others. No big, popular titles. I'd expected some AAA title to be writ…

"I tend to agree about the "async contamination" problem. The "async" system is optimized for someone who needs to run a very large web server, with a huge number of clients sending in requests. I've been pushing back against it creeping into areas that don't really need it."

100% this. As I say elsewhere in these threads: Rust is the language that Tokio ate. It isn't even just async viral-chain-effect, it's that on the whole crates for one async runtime are not even compatible with those of another, and so it's all really just about tokio.

Which sucks, if you're doing, y'know, systems programming or embedded (or games). Because tokio has no business in those domains.

Re: Leaving Rust gamedev after 3 years

#405
I think these comments are fair. It's true that Rust is rigid.

I've had great success with Rust, but on projects where I knew exactly what I needed to build. Rust's focus on code correctness is great for maintenance of projects, where the priority is in keeping them stable and not causing regressions.

So while I'd say Rust is pretty quick for refactoring of something like a device driver, it's far away from the hot-reloaded time traveling live tinkering IDE.

Re: Leaving Rust gamedev after 3 years

#406
post #51
post #41

Earlier quoted context omitted.

Did you read the part where they said that they're a two-person indie game studio with a development cycle of 3-12 months max?

That's not an argument against parallelism in game design in general.

Almost all parallelism in game engines is for very specific parts of the engine and almost none of the gameplay stuff is paralellizable. What people who haven't actually had to go through and solve the problems presented in game engines often times misunderstand is that when your game is running poorly because everything is happening on a single thread, almost all of this speed issue is because of rendering. Then physics. These are very hard problems to solve and it's more complicated than "use an ECS" to solve them.

Re: Leaving Rust gamedev after 3 years

#407
post #86

> As far as a game is concerned, there is only one audio system, one input system, one physics world, one deltaTime, one renderer, one asset loader. I thought this way when I was doing Java dev around 10 years ago. I thought it excused the singleton pattern. I was wrong! You should always be able to construct an object by explicitly passing dependencies to it. Especially for testing. It really is no fun if your rende…

People should get more into integration tests. If you start out thinking you need to separate everything for unit testability, you instantly get architecture astronaut-ism, where your architecture is entirely based on fake testability instead of the thing it's actually meant to do in production.

Re: Leaving Rust gamedev after 3 years

#408
post #173
post #107

Earlier quoted context omitted.

I know rust, I don't know game development (I've dabbled slightly). If I choose to build a game I either need to make it work in rust* or I need to learn a new language (Unity -> C#, Unreal -> blueprints, Godot -> gdscript). So your advice to "just use Unity/Unreal/Godot" is the opposite of your advice "you should stick with what you know" in my case. I suspect the former is good advice, and the latter is therefore w…

Perhaps the more appropriate advice is : Use the right tool for the job. Use C++ for writing a high performance library or a database engine. Use Go or Java for writing a server. Use C for writing a kernel module. Use shell scripts for automation. Use python for trying out ML ideas or heavier duty scripts. Use Rust for ... I'm not quite sure what it's the right tool for yet. I suspect it's trying to become the right…

Use Rust if crashes or memory bugs are not an option. For everything wasm, Rust is much more pleasant with good libraries than the competition.

Re: Leaving Rust gamedev after 3 years

#409

I've become wary of commenting on articles that mention the pros and cons of various languages, but I still find it strange that so many people are so strongly focused on what their favourite language can do (usually better than others), instead of the project they're working on. When it should be the other way around. The joke he mentioned about having 50 engines written but only 5 games certainly rings true and I d…

The hardest part of a project is finishing it. I think the main issue is the fun problems to solve happen very early in the project and once those are done it becomes incredibly tedius and boring and I usually lose focus until the project dies. Its difficult to maintain motivation.

Interesting, I almost find it the opposite right now. Learning the engine is a pain in the ass -- it's not particularly hard, just tedious to learn all the APIs and quirks -- and then when you're initially building the thing, "it's not fun yet" for a quite a while. But then once you have the fundamentals down, you can add more abilities and characters and other features, that's the fun shit.

I was working on the AI last night, and since I already had one functioning AI agent, it was pretty easy to spin up variations that behaved in moderately different ways, which was very fun!

I've only been dabbling though, and still sort of in the prototype stage, not quite a full game yet but getting there. Maybe I'll feel more like you suggest deeper into development.

Re: Leaving Rust gamedev after 3 years

#410

Earlier quoted context omitted.

Absolutely. Async/await typically improves headroom (scalability) at the cost of latency and throughput. It may also make code easier to reason about.

> at the cost of latency and throughput. Compared to what? Doing epoll manually?

If I'm not doing slow blocking I/O, I'm not doing epoll anyways.

But the moment somebody drops async into my codebase, yay, now I get to pay the cost.

Post reply on HN