Isometric map with big objects

Hello,
Maybe anyone have idea how to make Isometric object’s bigger than one tile?

Something like I am have:

map = [ // Tile map
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0]];
objMap = [ // Object map
[1, 0, 0, 0, 0],
[0, 0, 1, 0, 0],
[0, 0, 1, 0, 0]];

tileImg = 'tile.png';
objImg = 'obj.png';

tileArray = Array(tileImg, ...);
objArray = Array(objImg, ...);

tileW = 16; // Tile width
tileH = 16; // Tile height

function drawMap() {
    for(i = 0; i < map.length; i++) {
        for(var j = map[i].length; j++) {
            drawTile = map[i][j];
            drawObj = objMap[i][j];
            x = (i-j) * tileH;
            y = (i+j) * tileH / 2;
            drawImage(tileArray[drawTile], x, y);
           if(drawObj) {
               drawImage(objArray[drawObj-1], x, y - 16);
           }
        }
    }
}

Sorry for no Java code, but I am think this is easy understand. :slight_smile:

In here can draw isometric tile map with object’s. One object only can take one tile, but how to make Object where use 4 tiles or more? Maybe can anyone share idea?

Sorry for my English language and sorry for newbie questions. Thanks!

One way I’ve done this is to just fill the array with pointers all to the same object. The object needs to handle clearing all the array spaces when it moves or gets destroyed.

Looks to me like you’re just using a true/false collision array that is separate from your entity (objArray) list, so why not just set multiple spaces and draw it wherever you want?

if that’s the actual code you’re using, I should point out this part

            x = (i-j) * tileH; // shouldn't it be tileW?
            y = (i+j) * tileH / 2;

and there’s really a lot of ways to do this