How to encrypt bitmap files???
I am making a game and i want to make it a little hard for someone to go in the graphic files and see all the graphics and stuff. Right now im using just plain old .bmp files. I have paint shop pro 7 and im wondering if there is a file format that automatically encrypts files with a key or something. Or am i just gonna have to write my own compression routine or something?
As a first step I''d rename all the .bmp to .dat or something,
this might already keep of most of the ''normal people'' from
messing with''em.
As encryption I''d suggest something like the xor algorithm.
(xor first byte with a key, use the result as key for next byte
and so on... [if I recall correctly])
Sure, this is not proof as in "nobody will be able to hack it",
but it''s not like you''re hiding secret information or something.
And it should be rather fast and easy to implement =)
this might already keep of most of the ''normal people'' from
messing with''em.
As encryption I''d suggest something like the xor algorithm.
(xor first byte with a key, use the result as key for next byte
and so on... [if I recall correctly])
Sure, this is not proof as in "nobody will be able to hack it",
but it''s not like you''re hiding secret information or something.
And it should be rather fast and easy to implement =)
How do I set my laser printer on stun?
quote: Original post by Wildfire
As a first step I''d rename all the .bmp to .dat or something,
this might already keep of most of the ''normal people'' from
messing with''em.
As encryption I''d suggest something like the xor algorithm.
(xor first byte with a key, use the result as key for next byte
and so on... [if I recall correctly])
Plus, you can pack all the bitmaps to a single file (or one file
per level etc.), possibly along with other data.
This could even speed the loading up a bit.
---Never trust a Troglotroll.
My recommendation is that you just create your own graphics format.
First, read up on the .BMP format, and how it works. There are several weaknesses that the .BMP format has; for example, it is stored "bottom up", while all other graphics on modern PC''s is "top down". By making your own graphics format, you can make it top-down, which will make it load faster. Plus, by writing your own loading code, you can bypass the GDI.
You''ll also need to write BMP->your format and your format->BMP converters.
- Andy Oxfeld
First, read up on the .BMP format, and how it works. There are several weaknesses that the .BMP format has; for example, it is stored "bottom up", while all other graphics on modern PC''s is "top down". By making your own graphics format, you can make it top-down, which will make it load faster. Plus, by writing your own loading code, you can bypass the GDI.
You''ll also need to write BMP->your format and your format->BMP converters.
- Andy Oxfeld
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement