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.

Author
Message
Game designer extraordinaire
15
Years of Service
User Offline
Joined: 11th Oct 2010
Location: Mars
Posted: 12th Oct 2010 03:32
Hello. I am currently in need of some help. You see, when I try to use an image in dark basic pro I cant seem to get the background color,white, to be transparent. If anyone can shed some light onto this predicament help would be much appreciated.

Thanks!

Yes...it is I
luskos
19
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 12th Oct 2010 06:49
SET IMAGE COLORKEY


Coding is My Kung Fu!
And My Kung Fu is better than Yours!
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 12th Oct 2010 09:27
I find it's best to use alpha transparency, with PNG format images you have full control - add subtle drop shadows, smoothing, then you don't get those jagged edges on pixels unless you want them.

I tend to draw sprites at double the resolution, then scale down to the required size. This gives a neat anti-alias effect, making the sprite appear higher resolution than if you draw it at the normal size.

Health, Ammo, and bacon and eggs!
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 12th Oct 2010 14:58
Quote: "I tend to draw sprites at double the resolution, then scale down to the required size. This gives a neat anti-alias effect, making the sprite appear higher resolution than if you draw it at the normal size."

Agreed, that's how I do it too. PNG is great for use with transparency but as luskos said if you really want to use white as a transparent colour use "Set Image Colorkey".

DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 13th Oct 2010 16:24
Apha transparency is best as it allows you to use every colour in the sprite, but if not then as suggested change the colour key, or simply use pure black as your border colour.

http://s6.bitefight.org/c.php?uid=103081
Game designer extraordinaire
15
Years of Service
User Offline
Joined: 11th Oct 2010
Location: Mars
Posted: 15th Oct 2010 03:54
Thanks guys! I really needed that. Only one question : doesn't the png file format distort the image? Please correct me if im wrong.

Yes...it is I
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 15th Oct 2010 15:56
Quote: "doesn't the png file format distort the image?"

No, not unless you use some form of compression. I find png to be the most lossless method of saving images while still keeping a fairly small file size. They load pretty quick too.

Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 15th Oct 2010 19:58 Edited at: 15th Oct 2010 20:07
Quote: "distort the image"


You're probably talking about the blurring of images if you don't load the image right. If it's a 2D game always use a texture flag of 1 at the end of any GET IMAGE or LOAD IMAGE command and it'll grab/load the image pixel perfect.



Yeah we all agree that .png is the best format to use for every program. .jpgs are the worst since they change the colors of the image. .bmps are just too big and slow to use. And the biggest annoyance is neither .jpg or .bmp support transparencies.

Game designer extraordinaire
15
Years of Service
User Offline
Joined: 11th Oct 2010
Location: Mars
Posted: 17th Oct 2010 20:46
Thanks for all the help.

Yes...it is I

Login to post a reply

Server time is: 2026-07-22 03:51:28
Your offset time is: 2026-07-22 03:51:28