Senin, 27 Juli 2009

Isometric Graphic

Some of the above screenshot using Reiner Prokelein's Tileset

The above screenshot shows that Flash Player 10 can achieve 100 frames per second width 50 X 50 tiles and hundrends of characters.
Next I will tell you the way.

Sample how to put graphics in a tileset


To avoid some problems in putting graphics in Isometric cordinate system, we better apply the following principle:

Put the center in the lower tile square

If the height of your graphics (or bitmap) is more than the height of your isometric tile dimension,
put the center in isometric at isometric point.

For example, if you have a tree,
- put the tree in a tile (cell) center
- the grahic's height must be times of the tile height

Now you can put it by this function example in your IsometricObject:

public function addGraphic(b:Bitmap):void
{
bitmap.x = -bitmap.width/2;
bitmap.y = isometricHeight/2 - bitmapHeight;
}

It's requires to apply isometric point as the center of a tile (cell).






Tidak ada komentar:

Posting Komentar