If you use the lua jit plugin then your code will execute much faster. The problem is that it's exported as source code if you use the normal plugin.
I've written a patch that ouputs LuaJIT bytecode.
I've tested it and it seems to work fine on my latest project.
Just copy the files in the zip folder to your Gideros folder, it will overwrite some files - don't panic
.
Then create a new project and it will use luajit bytecode rather than lua bytecode.
If you have an existing project then you need to update your libs (see the libs\android folder in the zip) to luaJIT versions.
http://www.sinistersoft.com/downloads/luajit_patch.zip
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
https://deluxepixel.com
Comments
https://deluxepixel.com
Likes: SinisterSoft
Here is a Youtube video of the Dungeons game multiplayer test on a mobile phone...
https://deluxepixel.com
It shows on my tablet but since its android it doesn't do I flash player LOL. I will watch it on the dining room PC in the morning.
Likes: SinisterSoft
@ ABORTING: INVALID HEAP ADDRESS IN dlfree addr=0x51adec90
A/libc(10281): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1)
I am using gideros 2014.10
I tried the 2 main projects I am working on:
the biggest one doesn't even load (the player crashes instantly)
the other one runs until I reload a scene, then the player crashes.
If I export and compile a debug apk of the biggest project, it seems to run fine (faster than "base" luajit on this one ) I still have to test it thoroughly, maybe it is still going to crash later (hope not... %%- )
Didn't try compiling a test apk for the other one yet.
This is what I did to build jit gideros player:
export blank project
remove assets folder
overwrite libs directory with libs from the patch zip inside Android Template
import in eclipse
run
-------------------------
Any suggestion about those errors? Thank you
Likes: ar2rsawseen, SinisterSoft, pie
It might be something in your program that is unrelated but is showing up because of the way LuaJIT works. EG if somehow memory is getting corrupted or is leaking then the interpreter might work slightly differently than the JIT compiler.
You can turn off the JIT compiler by putting this at the start of your code:
jit.off()
In interpreter mode it still runs faster than standard Lua.
Do you include any other libs that are not in the standard Gideros build?
I'm using Gideros Update 2015.04.18 btw.
https://deluxepixel.com
jit.off() won't help and updating gideros neither (got the same error).
BUT, if I compile my projects as standalone debug apk I don't get the errors.. I have to test those carefully to be sure, but no problem so far, with a quick test of both.
The small project is running a bit smoother than without jit, the bigger one is keeping up pace with precompiled lua (as said before, faster than with "base" luajit)
I don't include external libs, just lua libs (like giderosCodingEasy, tntparticle.. ).
The thing is: Gideros without ondevice wifi testing is a bit 3:-O
I still can test on desktop, but It's not the same thing to check game performance.
I don't think to have memory leaks, and if I had some, I believe I should have had at least the same errors and FC in the compiled apks (but nothing crashed so far..)
thank you
http://docs.giderosmobile.com/deployment.html
check device player with plugins
Likes: SinisterSoft
I test on Android with a player made using the method @ar2rsawseen described.
https://deluxepixel.com
however, still no luck..
I just include luajit from @SinisterSoft as an external plugin, no other tampering with exported project.
If I send my source through wifi I get the deadbaad error I posted before, if I compile as debug apk the entire project runs fine. Maybe it has to do with incomplete loading of resources? I am guessing.. Can you think of any way to narrow down my bug search?
I can "workaround" this, using non jitted gideros to make my tests and development, and then exporting the project with jitted Gideros for publishing.. still it's a bit of a pain, mostly because if luajit would ever generate some bug, I would know it only after compiling with eclipse and testing it on device.
Another chance is that I am doing something wrong while building the jitplayer, could please someone give me a "working" jitted one to make a try?
Thank you very much!
https://play.google.com/store/apps/details?id=com.sinistersoft.savethemartians
It uses the same luajit lib and is a production apk (the same as a player but with the assets folder filled in with stuff).
Please let me know if it crashes on your phone.
https://deluxepixel.com
https://dl.dropboxusercontent.com/u/17120564/jitplayer.apk
These are the files that made it:
https://dl.dropboxusercontent.com/u/17120564/jitplayer.zip
https://deluxepixel.com
Save the martians works perfectly on my device, as well as my jitted apk apps do, while I have the same errors with your jitplayer.
At least I am sure that it's something in my project, but I don't have a clue to backtrace it - and still my question remains:
why there is no error if I export my project and compile it with eclipse - even if jit is enabled - but wifi testing on the "same player with empty assets" rise the deadbaad?
:-?
https://deluxepixel.com
I don't know if it was fixed. But if it wasn't then it would make jit go wrong.
Try commenting out your print() messages - see if it goes wrong then.
Likes: pie
https://deluxepixel.com
So I guess there still is some issue in print function - which unfortunately I use a lot for debugging purposes.. at least is something to start from
Thank you very much!
with your player my android dialogs are transparent.
see:
https://github.com/gideros/gideros/issues/56#issuecomment-96418185
can you tell us what is the targetsdk for your compiled apk?
Fragmenter - animated loop machine and IKONOMIKON - the memory game
I've added it to the github list of issues...
@keszegh api 19 is the target (from what I remember - but it might have been higher - it was whatever is output default).
Likes: pie
https://deluxepixel.com
thanks for the info. strange.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
https://deluxepixel.com
Fragmenter - animated loop machine and IKONOMIKON - the memory game
I always use custom players.
https://deluxepixel.com
Fragmenter - animated loop machine and IKONOMIKON - the memory game
https://deluxepixel.com
https://deluxepixel.com
https://deluxepixel.com
I can't wait to try the next release with all these bug fixes
=D>