Re: Running a D game in the browser

2016-08-07 Thread Sebastien Alaiwan via Digitalmars-d-announce
On Friday, 5 August 2016 at 13:18:38 UTC, Johan Engelen wrote: That patch doesn't look too bad. Could you introduce a CMake option for building with Emscripten-fastcomp? And a #define "LDC_LLVM_EMSCRIPTEN" or something like that, so that you can change `#if LDC_LLVM_VER >= 309 && 0` to `#if LD

Re: Running a D game in the browser

2016-08-05 Thread Johan Engelen via Digitalmars-d-announce
On Friday, 5 August 2016 at 05:39:57 UTC, Sebastien Alaiwan wrote: On Thursday, 4 August 2016 at 19:17:34 UTC, Sebastien Alaiwan wrote: at the moment, I have a patch to making the build work (only for the binary "ldc2", not other tools of the package). I created a dedicated github branch "fastc

Re: Running a D game in the browser

2016-08-04 Thread Sebastien Alaiwan via Digitalmars-d-announce
On Thursday, 4 August 2016 at 19:17:34 UTC, Sebastien Alaiwan wrote: at the moment, I have a patch to making the build work (only for the binary "ldc2", not other tools of the package). I created a dedicated github branch "fastcomp-ldc". The patch: https://github.com/Ace17/dscripten/blob/fastco

Re: Running a D game in the browser

2016-08-04 Thread Sebastien Alaiwan via Digitalmars-d-announce
On Wednesday, 3 August 2016 at 20:40:47 UTC, Kai Nacke wrote: That's awesome! Do you still know the modifications you made to compile LDC with emscripten-fastcomp? I would be interested to have a look into the "PNaCl legalization passes" problem. That would be great, and might simplify the to

Re: Running a D game in the browser

2016-08-04 Thread Martin Tschierschke via Digitalmars-d-announce
On Wednesday, 3 August 2016 at 20:26:23 UTC, Sebastien Alaiwan wrote: Hi, I finally managed to compile some D code to asm.js, using Emscripten. [...] You can play a minimalistic demo: http://code.alaiwan.org/dscripten/full.html [...] Please let me know what you think! Fascinating!

Re: Running a D game in the browser

2016-08-04 Thread Suliman via Digitalmars-d-announce
Very cool! Is it's possible now to write not graphical Apps for web in D? I do not need graphics, but I need normal language instead of js that can help me to do some computation. For example is it's possible to write in D app that would validate some fileds in HTML and simply show (even on

Re: Running a D game in the browser

2016-08-04 Thread Sebastien Alaiwan via Digitalmars-d-announce
On Thursday, 4 August 2016 at 09:57:57 UTC, Mike Parker wrote: On Wednesday, 3 August 2016 at 20:26:23 UTC, Sebastien Alaiwan wrote: 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

Re: Running a D game in the browser

2016-08-04 Thread Mike Parker via Digitalmars-d-announce
On Wednesday, 3 August 2016 at 20:26:23 UTC, Sebastien Alaiwan wrote: 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) Reddit: https://www.reddit.com/r/programming/comments/

Re: Running a D game in the browser

2016-08-04 Thread Chris via Digitalmars-d-announce
On Wednesday, 3 August 2016 at 20:26:23 UTC, Sebastien Alaiwan wrote: 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 c

Re: Running a D game in the browser

2016-08-03 Thread Sebastien Alaiwan via Digitalmars-d-announce
On Thursday, 4 August 2016 at 05:03:17 UTC, Joel wrote: [snip] Though, it looks like the score isn't reset when you start a new game. Or, is it intended that way? Oh, I read it wrong, the score is reset. Dummy, me! It's just that you're becoming better at this silly game :-) Thanks for your

Re: Running a D game in the browser

2016-08-03 Thread Joel via Digitalmars-d-announce
On Wednesday, 3 August 2016 at 23:23:24 UTC, Joel wrote: On Wednesday, 3 August 2016 at 20:26:23 UTC, Sebastien Alaiwan wrote: Hi, I finally managed to compile some D code to asm.js, using Emscripten. Good work. [snip] You can play a minimalistic demo: http://code.alaiwan.org/dscripten/fu

Re: Running a D game in the browser

2016-08-03 Thread Mark J Twain via Digitalmars-d-announce
On Wednesday, 3 August 2016 at 20:26:23 UTC, Sebastien Alaiwan wrote: 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 c

Re: Running a D game in the browser

2016-08-03 Thread Joel via Digitalmars-d-announce
On Wednesday, 3 August 2016 at 20:26:23 UTC, Sebastien Alaiwan wrote: [snip] Please let me know what you think! Another thing, the sound effects are late.

Re: Running a D game in the browser

2016-08-03 Thread Joel via Digitalmars-d-announce
On Wednesday, 3 August 2016 at 20:26:23 UTC, Sebastien Alaiwan wrote: Hi, I finally managed to compile some D code to asm.js, using Emscripten. Good work. [snip] You can play a minimalistic demo: http://code.alaiwan.org/dscripten/full.html [snip] Though, it looks like the score isn't re

Re: Running a D game in the browser

2016-08-03 Thread Dechcaudron via Digitalmars-d-announce
On Wednesday, 3 August 2016 at 20:26:23 UTC, Sebastien Alaiwan wrote: I finally managed to compile some D code to asm.js, using Emscripten. I know virtually nothing about compilers and even less about Emscripten, but the fact that you managed to get a D game running inside a browser is plain

Re: Running a D game in the browser

2016-08-03 Thread Kai Nacke via Digitalmars-d-announce
On Wednesday, 3 August 2016 at 20:26:23 UTC, Sebastien Alaiwan wrote: 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 c