Original Post
Hi, i recently started changing over my square tile-based game into an isometric tile game and am running into a few difficulties. I finally got the rendering/mouse mapping working, but am having trouble optimizing the rendering so that i''m not blitting too much offscreen. I went out and bought Pazera''s Iso book, but don''t understand some little things. Just to get the rendering working I was blitting every tile in my 50x60 tile map. (about 3000 blits per frame!) I noticed how slow this was already even on my 500mhz system. There''s a section in the book on how to optimize this, but for diamond shaped maps I don''t understand how I am supposed to blit from west to east (left to right) when all my tiles'' x coordinates increase diagonally? Just as a test I put something like:
// if tile is on the screen then blit it
if((tile.x > -64)&&(tile.x < SCREEN_WIDTH)&&
(tile.y > -32)&&(tile.y < SCREEN_HEIGHT))
blit tile
This works alot better (blitting about 280 tiles/frame), but still seems like the loop itself is inefficient. If anyone can explain Pazerra''s optimization for diamond maps, that would be great, or even if you know other ways i can optimize the rendering. Thanks Alot
BC
- Free Your Mind -