How to protect the source of your project?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
ddabrahim
Party member
Posts: 183
Joined: Mon May 17, 2021 8:05 pm
Contact:

How to protect the source of your project?

Post by ddabrahim »

Hi guys.

So I was just wondering what are the options to protect the source of your project and prevent people from accessing?
I've seen some discussion about it and it seems the general answer is that to include a license and explicitly deny permission to use any of the source of your project. I do accept this and in general I am happy about the open-source nature of LÖVE especially because I can learn a lot from the code of others.

But I've seen people talking about the ability to compile the source in to binary and recently I have downloaded a project that I am unable to open. Usually if I download a project, I can easily extract .love project from it then I rename .love to .zip and I can extract the entire source of projects but not this one. I fail to extract the content of the .zip which makes me wondering how could someone protect the zip this way? Or is it just pure luck and my unarchiver is simply not compatible maybe?

I would love to share the .zip/.love, but since I have extracted it from a project my self and it was not provided by the original author, I rather don't do it.

I would appreciate any ideas though.

Thank you.
User avatar
ReFreezed
Party member
Posts: 612
Joined: Sun Oct 25, 2015 11:32 pm
Location: Sweden
Contact:

Re: How to protect the source of your project?

Post by ReFreezed »

There hasn't been some discussion about this topic - there has been plenty, and it's the same answers every time.

viewtopic.php?p=223862#p223862

You don't need to license your code to protect it from copying - that's what copyright is for, and copyright is automatic for all creative works. Licensing is for giving people permission to do stuff. The worst (legal) thing that can happen is that someone looks at your code and learns something (oh the horror). Obscuring your code isn't going to prevent people from seeing the code - there is literally nothing you can do to prevent that, except not publishing your game at all.

Instead of worrying about people seeing your code, worry about making a game that anyone would actually care about in the first place to even want to copy. (By the way, just look at how games like DOOM or Rogue have spawned whole new genres of games trying to copy the original. Copying is not bad, just illegal sometimes.)
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
User avatar
zorg
Party member
Posts: 3444
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: How to protect the source of your project?

Post by zorg »

As for why you couldn't unzip a project, it might have been due to the project actually being compressed by 7zip and your decompressor not supporting that... that said, it's not exactly something löve supports either, it just happens to work in some cases.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
ddabrahim
Party member
Posts: 183
Joined: Mon May 17, 2021 8:05 pm
Contact:

Re: How to protect the source of your project?

Post by ddabrahim »

ReFreezed wrote:Instead of worrying about people seeing your code, worry about making a game that anyone would actually care about in the first place to even want to copy.
I understand the point you are making and it is not that I disagree, but one thing I have in mind is that what if my game is good enough to copy and I would like to share early versions / tech demos to get some feedback but the idea to allow people to access the full source at this stage is uncomfortable for one reason or an other.

I know it is going against the philosophy of LÖVE, and I do love open-source I am not complaining just expressing my thoughts.
zorg wrote:it might have been due to the project actually being compressed by 7zip and your decompressor not supporting that...
I had the feeling it is the case.

Thanks guys, appreciate the replies.
User avatar
togFox
Party member
Posts: 779
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: How to protect the source of your project?

Post by togFox »

@OP:

I think relying on copyright laws that are different across countries and require you to engage in court systems is cold comfort for someone with a great new idea. Let's be honest - it is no protection at all.

However, I sleep better at night considering:

- compiled binary files provide a higher technical barrier than zip files but no software is hack proof. The sort of ppl you want to stop won't be stop by compiled binaries. There are many free tools that reverse engineer exe/dll files etc

- There are commercial games on Steam that are open source (not free). Barotrauma is an example. Their source code is on github and that encourages the modding community

- looking at itch.io, there are thousands of games that don't make a single dime. Is your game really that great that it's worth protecting? Perhaps it is - so think about your love game not as a money spinner but a way to be seen and noticed and a way to add to your portfolio if an investor or software house comes knocking. Think of it as a plank to the next big thingy.

Its natural for some to treat coding as a potential income stream. I think that's unrealistic for most people but you do you. I stopped thinking commercial games + open source are not compatible.

