Go makes it ridiculously easy:
GOOS=js GOARCH=wasm go build -o web/game.wasmMore build info here: https://ebitengine.org/en/documents/webassembly.html
How was using Go targeting wasm (I presume)? I'm personally concerned about compilation times being super long, but I guess I've never tried...
As mentioned in the other comment, the heavy lifting is done by Ebitengine: https://ebitengine.org/en/documents/webassembly.html
Go supports compiling to wasm, and it's as simple as:
GOOS=js GOARCH=wasm go build -o web/game.wasm
It takes just a few seconds for this project. :)Otherwise it was neat!
But code looks great! Really nice to see ECS in Go.
The ship just gets stuck on the end of lvl 2.
You probably did it to try Go, wasm and ECS and I understand that, but if you to make a game seriously, you should have stopped much earlier. In the early stage of the game development you should made 5-10 prototypes using different tech/frameworks and use the best one. I seriously don't see Go+wasm+ESC being the best one for this kind of game.
How can you not go insane if you have to wait 20s for every page refresh.
Thinking about what would be the most efficient engine for the game would kill all the fun for me and the project wouldn't exist. :)
I'm trying to decide how much time I should devote to making this easier to set up / use by other people in the medium term, since it's just a side project for me. Might make a codespaces template so it's quick to get started.
They chose exactly the right tech for the job they intended - a fun experiment in a particular language and framework, and a write up based on that. They perhaps chose the wrong tech for your expectations?
A lot of native games take longer than that to load.