drawanim transparency problem

Previous topic - Next topic

phil

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

MrTAToad

Use a different colour for transparency for sprites...

phil

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:

Kitty Hello

The command must be executed before LOADSPRITE or GRABSPRITE. In case of GRABSPRITE, even before the DRAWRECT.

phil

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...

Moru

Post the code and the pictures, makes it easier to help :)

phil

 :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


Leginus

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

kamakazieturtle

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:

Ian Price

@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
I came. I saw. I played.