Hope that helps you to sleep better. :)
Current project:
https://togfox.itch.io/backyard-gridiron-manager
American football manager/sim game - build and manage a roster and win season after season
User avatar
ddabrahim
Party member
Posts: 183
Joined: Mon May 17, 2021 8:05 pm
Contact:

Re: How to protect the source of your project?

Post by ddabrahim »

togFox wrote:- compiled binary files provide a higher technical barrier than zip files but no software is hack proof. The sort of ppl you want to stop won't be stop by compiled binaries. There are many free tools that reverse engineer exe/dll files etc
Now that you mention it, it is totally true. If someone want to steal the source, they can. I remember few years ago I have discovered a tool that ripped assets from memory. So it is certainly possible. It is not so much stealing I am worry about however, just the idea to allow people to see the full source makes me somehow uncomfortable. But I agree with the point you are making.
togFox wrote:- There are commercial games on Steam that are open source (not free). Barotrauma is an example. Their source code is on github and that encourages the modding community
I stopped thinking commercial games + open source are not compatible.
Yes I totally agree, open-source and source-available is compatible with commercial projects and MODS are fun, It is not that I think what I do must be protected, I just don't feel comfortable sharing at this point in its current state. If I share it, I want to do it "right" with all the licenses and documentations in place and a "home" where people can post their feedbacks, comments and contributions.

Thank you.
User avatar
ivan
Party member
Posts: 1911
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: How to protect the source of your project?

Post by ivan »

I disagree with togFox that the law provides "cold comfort for someone with a new idea".
On the contrary: you can patent your idea, form a limited liability company to own and manage your project or even register a trademark for your brand.
There are many things you can do to "protect" your code and your project on an international level.
Compiling the source code is the last line of defense and will only stop hobbyists and kids.
If your game idea is any good, people will clone it anyways without looking at your code at all.
Furthermore, it is not very humble to assume that somebody is going to steal your code - most of the closed source code out there is not very good.
User avatar
ddabrahim
Party member
Posts: 183
Joined: Mon May 17, 2021 8:05 pm
Contact:

Re: How to protect the source of your project?

Post by ddabrahim »

Ivan wrote:you can patent your idea, form a limited liability company to own and manage your project or even register a trademark for your brand.
Oh well, I wish I was in the position my idea was so unique I had to register a trademark and patent and a limited company :awesome:
Ivan wrote:Compiling the source code is the last line of defense and will only stop hobbyists and kids
They are the ones I am actually concerned about, hobbyist and kids may choose to share and take credit for my staff. It has happened before with other engines I was using. I shared some projects and the next thing I know was that people have used and taken credit for my work.
I mean it didn't actually worth anything but still doesn't feel right when you discover your work embedded in to a project and people doesn't know you created it.
Of course if you have published a complete project on Steam or even GitHub, it is less likely to happen but if you share only a demo on a forum somewhere it is more likely to happen and I would like to avoid it by either protecting the source or being open about it with licenses and full documentation right from the start but I am just not there yet.

So I would prefer not to share the source for now. But I understand it doesn't actually worth anything, but because of my prior experience I do not feel comfortable sharing the source in any shape or form just yet.

Thank you.
gianmichele
Citizen
Posts: 63
Joined: Tue Jan 14, 2014 11:03 pm

Re: How to protect the source of your project?

Post by gianmichele »

This is a lua obfuscator written in pure lua.

https://github.com/levno-710/Prometheus
User avatar
zorg
Party member
Posts: 3444
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: How to protect the source of your project?

Post by zorg »

gianmichele wrote: Sun Apr 17, 2022 6:20 pm This is a lua obfuscator written in pure lua.

https://github.com/levno-710/Prometheus
As far as i can tell, that won't even work for luaJIT, only PuC lua 5.1 and roblox' flavour... AND all of the options (except for minify, which is more or less useless as obfuscation) seem like they're really bad ideas in terms of performance. (A custom bytecode interpreter VM running the code? wrapping locals in proxy tables? splitting up strings randomly and concatenating them? wrapping functions in other functions?)
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Post Reply

Who is online

Users browsing this forum: No registered users and 72 guests