handling files

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Coolkat
Posts: 25
Joined: Sun Mar 28, 2004 1:44 am
Location: U.S.A.

handling files

Post 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.
IcePump Gaming
under construction
Masdus
Posts: 186
Joined: Tue Aug 26, 2003 1:13 pm
Location: Australia

Post 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.
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

Yep, your own packaging.. or go the limp write approach like the *.pk3 which is just a renamed *.zip
Crud, how do I do this again?
Coolkat
Posts: 25
Joined: Sun Mar 28, 2004 1:44 am
Location: U.S.A.

Post 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?
IcePump Gaming
under construction
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post 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?
Crud, how do I do this again?
Masdus
Posts: 186
Joined: Tue Aug 26, 2003 1:13 pm
Location: Australia

Post 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.
stampsm
Posts: 142
Joined: Mon Nov 10, 2003 5:52 pm
Location: Las Vegas

Post 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
Coolkat
Posts: 25
Joined: Sun Mar 28, 2004 1:44 am
Location: U.S.A.

Post 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?
IcePump Gaming
under construction
Post Reply