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.

2D All the way! / 2d image, box surrounding it

Author
Message
10521
14
Years of Service
User Offline
Joined: 25th Sep 2009
Location:
Posted: 25th Sep 2009 16:20
ok here goes..... i am trying to make a 2d space sort of game but, i cannot set the background on the image space.bmp which is my spaceship to transparent so all that happens is i get a purple box surrounding my spaceship
any help would be grately appreciated
oh yeah here is code:


a picture of the game is attatched

Attachments

Login to view attachments
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 25th Sep 2009 18:56 Edited at: 25th Sep 2009 18:59
i'm assuming dark gdk is the same as DBPro in that if you add the the texture flag ,1 when you load an image, it will "retain picture perfect quality". then, make sure you set your sprite's transparency on. so, (in dbpro):

LOAD IMAGE "space.bmp",ImgNum,1
...
SPRITE SprNum,XVal,YVal,ImgNum
...
SET SPRITE SprNum,1,1

if that doesn't work for you, it may be an issue with the .bmp file itself; most suggest using 24 bit .png files (removing the magenta (rgb(255,0,255)) and need for SET IMAGE COLORKEY all-together). if you're not using a ton of them (and not able to convert to .png yourself), zip 'em up and attach them here and i'll convert them for you.


10521
14
Years of Service
User Offline
Joined: 25th Sep 2009
Location:
Posted: 26th Sep 2009 02:57
thats alright i can convet it and i've already tried using png but (sorry about this i don't really know to much) what do you mean remove the magenta? if i knew what you meant i'd give it a try but.....
10521
14
Years of Service
User Offline
Joined: 25th Sep 2009
Location:
Posted: 26th Sep 2009 09:36
thanks alot Virtual Nomad it worked! now i'll put a better picture in for my space ship and get started on making the game, oh yeah u wouldn't happen to know where i could get a good picture for my ship would you??

Login to post a reply

Server time is: 2024-05-02 17:56:24
Your offset time is: 2024-05-02 17:56:24