Jump to content
  • Advertisement
Sign in to follow this  
Cedophile

Applet Programming with Sprites

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

Hi. I have a bit of Java programming under my belt, and i'm thinking of trying my hand at applets. It all looks great so far, but I need a good source on using sprites. I'm a veteran of bitblt and DirectX from Visual Basic and C++. I'm looking to see if there's a method of getting sprites with transparent areas painted onto the screen. Does anyone have a good way to find this out? Thanks! Edit: To clarify, in BitBlt I used masks of bitmaps for transparency (ie white areas painted, black areas transparent, or the reverse; it's been a while), and in DirectX I just set the color key for transparency. Anything comparable in Java that I could study? [Edited by - Cedophile on June 15, 2007 12:47:37 AM]

Share this post


Link to post
Share on other sites
Advertisement
Java's basic drawing model supports transparency in images. If the
image is gif or png, it's completely built in. Jpg images are more
of a problem, because there is no way to incorporate transparency directly.
I solve that by using pairs of jpgs which I composite after loading.
http://www.andromeda.com/people/ddyer/java/imagedemo/transparent.html

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!