Live data from Hacker News

Leaving Rust gamedev after 3 years

loglog.games

101–110 of 996 posts

Re: Leaving Rust gamedev after 3 years

#101
post #28

This article describes almost exactly why I think gradual typing is actually a good thing. Type checkers shouldn't get in the way of your code compiling. Yes, the language has to be designed with this property from the beginning. Yes, you should always enforce complete checking in CI. But you should also be able to try half-baked ideas.

There are at least a few nascent statically typed languages (as in, full static typing rather than gradual) which nevertheless let code with type errors compile for the sake of testing.

The two that I know of are Darklang [0] and Roc [1] which aim to let you compile code with type errors for the same reason you suggest.

[0] "Dark is designed for continuous delivery. As such, we don’t like requiring you to make large scale changes across your program, like changing a type everywhere. Instead, we want you to quickly discover that bad ideas won’t work, without first requiring you to propagate the type changes throughout your program."

https://blog.darklang.com/real-problems-with-functional-lang...

[1] "If you like, you can run a program that has compile-time errors like this. (If the program reaches the error at runtime, it will crash.)"

https://www.roc-lang.org/friendly

Re: Leaving Rust gamedev after 3 years

#102
post #24

My impression of Rust is that it's a very opinionated language that wants everybody to program in a specific way that emphasizes memory safety above everything. That's a good idea, I think, for the systems programming use cases that it was intended for. I don't see that as a particularly useful thing to value for game development. The part in the article about the Rust borrow checker constantly forcing refactors soun…

> My impression of Rust is that it's a very opinionated language

It's not though. There's only one thing Rust is opinionated about.

> that wants everybody to program in a specific way that emphasizes memory safety above everything.

Well yes, that is literally the core proposition and purpose of the language. That's like saying java is opinionated because it wants to manage the memory.

> I just don't think the kinds of security bugs you get from C/C++ "unsafe" code are that big of a deal for games

As soon as games are networked it starts being a problem, and these days non-networked games are pretty rare.

Re: Leaving Rust gamedev after 3 years

#103
post #59

Earlier quoted context omitted.

I do not complain. I've seen this trend multiple times by now. First time was with Ruby on Rails I think [1], then the cancer that led us to write JS to output HTML and all the good stuff that came and still manages to pour from npm. Every now and then you can spot the "fashion" out of these things. Rust is good and has earned its place. I just despise cult-like followings for these languages and technologies. [1] ht…

There's no need for you to blather about "woke" and drag in US culture wars nonsense. It's distasteful, glib, and frankly not very intelligent, and just subtracts from whatever your point was.

As I said above, cult-like. They will swiftly call you names if you even dare to question their beliefs. Thank you for proving me right kind sir.

Re: Leaving Rust gamedev after 3 years

#104
post #30
post #11

Earlier quoted context omitted.

I think most people here understand that a language that is great for kernel development isn't necessarily great for everything else.

Oh the language is good, it's the people. Cult-like.

Would that make rust a cargo cult ?

Re: Leaving Rust gamedev after 3 years

#105
post #12
post #9

Earlier quoted context omitted.

Exactly!

C/C++ -> move fast and break things Rust -> move slowly and don't break anything

If they tried to use C++ it would have ended absolutely the same way.

As someone who works in gamedev I can assure you C++ is same bad choice for 2 man indie project. In search of fast iteration times games have moved away from writing code in low level languages. Hardware for casual games is much bigger and faster than anything small team is able to make.

Re: Leaving Rust gamedev after 3 years

#107
post #73

In my experience, fundamentally when you're starting a software project, you need to make a strong up-front decision between two things: 1. I am using technology in order to build this thing. 2. I am building this thing in order to use this technology. Developers often fall in the (2) camp but don't admit it. There's an allure to using the new, sexy tech that will solve all their problems, whether that's Rust, Kubern…

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 wrong.

* For the sake of argument, we can pretend I only know rust. In reality I know a fair number of other languages as well, but the list doesn't happen to include C# or "random game engine specific scripting language", which seems to be the options if we're going with an established engine for big 3d games.

Re: Leaving Rust gamedev after 3 years

#108
post #73

In my experience, fundamentally when you're starting a software project, you need to make a strong up-front decision between two things: 1. I am using technology in order to build this thing. 2. I am building this thing in order to use this technology. Developers often fall in the (2) camp but don't admit it. There's an allure to using the new, sexy tech that will solve all their problems, whether that's Rust, Kubern…

When all you have is a hammer, everything looks like a nail. When all you have is programming expertise, all your game production obstacles look like programming problems.

I think everyone in games has met an “engine person” who spends a lot of time iterating on tech, but never quite getting to the creative expression that got them in the game. I think part of it comes a bit from mythologizing breakthrough games like DOOM, where cool technology made something completely fresh. We begin to think that emulating id Software is how you make compelling art, ignoring the latter half of Kushner’s novel.

Re: Leaving Rust gamedev after 3 years

#109
This is a sobering read. Thank you for sharing.

This sums it up for me:

> Rust as both language and community is so preoccupied with avoiding problems at all cost that it completely loses sight of what matters, delivering an experience that is so good that whatever problems are there aren't really important. This doesn't mean "ship crap games", it means focusing on the game being a good game, not on the code being good code.

I think this can be easily extrapolated to projects outside of game development as well.

User experience is ultimately all that matters. If you're in prototyping stages of whatever it is you're building, and games spend a lot of time in this phase, then your focus should always be on testing what the user experience will be like, rather than absolute code correctness, maintainability, and everything else that makes a long-term project successful.

The fact Rust seemingly can't deliver this rapid prototyping workflow should be a large factor when deciding which language to use.

I've been using Go as my main language for the better part of a decade now, and I think it strikes the perfect balance of code quality and rapid prototyping. It's far from the side of absolute freedom of a language like Python, which becomes a nightmare to work with after the prototyping phase is over (though this might have improved in the past few years), but it's also far from languages like Rust, and allows me to be very productive, very quickly, while also being easy to pick up for newcomers. I probably wouldn't pick it for GUI or game development either, though, but for things like CLI, network and web tooling, it's perfect.

Re: Leaving Rust gamedev after 3 years

#110
post #26

> The problem you're having is only a problem because you haven't tried hard enough. You just need to read another 50,000 word fasterthanlime essay. Then you'll not have problems any more. > That being said, there is an overwhelming force in the Rust community that when anyone mentions they're having problems with Rust the language on a fundamental level, the answer is "you just don't get it yet, I promise once you g…

>> The problem you're having is only a problem because you haven't tried hard enough. And it actually does work that way with Haskell, in my experience. There's a big hill to get over where you flail against the type system, IO monad and all, and then you realize that, while Haskell's type system isn't perfect, being able to say Num t => (t -> b) -> [t] -> [b] is really pretty powerful, and being able to search for f…

> being able to search for functions by type signature is just plain convenient.

It's certainly not all the way there, but now that we are over the mostly empty promises of encapsulation and (worse) trying to model the world with classes, but grouping by that implicit first argument type for discoverability is exactly what OOP is, in this age of post-OOP.

The "you're not trying hard enough" position reminds me a lot of the Scala community's disdain for java-in-scala-syntax: if you don't use it like an almost-Haskell you're on your own (1). Here, I think Rust is actually more open: I don't read too much of the community, but most of what I saw seemed to be quite welcoming to the idea of placating the borrow checker with refcounting when "the rust way" fails to sufficiently click.

((1) but with Kotlin having taken over the entire not-almost-Haskell part of scala it's not an issue anymore: is has its niche and it fills it well, no more taking over the entire JVM while also magically converting everybody into an almost-Haskellian)

Post reply on HN