Hi,
I have a very simple 2D tile engine. I’d like to know if there’s a simple way to convert it to Isometric view. I was looking over the internet but I wasn’t able to get my code working. If someone has an example… it’d would help a lot.
Here is the code I currently have:
private int[][] currentMap;
int mapWidth = this.currentMap[0].length;
int mapHeight = this.currentMap.length;
for (int i = 0; i < mapWidth; i++) {
for (int j = 0; j < mapHeight; j++) {
int frame = this.currentMap[j][i];
g.drawImage(this.tiles.getSubimage(frame * 32, 0, 32, 32),
i * 32, j * 32, null);
}
}
It doesn’t have scroll yet, it simply draw the tiles in my screen.
Then I transformed the tiles into iso by rotating then 45 degrees and reducing the height divided by 2, but I’m not sure how can I render them. Any help?
Thanks