Live data from Hacker News

14kb WASM game written in D

skoppe.github.io

51–60 of 115 posts

Re: 14kb WASM game written in D

#51
post #22

Wow, what an impressive game for the web browser, and in such a small size! I'm particularly impressed by the variable lighting of the bullets down hallways, that's really quite masterful work. Kudos! Edit: I am impressed because I'm impressed. I spent a few weekends recently messing around with pygame, and I had a really hard time organizing my code and my thoughts. I do primarily numerical, technical work, and I se…

Impressive? 2011 says hi. "Unreal Engine 3 Support for Adobe Flash Player - Epic Citadel" https://www.youtube.com/watch?v=xzyCTt5KLKU

Epic Citadel was a lot bigger than 14 KBytes ;)

Re: 14kb WASM game written in D

#52

Wow, what an impressive game for the web browser, and in such a small size! I'm particularly impressed by the variable lighting of the bullets down hallways, that's really quite masterful work. Kudos! Edit: I am impressed because I'm impressed. I spent a few weekends recently messing around with pygame, and I had a really hard time organizing my code and my thoughts. I do primarily numerical, technical work, and I se…

[deleted]

Re: 14kb WASM game written in D

#56
post #22

Earlier quoted context omitted.

Impressive? 2011 says hi. "Unreal Engine 3 Support for Adobe Flash Player - Epic Citadel" https://www.youtube.com/watch?v=xzyCTt5KLKU

Epic Citadel was a lot bigger than 14 KBytes ;)

True, the point was more about what was possible before Flash was sacked and is yet to be common with WebGL/WASM.

Re: 14kb WASM game written in D

#57
post #22

Earlier quoted context omitted.

Impressive? 2011 says hi. "Unreal Engine 3 Support for Adobe Flash Player - Epic Citadel" https://www.youtube.com/watch?v=xzyCTt5KLKU

That's something on the order of ~5,000 times the size and looks extremely bland/boring.

Might be boring, yet where are the WebGL/WASM versions that are the modern versions thereof?

Re: 14kb WASM game written in D

#58

D is garbage-collected, right? How does the game plus the whole runtime fit into 14kb?

It is using the BetterC mode which disables all runtimes including gc. Spasm framework used by this demo is designed for such use case.

I did D including a custom runtime in about +20 KB of webassembly over this (I just wanted to take a straight desktop program and port it over). The runtime doesn't have to be that big.

Re: 14kb WASM game written in D

#59
post #21
post #10

Pretty impressive performance. It seems web assembly is pretty good tech for writing a performant web app. Is there any benchmark comparing web assembly vs javascript? I mean the same logic executed by javascript code vs the web assembly. Also curious to know if there are any serious web apps developed using web assembly.

Figma uses webassembly. We also use it for our web engine at https://castle.xyz , I gave at talk about that you can watch here: https://youtu.be/0FjCaoc1uzs where I go into some details and also do some live wasm game development (not sure how "serious" since we're still working on our app though). Much, much better performance than JS is possible because (among many other things) you can perform a lot of optimizatio…

As an aside, castle.xyz looks really cool! I can’t wait to play around with it.
Post reply on HN