Hi,
Let me explain myself. I will release in the next months a game commercially. I need a way to encrypt or to simply make an executable that won't be disassemblable.
I mean, when you simply "copy /b love.exe+game.love game.exe" the resulted binary can be easily disassembled into pieces and one of them is a zip compressed ensemble of lua files, which is the game source code.
I want a way to make such actions impossible. Any known ways of doing so?
I'd also need the solution to be possible on all platforms (Windows, OS X and Linux).
Thanks very much and have a nice day!
Any way to build a non-disassemblable executable?
-
- Party member
- Posts: 235
- Joined: Sat Dec 15, 2012 6:54 am
Re: Any way to build a non-disassemblable executable?
AFAIK this is not possible, or if it is then it won't be easy. If open source is an issue for you or your project, I would recommend not using LOVE, or Lua in general.tomshreds wrote:Hi,
Let me explain myself. I will release in the next months a game commercially. I need a way to encrypt or to simply make an executable that won't be disassemblable.
I mean, when you simply "copy /b love.exe+game.love game.exe" the resulted binary can be easily disassembled into pieces and one of them is a zip compressed ensemble of lua files, which is the game source code.
I want a way to make such actions impossible. Any known ways of doing so?
I'd also need the solution to be possible on all platforms (Windows, OS X and Linux).
Thanks very much and have a nice day!
Here are some more threads on the topic:
viewtopic.php?f=4&t=9084
viewtopic.php?f=3&t=2646
viewtopic.php?f=4&t=6989
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Any way to build a non-disassemblable executable?
Nothing is unbreakable. If someone really wants to disassemble or decompile or crack something bad enough, they will find a way. No matter how hard you make it. You can obfuscate. You can luac. You can hide things away. But if someone wants to see your source, they will one way or another.
Re: Any way to build a non-disassemblable executable?
So here's the deal: Love loads data from the end of the exe file, because Zip files don't have a header, they have a footer. One file can double as two, and that's what gets exploited. So anyone can rename your exe to a zip and get access to the contents. So, all of the artwork is up for grabs. As for the code, you have the program luac, which can stamp out lua source files as a compiled lua binaries. That will mostly help, but anyone can theoretically use a disassembler on that to get back a reasonably similar source file. Java and regular C aren't immune to this either, just for the record. Also, the compiled binary files are version locked to Lua 5.1 and Love 0.8.
So, tl;dr:
1. Art can't be protected, people can unzip the png and jpg files.
2. Source code can be compiled, but are locked to Love 0.8 and won't work in future versions of Love.
So, tl;dr:
1. Art can't be protected, people can unzip the png and jpg files.
2. Source code can be compiled, but are locked to Love 0.8 and won't work in future versions of Love.
Re: Any way to build a non-disassemblable executable?
You are so much right. I was focusing on protecting the code, but the important part to protect is all the game's art. I've got many spritesheets and animation sheets that I need protected.Inny wrote:So here's the deal: Love loads data from the end of the exe file, because Zip files don't have a header, they have a footer. One file can double as two, and that's what gets exploited. So anyone can rename your exe to a zip and get access to the contents. So, all of the artwork is up for grabs. As for the code, you have the program luac, which can stamp out lua source files as a compiled lua binaries. That will mostly help, but anyone can theoretically use a disassembler on that to get back a reasonably similar source file. Java and regular C aren't immune to this either, just for the record. Also, the compiled binary files are version locked to Lua 5.1 and Love 0.8.
So, tl;dr:
1. Art can't be protected, people can unzip the png and jpg files.
2. Source code can be compiled, but are locked to Love 0.8 and won't work in future versions of Love.
I wonder if I could code some kind of C++ process wrapper that would keep user away from the zip archive... Argh and I need it to work for OS X too.
That's a shame, I don't really care if people look at the code. But the arts must stay private...
Woah, that's going to be a fun ride. I really don't want to get my characters stolen by others. Maybe I'm overthinking this.
CaveStory must have found a way? I mean it's the only other commercial love-based title there is right?
EDIT: I downloaded the original (japanese) and it's not even a love game? Already had Cave Story++ but it uses C++/SDL and not love. Where's the love version?
EDIT2: I read on https://love2d.org/wiki/LuaC that LuaC isn't recommended. Then is there any way of securing the code?
Anyways, I just thought about it and almost any games have ressources accessible by the public. So I guess this isn't the end of the world... If I see somebody using my stuff I'll just tell them...
Thanks
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Any way to build a non-disassemblable executable?
Nope.tomshreds wrote:I've got many spritesheets and animation sheets that I need protected.
Nope.tomshreds wrote:I wonder if I could code some kind of C++ process wrapper that would keep user away from the zip archive... Argh and I need it to work for OS X too.
Nope.tomshreds wrote:But the arts must stay private...
You can't "protect" your art with any technical measure. Not if you want anyone to actually play your game. Because to play the game, the art has to get "unprotected" so it can be drawn on the screen. This has nothing to do with Lua, C++, OS X, or LÖVE. It's inevitable.
Let me ask you a question: why would it be bad if your art gets "stolen"? What would they do with it? And why would it be bad for you?tomshreds wrote:Maybe I'm overthinking this.
Same "Nope. Nope. Nope." story.tomshreds wrote:Then is there any way of securing the code?
That's a good and mature way to handle this. I wish I read this far before replying. Ah, well.tomshreds wrote:Anyways, I just thought about it and almost any games have ressources accessible by the public. So I guess this isn't the end of the world... If I see somebody using my stuff I'll just tell them...
Help us help you: attach a .love.
-
- Party member
- Posts: 235
- Joined: Sat Dec 15, 2012 6:54 am
Re: Any way to build a non-disassemblable executable?
Generally, the art of a game is something that is protected the least. Many professional games leave it out there, easy to get there. A lot of games have the art in some sort of compressed file (e.g. the WADs and Paks of the Doom and Quake series), but the developers often (usually?) provide the tools to get to them. And even if the art is protected in some way, it's usually the easiest thing to "steal" in some usable form.
Just make a good game: a game so good that people would rather player your version than a copy/clone. Sure, there's always the chance that someone might steal your code for their own game, but...who cares? Or do you plan on selling what you make?
As far as Cave Story, I'm pretty sure that it wasn't made with LOVE. It was released in 2004 (which I think predates LOVE?), and according to the developer it was in development for about 5 years before release, so he started making it some time in 1999 (which definitely predates LOVE). But yeah, it wasn't made with LOVE.
There could be a fan remake of Cave Story or something made with LOVE, but a search of these forums doesn't bring anything up.
Just make a good game: a game so good that people would rather player your version than a copy/clone. Sure, there's always the chance that someone might steal your code for their own game, but...who cares? Or do you plan on selling what you make?
As far as Cave Story, I'm pretty sure that it wasn't made with LOVE. It was released in 2004 (which I think predates LOVE?), and according to the developer it was in development for about 5 years before release, so he started making it some time in 1999 (which definitely predates LOVE). But yeah, it wasn't made with LOVE.
There could be a fan remake of Cave Story or something made with LOVE, but a search of these forums doesn't bring anything up.
Re: Any way to build a non-disassemblable executable?
And this is the reason why there isn't a single commercial game released with love2d to date and never will be.
It's a good tool for prototyping, learning lua and a general process of making a game though so take it for what it is.
I would never waste my time and the time of a coder making a product we're going to sell if there isn't even a basic way of protecting our work, piracy is bad enough but if your source and asset files are open to all too ... . Yeah it's true most big companies leave their assets comparably unguarded but at the same time they have big lawyers too, so they don't have to worry much about that. For indie devs though, security is an issue.
You get what you pay for. Free engines produce free games.
It's a good tool for prototyping, learning lua and a general process of making a game though so take it for what it is.
I would never waste my time and the time of a coder making a product we're going to sell if there isn't even a basic way of protecting our work, piracy is bad enough but if your source and asset files are open to all too ... . Yeah it's true most big companies leave their assets comparably unguarded but at the same time they have big lawyers too, so they don't have to worry much about that. For indie devs though, security is an issue.
You get what you pay for. Free engines produce free games.
- slime
- Solid Snayke
- Posts: 3162
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Any way to build a non-disassemblable executable?
There are multiple commercial games released which use LÖVE, and there will be many more in the future. I would probably not waste my time working with someone who valued "code protection" over other things. For indie developers, security is not a very big issue.corb wrote:And this is the reason why there isn't a single commercial game released with love2d to date and never will be.
Do you know what other independent game has all of its non-engine code (hundreds of thousands of lines of Lua) completely visible and editable? Natural Selection 2. It is a critically acclaimed game available on Steam, and has been very successful sales-wise.corb wrote:I would never waste my time and the time of a coder making a product we're going to sell if there isn't even a basic way of protecting our work, piracy is bad enough but if your source and asset files are open to all too ... . Yeah it's true most big companies leave their assets comparably unguarded but at the same time they have big lawyers too, so they don't have to worry much about that. For indie devs though, security is an issue.
You get what you pay for. Free engines produce free games.
The openly viewable code only contributed to its success: players can submit their own code fixes and changes to the developers. Many people have done this, and the game is better for it. It also allowed the game to be quite easily moddable when combined with Steam Workshop.
A couple other commercial independent games whose source code and assets have been viewed and edited by its players: Minecraft (code via JVM decompilers), and Terraria (code via C#/.NET decompilers). Interesting how neither Minecraft nor Terraria used a commercial engine.
Commercial game engines such as Unity3D (nearly all script code written for Unity is easily decompilable, by the way) and the Unreal Engine are not widely used because of their perceived code security, they're widely used because they have full-time employees making the engines as good as possible and marketing it to every game developer, as their day job.
Last edited by slime on Sat Feb 16, 2013 11:56 am, edited 1 time in total.
Re: Any way to build a non-disassemblable executable?
I'd like to ask why you want to prevent disassembly anyway? Do you believe that you will lose some monitary value if you don't do this? If so, please explain how.
Who is online
Users browsing this forum: No registered users and 0 guests