Jump to content
  • Advertisement
Sign in to follow this  
BigBeginner

Transparency problems (with Sprites)

This topic is 4625 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. Im writing a 2D simple game. Forasmuch I can't insert pictures into the forum, I'll try with links, if it's not forbidden. There is some cloud: I have a background image: (the turquoise color is the back color, it's ingored when drawing). arranges: - moving clouds - draw clouds - draw background - draw, control enemies etc. At this point everything is ok. When I hurt an enemy, some blood-blots is put onto the screen with alpha value: The blood blot is burned into the background. I use the ID3DXSprite, change the surface's target (not to backbuffer), and draw it. It is neither problem. The problem is inside the white circle. Can you see those yellow colors in the blood? That is the problem. When I burn a blood-blot to a background image, the background image's alpha bit changes too. That's why the clouds are filmy, I guess. Question is: how to burn this bloody effect into the background not to be visible the cloud? [Edited by - BigBeginner on January 20, 2006 6:04:09 AM]

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by BigBeginner
Hi. Im writing a 2D simple game. Forasmuch I can't insert pictures into the forum, I'll try with links, if it's not forbidden.

Nothing wrong with posting images inside posts unless they're "bad" pictures. Post a bad picture in a post and you might as well start running now [lol]

Anyway, to embed an image:

<img src="filename here">

If the image is particularly large (say, greater than 500 x 500) you can reduce its size:

<img src="filename here" width="50%">

Your images are pretty small though - posting slightly larger ones might be a good idea.

Jack

Share this post


Link to post
Share on other sites
Quote:
Original post by BigBeginner
if my English was **** (it is possible), or something is not clear, write it...
uhm, whats this all about?

Don't be unreasonable:
- You're the only one thats posted - your last 3 posts haven't really had anything in them (unless you edited them quickly?)
- No one has commented on the use of your language, but less of the swearing please as it's not appropriate here.
- It's been less than 5 hours since you posted. Wait longer for a reply, in truth there are rules against bumping a thread inside of 24 hours.

Jack

Share this post


Link to post
Share on other sites
I think your solution is to change the draw-order for your sprites. You could possibly set D3DTS_ZWRITEENABLE to FALSE - you'll need Z Testing, but particle systems can often skip the draw-order sorting by avoiding Z writes.

hth
Jack

Share this post


Link to post
Share on other sites
Hm.

I'll think about it over, but the main problem is: when I burn the blood to the background image, it's alpha values change - all the pixel of background's alpha value is 255 (not transparent) and when the blood put it on, it's alpha values changes too. That's why the clouds are appearing in the blood-effect. I guess.

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!