Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The goal is making these libraries in Rust. Rust is fundamentally a better language for game development than C#.


0 games have shipped in Rust and there is no plan anytime soon in the future that it will.

People think that a good language would make a good game, that's error #1. The ecosystem matters more than the language itself, basically using Rust is starting from scratch so you can't use all the good things that C++ / C# had for the last 15 years.

Edit: I want to clarify that I know that Rust is a good language, but as of now in 2021 it's just not ready for games, and there is no sign of change. It's fine to say "I can make games in Rust, it's going to be hard and painful but I can get something, but saying it's better than C# is definitly wrong.


> 0 games have shipped in Rust and there is no plan anytime soon in the future that it will.

That's trivially false.

> Last week, I released A Snake’s Tale on iOS, Android, Windows, Mac, and Linux.

> A Snake’s Tale was programmed entirely in Rust, and to the best of my knowledge, it is the first commercial game made in Rust to be released.

Dated 09 May 2017.

https://michaelfairley.com/blog/i-made-a-game-in-rust/


I think the parent means like AAA games.


Moving the goalpost


no


As someone replied I was talking about AAA games indeed, everyone can make a game in any language with 50 reviews on the app store after 3years.


AAA games are coming, there's at least two studios public about their in-progress Rust work. And backchannel whispers that may or may not come to fruition with more.

Time will tell.


And another one left Rust behind.


That wasn’t an AAA studio.


Ok, thanks for the correction.


What AAA games exist in C#?



Isn't Unity itself written in C++?


Isn't Rust itself built with a C++ based compiler, and binding to 3D system libraries written in C and C++?


There's a pretty big difference here though. In the case of Unity, most of the very hot code is C++. With a custom Rust engine, most of it is Rust.


On modern engines most of the hot code are GPGPU shaders, specially on cards modern enough to support mesh shaders.

Secondly, there is the ongoing rewrite from C++ into HPC#.

Third, I still remember the days when Pascal, Basic and C compilers were deemed worthless for professional game engines, followed by similar remarks to C++, back when Abrash books were still hot of the press.

Finally, languages don't dictate how fun games are and how much they sell.


Depends on how you define “c++ based compiler.” In the sense that it uses a library written in C++, yes, but “based” is kind of a stretch. It is an important one but not irreplaceable.


Yeah, I am splitting hairs on purpose, because at the end of the way winning benchmarks on the playground is meaningless on the business side.

Yes, Unity uses C++ in the core engine, just like in the old days the first wave of games written in C were full of inline Assembly, while the first wave of Objective-C and C++ games were plain old C.

Yet the Switch has outsold the DS, and Unity powers more than 50% of the games sold on the platform.

C# 9 is at the same level as D and Nim, minus a couple of little things that could still be added. To the point that with .NET 5, Microsoft has started to rewrite the runtime in C#, whereas Unity is slowly porting the rendering pipeline into the HPC# subset.

So if they would decide to have Unity on D or Nim, compiled with the LLVM compilers, which kind of discussion would we be having, which compiler makes clever use of LLVM IR?


> C# 9 is at the same level as D and Nim

What do you mean? How does one reach D/Nim levels of performance (or did you mean expressivity) in C#? I'm experimenting with Nim for gamedev these days, I might be persuaded to take another look at C# depending on your answer.

Also, what is the HPC# subset? Any resources to read about that?


As of .NET 5 and C# 9 (also applies partially to F# and VB) you can:

- use structs like in C

- do safe stack allocations for arrays

- use GC free heap allocations and map them to memory slices

- GC free code regions

- static lambdas

- machine numeric types

- static lambdas

- native function pointers

- native sized numeric types

- more control over structs layout and usage

- using available in any type that implements Dispose pattern even if the interface isn't adopted

- you can make use of Roslyn to ensure using is not forgotten

- unsafe and native pointers

- vector types for SIMD, NEON and AVX

- you can generate MSIL on the fly similarly to what C++/CLI compiler would have done. Naturally this trick requires unsafe Assemblies.

HPC# is a C# subset created by Unity with the long term roadmap goal to replace C++ on Unity. Although it looks like a C# subset and plain .NET types, there is a new compiler, Burst, that is aware of those special types.

There is also an ECS framework that goes alongside it, DOTS.

The founding members of the projects are ex Psygnosis employees well known in the C++ community.

https://docs.unity3d.com/Packages/[email protected]/manual...

https://youtu.be/BpwvXkoFcp8

https://youtube.com/playlist?list=PLX2vGYjWbI0QRLkvupULwSZCP...


If you're waiting for some AAA title to ship, you'll be waiting a while. Big studios aren't going to be first adopters and they have expensive commercial tools for building games already. That said there are a bunch of toy project Rust games you could say are complete or "shipped" and many more games under development. There's no reason to be pessimistic about its use in the space. https://itch.io/games/made-with-rust


Sounds to me like those things just need to be rewritten. Or is the plan to keeping using the same language and libraries for the next 60+ years?


If you ask UNIX clones developers....


> 0 games have shipped in Rust and there is no plan anytime soon in the future that it will.

The language is still pretty new but there is a lot of people investing in this. Embark studios and Ready at Dawn come to mind.

> People think that a good language would make a good game, that's error #1. The ecosystem matters more than the language itself, basically using Rust is starting from scratch so you can't use all the good things that C++ / C# had for the last 15 years.

It's not an error. Ecosystem matters but to a point. Like game engines are written with a particular type of game in mind. If your game doesn't fit the particular use case, it might make more sense to roll your own. Also, if you have been building your own game engines in C++, doing it in Rust should not be much of a problem.


Gotta start somewhere.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: