Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Hiding Bitmap file

This topic is 5621 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

I have wrote a tetris, but my tetris graphic file is not hidden and someone can just use them. Is there any way I can hide my 4 bmp file. I know 2 way to hide it but there are disadvantage 1) Load bmp as resource, but will make tetris.exe file size very large. 2)rename bmp to dat file, but software like QuickviewPlus are still able to view it as bitmap file. Does anyone got any other suggestion ??? tetris.exe background1.bmp background2.bmp Block.bmp title.bmp

Share this post

Link to post
Share on other sites
Put some tag in your bmp files /replace the header to make them not recognizable. When the client launches, you remove the tag /put the original header and then load the file as usually.

You could use some compressed format too, it would uncompress the files during loading time, but it will probably increase loading time too much for the purpose.

But really, I think a simple renaming should be enough for your tetris game.

[edited by - Cahaan on June 3, 2003 6:01:03 AM]

Share this post

Link to post
Share on other sites
I wrote an obfuscator for all my image and sound files.

It mangles the data (I.e. adds a PSEUDO-random value to each byte in my file to make it unreadable).

When my game app runs, it reads the file, subtracts the pseudo-random value from each byte, and I have the true file in memory.

I can then create it as a texture/wave/midi file, and make it part of my game.

Also, FYI, even if you do make the BMP a resource, it still will be accessible.

Note that my images are easily crackable, but it deters hackers from wasting time messing with your project. My images are shit anyways, but I did this as a learning experience.

I learned:
1) algorithms that return random numbers with long periods
2) managing BMP/sound files that reside in memory
3) figuring out how to read files from memory (Not as difficult as I thought it would be).

the obfuscator is just a single class with static methods to mangle/unmangle data.

I''d share it with you, bun then you''d be able to get at my game data!


Share this post

Link to post
Share on other sites
I think the simplest way to do something like this is to create your own file format. You know how to read a BMP file in so why not remove the header from the BMP and replace it with a your own file header? Leaving the image data intact.

Dave "Dak Lozar" Loeser

Share this post

Link to post
Share on other sites

  • 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!