Jump to content
  • Advertisement
Sign in to follow this  
Yamian

GAHHH, ARCHIEVE/ENCRYPT FRUSTRATING!!!

This topic is 4880 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
I get SDL_RWFromRAR.c(12) : error C2100: illegal indirection
it's the line with SDL_RWFromMem

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!