Jump to content

  • Log In with Google      Sign In   
  • Create Account


"encoding" BMP files


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
15 replies to this topic

#1 Julio   Members   -  Reputation: 116

Like
Likes
Like

Posted 12 March 2000 - 05:31 AM

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.

Sponsor:

#2 Spellbound   Members   -  Reputation: 122

Like
Likes
Like

Posted 12 March 2000 - 06:02 AM

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.

#3 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 12 March 2000 - 12:25 PM

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.

#4 JonatanHedborg   Members   -  Reputation: 122

Like
Likes
Like

Posted 12 March 2000 - 12:36 PM

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....




#5 SiCrane   Moderators   -  Reputation: 9560

Like
Likes
Like

Posted 12 March 2000 - 03:43 PM

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.

#6 Spellbound   Members   -  Reputation: 122

Like
Likes
Like

Posted 12 March 2000 - 04:17 PM

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

#7 Spiff   Members   -  Reputation: 122

Like
Likes
Like

Posted 12 March 2000 - 07:34 PM

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

#8 Spellbound   Members   -  Reputation: 122

Like
Likes
Like

Posted 12 March 2000 - 08:59 PM

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.

#9 Spiff   Members   -  Reputation: 122

Like
Likes
Like

Posted 12 March 2000 - 09:17 PM

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

#10 SiCrane   Moderators   -  Reputation: 9560

Like
Likes
Like

Posted 12 March 2000 - 09:20 PM

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.

#11 Spiff   Members   -  Reputation: 122

Like
Likes
Like

Posted 12 March 2000 - 09:22 PM

Ok, I give in. Although I''m still considering drawing my nick on all of the textures though

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

#12 Spellbound   Members   -  Reputation: 122

Like
Likes
Like

Posted 12 March 2000 - 09:52 PM

quote:
Original post by Spiff

But the main reason for using resource files is to gather the files into one and prevent users from modifying them.



Actually I think the main reason for using resource files is that it is faster to load the data from a resource file than from separate files. This because you don''t need to rely on the operative system to find the file for you, instead you effectively have a pointer that tells you exactly where the file is inside the resource file.

It also takes up less space on the harddrive than separate files. Files on the harddrive use an even amount of blocks, which will in average give you a waste of half a block per file. As an example, think of the old FAT16 file system, here each file is stored in blocks of 32kb. If you have a thousand files you will waste 16 MB of harddrive space. In reality you will waste a lot more than that as most files are smaller than 16 kB effectively raising the average waste per file. Of course with FAT32 and NTFS the block size is a lot smaller (I believe it is 4kB for FAT32) but the waste is still there.

#13 LaughingD   Members   -  Reputation: 151

Like
Likes
Like

Posted 12 March 2000 - 10:14 PM

Another reason to use some sort of resource file is that it can take a lot less time to install on a users machine (assuming you are installing from a CD) as you get one long sustained transfer instead of a thousand seeks and a thousand short transfers that generally make the CD skip all over the place. I''m just mentioning this because of a game that I just worked on where the developers shipped about 3000 seperate 2-16k files, and it takes FOREVER to install, and it''s really not that large.

Another benifit is that when you are creating your install, it''s much easier to be sure you didn''t forget a file (though you might have forgotten to put it in your resource file).

One other thing (it''s the last, I swear it) is that you can use numeric ID''s instead of filenames (if you roll your own resource file), and then you don''t have all those filenames littering your code and taking up space. Of course, you have to make sure the ID''s match...

Mark Fassett
Laughing Dragon Entertainment
http://www.laughing-dragon.com

#14 bben2k   Members   -  Reputation: 122

Like
Likes
Like

Posted 14 March 2000 - 10:35 AM

One other possibility that will not Prevent someone from taking the graphics but can help copyright them. Is to use a technique calles stegenagraphy... I don''t know if I spelled it correct. But that actualy can hide a logo, or any sort of file within the graphic itself. Though you cann''t tell just by looking at the picture, it is possible by looking at the data and using certain tools to tell there is a hidden file. But by encrypting the file and other methods it is a very common and effective way to copyright images. Might be worth a look into.

#15 gmcbay   Members   -  Reputation: 130

Like
Likes
Like

Posted 15 March 2000 - 07:47 PM

Spiff...Why would id care if you wrote your name on all the textures? The net effect of your effort would be that you uglified your (and only your) copy of Quake3. If the Quake games (and Doom before them) taught us anything, it should be that the ability for users to modify game art and even behavior can be a huge plus, as it creates a longevity that the game would otherwise not have.

Trying to hide graphics with obfuscation is a pretty useless gesture. If anyone really wanted to get them out, they could, no matter what you do to hide them. Worst case would be they just have to disassemble your texture loading function. That doesn''t mean they can just go and use them in their own game, copyright law protects against that.

id using ZIP format for Quake3 isn''t lazy -- its just smart. It gives them good compression and as others mentioned makes it easy for mod programmers to work with the files. Even when they were using other formats (WAD, etc) the fileformats were known. Most of them id published themselves. For the original Doom, a lot of the information was first reversed engineered by end-users (before id realized how much of a good thing it is to keep your game mod-friendly)



#16 Spiff   Members   -  Reputation: 122

Like
Likes
Like

Posted 15 March 2000 - 09:32 PM

*puts down his sign* - I give in. Of course there are advantages of using zip files, but only for games you really want people to alter, and that''s prolly not what Julio wants. Can we go with this..?

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




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS