GLBasic forum

Main forum => GLBasic - en => Topic started by: phil on 2009-Nov-12

Title: drawanim transparency problem
Post by: phil on 2009-Nov-12
hi, I may have found a bug of i may be doing this wrong...
SETTRANSPARENCY RGB(255,0,128) so now everything with this colour should not display this colour right??? ie. fonts sprites and drawanim?
well fonts are working, but my animated Turrican is accompanied everywhere buy a big pink girly square around him (255, 0, 128).  HELP  :noggin:

go easy, I am a noob so go easy!! lol
Title: Re: drawanim transparency problem
Post by: MrTAToad on 2009-Nov-12
Use a different colour for transparency for sprites...
Title: Re: drawanim transparency problem
Post by: phil on 2009-Nov-12
yup, tried black... 0,0,0 green 0,255,0 and each time i could get my fonts to go transparent but not my anim... i even tried .png anim and .bmp incase this was the prob... if this isnt what u mean then please elaborate, im lost!! :noggin:
Title: Re: drawanim transparency problem
Post by: Kitty Hello on 2009-Nov-12
The command must be executed before LOADSPRITE or GRABSPRITE. In case of GRABSPRITE, even before the DRAWRECT.
Title: Re: drawanim transparency problem
Post by: phil on 2009-Nov-12
hmmm... it is my second command, right after SETCURRENTDIR("Media") and load font comes before loadanim in my code and it works for that... I may have to post my code if it isnt something obvious...
Title: Re: drawanim transparency problem
Post by: Moru on 2009-Nov-12
Post the code and the pictures, makes it easier to help :)
Title: Re: drawanim transparency problem
Post by: phil on 2009-Nov-12
 :x Ok... Ive fixed the problem... Firstly it wasnt a GLBASIC problem, it was a mspaint problem. I have no idea what caused it but i got around it by cutting my sprite and pasting it onto my fonts png, I then picked the pink from the fonts png and filled the sprite with it before resizing the page and renaming it as my sprite... for some reason its now transparent LOL... Sorry everyone, I think it was cos id converted my sprite it from a gif previously or something.
I`ll stand in the naughty corner for a while and think about what ive done. LOL

Title: Re: drawanim transparency problem
Post by: Leginus on 2009-Nov-12
Dont worry,  you wont be lonely.  I have just about finished the gfx for my game, so next week the coding begins.  Its by no means my first game, but certainly my first thing in GLB so I am sure that I will do some silly things  =D
Title: Re: drawanim transparency problem
Post by: kamakazieturtle on 2009-Nov-18
Quote from: Leginus on 2009-Nov-12
Dont worry,  you wont be lonely.  I have just about finished the gfx for my game, so next week the coding begins.  Its by no means my first game, but certainly my first thing in GLB so I am sure that I will do some silly things  =D

Tell me about it, I've been coding for like 5 years and using GLBasic for 1 1/2 and still make silly little stupid mistakes. I really can't wait til I start my programming class next semester so I can really get my feet wet. Everything I know is from books and forums and figuring it out in time. Maybe school will help me avoid more of these silly mistakes and actually teach me C++ finally. :giveup: But don't fear to ask questions, this is a very helpful and responsive forum.  :good:
Title: Re: drawanim transparency problem
Post by: Ian Price on 2009-Nov-23
@Phil: Are you using Windows 7 by any chance? I've just encountered this problem (again with MS Paint). I've been using GLB for over a year now and I've never had this problem before. I don't think this has anything to do with GLB inexperience (I've created numerous games and apps) - I think there's an issue here.

I wonder if MSPaint has slightly changed the way that it saves .PNG files