|
Allegro 4.4.2 to JS using emscripten |
eri0o_
Member #16,808
February 2018
|
Has someone managed to do it? Is there any step by step guide? Looking around I did found some resulting demos in JS that shows it's possible, but no one wrote anywhere how to do it. In some cases the person alluded they would write about it in the future, but I never found any text about it. I tried by myself but wasn't successful. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Max Savenkov was our emscripten experimenter. But he was using Allegro 5. I don't know anyone that did it with Allegro 4. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
ks
Member #1,086
March 2001
|
Incidental but may be of value: http://allegrojs.net/
|
gillius
Member #119
April 2000
|
Part of the reason I made https://github.com/gillius/jalleg (Java binding for Allegro) is that in addition to Java, there are many other languages that run in JVM, including multiple implementations of JS. I had JS specifically in mind as well due to its popularity now. Since I came up with jalleg, GraalVM exists now, which offers a dramatically more compelling use case. Firstly, GraalVM allows compilation of Java to native code that can run without JRE installation on Linux amd64 instruction set. It also includes a JS implementation that supposedly meets or exceeds that of nodejs (V8) in terms of performance. GraalVM can natively JIT LLVM the same way that it handles JVM bytecode, which means even when not using native compilation mode, that it is possible to communicate between Java/JVM languages and LLVM-compiled C code with no FFI at all, allowing completely overhead-free interaction between Java and Allegro. JAlleg is actually a JNA binding to Allegro, so by itself doesn't enable the native compilation or integration without FFI... However, GraalVM's performance as a direct JVM replacement exceeds Hotspot (default JVM) and still includes the high-performance JS implementation so even without any work you can still benefit to some speed increase and JS integration. If someone can figure out how to compile Allegro to LLVM, then theoretically you can load Allegro like any other library into Java. I haven't figured out yet what the equivalent is for header files though which is the other half of jalleg (defining Java interfaces that define Allegro native calls). Gillius |
Elias
Member #358
May 2000
|
For Allegro 5 running in a browser is more or less officially supported (using emscripten and the SDL2 port), the PR mentioned in that thread has since been merged: -- |
|