So I’ve got several horizontally looping backdrops, and every one has this weird vertical line somewhere on the right. The line is only visible on transparent backdrops, and the opacity of the line is based on the opacity of the image at that location:
It’s almost as if the backdrop is “overlapping” itself by 1 pixel there. Also this line is NOT at the edge of the images, and in fact it appears at different horizontal locations if I scale the graphics to different sizes. The line also disappears as the backdrop scrolls to the left.
If I carefully pan the camera 1-pixel left and right at the point where the line disappears and reappears, I can see that when there’s a line, 1 pixel of the image disappears under the line:
I’ve tried to rummage through the “Backdrop” class to figure out how it works (no luck), and I noticed that the line appears while “_point.x” is much less than zero, but once it reaches zero, that’s when the line disappears.
So… what the heck? Halp?
Don’t know how useful my code is since this seems to happen no matter what I do, but here it is anyway: (I’m scaling the graphic, but I’ve tried without scaling and there’s no difference.)
public class SkyClouds extends Entity
{
private var cloudsBG:Backdrop;
//get the correct vector
private var cloudsLevelClass:Class = getDefinitionByName("vector_clouds"+Global.cloudsState) as Class;
private var clouds:MovieClip = new cloudsLevelClass();
//new blank bitmap data, to draw the vector onto
private var cloudsBMPDATA:BitmapData = new BitmapData(705 * Main.gameScale, 192 * Main.gameScale, true, 0x0);
public function SkyClouds () //====== CONSTRUCTOR ==========
{
//draw the vector onto the bitmap data
cloudsBMPDATA.draw(clouds, Main.graphicMatrix);
//set the bitmap data as the backdrop
cloudsBG = new Backdrop(cloudsBMPDATA, true, false);
graphic = cloudsBG; //set the backdrop as the graphic
}
}