Page 1 of 1

handling files

Posted: Fri Apr 16, 2004 1:34 am
by Coolkat
this is sorta not related to Irrlicht.. so if this is the wrong forum then sorry. If i release a commercial product and it uses models and other 3D related objects.. how can i get it so the program can call the models without haveing the models there? like in games that are released into stores.. you don't want people editing your models.. so how do you get it so they can't be touched? i can't zip them and add the zip to the irrlicht engine to read because someone could just decompress them.. is there another way?\

any help would be great.

Posted: Fri Apr 16, 2004 5:23 am
by Masdus
you will need to look at some sort of packaging system like .wad. The only problem is that most of the popular formats have free tools to take them apart, so people could still steal your models. Another way is to simply use a different file extension on you files so people don't know what format they are.

Posted: Fri Apr 16, 2004 1:18 pm
by saigumi
Yep, your own packaging.. or go the limp write approach like the *.pk3 which is just a renamed *.zip

Posted: Fri Apr 16, 2004 6:42 pm
by Coolkat
like you said a .pk3 is a renamed .zip.. so can you unpack .pk3 with winzip still? if so then could i pack everything into a .dat or something like that? and if i do make my own packing extension.. could Irrlicht unpack it?

Posted: Fri Apr 16, 2004 8:25 pm
by saigumi
A zip file is a zip file no matter what the extension is and Irrlicht will read it no matter what you name it.

The format and contents of the file would still comply with what a zip file is and would work.

For grins, open a small zip file in notepad/textpad/whatever.

Notice that the first 2 characters are PK and the thirds is a binary 3?

Posted: Mon Apr 19, 2004 2:45 am
by Masdus
if you wrote your own package system irrlicht would not natively be able to unpack it in the smae way it unpacks zip files, but you don't need it to. You would simply write your own unpacking code to use. You would then simply pass the relevant file from the package to irrlicht to use. Basically you would need to write code similar to zip code of irrlicht.

It is simplier to use irrlichts zip features over creating a package system. However renaming a zip doesn't prevent people from opening it, it simply tries to fool people into thinking that they can't so they don't try. A custom package system would provide a much greater level of security.

There is also a middle ground. You can take a format like zip and slightly modifiy it so that is becomes unreadable, for example change the file header info (i'm not sure if that would affect a zip but some file types need specific file headers.) Then you can use existing products to make your package and you only need a minimum of custom code to read the modified file.

Posted: Mon Apr 19, 2004 4:58 am
by stampsm
one solution i have been looking at is the ability to password protect a zip file
since irrlicht uses zlib for zip files as long as zlib allows for password protected files it wouldn't be to hard to modify irrlicht to use passworded zip files
does anyone know if zlib can read password protected zip files?
if this works it will solve your problem

Posted: Mon Apr 19, 2004 6:34 pm
by Coolkat
i would like to make my own packing system but i wouldn't know how to.. or where to start.. and ideas on how to go about doing that OR something on the net somewhere that tells you how to do that?