Running a D game in the browser
Sebastien Alaiwan via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Wed Aug 3 13:26:23 PDT 2016
Hi,
I finally managed to compile some D code to asm.js, using
Emscripten.
It had been done by one dude several years ago, but some changes
in the inner workings of Emscripten (the introduction of
fastcomp, also probably combined with changes in the way LDC
generates LLVM bitcode) made it impossible to use the same
technique.
You can play a minimalistic demo:
http://code.alaiwan.org/dscripten/full.html
The source code + toolchain deployment scripts are available on
github:
https://github.com/Ace17/dscripten
And a blogpost explaining the technique is available here:
http://code.alaiwan.org/wp/?p=103
(Spoiler: at some point, it involves lowering the source code
back to C)
Please let me know what you think!
More information about the Digitalmars-d-announce
mailing list