Hiding the Code

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.
Post Reply
Basic
Prole
Posts: 4
Joined: Sun Oct 25, 2009 4:27 pm

Hiding the Code

Post by Basic » Sun Oct 25, 2009 4:36 pm

Hi, I'm new to lua and indeed love (which by the way looks cool), but come from a ruby / c++ background.

I'm curios about how visible the code is, or is there a way to hide the code? I'm wanting to make a multiplayer game. but dont want users messing with the code

thanks.

User avatar
napco
Party member
Posts: 129
Joined: Fri Jun 12, 2009 9:28 pm
Location: Ital... ehm...

Re: Hiding the Code

Post by napco » Sun Oct 25, 2009 6:00 pm

I don't agree with hiding the code... By the way i don't know any method except transforming your .love game in a .exe, but i'm not sure it will hide your code.

User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Hiding the Code

Post by bartbes » Sun Oct 25, 2009 6:07 pm

There is not much you can do except for running it through luac (the lua bytecode compiler found in the standalone lua build) and maybe appending it to the .exe, however, this in no way guarantees code safety, currently no other solution has been found. In the future we might (emphasis on might) do something to help you protect code, but the LÖVE community has been open-source minded, so this hasn't gotten a high priority.

Basic
Prole
Posts: 4
Joined: Sun Oct 25, 2009 4:27 pm

Re: Hiding the Code

Post by Basic » Sun Oct 25, 2009 6:21 pm

napco wrote:I don't agree with hiding the code...
I'm not being precious or arrogant of my code, I dont agree with hacking cheating gamers.

The player is the end user, and his/her experience is paramount over some code philosophy.
bartbes wrote:the LÖVE community has been open-source minded, so this hasn't gotten a high priority.
Fair enough from a dev point of view open code is very useful I use Gosu with Ruby so I understand that.

User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Hiding the Code

Post by Robin » Sun Oct 25, 2009 6:58 pm

Basic wrote:I'm not being precious or arrogant of my code, I dont agree with hacking cheating gamers.
It's a very legitimate concern. However, you can't stop cheaters completely. You can make it hard for them, keep them busy for a while, but those who want to cheats will find ways to do so. Using luac, as bartbes suggested, is a fairly good and easy way to keep out the "casual cheaters", and that is the best you can do anyway.
Help us help you: attach a .love.

Basic
Prole
Posts: 4
Joined: Sun Oct 25, 2009 4:27 pm

Re: Hiding the Code

Post by Basic » Sun Oct 25, 2009 7:08 pm

Robin wrote:but those who want to cheats will find ways to do so.
its true, but I dont want to leave a gaping wide hole.

thanks guys I'll check out luac

User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Hiding the Code

Post by bartbes » Sun Oct 25, 2009 8:41 pm

Remember that with sockets most things can be manipulated, the best there is when talking about networked games is encrypted protocols, which I don't think is feasible in lua. The best thing you can do is make sure that a lot is done server side and thus there can't be much manipulation client-side. (or do stuff like checking if a player is going faster than max speed)

User avatar
subrime
Citizen
Posts: 76
Joined: Thu Nov 13, 2008 6:18 pm
Location: Australia

Re: Hiding the Code

Post by subrime » Mon Oct 26, 2009 3:57 am

There are different kinds of cheating in different kinds of game...

With a good (read paranoid) client/server system, each client only gets fed data the player is allowed to see, and only supplies the server with each player's commands... all processing/simulation is done (or mirrored) on the server. This system can't stop enhancements to help a player do legal things better, but will prevent a client violating/corrupting the game logic.

With peer to peer games, it's harder. Possible if you want to give up on information hiding, but using things like "fog of war" etc may force you to use a client/server model.

Basic
Prole
Posts: 4
Joined: Sun Oct 25, 2009 4:27 pm

Re: Hiding the Code

Post by Basic » Mon Oct 26, 2009 10:26 am

interesting Subrime.

I'll certainly give that a shot, but it relys on the server program not being included on the clients machine (and again not being easily available), which it will be. However I have been playing with the idea of writing the server in c++ anyway.

And this wont be a commercial product, its a just a demo of sorts so I dont need to go overboard with security, but dont want it completely unlocked

But plenty of food for thought.

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests