Jump to content
  • Advertisement

Archived

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

Gresc

not loading the white space

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

hey i am currently making a tile based game and have three layers... bottom being the terrain, the second being the things you can''ty walk on (trees etc) and the top being the char and baddies... wht i need to know is, is there a way of editing out the whitspace of bmp images... eg my trees on the second layer are completelty blocking out the tile beneath it on the bottom layer, when i really only want the tree present, not the white space around the tree... if u get what i mean (i know i haven''t made this very clear, sry) please help... thanx guys

Share this post


Link to post
Share on other sites
Advertisement
You are going to have to use blending with either masks or on alpha layer. You can also look into alpha testing. Search these topics up. I think NeHe has a mask tutorial too.

Share this post


Link to post
Share on other sites
In OpenGL, probably the easiest way would be use alpha channels in your bitmaps. So instead of using .bmp files use, for example, targas. Then you can encode the transparency information directly in the image.

Share this post


Link to post
Share on other sites
Yes for the alpha layer to be effective int eh way you want, plus you will have to render from back to front to prevent strange depth clipping. (This game is 2d i take it)

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!