Closed source love2d games...

General discussion about LÖVE, Lua, game development, puns, and unicorns.
herrybiscuit
Prole
Posts: 5
Joined: Mon Dec 15, 2014 8:37 pm
Contact:

Closed source love2d games...

Post 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.
User avatar
Azhukar
Party member
Posts: 478
Joined: Fri Oct 26, 2012 11:54 am

Re: Closed source love2d games...

Post by Azhukar »

User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: Closed source love2d games...

Post by s-ol »

Azhukar wrote:Welcome to 2010.
That can be easily extracted though. At least when you figure out its love2D.
Last edited by s-ol on Tue Dec 16, 2014 1:30 am, edited 1 time in total.

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
herrybiscuit
Prole
Posts: 5
Joined: Mon Dec 15, 2014 8:37 pm
Contact:

Re: Closed source love2d games...

Post 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.
User avatar
Azhukar
Party member
Posts: 478
Joined: Fri Oct 26, 2012 11:54 am

Re: Closed source love2d games...

Post 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.
herrybiscuit
Prole
Posts: 5
Joined: Mon Dec 15, 2014 8:37 pm
Contact:

Re: Closed source love2d games...

Post 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).
Attachments
poc.zip
Proof of concept
(2.8 MiB) Downloaded 180 times
User avatar
zorg
Party member
Posts: 3444
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Closed source love2d games...

Post 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.
Me and my stuff :3True 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.
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: Closed source love2d games...

Post 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.

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
User avatar
Azhukar
Party member
Posts: 478
Joined: Fri Oct 26, 2012 11:54 am

Re: Closed source love2d games...

Post 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. :crazy:

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.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Closed source love2d games...

Post by Robin »

Minor point: this thread is about hidden source, not closed source. Everything that falls under copyright law is closed source by default.
Help us help you: attach a .love.
Post Reply

Who is online

Users browsing this forum: No registered users and 226 guests