Jump to content
  • Advertisement
Sign in to follow this  
Goguigo

Fade In - Fade Out Efect?

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

Advertisement
You'll need to create a byte array of rgba values using Image.getRGB(), fade the RGB values, then create a new image from the byte array using Image.createRGBImage().

Google "midp fading" for examples.

That's midp2 only.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
you need to do the same with the sprtie image, and manually reduce the RGB values in a loop each frame till they are gray...then use the new value as the sprite, you can only set a transparent in midp2 so its a limited use.
Its also a considerable processing task and not all handsets will have the power to handle it.

Share this post


Link to post
Share on other sites
For sprites fading in and out during gameplay you might want to just use a bunch of frames that slowly fades out if memory permits. It will be a lot faster.

shmoove

Share this post


Link to post
Share on other sites
Like any other sprite animation. A bunch of frames that slowly fade out. This will mean that you need a lot more graphics, so you'll get a bigger jar and more heap usage, so it's a trade-off in that sense (which is why I said "if memory permits").

shmoove

Share this post


Link to post
Share on other sites
Depending on what you need to fade, you can simply paint a semitransparent image on top of the whole screen repeatedl and make it fade to that image.

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.

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!