Jump to content
  • Advertisement


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


Advance Idea..should I say newbie Idea

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

Is it possible for me to load a prerendered bitmap and load the same bitmap again but with only two colors black and white. Then make black and white to be transparent but also make white non-walkable.

Share this post

Link to post
Share on other sites
possible yes, smart no...

do like this instead, save to bitmaps one haveing the bitdepth you want to use and one using 1BPP, the 1BPP one is the one you use for walking, thats the easy way, the alternative is to make all areas that should be transparent the same color and use colorkeying and alsot using it as a look-up do whatever suits you best.

just fiddle around with it and youll discover things

Share this post

Link to post
Share on other sites
or just reserve one bit of the texture-color for "walkable" information.
you can take the additional green bit in 5:6:5 or the least-significant blue bit in 8:8:8.

when loading, just copy this bit to a "walkable-buffer" and set it to zero in the texture-image.

this way you have the information in one monolithic (or does this one spell with ''y''?) block, which should be smaller on disk, faster to load, easier to keep track of when changing the texture etc.

and nobody will know where you store the information, until he is a skilled reverse-engineer or does a very good guess.
and anyone trying to just replace one bitmap by a bitmap made with photoshop or similar will end up with totally messed up clipping, which is fun too.

that is what i consider smart.

if you then put your textures and geometry-data and stuff in one big file, LZW-compress them in chunks like what you are going to load together... that is what i consider cool
you should take this last step only before releasing, itll cost much time otherwise when you change textures etc.

but since youre probably not be doing anything i wrote above, ill just stop here.
(maybe think about the "use one color bit" approach though. that one should really make sense)

the color-bit-approach can also be used to store compressed-ciphered data in .BMPs or .PCXs or other lossless image-formats. its very hard to notice there is something "behind" the image and its very hard to proove too, because compressed&ciphered data will just look like random noise (if you use arithmetic-coding for example). thats what i consider fun

--- foobar
We push more polygons before breakfast than most people do in a day

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!