[Utility] Love Compiler

Showcase your libraries, tools and other projects that help your fellow love users.
TheMayoMurderer
Prole
Posts: 3
Joined: Sat Nov 15, 2014 3:08 pm

[Utility] Love Compiler

Post by TheMayoMurderer »

I have created a simple tool for turning a single Love source file into portable bytecode.
Details on how to use it are in lovecompiler_readme.txt.
This is not the compiler's final form, and will evolve based on your requests. So if you have any suggestions, fire away!
Enjoy!
- TheMayoMurderer
Attachments
LoveCompiler.zip
Here it is. Extract it and read lovecompiler_readme.txt for instructions.
(2.9 MiB) Downloaded 514 times
Last edited by TheMayoMurderer on Tue Feb 03, 2015 5:21 pm, edited 1 time in total.
User avatar
lost_RD
Prole
Posts: 23
Joined: Sun Nov 24, 2013 9:16 am
Location: Australia

Re: [Utility] Love Compiler

Post by lost_RD »

I compiled an asteroids demo I had lying around - no idea whose it is, sorry author - and it worked like a charm.

So is this the be-all-and-end-all of source code obfuscation? Can we commercialise our games now?
space.love
Original version
(3.82 KiB) Downloaded 912 times
space.love
Bytecode version
(1.63 KiB) Downloaded 921 times
TheMayoMurderer
Prole
Posts: 3
Joined: Sat Nov 15, 2014 3:08 pm

Re: [Utility] Love Compiler

Post by TheMayoMurderer »

lost_RD wrote:I compiled an asteroids demo I had lying around - no idea whose it is, sorry author - and it worked like a charm.

So is this the be-all-and-end-all of source code obfuscation? Can we commercialise our games now?
I'm glad it worked well for you :)
This isn't the compiler in its final form, and I have many more features planned - support for multiple source files, a GUI, etc.
If there's anything you'd like to see in Love Compiler, please either comment here or message me, and I'll see what I can do :)
User avatar
lost_RD
Prole
Posts: 23
Joined: Sun Nov 24, 2013 9:16 am
Location: Australia

Re: [Utility] Love Compiler

Post by lost_RD »

TheMayoMurderer wrote:This isn't the compiler in its final form, and I have many more features planned - support for multiple source files, a GUI, etc.
Of course, I agree that all is good and worth doing, what I'm asking is whether the problem of obfuscating an interpreted game is solved as much as it can be? Will our source codes ever be more safe than the output in your compiler? Could somebody reverse your process?
TheMayoMurderer
Prole
Posts: 3
Joined: Sat Nov 15, 2014 3:08 pm

Re: [Utility] Love Compiler

Post by TheMayoMurderer »

Of course, I agree that all is good and worth doing, what I'm asking is whether the problem of obfuscating an interpreted game is solved as much as it can be? Will our source codes ever be more safe than the output in your compiler? Could somebody reverse your process?
My compiler uses LuaJIT's string.dump() extension, which converts a function's procedure (the code inside the function) to portable bytecode. The bytecode can then be run directly as a procedure, or loaded back into a function. My knowledge goes pretty much as far as that when it comes to compilation and bytecode.
I'm sure - as with any bytecode - there's a way to reverse-engineer it. It's not impossible that someone would be able to access it. Think of it this way; the license is a friendly sign saying "please don't enter my garden". It's more legal obligation than an active barrier. Compiling your code to bytecode is the razor wire fence; it's something that actively stands in the way of someone doing something you don't want them to do.
It's still possible to climb over the razor wire fence. I imagine anyone with a high enough ladder could do it. What it does is make it difficult to climb over, so that fewer people will try, and fewer yet will be successful.
TL;DR: bytecode can be reverse-engineered. However, whereas a license says "don't do this", compiling the source to bytecode actively stands in their way.
User avatar
Duster
Prole
Posts: 32
Joined: Fri Dec 19, 2014 8:34 pm
Location: Ontario, Canada

Re: [Utility] Love Compiler

Post by Duster »

Very nice. As someone who gets very self conscious about his code, I'm looking forward to seeing more from this. :)
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: [Utility] Love Compiler

Post by Robin »

lost_RD wrote:Can we commercialise our games now?
You already could, and some already have.

Your source code is not the most important asset of the game.
Help us help you: attach a .love.
User avatar
josefnpat
Inner party member
Posts: 955
Joined: Wed Oct 05, 2011 1:36 am
Location: your basement
Contact:

Re: [Utility] Love Compiler

Post by josefnpat »

Missing Sentinel Software | Twitter

FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
Rickton
Party member
Posts: 128
Joined: Tue Mar 19, 2013 4:59 pm
Contact:

Re: [Utility] Love Compiler

Post by Rickton »

I don't get why people are so scared of the source code being accessible. It's not like something being closed-source is any harder to pirate. What exactly do you think people are going to do with the code?

The one legitimate reason I could see to worry would be with a multiplayer game, you might not want the source code to be very accessible because it'd be easy for people to cheat. But if you're that worried about it, there should probably be other anti-cheating mechanisms in place, like many multiplayer open source (and closed source) games have.

As a side note, Minecraft is apparently pretty easy to decompile to source (it's how a lot of the more in-depth mods were/are made), and it doesn't seem to have prevented them from making millions of dollars.
Possession - Escape from the Nether Regions, my roguelike made in LÖVE for the 2013 7-Day Roguelike Challenge
And its sequel, simply called Possession , which is available on itch.io or Steam, and whose engine I've open-sourced!
User avatar
NightKawata
Party member
Posts: 294
Joined: Tue Jan 01, 2013 9:18 pm
Location: Cyberspace, Room 6502
Contact:

Re: [Utility] Love Compiler

Post by NightKawata »

Rickton wrote:I don't get why people are so scared of the source code being accessible. It's not like something being closed-source is any harder to pirate. What exactly do you think people are going to do with the code?

The one legitimate reason I could see to worry would be with a multiplayer game, you might not want the source code to be very accessible because it'd be easy for people to cheat. But if you're that worried about it, there should probably be other anti-cheating mechanisms in place, like many multiplayer open source (and closed source) games have.

As a side note, Minecraft is apparently pretty easy to decompile to source (it's how a lot of the more in-depth mods were/are made), and it doesn't seem to have prevented them from making millions of dollars.
Considering that helps Minecraft more than hurt it.
Personally, I think you're kind of beating a dead horse with bytecode compilation, but I can see why people would want to do it. If it makes you feel safer, feel free.

Moreover licensing is what protects your game.
Think of it this way. If someone wants to break your game, they will break your game. That's just how it is.

For multiplayer and the like, server-side protection is indeed a thing, so are anti-cheat detections.
On a more relevant note: Kudos for the author for creating this. Definitely a tool people could use if they wanna try bytecode compilation.
"I view Python for game usage about the same as going fishing with a stick of dynamite. It will do the job but it's big, noisy, you'll probably get soaking wet and you've still got to get the damn fish out of the water." -taylor
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests