Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411485 Posts in 69371 Topics- by 58428 Members - Latest Member: shelton786

April 24, 2024, 06:56:50 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)How to Protect a Game's Assets?
Pages: 1 [2]
Print
Author Topic: How to Protect a Game's Assets?  (Read 2307 times)
oahda
Level 10
*****



View Profile
« Reply #20 on: November 20, 2015, 01:08:06 AM »

I'd be interested in knowing what you're doing that's specific to Windows because I thought you were just obfuscating files...
Logged

bauer
Level 1
*


Codes games & makes music


View Profile WWW
« Reply #21 on: November 20, 2015, 07:20:02 AM »

Can't you simply embed the encrypted files into the executable?
Logged

ThemsAllTook
Administrator
Level 10
******



View Profile WWW
« Reply #22 on: November 20, 2015, 08:03:02 AM »

Can't you simply embed the encrypted files into the executable?

Doing that on OS X and Linux isn't as simple a matter as on Windows. It's possible, but definitely off the beaten path - I don't think your typical development tools provide any support for it.
Logged

Layl
Level 3
***

professional jerkface


View Profile WWW
« Reply #23 on: November 20, 2015, 08:26:51 AM »

Can't you simply embed the encrypted files into the executable?

If with that you mean resource files that are compiled into an executable on windows, that's anything but encryption. It's really easy to just find the data back.
Logged
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #24 on: November 20, 2015, 09:17:16 AM »

My guess is something like just appending a zip archive to the end of the exe. Don't really see much point in doing that. All it really does is makes it hard to update your data.
Logged

oahda
Level 10
*****



View Profile
« Reply #25 on: November 20, 2015, 09:51:52 AM »

Can't you simply embed the encrypted files into the executable?

Doing that on OS X and Linux isn't as simple a matter as on Windows. It's possible, but definitely off the beaten path - I don't think your typical development tools provide any support for it.
I guess this answered my question too.  Hand Thumbs Up Left
Logged

bauer
Level 1
*


Codes games & makes music


View Profile WWW
« Reply #26 on: November 22, 2015, 05:14:19 AM »

Not necessarily as a resource, there's for example a tool called bin2c which simply converts your binary file into a header (char array) that you can include into your app and use as a memory blob. Agree on the encryption problem though, it would be easy to extract the data, though I'm not clear on how secure it really needs to be as it was mentioned that the main problem is people simply copy/pasting assets from a folder or similar. If you do it as a header you could maybe run each char/byte through a simple encryption algorithm upon save/load.

Online highscores is a different beast though. Previously I've kept track of each "score value" (points, health, multipliers, timers) to see if they've been changed inappropriately (via Cheat Engine or similar). Every time those values are changed, they are changed via a function that creates and stores a hash of the old/new value, and the hash must match each time the value gets set. If it doesn't then it has most likely been tampered with and we can decide what to do. For example, silently don't upload the leaderboard score, or pretend to lose internet connection if the game is online, or something else more or less vague. Smiley
Logged

pelle
Level 2
**



View Profile WWW
« Reply #27 on: November 23, 2015, 04:12:43 AM »

For hiding the source code, again make sure you are allowed to do this according to the license of the engine you're using. A lot of open source licenses require you to distribute the source as well. An example being Open Hexagon, which is under the AFL 3.0 license.

This. I hope that OP isn't trying to get away with copyright infringement (ie not distributing source code of his modifications when the license says it must be distributed).

That is of course completely separate (usually) from how other content is distributed. There are commercial games that have source code available, but there isn't really a lot of fun you can do with it because all the scripts and data needed on top of the engine to make anything happen are not open source.
Logged
Cheezmeister
Level 3
***



View Profile
« Reply #28 on: November 24, 2015, 09:57:20 AM »

It seems to me that scripts are part of the source code, if they are necessary for the software to work. I assume that the games pelle's referring to are releasing the core source "just because", i.e. not because of any copyleft measures, so they're perfectly entitled to release whichever files they please.

But one wonders whether the viral nature of GPL et. al. would legally extend to script files in "derivative works".
Logged

෴Me෴ @chzmstr | www.luchenlabs.com ቒMadeቓ RA | Nextris | Chromathud   ᙍMakingᙌCheezus II (Devlog)
pelle
Level 2
**



View Profile WWW
« Reply #29 on: November 25, 2015, 11:57:37 PM »

It seems to me that scripts are part of the source code, if they are necessary for the software to work. I assume that the games pelle's referring to are releasing the core source "just because", i.e. not because of any copyleft measures, so they're perfectly entitled to release whichever files they please.

But one wonders whether the viral nature of GPL et. al. would legally extend to script files in "derivative works".

http://www.gnu.org/licenses/gpl-faq.html#IfInterpreterIsGPL

"When the interpreter just interprets a language, the answer is no. The interpreted program, to the interpreter, is just data; a free software license like the GPL, based on copyright law, cannot limit what data you use the interpreter on. You can run it on any data (interpreted program), any way you like, and there are no requirements about licensing that data to anyone."

But then they go on for two more paragraphs about some exceptions that I am not quite sure how to, uhm, interpret. Although the FSF is of course rather hardcore and biased about this, and most interpreters have more liberal licenses anyway.
Logged
BorisTheBrave
Level 10
*****


View Profile WWW
« Reply #30 on: November 26, 2015, 02:41:29 PM »

It goes on to say if you expose any bindings, then yes, GPL still carries over. Any game scripts are linked to the game, it's not merely interpretation. So you do need to GPL license or equivalent your scripts.

E.g. I've written some Blender plugins. As blender is GPL, so are the scripts. The FAQ spells it out.
Logged
pelle
Level 2
**



View Profile WWW
« Reply #31 on: November 30, 2015, 03:54:00 AM »

It goes on to say if you expose any bindings, then yes, GPL still carries over. Any game scripts are linked to the game, it's not merely interpretation. So you do need to GPL license or equivalent your scripts.

E.g. I've written some Blender plugins. As blender is GPL, so are the scripts. The FAQ spells it out.

OK. Weird. FSF really have extreme ways of interpreting what is a derived work or what linking means.
Logged
Saturn2888
Level 0
**



View Profile
« Reply #32 on: December 03, 2015, 10:09:40 AM »

I'm closing this thread. It's gotten way off topic and the closest response was saying to use encrypted zip files and another bin2c; neither of which get around the fact that you could string-search the binary and pull out the encryption strings.

Software that encrypts the executable, at least for OS X, has existed in the past, but since the one company I knew of is no longer in business, it's really sad I can no longer find an alternative product to prevent string-searching the binary.

Seems like almost all devs write proprietary compiled software so even if people jack the files, they can't do anything except create mods for that particular game. In my case, you'd be getting access to the source code I wrote. No one releases the source to a paid game and expects a return on investment unless your business model relies on a monthly service contract like Office 365 so clearly, that's out of the question.

At this point I'm unclear if a Mac or Linux release would be possible based on the responses I've received.
Logged
Pages: 1 [2]
Print
Jump to:  

Theme orange-lt created by panic