I always wondered if Go would be a good language to make a game in due to its concept of goroutines. Maybe one of these days I’ll give it a shot.
It's extremely good. Goroutines and channels make it very straightforward to set up an ECS engine hence you can actually run a lot of the engine in parallel and not have to stick to the "game loop" structure. Build your systems similar to the actor model with a mailbox, have an event/messaging bus, and you basically have a very performant engine. I've yet to run into issues with the GC. The only bit of tuning I had t…
Making games in Go for absolute beginners
61–70 of 78 posts
Re: Making games in Go for absolute beginners
#62Is size still an issue with Go if you wanted to compile to WASM and target the browser?
Re: Making games in Go for absolute beginners
#63The web browser gives you a rich collection of things you need out of the box and fairly "cross platform" by nature. You get things like graphics, audio, networking, debugging utilities, access to webgl / webgpu, etc.
As much as I hate to admit it.. it seems the web is far more suited for it than Go. I'm sure the game dev purists out there are pointing and laughing at the idea though :)
Re: Making games in Go for absolute beginners
#64I love Go and have been thinking of using it for a game project, but I can't help but feel like the web itself is a far better stack. The web browser gives you a rich collection of things you need out of the box and fairly "cross platform" by nature. You get things like graphics, audio, networking, debugging utilities, access to webgl / webgpu, etc. As much as I hate to admit it.. it seems the web is far more suited…
Re: Making games in Go for absolute beginners
#65While writing games in any programming language is a very rewarding experience, I have found HTML5 Canvas and JavaScript to be very effective for writing games as absolute beginners too. If sound is needed, there is Web Audio too, all available right within the web browser. It is quite possible to write simple games without using any external JS libraries by sticking to first principles only, e.g., drawing simple sha…
Re: Making games in Go for absolute beginners
#66While writing games in any programming language is a very rewarding experience, I have found HTML5 Canvas and JavaScript to be very effective for writing games as absolute beginners too. If sound is needed, there is Web Audio too, all available right within the web browser. It is quite possible to write simple games without using any external JS libraries by sticking to first principles only, e.g., drawing simple sha…
We just need make web assembly better for higher level languages, because neither javascript not rust are an end-all great language for small games.
Re: Making games in Go for absolute beginners
#67Re: Making games in Go for absolute beginners
#68Earlier quoted context omitted.
I would recommend against anyone using PixiJS. From a code perspective it feels dated and inconsistent. It can be very difficult finding correct information for the latest version, and you will very easily hit performance problems if you want to create a full screen game. You will need to apply the bitmap caching feature to yield best performance, and to me it seemed riddled with rendering and interaction bugs, or at…
And the alternative 2D game engine designed for the Web with GPU acceleration is?
Re: Making games in Go for absolute beginners
#69I always wondered if Go would be a good language to make a game in due to its concept of goroutines. Maybe one of these days I’ll give it a shot.
The way you have to do math with vectors without operator overloading available in Go is quite cumbersome. I am a huge Go fan and I figured this out working on the raytracer in a weekend project using Go.
Re: Making games in Go for absolute beginners
#70Earlier quoted context omitted.
The way you have to do math with vectors without operator overloading available in Go is quite cumbersome. I am a huge Go fan and I figured this out working on the raytracer in a weekend project using Go.
You built a raytracer in a weekend? That's kind of impressive :P