Pages: 1
  Print  
Author Topic: Compile to JavaScript  (Read 1377 times)
Offline (Unknown gender) royboyjoytoy2
Posted on: December 14, 2014, 08:37:23 AM
Member
Joined: Dec 2014
Posts: 1

View Profile
Do you think it would be possible to build games in JavaScript using https://github.com/kripken/emscripten ?
Logged
---------------------------------------------------
Been around since G-Java was first released.
Offline (Male) Josh @ Dreamland
Reply #1 Posted on: December 14, 2014, 11:04:57 AM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2949

View Profile Email
We've done so, actually. A long time ago. Unfortunately, the contributor base is spread too thin, as it is. The bigger problem at the time was that the compiler made it difficult to support C++ and JavaScript concurrently. That's since been mostly corrected, and I have been pushing out changes lately that improve the situation. I wouldn't get my hopes up for a JavaScript port renaissance in the near future, though.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Unknown gender) TheExDeus
Reply #2 Posted on: December 14, 2014, 11:47:30 AM

Developer
Joined: Apr 2008
Posts: 1872

View Profile
We also considered using LLVM for this, but the idea died. I guess we didn't want to switch compilers at that point (it would probably involve us switching to Clang). The one Josh talks about was actually an ENIGMA engine made in JS, for which game code was converted from EDL/GML to JS instead of C++. I think compiling to asm.js via Emscripten would create a lot faster code, than writing the whole thing in pure JS. Technically we could try that, but right now the biggest problem is that we don't have GLES support. Emscripten converts GLES to WebGL (which is essentially GLES), so it wouldn't probably convert our GL3 graphics system.
Logged
Offline (Unknown gender) Wendigo
Reply #3 Posted on: October 11, 2015, 05:39:58 AM
Member
Joined: Apr 2015
Posts: 42

View Profile
Sorry for digging out this old topic again but I'm interested in the state of EnigmaJS.
Somewhere I read that it was more or less a proof of concept. I recently downloaded the IDE and tried to run a project with a simple sprite on screen without any logic.
But the compilation progressbar stopps after about 1/10th of length. "writing game to html5"
Did you actually get so far as to make it compile something or is the fault on my side?
Logged
Pages: 1
  Print