News for hackers. Stuff that matters.
Re:The State of Go: Where we are in February 2016 by espadrine on Wednesday February 03, 2016 @11:39AM (#11027442)
You have to ensure that the GC never makes you drop a frame. For 60Hz, that means staying below 16.7ms.

Given that a Go 1.6 GC will still take about 4ms, you have 12.7ms to generate a frame, which can be too limiting for some CPU-intensive games, but is perfectly acceptable for many games.

(In Go 1.5, a GC was much more likely to make you drop a frame, as it could easily average 40ms.)

On the other hand, there are less high-quality libraries in Go than in C++ or in JS. That may be the most limiting factor.

Re:The State of Go: Where we are in February 2016 by mike_hearn on Wednesday February 03, 2016 @05:18PM (#11030297)
Interesting fact: Unreal Engine uses a GCd heap (or used to at least) for its core game state, so that means many AAA games use GC. And you can hit 60fps with it.

Their secret is they keep the game state heap really small. Like, 50 megabytes, maybe.

Re:The State of Go: Where we are in February 2016 by pjmlp on Thursday February 04, 2016 @02:44AM (#11032572)
Re:The State of Go: Where we are in February 2016 by twotwotwo on Wednesday February 03, 2016 @07:15PM (#11031019)
Another weird thing is, the background collection is still using a core (plus somewhat slowing foreground code, with write barriers) when it runs. It's kinda like you have a varying amount of CPU power.

One approach is just to program as if you had less CPU, as if there were always a GC running. I suppose if you have some code that isn't smoothness critical (game AI, say), or CPU-affecting detail settings you can twiddle without looking too glitchy, maybe you can figure out some way to shed work when you start to fall behind.

It'd be really cool to see someone attempt a game or such in Go--boundary pushing's always fun, more so when the boundaries are recently expanded.

Re:The State of Go: Where we are in February 2016 by pjmlp on Thursday February 04, 2016 @02:48AM (#11032584)
Back in the 80's and early 90's, that type or remark was intended to anyone trying to use Turbo Pascal, C, AMOS, Turbo Basic, Forth, Modula-2.... for game development.

No sane game developer would use anything other than Assembly.

The more things change, the more they stay the same.

Re:The State of Go: Where we are in February 2016 by twotwotwo on Thursday February 04, 2016 @05:31PM (#11037826)
Wasn't to discourage at all--was trying to give my understanding (based on the design docs, talks, etc.) of what your CPU budget looks like and speculate about ways to deal.

"It'd be really cool" was absolutely sincere; the Go folks have given us some new toys and it'd be neat to see how far we can take 'em.

Re:The State of Go: Where we are in February 2016 by pjmlp on Friday February 05, 2016 @02:38AM (#11040125)
That was my point as well.

The culture in the gamedev world is such that the big teams only switch tooling when forced to do so. Only amateurs tend to try out new ways.

Back when the move from Assembly to higher level languages started, many games would be filled with inline Assembly.

The compilers weren't that good generating code and they didn't want to loose the power of Assembly.

Just like now with the managed runtimes and having tons of C and C++ underneath. Languages that weren't that speedy 30 years ago.

We need to keep the spirit of taking things far alive, because in computing seeing is believing.

Re:The State of Go: Where we are in February 2016 by martijn_himself on Wednesday February 03, 2016 @12:17PM (#11027744)
I just have to say this is a great answer. Thanks.