Switch to full style
Understanding the language, error messages, etc.
Post a reply

set background color

Wed Aug 10, 2016 6:34 pm

Is there a way to set a "background color" that appears behind sprites? Currently behind my spitear is white but is there a way to set that to black? I didn't see anything in the reference.
... thanks in advance, noah

Re: set background color

Wed Aug 10, 2016 6:46 pm

Actually, it does say in the reference :P http://gamebuino.com/wiki/index.php?tit ... y.setColor

So you do gb.display.setColor(FORGROUND_COLOR,BACKGROUND_COLOR);

e.g.: gb.display.setColor(WHITE,BLACK);

Re: set background color

Wed Aug 10, 2016 7:04 pm

Hooow embarrasing :oops:
Thanks :)

Re: set background color

Wed Aug 10, 2016 7:18 pm

Actually, I don't think this does what I want it to do. This sets the background color when you draw a circle, square or whatever, but I want the whole of the screen to be black but to have the sprites overlaid. I'm not sure how to make this clearer, but I hope you understand what I'm trying to say.
Thanks, noah

Re: set background color

Wed Aug 10, 2016 8:17 pm

Just draw a black rectangle over the entire screen as the first thing to do

Re: set background color

Wed Aug 10, 2016 8:57 pm

if you make your background bitmap colored in black and white on the get go or use the tilemap editor you can design terrain sprites of any color as long as they are black and white and the background color should be what you want. I had a problem with this too in the beginning, all my background sprites were floor colored black so I just saved my sprites using mspaint to kill the transparency and they look good now.

setting color is more for using multiple bitmaps of thr same kind to produce greys
Post a reply