sskj Posted April 9, 2015 Share Posted April 9, 2015 Hi Boris, I have been trying to compile latest version of v8 and came across your post onstackoverflow.com. I made the changes which worked for you but i still see errors when i compile with my android jni code.api.cc:function v8::CheckConstructor(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSObject>, char const*): error: undefined reference to 'V8_Fatal':: libv8_base.a(runtime-i18n.o):runtime-i18n.cc:function v8::internal::Runtime_GetLanguageTagVariants(int, v8::internal::Object**, v8::internal::Isolate*): error: undefined reference to 'uloc_getBaseName_54': libv8_base.a(runtime-test.o):runtime-test.cc:function v8::internal::Runtime_AbortJS(int, v8::internal::Object**, v8::internal::Isolate*): error: undefined reference to 'v8::base::OS::Abort()' Would really appreciate your help on this!! Thanks!! Quote Link to comment Share on other sites More sharing options...
lucked Posted June 11, 2015 Share Posted June 11, 2015 how can i export for android? my js games? Quote Link to comment Share on other sites More sharing options...
Boris van Schooten Posted September 4, 2015 Author Share Posted September 4, 2015 Finally got round to publishing gles.js. It's now available on github! https://github.com/borisvanschooten/glesjs Quote Link to comment Share on other sites More sharing options...
PixelPicoSean Posted September 5, 2015 Share Posted September 5, 2015 @Boris van Schooten can you provide some examples? I cloned the code and built successfully, but I can only see black screen without anything. I put a index.html and pixi.js and some code to display a sprite at the center. It should work like you've posted in your page. Quote Link to comment Share on other sites More sharing options...
BdR Posted April 3, 2016 Share Posted April 3, 2016 I tried to get gles.js to work using Android Studio (v1.5.1) and I just want to try a simple pixi demo to see if I can get this working. However, I ran into some problems. Here's what I tried: First, open Android Studio and import the project (as downloaded from github) Then build and run and I got a Gradle error "NDK integration is deprecated in the current plugin" which was solved after adding a file gradle.properties with content "android.useDeprecatedNdk=true" to root of project (answer found here) Tried to run again, but get a console error "Error opening directory '/mnt/sdcard/.android_secure/', skipping: Permission denied." so I add to AndroidManifest.xml: <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> I also got this error at one point but that somehow went away again: 04-03 11:48:35.678 275-379/system_process E/ThrottleService: problem during onPollAlarm: java.lang.IllegalStateException: problem parsing stats: java.io.FileNotFoundException: /proc/net/xt_qtaguid/iface_stat_all: open failed: ENOENT (No such file or directory) Then I got an error that it can't find "ndk-build.cmd" So I downloaded the NDK which is about 700+ MB (note: the NDK can't be installed via the Android SDK Manager) and paste into the directory C:\Users\JohnDoe\AppData\Local\Android\sdk\ndk-bundle and in file local.properties I add a line: ndk.dir=C\:\\Users\\JohnDoe\\AppData\\Local\\Android\\sdk\\ndk-bundle But now I'm stuck with an error in main.cpp "android_native_app_glue.h: No such file or directory" I think only the libglesjs.so needs to be added to the project, but looking at the instructions here I can't make heads or tails of it.. Anyone here who is familiar with Android Studio ? Quote Link to comment Share on other sites More sharing options...
BdR Posted April 11, 2016 Share Posted April 11, 2016 (edited) I've managed to get it working in Android Studio I've uploaded the Android Studio project to github. However, I run into an issue with the touch input, the dude in my example just moves up and down when I swipe left and right. But when I swipe up and down doesn't move, the x position never changes and is always 100..? Does anyone have any ideas or know how to fix this? EDIT: Never mind, I was accidentally using an older html5.js from the PhaserExampleInvaders.apk example, which still had function _mouseMoveCallback(x,y) { instead of function _mouseMoveCallback(ptrid,x,y) { Edited April 12, 2016 by BdR Accidentally was using an older html5.js version from PhaserExampleInvaders.apk Quote Link to comment Share on other sites More sharing options...
BdR Posted April 13, 2016 Share Posted April 13, 2016 On 7-7-2014 at 11:15 PM, Boris van Schooten said: Finished coding basic support for DOM, input, and sound, and a few more GL bindings. I just got my first game running on it! Check out the APK on the website. At the moment I'm trying to get sound working in GLESJS, but it keeps either not playing the sounds or crashing the app. At first I added audio tags to index.html and then loading them, but that didn't work. <audio id="forcefield" preload="auto" type="audio/wav"> <source src="snd/forcefield.wav" type="audio/wav"/> </audio> // and then load it like this: soundForcefield = new Audio('forcefield'); //soundForcefield = new Audio('snd/forcefield.wav'); // same effect Then I saw your TsunamiCruiser apk file and I added JGAudio.js to my project, but that also crashes. // first load sound in prefloader JGAudio.load('forcefield', 'snd/forcefield'); // and then later play it JGAudio.play('forcefield'); When I call soundForcefield.play() or JGAudio.play('forcefield') it crashes the entire app, and gives this error: E/dalvikvm: JNI ERROR (app bug): accessed stale local reference 0x32b00005 (index 1 in a table of size 1) E/dalvikvm: VM aborting A/libc: Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1), thread 17169 (Thread-10633) I have no idea what I'm doing wrong, because when I run the same thing in my browser (Chrome on Win8.1) it runs fine with sound. I've updated my github example but with the .play line disabled for now.https://github.com/BdR76/GLES.JS-Android-Studio-project Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.