I’m creating a pixel-based blitting-based engine for my website which reads data from a Real-time Blueprint Plan and places every content into a buffer before displaying it in a single Screen Bmp… Currently, I’m coding everything to look exactly like the blueprint by default, but the user should be able to customise things like weather, time, wind direction, sky, and fool around with the environment. Framerate is still awesome. (can’t wait to add more junk and more stuff from my single smoke/rain/lighning/whatever generators!)
Eg.
// Crashed GBomb
pWidth=plan.gBomb.width;
pHeight=plan.gBomb.height;
pX=plan.gBomb.x;
pY=plan.gBomb.y;
gBomb=new BitmapData(pWidth, pHeight, true, 0);
gBombRect=new Rectangle(0,0,pWidth,pHeight);
gBomb.draw(new CrashedGBomb(pWidth, pHeight), idMatrix);
gBombPt=new Point(pX,pY);
But here’s a problem. (attached image)
I think the problem is obvious. I think copyPixels somewhat also seems to copy the smoke’s transparent pixels over the GBomb. (And since it’s sharing the same buffer…“this”.copyPixels…it’s a problem.) Is there a way to copyPixels and do some composite transparency?
Not very sure how to do that.
Also, if anyone knows a fast way to reverse/invert the values in the smoke’s alpha channel (200 becomes 55, for example, than do help me.). My hardlight draw method doesn’t seem to really match the sketch very well. It’s still too bright. Though I can manually darken the bitmap…that woudl be a last resort.