My game's media

Blitz3D Forums/Blitz3D Beginners Area/My game's media

Kiyoshi(Posted 2010) [#1]
Hey y'all, I need a little help.
I've created a small program, which uses various types of media, such as textures, sounds, meshes, etc. Of course, when I created the executable, all these files had to be in the folder that the .EXE file was in. However, when I gave this program to a friend, he pointed out that most of the game's media can be manually edited (textures messed with, replacing sound files, etc.), because the files are immediately accessable from the folder. Of course, this is a problem. What I need to know is how I can hide these files, or lock them somehow, so they can't be edited (at least not directly) when I distribute the .EXE. I'd very much appreciate some help with this, thanks! :D


xlsior(Posted 2010) [#2]
There's several ways of doing this -- In Blitzmax it's easy because you can include the media directly in your program with incbin.
Under B3D, you'll have to do a little more work.

You can either:
1) Store the media in some proprietary format
2) Store the media in an encrypted format, then decrypt upon loading
3) Store all the media together in a media pack or something

Either way, you're going to have to change your data loading routines around a bit...


Ross C(Posted 2010) [#3]
Something like molebox should do what you need :)


xlsior(Posted 2010) [#4]
Molebox would work too, yes...

Although it does have a fairly significant drawback, in that certain virus scanners periodically give false positives for virus detection when they scan a molebox compressed executable

(Since some virusses/trojans use Molebox as well, part of the code will be identical)

Shouldn't be a showstopper, but at least be aware of this in case some of your testers / buyers may complain that their virusscanner got triggered by your game.


Kiyoshi(Posted 2010) [#5]
Thanks! This helped me :D


Josaih6/10(Posted 2010) [#6]
I use the BlitzMediaLinker. It's free and easy to use. Not sure where to find it but google should bring it up.