GAHHH, ARCHIEVE/ENCRYPT FRUSTRATING!!!

Started by
15 comments, last by Yamian 18 years, 10 months ago
Gahhh, I've been trying to archieve/encrypt my agme files for a week now and don't think I've made any progress. So now I'm asking you people, who do u archieve/encrypt ur game files? Here is what I'm looking for... Archieve-put all my fiels into one Encrypt-Only my program and I may see the files Use-easy to integrate into my program!!! I've given up on wasting any time doing it as when it comes down to is, I'll only need it as a learning experience becasue I'm not really concerned about the rights of my blocky artwork, but I just want to learn as many professional aspects of Game Dev as possible. If someone has an exampel I can set up under 10 minutes, thena nd only then will I use it!
Advertisement
Encryption: Don't bother. Anything that your program can decrypt, an attacker can decrypt. See: SoftIce, w32dasm, the Church-Turing Thesis.

Archive: http://www.unrarlib.org/ is a good start; put your game files in a .rar archive (rename it from .rar to something else if you feel like being sneaky) and use this library to pull individual files out at runtime.
I agree with Sneftel that encryption is probably a waste of your time.

As for putting all your files into one, take a look at the article Resource Files Explained here at gamedev, hopefully it might be of some use to you.
Thank you so much! I had tried Zziplib, LZMA, Custom stuff, TAR, but never RAR. Thx a mil, I feel liek i've wasted the last week of my liek though, and a GUI based library in another post would still be good.

P.S. I don't think I have to worry attackers if I did encrypt.
This is exactly what I wanted, but I'm eggtin problems. Coudl someone who has used this library tell em what the problem is?

SDL_RWops *SDL_RWFromRAR(char *rarfilename, char *resourcename, char *password){	char *buffer;	unsigned long *filesize;		if(!urarlib_get(buffer, filesize, resourcename, rarfilename, password))	{		MessageBox(NULL, strcat("Unable to load ", rarfilename), "ERROR", MB_OK);		exit(1);	}	return SDL_RWFromMem(buffer, *filesize);}


It compiles fine, but buffer always ends NULL, and the error is not returned.
At first glance it looks like you're using the function wrong. I'm looking at the samples included with the library and it looks like the first parameter is supposed to be a pointer to a pointer, and the second is supposed to be the address of an unsigned long, while you're just sending it a pointer to an unsigned long (there's a difference).

Edit: In other words, the function can't write to the pointer you're sending it, so it comes back exactly as it was when you sent it, pointing to NULL.
I like the DARK layout!
so how can i fix it...
SDL_RWops *SDL_RWFromRAR(char *rarfilename, char *resourcename, char *password){	char *buffer;	unsigned long filesize;		if(!urarlib_get(&buffer, &filesize, resourcename, rarfilename, password))	{		MessageBox(NULL, strcat("Unable to load ", rarfilename), "ERROR", MB_OK);		exit(1);	}	return SDL_RWFromMem(buffer, *filesize);}

Try that. Almost right out of the samples.
I like the DARK layout!
I get SDL_RWFromRAR.c(12) : error C2100: illegal indirection
it's the line with SDL_RWFromMem
okay I fixed that by taking th * from filesize at the end and it compiles fin but I get the messagebox with the error. =(. IS theer somethign wrong with my rar file? does it have to be all the default settings when making te RAR, becasue I did the highest compressing possible.

This topic is closed to new replies.

Advertisement