Page 1 of 5
Closed source love2d games...
Posted: Mon Dec 15, 2014 9:03 pm
by herrybiscuit
Closed source love2d games are possible and i have done it with the magical powers of C++ (which i have been programming in for 3 years now). A basic rundown of how to do it is
1. grab source code
2. throw the lua code in it
3. edit some code
4. compile the love
the only reason why i am not making a full tutorial here is because this forum post would be many many many pages long. however i did make a full tutorial on my site
http://herry.zerobiscuit.com/love2d-2/h ... ows-part1/. By the way i am very sorry for mac and linux users i don't have mac or linux machine only windows. Also, sorry for the self promotion but i felt i needed to spread my knowledge with the love2d community.
Re: Closed source love2d games...
Posted: Mon Dec 15, 2014 9:36 pm
by Azhukar
Re: Closed source love2d games...
Posted: Mon Dec 15, 2014 9:51 pm
by s-ol
That can be easily extracted though. At least when you figure out its love2D.
Re: Closed source love2d games...
Posted: Mon Dec 15, 2014 9:52 pm
by herrybiscuit
the only issue with creating the merged executable is that someone could open it with 7-zip and get the source code. the method that i made avoids it completely.
Re: Closed source love2d games...
Posted: Mon Dec 15, 2014 10:56 pm
by Azhukar
I find it amusing you believe lua bytecode conversion is any more protective than the append method.
Granted you will discourage non-programmers from accessing your code, similar to adding a color warning for the blind.
Re: Closed source love2d games...
Posted: Tue Dec 16, 2014 12:21 am
by herrybiscuit
Azhukar wrote:I find it amusing you believe lua bytecode conversion is any more protective than the append method.
Granted you will discourage non-programmers from accessing your code, similar to adding a color warning for the blind.
If you talking about the part when we use auto.lua to convert the lua code to a byte array in a .lua.h file then its not left out in the open when you compile it. when you compile a c++ program especially with visual studio it becomes impossible and impracticable to decompile it. even if you manage to decompile love2d you will get back a massive assembly code file that will not even resemble the original code. i have left a proof of concept in the attachments without the source code. if you give up on trying to get the src then ill give it to you (i built it in vs so it, i think, will only work on windows).
Re: Closed source love2d games...
Posted: Tue Dec 16, 2014 2:12 am
by zorg
herrybiscuit wrote:when you compile a c++ program especially with visual studio it becomes impossible and impracticable to decompile it.
Impractical, sure, but not impossible; there are cracks for many softwares, including games, that range from disabling copy protection to enabling cheating, and the people making/doing these are pretty much experienced in these things. People who have an affinity for disliking closed source things will dismantle them if it piques their interest, nothing anyone can do about that...
herrybiscuit wrote:even if you manage to decompile love2d you will get back a massive assembly code file that will not even resemble the original code.
...and they won't care how your code looked before, they'll use the output to see how the code works, and edit it to their needs.
Still, in my opinion, i don't see the need to obfuscate a game's (made with löve, at least; not some AAA title that runs on $$$) source code, nor any assets for two separate reasons;
1. as i said, if someone wants to, and has some gumption, they will be able to get at least similar code through reverse-engineering.
2. assets can be recorded through various means.
Re: Closed source love2d games...
Posted: Tue Dec 16, 2014 2:52 am
by s-ol
zorg wrote:herrybiscuit wrote:when you compile a c++ program especially with visual studio it becomes impossible and impracticable to decompile it.
Impractical, sure, but not impossible; there are cracks for many softwares, including games, that range from disabling copy protection to enabling cheating, and the people making/doing these are pretty much experienced in these things. People who have an affinity for disliking closed source things will dismantle them if it piques their interest, nothing anyone can do about that...
herrybiscuit wrote:even if you manage to decompile love2d you will get back a massive assembly code file that will not even resemble the original code.
...and they won't care how your code looked before, they'll use the output to see how the code works, and edit it to their needs.
Still, in my opinion, i don't see the need to obfuscate a game's (made with löve, at least; not some AAA title that runs on $$$) source code, nor any assets for two separate reasons;
1. as i said, if someone wants to, and has some gumption, they will be able to get at least similar code through reverse-engineering.
2. assets can be recorded through various means.
Well, if you want to control distribution a tiny bit then doing something like this might be worth it.
Re: Closed source love2d games...
Posted: Tue Dec 16, 2014 4:09 am
by Azhukar
herrybiscuit wrote:if you give up on trying to get the src then ill give it to you (i built it in vs so it, i think, will only work on windows
I gave up after a few minutes. I admit it obfuscates things better than I imagined, I still don't believe it will discourage someone motivated to make a crack. But it did discourage me from hacking through to a spinning rectangle.
What I did learn about it in the few minutes was that it's in a well documented PE format that I do not wish to dwell into, but I'm guessing extraction tools for its contents exist. Which means strings like luajit bytecode files and your assets. 7-zip seems to be able to extract sections from it.
Re: Closed source love2d games...
Posted: Tue Dec 16, 2014 9:46 am
by Robin
Minor point: this thread is about hidden source, not closed source. Everything that falls under copyright law is closed source by default.