sounds/graphics "container" files?

BlitzMax Forums/BlitzMax Programming/sounds/graphics "container" files?

XxGuardianKnightxX(Posted 2009) [#1]
What if you don't want to have large folders full of sounds, music and graphics lying around for the end user to screw around with as they wish? Is there any way, however difficult it may be, to make compressed files to hold the sounds/music and compressed file to hold the graphics?

Or perhaps even a file to hold the level maps? Oh wait, I use the LEV format which I developed myself with my friend, so it's already cryptic enough. Plus levels are comparatively small files and don't need compression/storage in a single file.

My main inspiration is the concept of "WADs" used by the computer game DOOM. So, what do you say? I think it's a good idea, personally. How hard is it to do so, and do you need to use or write a special module for it?


*(Posted 2009) [#2]
have a look at Terabit's packer and see how thats done, then out something like that. I developed EPack for that purpose it takes loads of files and compressed it into one file with encryption.


Gabriel(Posted 2009) [#3]
What if you don't want to have large folders full of sounds, music and graphics lying around for the end user to screw around with as they wish? Is there any way, however difficult it may be, to make compressed files to hold the sounds/music and compressed file to hold the graphics?


Yes, there is a way to make compressed files to hold the sounds and music, but there are two related issues here.

Firstly, why reinvent container files? You already have zip and rar, they're free to use, they're easy to implement, and they've had millions of hours of testing so you know they're rock solid.

Secondly, it's no longer possible to prevent users screwing around with your graphics. There are free programs available which will intercept your graphics data as it is sent to the graphics card. Short of encrypting your graphics and writing a shader which decodes it(and even then, the shader could be grabbed and the source code to the decryption would be freely available) there is nothing you can do to prevent these programs grabbing your data.


Nate the Great(Posted 2009) [#4]
why not incbin everything?


GfK(Posted 2009) [#5]
Yes, use Incbin.

You can also use Molebox but it isn't free.


Muttley(Posted 2009) [#6]
Molebox is great, but it does cost. The main benefit to it over Incbin is that you can encrypt everything as well to make it harder for people to extract stuff.


XxGuardianKnightxX(Posted 2009) [#7]
I also looked into MPacker...link's dead, but I sent an email to the creator of it. Anyone know another way to get MPacker? I heard it's really good, and cross-platform too: I need my games to be cross-platform, especially since I'm disagreeing currently with Microsoft.

Also, what exactly is Incbin? Sounds interesting :)


*(Posted 2009) [#8]
incbin is good but cant do models and textures (unless I missed a minib3d update again ;))


xlsior(Posted 2009) [#9]
Incbin.

and/or use Koriolis's zipstream module: it can read straight from a (password protected) zipfile, which you can optionally incbin straight into the executable.


Grisu(Posted 2009) [#10]
Incbin + zip/rar


levelord(Posted 2009) [#11]
I've read elsewhere that IncBin can cause troubles with DRM wrappers. Does anyone know this to be true or false by experience with releasing a game through portals?