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.

DarkBASIC Professional Discussion / Patch 4.1 Image transparency problem

Author
Message
Ratty Rat
23
Years of Service
User Offline
Joined: 24th Sep 2002
Location:
Posted: 23rd May 2003 11:51
I am writing a 2D game using sprites, all my images are TGA.

Up until patch 4.1 everything was fine, but since installing 4.1 the sprites have no transparency (IE black areas are not see through). If I convert the images to BMP they work OK, but I do not want to do this, or convert to any lossy (JPG/PNG) formats.

I have tried messing about with SET IMAGE COLORKEY etc and nothing works.

Anyone else get this, or know a way round it without changing my image format?

I know DBPro treats TGA differently to BMP images and there was some kind of fix (for mipmaps) in 4.1, perhaps this is a new bug thats crept in?
"Don`t try to engage my enthusiasm, I don`t have one"
haggisman
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 23rd May 2003 12:18
TGA already has alpha in the format, and so does PNG. Therefore they now ignore the set image colorkey command. So you either have to use bitmaps or set the alpha in an art package.

project: light/obscurance mapper (80% done)
Ratty Rat
23
Years of Service
User Offline
Joined: 24th Sep 2002
Location:
Posted: 23rd May 2003 12:32
Ahh, thanks haggisman, I`d totally forgotten to do that (I had not been setting the TGA alpha channel to black as DBPro up to 4.0 seemed to ignore it anyway).

Which also means this is an improvement, rather than a bug, excellent x-d !

"Don`t try to engage my enthusiasm, I don`t have one"
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 23rd May 2003 12:37
Indeed. This means that we can now use sprites for fade screen FX.

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_102.zip
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 23rd May 2003 13:17
I was doing that ages ago...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
The Big Babou
23
Years of Service
User Offline
Joined: 10th Feb 2003
Location: Cyberspace
Posted: 23rd May 2003 14:24
ratty, png isn't lossy, but it makes very small filesizes and supports saving transparency, i don't know a better format for images in DBPro.

Login to post a reply

Server time is: 2026-07-11 13:58:44
Your offset time is: 2026-07-11 13:58:44