megamarc / Tilengine

Free 2D graphics engine with raster effects for retro/classic style game development
https://www.tilengine.org
Mozilla Public License 2.0
803 stars 94 forks source link

No Isometric support #75

Closed GithubPrankster closed 4 years ago

GithubPrankster commented 4 years ago

Good evening, I was testing out a new perspective for my game, so I had made a map in Tiled that utilized it. image However, when I got it onto Tilengine, it appeared the same as any old Orthogonal tilemap! image I may try working in a different perspective (45º or similar) but I am sad that I could not try this out. There are games out there such as Super Mario RPG which utilize an isometric view and I was seeking to capture that. Perhaps support could be added? Granted, it may require work around the third dimension which could be a hassle, but I seek some opinions on this.

megamarc commented 4 years ago

Hi! Classic 2D VDP chips don't have direct support in hardware for "diamond" isometric tiles, nor does Tilengine do. Only orthogonal mode is supported, following its working principles. Very few isometric games for the SNES or Megadrive/Genesis were created, because they are hard to implement. Developers must work with squared tiles split diagonally combining two "materials", one on each side.

This is the actual tileset of isometric game "Populous" (https://www.youtube.com/watch?v=Ynb5-F6TPic): Populous

If you load this png as a 8x8 orthogonal tileset in Tiled and examine it, you'll se what I mean. This is the way to go.

GithubPrankster commented 4 years ago

Ouch, I think it would be less painful for me to just go with a typical top down perspective. Implementing depth would be too tricky for me. Thanks for the opinion :0

megamarc commented 4 years ago

Another option could be to interleave 2 layers displaced by half of the tileset size: if your "diamond" tileset is 32x32, use 2 layers that are offset by 16x16:

Now the "holes" in one layer should be filled by the other layer. However using this method you won't be able to use different layers to implement depth (front/back of sprites), but if your gameplay is going to be flat, it can do the trick.