You shouldn't have to worry about this kind of stuff if it's just a static site.
I'd host this on a cdn like cloudflare or github pages (free!).
also: this is incredibly cool. thanks for writing this up and sharing!
I'm about to buy Terraria after all these years, just so I can get the assets and check this out. You're cool :)
Its better than Minecraft, in my opinion.
For anyone wondering: https://github.com/gzuidhof/coi-serviceworker or https://github.com/WebReflection/mini-coi
edit: 2000m now that I revisited. Crazy hard.
:strawberry:x14
3:17:46
deaths:1981
Even "AI"s know to show you how to do it in spite of requestAnimationFrame. I know, I asked.
But you have to ask them specifically to decouple game world updates from drawing, or they'll give you the dumb solution.
Heh, you'd think Minecraft would be exactly the sort of thing that absolutely should be running in the browser, considering it was originally a Java applet.
I understand the point, I just find it amusing.
Somehow it reminds me of something, but memory is getting fuzzier nowadays. /s
6 years ago? https://news.ycombinator.com/item?id=19861584
Once you are in canvas land, you'll have to do the text rendering yourself - that's not the fault of JS or WASM though, but of the broken web API stack (what's there is not properly layered, and the whole layer stack is inverted, e.g. canvas sits on top of the DOM instead the DOM sitting on top of canvas).
So You Want To Compile Your C# Game Engine To The Web With WASM
https://kylekukshtel.com/csharp-wasm-game-engine-compile-web...
[1] Single player: https://thelongestyard.link/q3a-demo/ Multiplayer: https://thelongestyard.link/q3a-demo/?server=HN
If you are interested in taking a look, we run a cloud gaming service based on WASM at https://gaming.inlinestyle.it with cloud saves support. Many of things you discussed are related to what we had to do too, but we tried to do it only for opensource and freeware games so that everyone can benefit from them and play them on the cloud.
Appreciate any suggestion you have on how to improve the service!
rlmineing_dead•4d ago