The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
[OT]-How To Protect Game Assets?(Audio/Visuals)
JeZ-l-Lee


Joined: 20 Sep 2009
Posts: 572
Location: Long Island, New York, United States, Earth
[OT]-How To Protect Game Assets?(Audio/Visuals)

Hi,

Does anyone have a recommendation for a free method to pack game assets into a single file(to protect them)?
We are working on a Windows(R) only SDL2 game now that we may want to sell in the future,
so a free method to pack the game assets(graphics, sounds, music, fonts, & dictionary) into a single file would be required.

Thanks!
[OT]-How To Protect Game Assets?(Audio/Visuals)
Philip Bennefall
Guest

Perhaps this one?

http://icculus.org/physfs/

Kind regards,

Philip Bennefall
On 4/26/2015 1:54 AM, JeZ-l-Lee wrote:

Quote:
[OT]-How To Protect Game Assets?(Audio/Visuals)

Hi,

Does anyone have a recommendation for a free method to pack game assets into a single file(to protect them)?
We are working on a Windows(R) only SDL2 game now that we may want to sell in the future,
so a free method to pack the game assets(graphics, sounds, music, fonts, & dictionary) into a single file would be required.

Thanks!



JeZxLee
JessePalser <AT> GMail <DOT> com
16BitSoft Inc.
Video Game Design Studio
www.16BitSoft.com


Quote:
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
[OT]-How To Protect Game Assets?(Audio/Visuals)
Jared Maddox
Guest

Quote:
Date: Sat, 25 Apr 2015 23:54:21 +0000
From: "JeZ-l-Lee"
To:
Subject: [SDL] [OT]-How To Protect Game Assets?(Audio/Visuals)
Message-ID:
Content-Type: text/plain; charset="iso-8859-1"

[OT]-How To Protect Game Assets?(Audio/Visuals)

Hi,

Does anyone have a recommendation for a free method to pack game assets into a single file(to protect them)?
We are working on a Windows(R) only SDL2 game now that we may want to sell in the future,
so a free method to pack the game assets(graphics, sounds, music, fonts, & dictionary) into a single file would be required.

Thanks!

------------------------
JeZxLee
JessePalser &lt;AT&gt; GMail &lt;DOT&gt; com
16BitSoft Inc.
Video Game Design Studio
www.16BitSoft.com


If you're trying to avoid other people copying the assets, I refer you
to this: http://badlogicgames.com/forum/viewtopic.php?f=11&t=7513

Specifically note the mention that Valve and id Software don't bother
trying to PROTECT the data, instead caring about CONVENIENCE. Learn
from their example and stop worrying about protecting your art assets
from being copied.

Also, remember that Windows basically ALWAYS supports screengrabs IN
THE OS by simply pressing the PrintScreen button (and using alt in
conjunction if you just want some particular window). Don't waste your
time on fiddly little minutia that aren't likely to cause you problems
(also remember that Flappy Bird looked like it had used NES Mario
assets, but hadn't used even one: seriously, don't waste your time).

Beyond that, if you're trying to shove the assets into the executable
for reliability purposes, I know (and have scratched out) how to do
it, but you'd have to pay me to get it finished (I have other projects
at the moment). Basically you write a program that will read in an
arbitrary file, and output both a header and c file that contains the
original file as a hexadecimal-encoded array. Pretty straightforward,
and useful if you want to support some very simple bootstrapping (also
useful as a means of complying with GPL: shove all source into an
archive, run the archive through the program described above, link to
your program, and include a command-line switch that just vomits the
entire thing out).
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
[OT]-How To Protect Game Assets?(Audio/Visuals)
Daniel Gibson
Guest

On 04/26/2015 03:34 AM, Jared Maddox wrote:
Quote:

If you're trying to avoid other people copying the assets, I refer you
to this: http://badlogicgames.com/forum/viewtopic.php?f=11&t=7513

Specifically note the mention that Valve and id Software don't bother
trying to PROTECT the data, instead caring about CONVENIENCE. Learn
from their example and stop worrying about protecting your art assets
from being copied.

I totally agree with this.

Quote:

Beyond that, if you're trying to shove the assets into the executable
for reliability purposes, I know (and have scratched out) how to do
it, but you'd have to pay me to get it finished (I have other projects
at the moment). Basically you write a program that will read in an
arbitrary file, and output both a header and c file that contains the
original file as a hexadecimal-encoded array. Pretty straightforward,
and useful if you want to support some very simple bootstrapping (also
useful as a means of complying with GPL: shove all source into an
archive, run the archive through the program described above, link to
your program, and include a command-line switch that just vomits the
entire thing out).

Well, for adding into the executable there is another nicer way:
* put things in a .zip file
* append that zip to your executable (cat bla.zip >> yourExe)
* run "zip -A yourExe" to fix the zip internal file offsets (zip is from
"Info-Zip" in this case)
* make your executable open itself as a zip file (using miniz, zlibs
minizip, physfs or whatever lib can help you reading zips) and use it
like a normal zip file

To open your executable, DG_GetExecutablePath() from DG_misc.h (see
https://github.com/DanielGibson/Snippets/ ) might help.

I'd suggest only doing this if you have very few assets - patches for
your game will have to contain all the assets (instead of just a
bugfixed executable). That might be acceptable for a 5MB (incl. zipped
Assets) game, but maybenot so much for a 500MB game

Cheers,
Daniel
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org