hajimehoshi / ebiten

Ebitengine - A dead simple 2D game engine for Go
https://ebitengine.org
Apache License 2.0
10.89k stars 652 forks source link

Wasm not working with librewolf #2852

Open ThePuzzledDev opened 10 months ago

ThePuzzledDev commented 10 months ago

Ebitengine Version

2

Operating System

Go Version (go version)

go version go1.21.4 linux/amd64

What steps will reproduce the problem?

Run EBiten + WASM on Librewolf

What is the expected result?

A working game

What happens instead?

An indefinite black screen

Anything else you feel useful to add?

I tried using the go run github.com/hajimehoshi/wasmserve@latest . as well as manually compiling it, and neither work. Also here's the code: https://codeberg.org/Puzzled/gopong-ebiten

hajimehoshi commented 10 months ago

What error did you see in the developer tool?

ThePuzzledDev commented 10 months ago

Hey, sorry it took me a while to get back. I got the error, Error: Go program has already exited

hajimehoshi commented 10 months ago

So the program exited. Please tell me which part was reached.

hajimehoshi commented 10 months ago

I found this is an issue in wasmserve. Specifying a minor version of Go doesn't work with wasmserve.

module foo                                                                                                                                                                                                                                                                            

go 1.21.4
hajimehoshi commented 10 months ago

Try

go run github.com/hajimehoshi/wasmserve@1931e79578ff16bae62005d0b6bec4c77ad43ed9 .

instead of

wasmserve .

. I'll tag a new wasmserve version few days later.

ThePuzzledDev commented 10 months ago

It's still giving me the exact same error

hajimehoshi commented 10 months ago

Unfortunately I couldn't reproduce your issue. I've already succeeded to run your game on browsers.

hajimehoshi commented 10 months ago

I found a minor issue in wasmserve, but I am not sure this was relevant. Could you try

go run github.com/hajimehoshi/wasmserve@acaa4bbab21790876675f069f3e01e916df4173b .

?

ThePuzzledDev commented 10 months ago

Super sorry about my lack of replies. I'm really busy, and forget to check GitHub. No that did nothing.

hajimehoshi commented 10 months ago

Does wasmserve work with other games?

ThePuzzledDev commented 10 months ago

No, it still gives me the same error

hajimehoshi commented 10 months ago

I'm afraid I have no idea what was going on.