Hi guys,
Have you used LuaJit with Gideros and, if so, was the effort worth the performance increase in your case? I'd love to hear details about what kind of game you used it in, and exactly how it improved the performance.
http://giderosmobile.com/labs/luajitCheers,
Niclas
Comments
https://deluxepixel.com
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
I'm not going in head first because adding something magical like LuaJIT adds another question mark if when troubleshooting issues.
There is only one requirement in coding I am aware of (you don't need to change it back , works in plain lua too) it's stated somewhere in this forum: if I recall it correctly it was something about function arguments like in
function myfunc (...) usage - which I've never used personally because I didn't understood how to use it.. but is there in some lua lib that you may load
I'm sorry I can't check this right now without laptop nor wifi: search the forum for luajit and my notes (if I am right it was in a post from gregbug about tnt particle system)
At this time in my game luajit it's not so worth (longer loading time, everything is a bit smoother, but on a single multiple pathfinding action there is a loong delay - I use jumper, but I suppose it's my fault since I use jumper in other actions and I don't have such delays. Plus, I'd like to support also older devices, every delay on these is doubled and there was no appreciable improvement overall).
I've not given it up though, it does seem to increase performance on newer devices, not tested thoroughly yet. maybe in a near future I'll think about it again.
@keszegh I can use json along with luajit and it's not crashing (android 4.4) I believe the "damage" is somewhere else in what you do with loaded data (or some "coding requirement" - see above)
Hope this helps
Likes: ar2rsawseen
well, if localization is necessary then that might be an issue for me too, i have plenty of functions without localizing the arguments. on the other hand jit version of windows player seems to be working fine with the same project.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Likes: pie
is luajit working with android fine for everybody?
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
I don't remember editing any file on your list for this issue, I used them all.
If I recall correctly I had issues (easily solved) with the following libs and luajit:
progressbar by @ar2rsawseen
An outdated release of tnt particle system (latest already fixed)
And, to use Tnt animator by @gregBUG with luajit you need its source file
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Installation mobiles
Prerequisites
To make mobile project work with LuaJIT you need to make some changes to Gideros Installation and reexport the project's assets again
Windows installation
Mac OSX installation
Android
Copy libs folder from luajit folder into your exported project overriding existing liblua.so files
IOS
Copy liblua.a from luajit folder into your xCode's project folder overriding existing liblua.a
of course I read only the 'android' part and did not realize that the 'windows installation' part also has to be done for exporting to android properly.
now that it works this way, I realize that it's a slight drawback with luajit that the lua files are completely exposed (encrypting is also not possible of them while using luajit). it's a bit more surprising for me that also the asset files cannot be encrypted - if i encrypt, then again it is not working. so everything is exposed.
this may be enough for me to stay with plain lua as the performance gain might not be needed for me.
@ar2rsawseen, @pie, thanks for your help
Fragmenter - animated loop machine and IKONOMIKON - the memory game
(for me it did not work, but it's hard to check when am i running what in eclipse, so i will try more then, perhaps i messed up something else)
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Other than that I'd say everything is faster - no complaints here.
On a side note, the encryption with Gideros needs to be revisited as it's pretty easy to auto hack it out.
https://deluxepixel.com
Likes: SinisterSoft
Of course - I don't know how the framework stores lua code in memory. If you load an apk in an emulator and take a memory dump - how easy is it to access the original code even if it was encrypted?
Access to source code may not be that important to some, except for retrieval of private keys used for encryption/public api access, etc.
If you use luaJit, then today I can take your apk and recreate your exact project with original source lua+all assets. If you don't, it's more time consuming because I have lua byte code to deal with, some of which cannot be automatically decompiled.
Likes: SinisterSoft
https://sites.google.com/site/xraystudiogame
@EricCarr Lua files have a header, so do other picture files - using this it's possible to figure out the XOR as it's too short before it repeats (it's about the same size as the Lua header that never changes!).
https://deluxepixel.com
https://github.com/gideros/gideros
https://www.youtube.com/c/JohnBlackburn1975
Niclas
One thing is for sure - the existing method needs to be changed.
https://deluxepixel.com