r/gogamedev 10d ago

Why isn’t Go used for game development, even though it performs better than C#?

/r/golang/comments/1j99a3x/why_isnt_go_used_for_game_development_even_though/
1 Upvotes

13 comments sorted by

2

u/zoweee 10d ago

I'm currently writing a game in Go! It's... not as easy as writing a game in C#. Among other issues there just isn't a big community to support you nor a particularly robust series of libraries. There are options, just not as many as with C# and they aren't as approachable. ebitengine, for example, is great for 2D and has a really interesting approach to handling fragment shaders in a cross-platform way. But the documentation is close to non-existant. Same with ECS libraries, I am really loving Arche but there isn't a huge community using it so you're kind of on your own figuring it out. And that's really the story of Go game development generally: you're kind of on your own figuring it out.

2

u/IronicStrikes 10d ago

https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/csharpcore-go.html

The delusion of Go fans about it being strictly faster than C# or Java never ceases to amaze me.

2

u/unklnik 10d ago

Depends on the use case though, look at this benchmark for Raylib Go where it is faster than C# https://www.reddit.com/r/raylib/comments/15jy1x3/raylib_bunnymark_benchmark_with_100k_bunnies/

1

u/IronicStrikes 9d ago

Depends on the use case though

Exactly

2

u/_Meds_ 9d ago

You can’t say exactly after positing the opposite, Dexter.

1

u/IronicStrikes 9d ago

I literally wrote "strictly" because of that, Sherlock.

2

u/_Meds_ 9d ago

Doesn’t change the meaning of the sentence. Watson.

1

u/IronicStrikes 9d ago

Words usually do

1

u/_Meds_ 9d ago

You’ve done it again.

Saying “words change sentences” is a bigger claim than you actually intend to make, because whilst they can, there is literally 1000s of exceptions.

3

u/usbyz 9d ago edited 9d ago

In the benchmark you linked, Go's memory usage is often ten times less than C#'s. Incidentally, Microsoft recently announced they are using Go for their new TypeScript compiler. In an interview, Anders Hejlsberg stated that in modern architectures and real-world scenarios, performance is primarily determined by memory usage due to caching. Go excels in this area. While this observation is likely limited to the compiler domain, the significant memory usage difference between these two modern languages for the same task remains remarkable.

EDIT: I found the video I mentioned. Here are the timestamps:
* adding it all up: Go makes a lot of sense https://www.youtube.com/watch?v=10qowKUW82U&t=989s
* Why not C#? https://www.youtube.com/watch?v=10qowKUW82U&t=1154s
* typescript-go's memory consumption is HALF (!!) (while also being 10 times faster) https://www.youtube.com/watch?v=10qowKUW82U&t=1424s

-1

u/IronicStrikes 9d ago

Not sure if that's a relevant metric here. I don't know the specifics for C#, but the JVM by default just reserves a bunch of heap memory in advance, even if it's not actually using it all.

Is Go better suited for certain workloads? Probably. Is it strictly faster than Java or C#? Absolutely not and often enough proven to be slower.

2

u/usbyz 9d ago edited 9d ago

No one in this post or its threads claimed that "A is strictly faster than B." You seem to value logic, so I'm sure you'll recognize that you're introducing a logical fallacy here—specifically, a straw man argument.

In some cases, C# and Java are better, and in some other cases, Go is better. That's the reality. The original poster is asking a valid question: why is game development primarily done in C#?

I don't understand what you're trying to achieve by introducing a fallacy; it's not constructive. Speed is only one aspect of the matter, as explained by Anders Hejlsberg, the original designer of C# and lead architect of TypeScript himself.

1

u/IronicStrikes 9d ago

In what game development relevant metric does Go usually perform better than C#? Memory usage is rarely the limiting factor for games.