Comment on Show HN: I'm open-sourcing my game engineparentComments−nine_k2yNode of course can work on multiple cores, using worker threads [1]. You can even share large data efficiently using a SharedArrayBuffer.[1]: https://nodejs.org/api/worker_threads.html−deadbabe2yIt isn’t trivial to just split up a game into múltiple worker threads and keep everything in sync. With Go, it’s much easier.−holografix2yCan you expand on the low hanging fruit of splitting a game into multiple goroutines?What lends itself well to this?−deadbabe2ygoroutines−moffkalast2yThere is still considerable overhead turning things into buffers and back. Was there ever a good reason given as to why passing an object to a worker normally has to convert everything to string and back? It is just so completely idiotic.
Comments
Node of course can work on multiple cores, using worker threads [1]. You can even share large data efficiently using a SharedArrayBuffer.
[1]: https://nodejs.org/api/worker_threads.html
It isn’t trivial to just split up a game into múltiple worker threads and keep everything in sync. With Go, it’s much easier.
Can you expand on the low hanging fruit of splitting a game into multiple goroutines?
What lends itself well to this?
goroutines
There is still considerable overhead turning things into buffers and back. Was there ever a good reason given as to why passing an object to a worker normally has to convert everything to string and back? It is just so completely idiotic.