Ported js13k game underrun to D targeting webassembly
Sebastiaan Koppe
mail at skoppe.eu
Sat Nov 17 21:35:59 UTC 2018
Underrun is small game build by Dominic Szablewski for the 2018
js13kGames competition.
I decided to port it to D and to target webassembly. You can play
the game here https://skoppe.github.io/spasm/examples/underrun/
It is part of my endeavour into the wonderful world of
webassembly. I specifically choose this project so I could get a
feel for how to call web api's other than the dom, i.e. WebGL and
AudioContext.
Porting went pretty smooth, except for the fact that I wanted it
to be done in betterC, which turned out to cripple lots of things
I am used to rely on.
Things like:
- having to write closures by hand
- not being able to use stdx.allocator
- almost no use of phobos (even at CTFE)
D could definitely use some love in that area. I was specifically
stumped that stdx.allocator doesn't work in betterC; if somewhere
is a good place to use stdx.allocator you would expect it to be
betterC, but alas.
Had lots of fun though. Hope you like it.
More information about the Digitalmars-d-announce
mailing list