Hi there!
I've browsed all the articles on gamedev.net about isometric engines and tile based games, but did not found the solution I search in special. So I registered, and decided to ask for help within this forum.
I have written a basic isometric engine, that looks like this:
What you see here, is the map editor. I decided to write it first, to have a complete mapping system, when I start to develope the game.
This engine I wrote, it works realy fine. As long as I place floor Tiles, as the two placed on the shot. But if I want to place one of this tiles, I get a big problem:
If I place both of the tiles within my editor, it looks like this:
So, what do I do, to get this view? This steps I go through, wenn displaying a tile > Layer 0 (Floor-Tiles):
Get the Height of the Tile to place (Image-Height)
Get the Width of the Tile to place (Image-Width)
Set the display X-Position to current X-Position of Draw Function, substracting the difference of the Image-Width from Tile and the Width of the Floor-Tilr
Set the display Y-Position to current Y-Position of Draw Function, substracting the difference of the Image-Height from Tile and the Height of the Floor-Tilr
To make this all a little more transparent, the Sizes are defined as follow (Theese are all 2D Bounds):
Width of a Floor-Tile = 100 px }
Height of a Floor-Tile = 50 px } 2:1
Width of a Wall-Tile = 128
Height of a Wall-Tile = 174
When the draw function gets to a tile on position x:100,y:100 (2D Coordinates), and there is one of the walls addicted to this field, it would calculate this x/y position for drawing the tile:
wallY = 100 - ( 174 - 50 )
wallX = 100 - ( 128 - 100 )
So... I guessed, while writing the base functions of the engine, that this would automaticly move the wall tile onto the floor tile... in some way. Now I'm stucked into some caluclating and getting crazy about it. It would be great if someone here could telle me, how get the tiles > layer 0 working.
[Edited by - Souldrinker on September 2, 2004 9:10:20 AM]