When we increase the tile width from 32 pixels to 64 pixels, the area it fills the screen automatically grows; The number of loops decreases and the frame rate with texturender reaches 60 levels.
I see 45 frames in a 12x12 grid loop. When I make this a 6x6 grid, I see 60 frames. What do your suggest? Thank you.
private function drawCamera():void {
if (player.move)
{
camera.x = camera.nextX;
camera.y = camera.nextY;
}
var tileCol:uint=camera.x/mapTileWidth;
var tileRow:uint =camera.y / mapTileHeight;
for (var rowCtr:uint = 0; rowCtr <= camera.rows; rowCtr++) {
if (rowCtr+tileRow == worldRows) break;//50 satrı ve sütundan oluşan kameranın sınırı kontrol ediliyor.
for (var colCtr:uint = 0; colCtr <= camera.cols; colCtr++) {
if (colCtr + tileCol ==worldCols ) break;
tileNum = world[rowCtr + tileRow][colCtr + tileCol];
adress = tileNum < 10?"0" + String(tileNum):String(tileNum);
graph.texture = assets.bringtextures().getTexture(adressName+adress);
graph.x=colCtr*mapTileWidth;
graph.y = rowCtr * mapTileHeight;
camera.bufferBD.draw(graph);
}
}
canvasrender.draw(cameraImage);
}