Live data from Hacker News

14kb WASM game written in D

skoppe.github.io

11–20 of 115 posts

Re: 14kb WASM game written in D

#11
post #5

This uses webgl, right? Maybe feedback to the user in case of missing support would be useful. Else folks get stuck at "Initializing..." with an exception in the console. Not everybody checks the console. (TypeError: can't access property "createBuffer") Edit: stuck at "Initiating..."

Running fine on Firefox on Mac OS

Re: 14kb WASM game written in D

#12
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.

My understanding is WASM is pretty performant except in the case when it needs to interact with browser apis / js where is preforms quite a bit worse than JS.

Re: 14kb WASM game written in D

#13
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.

I'm not sure there is a difference for webgl calling it from Wasm vs JS?

Re: 14kb WASM game written in D

#14
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.

I don't think you say much about the performance here except that it isn't noticeably terrible. Any modern computer should be expected to run this kind of thing with a smooth framerate using paltry resources. I would expect this even if this had been written directly in javascript.

Re: 14kb WASM game written in D

#15
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.

[deleted]

Re: 14kb WASM game written in D

#17

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…

Ok, I'm not trying to take anything away from the developer here but calling this "masterful" makes me think you must have incredibly low expectations for webtech games and/or developers.

Re: 14kb WASM game written in D

#18
A few errors:

• There’s an & that should be either & or &, depending on whether it’s setting HTML or text.

• The opening garbage text is mojibaked, so that it looks like… different, not as æsthetically pleasing garbage.

• The text that’s supposed to be like “7 SYSTEM(S) STILL OFFLINE” is getting mangled badly, missing much of the string and getting a bunch of U+0000s in it—unchecked and incorrect string indexing, by the looks of it. Hmm… “1␀␀␀␀␀␀␀␀␀␀STIL1␀␀␀␀␀␀␀” actually looks like something’s clobbering the string literal stillOffline. Ouch; that actually worries me, though I hope it’s largely just a side-effect of some shortcuts taken to keep the code tiny and not something that would normally be an issue?

• terminal_text_outro has some double quotes that should be single quotes (apostrophes).

Other than that, seems to be working well.

Post reply on HN