Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / backdrop sprite with transparency

Author
Message
rob3d
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Canada
Posted: 3rd Jun 2003 07:19
I wonder if anyone can answer this question. I am trying to load a sprite the size of the screen as a backround surface for my game. I have left areas of the image pure black. These are areas I would like to be transparent on the sprite, then I would like to paste other sprites to the screen and have them come into view only in the area of my backround sprite that is black. When I try this none of the new sprites show through in the black (supposedly transparent areas) or if I change the backround sprite's settings all the sprites are on top of this backround sprite (although the pure black areas on these sprites are transparent)
I have used the settings below for the backround sprite.
sprite 1000,0,0,500
set sprite 1000,1,1
set sprite priority 1000,1

If I don't set it's priority to 1 then all the other sprites are drawn on top. What I am trying to achieve is like a face of a slot machine with the reels spinning behind windows in the space.

Is this possible to do?
Mattman
21
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 7th Jun 2003 06:54 Edited at: 7th Jun 2003 06:55
If u want a sprite to be the background, that, I believe, is simple!
But in order to do this, the sprite must be a bitmap!
Just simply make the bitmap bitmap 0! As for the transparant parts I can't really help u Maybe you just place the sprites over your .bmp background without making blacks spots. Sorry I can't really help

GL!
Mattman

Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.
---Andy Rooney
rob3d
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Canada
Posted: 10th Jun 2003 09:34
Mattman

Thanks for the reply. Someone (Fog) on the Real Game Tools site helped me out. It turns out the image I used for the foreground overlay was okay but it did not work if it was a .png
I saved the image off as an .jpg and a .bmp and they both worked (of course the .jpg fringed a little bit around the borders of the black to the other colours, that's why I chose the .png for size and a sharp mask) The .bmp of the file worked perfectly but the image file size is large.
Does anyone know why the .png should not have worked? Is their some special way .png files need to be saved to work correctly?
Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 10th Jun 2003 22:15
Did you configure the alpha levels of the .png? They work fine for me, and are much smaller in size then .bmp files.

I hear and I forget. I see and I remember. I do and I understand.
rob3d
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Canada
Posted: 13th Jun 2003 08:24
Nilrem

How do you configure the alpha levels of a png, within DBPro or in a paint program such as photoshop? I didn't see any alpha options when I saved the file in Photoshop.

Robk
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 13th Jun 2003 08:54
here is a sample of using a png and a bmp.

In photoshop the transparent areas for my png were clear and transparent and not black.

http://www.lunarpixel.com/temp/png_alpha_test.zip

DBP

Login to post a reply

Server time is: 2024-11-24 16:22:50
Your offset time is: 2024-11-24 16:22:50