Archived

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

Samurai_x

Advance Idea..should I say newbie Idea

Recommended Posts

Samurai_x    122
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
foobar    122
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)

p.S.:
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