Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Example of websocket using the wasm target

A topic by shrmpy created Jun 26, 2022 Views: 52
Viewing posts 1 to 1
Submitted(+1)

There was a question about websocket support, and it was not very straightforward on initial experiments. I think the goita project helped clarify how the pieces fit together. So here is a skeleton example starting with  Siôn le Roux's ebiten-game-template then adding a websocket (to send text to a echo backend service) - github.com/shrmpy/wswa

There is hosting on GH pages via their workflow/actions that can be demo'ed. It expects the echo service at localhost:8077. There is one straight from goita that I put at `cmd/echo.go` and after it is started, you can use your browser to visit the published GH page (example at shrmpy.github.io/wswa/)