Closed czyzby closed 7 years ago
Those support GWT? Since they have C++ code I could embed C++, but that would prevent Javascript code to work. Is there a portable pure-java implementation for those?
No, they do not. I think both have unofficial GWT ports, but they most likely use native JS code or C(++) transpiled to JS. I don't think an official pure Java solution is available, although there seems to be a Bullet Java port.
The best way would be integrating the native dependencies, generating c++ and then using emscripten to target the web.
There is no any LLVM to JVM compiler? That should be relatively easy and with java.nio it is possible. And would allow to compile C++ into JVM. The problem with emscripten is that I would have to do for each non c++ target, while the other approach would work everywhere for example generating flash, php, python, lua among others.
Maybe this one or similar? https://github.com/davidar/lljvm
I was able to get it working. For the record:
https://hub.docker.com/r/mhaye/lljvm/ https://github.com/davidar/lljvm/pull/5
docker run -t -i mhaye/lljvm /bin/bash
cd /usr/local/src/testProg && lljvm-cc test.c -o test && java test
Hello world.
It generates a test.class
I copied it outside docker and downloaded the runtime:
docker ps
docker cp a88549c3609e:/usr/local/src/testProg/test.class test.class
wget https://github.com/davidar/lljvm/releases/download/0.2/lljvm-0.2.jar
java -cp .:lljvm-0.2.jar test
So I created this repository: https://github.com/jtransc/java-freetype
Build script fails, but it is a begining: https://github.com/jtransc/java-freetype/blob/master/build.sh
./build.sh
rm: lljvm.cid: No such file or directory
In file included from /project/src/base/ftapi.c:20:
In file included from /project/include/freetype/ftlist.h:32:
In file included from /project/include/freetype/freetype.h:34:
In file included from /project/include/freetype/config/ftconfig.h:43:
In file included from /project/include/freetype/config/ftstdlib.h:60:
In file included from /usr/local/lib/lljvm/include/newlib/limits.h:130:
/usr/local/lib/clang/1.1/include/limits.h:35:15: fatal error: 'limits.h' file not found
#include_next <limits.h>
^
1 diagnostic generated.
I completely forgot - there's also gdx-pay, which is a definitely important extension. A cross-platform way of adding ads (for example) to your games is crucial, imho.
We could use: http://lib.haxe.org/search/?v=iap https://github.com/openfl/extension-iap
It should be pretty easy with @HaxeAddLibraries
+ @HaxeMethodBody
Please create 1 ticket for 1 bug/feature, i create #76 for iap in iOS as first tested platform. Bullet i think need support, after anybody will have real project for test. Freetype already supported on haxe. If need more create new ticket. Close this zombie ticket =)))
gdx-pay
.There are currently 4 official extensions with native dependencies: Box2D, Controllers, Bullet (3D physics) and Freetype (TTF font support). The first two are already supported by
gdx-backend-jtransc
, which is great. Bullet is specific to 3D games (which are far less common than LibGDX 2D games), so it can be put on hold - but the Freetype and Pay extensions support would certainly be beneficial.