[SOLVED] With Surface And transparent PNG loaded
EDIT: this problem is solved graceful to Looki. Thanks :)
Here, you can see what the problem was:
So, i explain my problem.
First, i create a brickbreaker with 2 images.
One loaded in a Picture object (simple of Clickteam object).
This image serve as a Background, no act, just background!
Other loaded in a Surface object (Looki's extension).
This image is a .png transparent, loaded into Surface object from the start of frame.
It serve as brick mask.
So assuming this two things, i can break with a collision test the mask, but.. It is replaced by "Black color" not the transparency color.
My question is, then How i can do that please ? ;)
I'll checked the Surface's examples, but, nothing seem to answer to my problem, i need your help friends!
My events are:
Code:
Start of Frame:
[Surface]: Load image from file Apppath$+"breakmasks\level1.png" override extension ""
Collision between [Ball] and [Surface]:
[Surface]: Draw Ellipse at ... and color RGB(0,0,0), outline 0 color RGB(0,0,0)
the '...' is just the ellipse position i've draw, it's not important to know where is it positionned, but, for the transparent color, i dunnow how to make that.
YOU MUST KNOW: i ticked on "Transparent" in the Surface parameter, and, i have NOT affected the transparency default color of Surface Object (which will be 0,0,0)... So.. what.. the.. hell?
So please, anybody help?
Re: [Help] With Surface And transparent PNG loaded
Hello, I assume that you the image has an alpha channel.
In that case, the transparent color is *ignored* - You can remove the alpha channel, but that will of course make it look worse.
What you could do as well - draw onto the alpha channel. How to do that is explained in the Alpha Channels example MFA.
Sorry I can't help you any more because I'll be away soon.
Re: [Help] With Surface And transparent PNG loaded
Ok, i will trying to draw on the alpha channel, (and yes, it exists an alpha channel).
So i try as you said.
Re: [Help] With Surface And transparent PNG loaded
EDIT: Looki, thanks for your example, it's OK now, but i must "reblit" the image each times the ball collide with the surface, it's that i've missed, sorry for disturb.