Page 2 of 2

Re: Sprite questions

PostPosted: Wed May 21, 2014 12:00 am
by Drakker
Considering that transparent would be white and opaque would be black on the LCD, that works nicely if you want transparent pixels, but if you want a pixel to be white (0, transparent) no matter what when the background might already be black or gray?

Would it be possible to do something like this:

(W = white, B = black)
W B
0 0 = transparent pixel
1 0 = white
0 1 = black
1 1 = gray

This way you'd have an array for white, an array for black, and when a pixel is in both arrays, it would result in a gray pixel. Or am I missing something?

I was putting that idea forward simply because that's how it's done on older systems, say, the NES.

Re: Sprite questions

PostPosted: Thu May 29, 2014 3:35 pm
by adekto
hey guys just wonderign what code u guys use for the grey
maybe its just be but it just looks like its flickering to slow/fast that i just see mostly black
Code: Select all
 if(gb.frameCount%2) gb.display.drawBitmap(enemy_x,enemy_y,batG,0,NOFLIP);
    else {
      gb.display.setColor(WHITE);
      gb.display.drawBitmap(enemy_x,enemy_y,batG,0,NOFLIP);
    }
    gb.display.setColor(BLACK);
    gb.display.drawBitmap(enemy_x,enemy_y,batB,0,NOFLIP);

Re: Sprite questions

PostPosted: Thu May 29, 2014 3:39 pm
by rodot
You should load SETTINGS.HEX from your SD to adjust the contrasts.
Also, set the frame rate at 41 using gb.setFrameRate(41);