Hi
i have been studying the topic of compiling lua and I have a couple of questions
1) What's the difference between luaJIT and luaC? Which one's better?
2) I'm using zero bane studio (windows) which has LOVE in it. Should there be also luaJIT somewhere?
3) Can the lua decompilers exes be downloaded from somewhere? I have only found couple (luajit-decomp, luadec) from here but didn't know how to use the luajit-decomp. And haven't got any luck trying to build one from sources
4) Is it possible to have part of your code compiled and rest not, so you can enable modding?
Edit: Another question
thanks!
Lua encoding
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Lua encoding
1. LuaC is the PuC version's compiler; LuaJIT is by Mike Pall. The former is only for compiling your lua scripts into bytecode that can be loaded in faster, but it won't get faster execution speeds. LuaJIT is a just-in-time compiler for lua, and what Löve uses by default; It also has facilities to pre-compile lua scripts into bytecode giving you the similar faster load speeds but again, not execution speeds. (LuaJIT is faster in most cases than PuC Lua though)
2. Löve already comes with LuaJIT by default.
3. Dunno, but don't expect the same quality from machine-decompiled content.
4. Yes, but mods can also be compiled of course... thing is, they would need to be compiled with the same lua version löve came with in your project you distributed for those to work that way.
2. Löve already comes with LuaJIT by default.
3. Dunno, but don't expect the same quality from machine-decompiled content.
4. Yes, but mods can also be compiled of course... thing is, they would need to be compiled with the same lua version löve came with in your project you distributed for those to work that way.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Lua encoding
The first definitely, compared to PuC lua, LuaJIT can run stuff way faster (I think i saw benchmarks for specific things that got executed almost as fast as C code); as for the other, not sure whether you can do it through löve or not, but of course, luaJIT also has a way to (pre-)compile files into bytecode... which, again, should be stated that the only reason you'd ever want to do that would be to speed up code loading times.
Last edited by zorg on Mon Oct 07, 2019 9:44 pm, edited 1 time in total.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: Lua encoding
Everything can be decompiled so don't worry about it. If you're worried that someone will steal your great software invention - don't oversell yourself. It will at best be something that million other people already did and millions more will do without your input. There's nothing you can come up with that will be of any interest to other people.
Re: Lua encoding
Thanks everyone for your replies!
I was hoping that even decoded, the source code would be obfuscated which would discourage anyone to make couple of changes and uploading it as he's own. It's not ideal protection but all I can do
Plus the license which everyone talks about
Well that's encouraging
I was hoping that even decoded, the source code would be obfuscated which would discourage anyone to make couple of changes and uploading it as he's own. It's not ideal protection but all I can do
Plus the license which everyone talks about
Re: Lua encoding
Well that's literally what crackers and hackers do so you can't hope to stop people or even meaningfully impede them. And when someone wants to rip you off, they wouldn't even use any of your stuff, they'll just make a close enough copy. Again, don't worry about it.
Re: Lua encoding
Some game companies release their source code after a while. Some of them are big titles. But I don't remember any notable project using their source code.
So releasing the source code might be the best way to discourage people who are constantly trying to steal your code.
So releasing the source code might be the best way to discourage people who are constantly trying to steal your code.
Re: Lua encoding
My projects are always so big I would like to have some protection. Then after some time after the release I could release the code so people can mod it but at start I would like to have the source closed. Or partly open source, for modding.
I tried luajit to compile lua file but love couldn't read the compiled file
I tried luajit to compile lua file but love couldn't read the compiled file
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Lua encoding
I think i mentioned it previously, but you need to use the same version of LuaJIT that the Löve version you have uses.Coder567 wrote: ↑Wed Oct 09, 2019 11:41 am My projects are always so big I would like to have some protection. Then after some time after the release I could release the code so people can mod it but at start I would like to have the source closed. Or partly open source, for modding.
I tried luajit to compile lua file but love couldn't read the compiled file
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Who is online
Users browsing this forum: No registered users and 1 guest