how to hide graphics for players
Hi, I''m new to game programming and have built a Tetris-clone. I''m using DirectX7 to draw my graphics (these are bitmaps).
If you look at other games their graphics have been made "invisible" for the players. How can I hide my resources so they aren''t available to others?
How are you storing them? In the resource file or as standalone files?
One idea is to add them to the resource file and then encrypt the program once compiled. Check out a program called UPX. Just do a search for it or something. It''s a brilliant PE packer.
Another idea is to code you''re own encryption and decryption routine. When you draw your images encrypt the file and when needed in your prog just decrypt them.
A simple XOR encryption is well easy to code and will stop most people accessing your graphics.
If you need any further help on these two topics don''t hesitate to contact me..
Regards,
David Stubbs
One idea is to add them to the resource file and then encrypt the program once compiled. Check out a program called UPX. Just do a search for it or something. It''s a brilliant PE packer.
Another idea is to code you''re own encryption and decryption routine. When you draw your images encrypt the file and when needed in your prog just decrypt them.
A simple XOR encryption is well easy to code and will stop most people accessing your graphics.
If you need any further help on these two topics don''t hesitate to contact me..
Regards,
David Stubbs
Regards,Dave
this might sound a bit hard.
i find this totaly bollux are u afraid about other ppl seeing what textures youve used WHY? they steal them from u?
good and confident programs don''t need this eg quake unreal etal. ask yourself why first do they need to be hidden (which is impossible) then ask yourself is this a vanity thing!
i find this totaly bollux are u afraid about other ppl seeing what textures youve used WHY? they steal them from u?
good and confident programs don''t need this eg quake unreal etal. ask yourself why first do they need to be hidden (which is impossible) then ask yourself is this a vanity thing!
zedzeek:
Well, after a good thinking, I must say you are right. There is no reason for hiding graphics or any resources. In fact, if you worked very hard on some textures, it would be an appreciation (don''t know if this is the correct word) if others would use your graphics.
But it would still be nicer if all my graphics would be stored in a file called eg "graph.res" or something, rather then have them in a subdir "/graph".
n0p3x:
Thanx anyway. I looked for UPX and it says it only compresses executables. Is this true?
I can''t use a resource file, because I don''t use C++, but VB. But I''m trying to move to C++ if I have got a little more experience in games programming.
Well, after a good thinking, I must say you are right. There is no reason for hiding graphics or any resources. In fact, if you worked very hard on some textures, it would be an appreciation (don''t know if this is the correct word) if others would use your graphics.
But it would still be nicer if all my graphics would be stored in a file called eg "graph.res" or something, rather then have them in a subdir "/graph".
n0p3x:
Thanx anyway. I looked for UPX and it says it only compresses executables. Is this true?
I can''t use a resource file, because I don''t use C++, but VB. But I''m trying to move to C++ if I have got a little more experience in games programming.
The only reason you would want to hide/encrypt your images is to prevent cheating. For multiplayer games, some form of resource checking is a must (hl checked the size of the hl.exe to see if it was the correct size, and Quake3 implemented a pure server). For single player games it isn''t worth the effort.
-e
-e
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." - Albert Einstein
Yeah UPX only compresses executables. I meant to compress the executable after you had added the images to the resource file and compiled to stop people opening your program in a resource editor and still being able to get at your pics.
Besided, even if you don''twant to do that check out UPX''s compression ratio for your programs. It really is very good and doesn''t hamper performance much (well, i''ve never noticed a difference).
Regards,
David Stubbs
Besided, even if you don''twant to do that check out UPX''s compression ratio for your programs. It really is very good and doesn''t hamper performance much (well, i''ve never noticed a difference).
Regards,
David Stubbs
Regards,Dave
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement