Skip to content

WASM asset loading best practices #2656

Answered by tinne26
3elDU asked this question in Q&A
Apr 26, 2023 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

The most common approach is to use the https://pkg.go.dev/embed package in order to embed the assets directly into the compiled executable / wasm file. Most entries in the 2022 Ebitengine game jam did that. If you have many assets, though, yes, you would need to use http requests, but that's rarely necessary. Like, if you need to do that, you should be at a level where you can figure it out on your own.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@3elDU
Comment options

@tinne26
Comment options

@3elDU
Comment options

Answer selected by 3elDU
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants