logoalt Hacker News

andaitoday at 11:37 AM2 repliesview on HN

Unity compiles down to 3MB wasm. Though they don't need to ship the dotnet runtime, they use IL2CPP, a proprietary thing that translates dotnet code into C++. Then they run Emscripten on it.

Also I think Godot's WASM outputs used to be 2-3x smaller in Godot 3 (though the C# one was bigger).

You can ship a JS game in kilobytes, although atop 30 million lines of Chromium that's cheating of course :) still good fun.

https://js13kgames.com/

Notch also made a bunch of 4kb Java (not JS) games back in the day, which is probably what got me into this stuff.

https://web.archive.org/web/20090108001738/http://www.mojang...


Replies

silon42today at 12:38 PM

WASM requires a browser too, no? (or an equivalent runtime, possibly smaller depending on requirements)

show 2 replies
flohofwoetoday at 1:18 PM

Tbf, you can also ship WASM games in kilobytes. E.g. here's a Pacman clone written in C99 in "46.8 kB transferred" (107 KBytes uncompressed size):

https://floooh.github.io/pacman.c/pacman.html

...can probably be made quite a bit smaller when 'as-small-as-possible' is the main goal.