[IMPORTANT] Problem with the game distribution.

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.
Kjunix
Prole
Posts: 3
Joined: Tue Dec 24, 2019 10:59 pm

[IMPORTANT] Problem with the game distribution.

Post by Kjunix »

I have noticed that when you merge love.exe and game.love into a game.exe you can actually extract the game.exe files.

Now that's a problem, because everyone can extract my game from game.exe and see the source code.

The question is, are there any other methods for a game distribution other than this one: https://love2d.org/forums/viewtopic.php?f=4&t=451 ?
Last edited by Kjunix on Tue Jan 14, 2020 11:26 pm, edited 1 time in total.
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: A problem with game distribution!

Post by raidho36 »

You can generate LuaJIT bytecode and ship that instead of the source code. It will make the game virtually unmoddable though, which I would advise against.

If you have real reasons to have source code unavailable, such as NDA with Sony, then a better approach is to hack LOVE C++ code and implement these features in it, or make a Lua-compatible DLL and hook it up through the game.
cazura
Prole
Posts: 14
Joined: Fri Jan 03, 2020 4:17 pm
Location: Brazil

Re: [IMPORTANT] Problem with the game distribution.

Post by cazura »

Wait... So it is possible to extract and have access to the source code of Move or Die, Blue Revolver, etc? Sounds a nice way of learn and see how people do things.
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: [IMPORTANT] Problem with the game distribution.

Post by raidho36 »

cazura wrote: Wed Jan 15, 2020 12:05 am Wait... So it is possible to extract and have access to the source code of Move or Die, Blue Revolver, etc? Sounds a nice way of learn and see how people do things.
Yeah usually, but the thing is, there's nothing of value to be found unless you're a beginner.
cazura
Prole
Posts: 14
Joined: Fri Jan 03, 2020 4:17 pm
Location: Brazil

Re: [IMPORTANT] Problem with the game distribution.

Post by cazura »

raidho36 wrote: Wed Jan 15, 2020 12:53 am Yeah usually, but the thing is, there's nothing of value to be found unless you're a beginner.
Well, I really am a beginner. I got the demo from Blue Revolver. The structure and code is very well organized, divide in several lua files and stuff. It really puts a perspective against my poor mister "the whole game in 4 lua files" thingy. Even though my game is much more simple, my code is so messy. I see a long road to go yet.
Kjunix
Prole
Posts: 3
Joined: Tue Dec 24, 2019 10:59 pm

Re: [IMPORTANT] Problem with the game distribution.

Post by Kjunix »

cazura wrote: Wed Jan 15, 2020 12:05 am Wait... So it is possible to extract and have access to the source code of Move or Die, Blue Revolver, etc? Sounds a nice way of learn and see how people do things.
Yes its possible, just search "love2d games" and download them, you can extract .exe file with winrar and see all the files in the game.
I have discovered that when I was uploading my game to an USB drive to show my game to professor.

That's bad because, for example you have made an mmo and people buy your game and play it normally. But someone can extract the files and mess with the code and still run the game. Example they can add:

Code: Select all

if love.keyboard.isDown("o") then
	player.money = player.money + 9999
end 
Or even worse, they can steal your game and claim it as theirs.
User avatar
pgimeno
Party member
Posts: 3672
Joined: Sun Oct 18, 2015 2:58 pm

Re: [IMPORTANT] Problem with the game distribution.

Post by pgimeno »

Kjunix wrote: Wed Jan 15, 2020 6:12 pm That's bad because [...]
These threads probably have the answers to your questions. If something is still unclear afterwards, please report back.

https://love2d.org/forums/viewtopic.php ... 62#p223862

(I've just added this thread)

To address your concerns:

1) They can't do that in the server, which should be the authoritative source as in any MMO. Take Second Life, for example; the viewer is open source. You can add to the balance in your client and have say 10,000,000 L$, but you can't use them to pay anything because the real balance is in the server, and the checks of whether you actually have enough money are also in the server.
2) They can do it anyway, but that's a matter of copyright law, not of whether the source is part of the program.
cazura
Prole
Posts: 14
Joined: Fri Jan 03, 2020 4:17 pm
Location: Brazil

Re: [IMPORTANT] Problem with the game distribution.

Post by cazura »

pgimeno wrote: Wed Jan 15, 2020 6:20 pm 2) They can do it anyway, but that's a matter of copyright law, not of whether the source is part of the program.
A curiosity if I may ask, and if you, of course, would know the answer. But, is this true for all engines? Corona, GDevelop, Unity, Unreal, Blender, and so on. Like... If the person don't go extra complicated steps to protect it, is the building reversible?
nequals30
Prole
Posts: 9
Joined: Sun Sep 22, 2019 5:54 pm

Re: [IMPORTANT] Problem with the game distribution.

Post by nequals30 »

I see this question coming up a lot on the forum, and I think it comes from people's hesitation to "give away" the code they've put hard work into.

I think the truth is that game code is usually kludgy and duct-taped together, and not the essense of a game. The real substance of the game (art, story, etc) is 1) easy to steal anyway, and 2) protected by copyright.

As an example, the source code for VVVVVV was made public today, and it shows how dirty game code can be, even when written by pros:
https://www.polygon.com/2020/1/13/21064 ... gh-release

Just look at this 3,500 line switch-case statement:

https://github.com/TerryCavanagh/VVVVVV ... e.cpp#L605
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: [IMPORTANT] Problem with the game distribution.

Post by raidho36 »

cazura wrote: Wed Jan 15, 2020 8:09 pm A curiosity if I may ask, and if you, of course, would know the answer. But, is this true for all engines? Corona, GDevelop, Unity, Unreal, Blender, and so on. Like... If the person don't go extra complicated steps to protect it, is the building reversible?
It's true for all computer programs. Some types of programming languages make recovering source code easier than others.
Post Reply

Who is online

Users browsing this forum: Google [Bot], Semrush [Bot] and 10 guests