• Advertisement

Archived

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

"encoding" BMP files

This topic is 6609 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 want to change the file format for the standard .bmp file format so I can use graphics in my games without worrying about them getting pirated. Something similar to a .wad (as in Doom). I can load a bitmap file easy enough and I am wondering if I just change the header of ''MB'' to something else, will programs like Paintbrush be able to read the file? Any help would be great.

Share this post


Link to post
Share on other sites
Advertisement
Just changing the filename, will not help you. The simplest way of protecting against theft is to make your own fileformat. It is not fully protected though because someone will eventually figure out the fileformat, at least if the graphics is worth stealing.

If you want to do something like Doom, or Quake then you may want to take a look at this article:

Resource Files explained

You may be interested in knowing that Q3 graphics are not protected in any way, because the pak files can easily be read with WinZip.

I also don''t think you have to worry about people stealing your graphics, because it''s something that is so easily noticed.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Don''t bother trying to protect the graphics. Even if yu make them impossible to read, someone can just sit around and press print-screen to get all the frames into the clipboard.

Share this post


Link to post
Share on other sites
spellbound: i think what he ment was; not change the extension, but the HEADER... (i dont mean to sound mean)

and whoever the anonymos is; hes right... the only reason i can think of why u should put them in a pak file or whatever is size and maybe speed... + that it looks better....


Share this post


Link to post
Share on other sites
To answer your question: most loaders will just give up after seeing a "MB" rather than a "BM". However some loaders will still try to read it anyway (especially if it''s labeled as a .bmp file). I found this out the hard way when I miss coded a bitmap writing function.

Alternately you can just add junk to the head of your files, or xor each byte with some arbitrary byte, etc.

On the plus side, if you do manage to hide your textures, screenshots of a three dimensionaly game will only give bad quality pirating of your textures. On the downside, the anonymous poster is right, if you''re in two dimensions then they can definately pirate your images without loss of quality.

Share this post


Link to post
Share on other sites
JonatanHedborg: You''re right, after re-reading the post I see my error. My tired eyes wasn''t feeding me the right information.

Share this post


Link to post
Share on other sites
Resource files is the best way to go, as long as they can''t be edited. I''ve made my own file format and every time I need a file, I extract it to a temp folder. If someone would Alt+Tab in the game, they can get the files but not edit them. You can also apply encoding to the resource file too (not zip like Q3 though, since IMHO that''s really lame)

============================
Daniel Netz, Sentinel Design
"I'm not stupid, I'm from Sweden" - Unknown

Share this post


Link to post
Share on other sites
Spiff: I think the way that Q3 uses zip for their pakfile is a really good idea. That way they don''t need to create a program to put all files in the pakfile. Also, they don''t use any compression to the data.

Share this post


Link to post
Share on other sites
Well, sure, you're right about that Spellbound. But the main reason for using resource files is to gather the files into one and prevent users from modifying them. I can get all the textures from Q3 and use it myself or draw my nickname all over them.

It would be a good thing if some minor game used zip files, but if Q3 used zip for ease, they're just lazy.

============================
Daniel Netz, Sentinel Design
"I'm not stupid, I'm from Sweden" - Unknown

Edited by - Spiff on 3/13/00 3:18:02 AM

Share this post


Link to post
Share on other sites
They probably didn''t do it for ease of use. Most likely it was because the Quake/Doom series has always relied very much on the society of people producing mods and skins and what have you. So, I''m guessing, it was more for *our* ease of use.

Share this post


Link to post
Share on other sites

  • Advertisement