Live data from Hacker News

Migrating away from Rust

deadmoney.gg

681–690 of 799 posts

Re: Migrating away from Rust

#681
post #457

Earlier quoted context omitted.

> GC pauses aren't really acceptable Java has made great progress with low-pause (~1 ms) garbage collectors like ZGC and Shenandoah since ~5 years ago.

Yes and it's impressive. For the competitive Minecraft player, I suspect starting their VM with XX:+UnlockExperimentalVMOptions is normal. A casual gamer is however not going to enjoy that.

Are you sure that enabling ZGC or Shenandoah requires UnlockExperimentalVMOptions ?

Re: Migrating away from Rust

#683
post #650
post #581

Earlier quoted context omitted.

Yes via sealed classes. It also has pattern matching.

So they are there, but ugly to define: public abstract sealed class Vehicle permits Car, Truck { public Vehicle() {} } public final class Truck extends Vehicle implements Service { public final int loadCapacity; public Truck(int loadCapacity) { this.loadCapacity = loadCapacity; } } public non-sealed class Car extends Vehicle implements Service { public final int numberOfSeats; public final String brandName; public Ca…

You could use Java records to make things more concise:

  record Truck(int loadCapacity) implements Vehicle {}
  record Car(int numberOfSeats, String brandName) implements Vehicle {}
  sealed interface Vehicle permits Car, Truck {}

Re: Migrating away from Rust

#684

Earlier quoted context omitted.

It depends on the kind of game you’re making. If it’s a really logic-intensive game like Factorio (C++), or RollerCoaster Tycoon (Assembly), then I don’t think you can get away with something like Unity. For simpler things that have a lot of content, I don’t think you can get away with Rust, until its ecosystem grows to match the usual game engines of today.

I mean, you could write your logic engine in Rust (as a library), and do all the rest in a more ergonomic language, with a GC.

Yeah, I think that would be ideal if possible, although often that requires most of the state to be in Rust, and exposing proper bindings to every bit of that state is quite an undertaking.

Re: Migrating away from Rust

#686
post #531

Earlier quoted context omitted.

> Rust is an obvious improvement over the interpreted languages. Do we agree that most of the languages I mentioned above are not interpreted languages? You seem to only consider Go as a non-interpreted alternative...

Other than Go it's just C/C++ and Swift.

Java, Scala and Kotlin too.

Re: Migrating away from Rust

#687
Nice write up! Nevertheless, these are very specific circumstances:

* They didn't select Rust as the best tool available to create a game, they decided to create a Rust project which happens to be a game

* When the objective and mental model of a solution is clear, the execution is trivial. I bet I could recreate a software which took me 3 months to develop in 3 days, if I just have to retype the solution instead of finding a solution. No matter which language

* They seem to struggle with the most trivial of tasks. Having to call out being able to utilize an A* library (an algorithm worth like 10 lines of code) or struggling with scripting (trivial with proven systems like lua) suggests a quite novice team

That being said, I'm glad for their journey:)

Re: Migrating away from Rust

#688
post #204

The fact that people love the language is an unexpected downside. In my experience the rust ecosystem has an insanely high churn rate. Crates are often abandoned seemingly for no reason, often before even hitting 1.0. My theory is this is because people want to use rust primarily, the domain problem is just a challenge, like a level in a game. Once all the fun parts are solved, they leave it for dead. Conversely and…

Agreed. For the same reason I unironically prefer Java, Go, C++, JS/TS to solve real problems.

I see Java, Go and C++ but js/TS is even worse than rust with regards to package deprecation

Re: Migrating away from Rust

#689

Another failed game project in Rust. This is sad. I've been writing a metaverse client in Rust for almost five years now, which is too long.[1] Someone else set out to do something similar in C#/Unity and had something going in less than two years. This is discouraging. Ecosystem problems: The Rust 3D game dev user base is tiny. Nobody ever wrote an AAA title in Rust. Nobody has really pushed the performance issues.…

This is probably brought up whenever an article mentions “wasted time”, but I wonder what percentage of side and “main” software projects “fail”- so we have to define side vs main and what it means to fail (I would imagine failure looks different for each), but anecdotally, none of my side projects have made money, but at least one I would call “done”, so… success?

A fear I have with larger side projects is the notion that it could all be for nought, though I suppose that’s easily-mitigated by simply keeping side projects small, iterative if necessary. Start with an appropriate-sized MVP, et al.

Post reply on HN