about distributing on windows...

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
RonanZero
Citizen
Posts: 90
Joined: Mon Oct 20, 2014 3:33 am

about distributing on windows...

Post by RonanZero »

i dont want anybody, at all, to have access to the source, sprites, or sound files of my game. it will be windows only, i know love can create an exe but i want to make sure they cant just look inside it and see all of the game's code in plaintext, or go into a folder for all the resources.
while true do end;
szensk
Party member
Posts: 155
Joined: Sat Jan 19, 2013 3:57 am

Re: about distributing on windows...

Post by szensk »

tl;dr: This is far more difficult than it's worth.

A few previous related threads:
https://www.love2d.org/wiki/Source_Obfuscation
viewtopic.php?f=3&t=79352
viewtopic.php?f=4&t=76674

One approach is to distribute the code in compiled bytecode form as most decompilers for LuaJIT bytecode are partially incomplete. Or perhaps using a code obfuscator would make your intent clear too. The final approach goes over the top: write or integrate a DRM extension for Love (and even that could be cracked).
User avatar
RonanZero
Citizen
Posts: 90
Joined: Mon Oct 20, 2014 3:33 am

Re: about distributing on windows...

Post by RonanZero »

if i obfuscated it, minified it, and then "compiled" it with luac, would i still be able to have mod support? im trying to make a game where people cant read the source code, but they can mod it, like how gmod is written in c++ so you cant see it's source code but you can use lua to hook onto things and add new things, but not replace or access any actual base code.

This is mostly to prevent clientside cheating, and people using my engine without permission, since this is an online-only game.
while true do end;
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: about distributing on windows...

Post by T-Bone »

You won't be able to prevent cheating. It's just not possible.

You can make it more difficult, but Löve doesn't really provide good tools for that. It's a question of how far you're ready to go versus how far you think cheaters are ready to go.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: about distributing on windows...

Post by kikito »

RonanZero wrote:This is mostly to prevent clientside cheating
The only reliable way to do that is making the server the only source of truth. If you are doing a shooter, the client should not be able to send something like "I have hit this guy". It should only be sending "I am pressing left right now". Or "I am pressing fire". The server is the one who should say "player x was hit by this bullet" and the clients read that. The clients should never "decide who has won a point", basically.
RonanZero wrote:and people using my engine without permission
I can understand that. However I would advice to meditate about this decision. Would it be really that bad if people used your engine? What's the worst that can happen? These questions are not rhetorical. You are investing a significant amount of time & effort in preventing that. Time that could be employed somewhere else (like making your game better, or more fun), and it is not coming back. I am not saying it is not worth it, but think about it. Framing it in numbers makes it easier: "How many hours of work does it bother me that others use my engine?"
When I write def I mean function.
User avatar
RonanZero
Citizen
Posts: 90
Joined: Mon Oct 20, 2014 3:33 am

Re: about distributing on windows...

Post by RonanZero »

People have already tried to steal it when I made my game in another programming language.

I know it isn't possible to be theft-and-cheater-proof, but I want it to not be as easy as "lets open winrar and look at the source code lol"
while true do end;
User avatar
slime
Solid Snayke
Posts: 3144
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: about distributing on windows...

Post by slime »

RonanZero wrote:if i obfuscated it, minified it, and then "compiled" it with luac, would i still be able to have mod support? im trying to make a game where people cant read the source code, but they can mod it, like how gmod is written in c++ so you cant see it's source code but you can use lua to hook onto things and add new things, but not replace or access any actual base code.
Yes. Don't do any of things specifically though, just use the LuaJIT standalone interpreter's bytecode compiler.

LÖVE uses LuaJIT, which doesn't accept 'regular Lua' bytecode (i.e. what's produced by luac.)
Bytecode compilation also obfuscates your code without destroying traceback messages used in bug reports, unlike other obfuscation / minification tools. If you use the latter, your users probably won't agree with your decision when they find out that it made fixing bugs much harder than it should be. :)
User avatar
ivan
Party member
Posts: 1912
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: about distributing on windows...

Post by ivan »

kikito wrote:The only reliable way to do that is making the server the only source of truth.
Yep.
kikito wrote:Would it be really that bad if people used your engine? What's the worst that can happen? These questions are not rhetorical. You are investing a significant amount of time & effort in preventing that.
Going one step further, I would say that the people who have the skills to read, understand and reuse your code
to make something notable, probably won't do it without permission.
but I want it to not be as easy as "lets open winrar and look at the source code lol"
Ya, I used to compile my Lua scripts too, so that people wouldn't laugh at my code too much,
but in retrospect it's not worth the time. ;)
User avatar
I~=Spam
Party member
Posts: 206
Joined: Fri Dec 14, 2012 11:59 pm

Re: about distributing on windows...

Post by I~=Spam »

ivan wrote:Ya, I used to compile my Lua scripts too, so that people wouldn't laugh at my code too much,
but in retrospect it's not worth the time.
:rofl: Don't think so badly of yourself :P

Like everyone else said it isn't worth your time. It is very simple to "decompile" lua bytecode and it looks pretty much the same as the original just without the comments and other things that make it more human readable....
My Tox ID: 0F1FB9170B94694A90FBCF6C4DDBDB9F58A9E4CDD0B4267E50BF9CDD62A0F947E376C5482610
User avatar
Inny
Party member
Posts: 652
Joined: Fri Jan 30, 2009 3:41 am
Location: New York

Re: about distributing on windows...

Post by Inny »

Before worry about people stealing your game, first make the game.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], DTmg and 5 guests