I was trying made a pseudo race game. But I have a problem with graphic position and size when I scale it so it can fit on browser resolution.
Scale my graphic, there is a gap between each graphic :
Not scale my graphic, no gap :
So I was draw each segment using :
sptRoad.graphics.beginFill(color, 1); sptRoad.graphics.moveTo(x1, y1); sptRoad.graphics.lineTo(x2, y2); sptRoad.graphics.lineTo(x3, y3); sptRoad.graphics.lineTo(x4, y4); sptRoad.graphics.endFill();
The gap problem occur when I scale sptRoad like this :
sptRoad.scaleX = aspectRatio; sptRoad.scaleY = aspectRatio;
Is there solution for this? I want my game fit in all browser resolution.