RafaelBarbosatec / bonfire

(RPG maker) Create RPG-style or similar games more simply with Flame.
https://bonfire-engine.github.io
MIT License
1.26k stars 189 forks source link

Does it support isometric tilemap? #86

Open kuyum opened 3 years ago

kuyum commented 3 years ago

Thanks for the great work. I am trying dev an isometric game. Does it support isometric tilemap?

RafaelBarbosatec commented 3 years ago

Hi @kuyum! Thank's for contact ! We do not have support for an isometric tilemap yet. It would be a very interesting feature. Even the new versions of Tiled have a very nice support for isometric maps. If you want to help us implement this it would be very interesting.

GyHUN95 commented 2 years ago

It's arrived in flame 1.4.0, https://docs.flame-engine.org/1.4.0/flame/components.html?highlight=isometric#isometrictilemapcomponent

RafaelBarbosatec commented 2 years ago

Yes, it's already possible render isometric maps. But to give you a good experience with this kind of game. I will need adds the third dimension: x,y,z. And for this I have to create many modifications to give support for all behaviors and components offered by Bonfire.

4mitabh commented 2 years ago

I dont think, we'll need to change any of the data structures, or need a Z dimension.

The common way to implement isometric maps in games uses only x,y coordinates, and most of the game engine remains exactly the same. The cartesian to isometric transformation are required only at two places:

  1. When rending tiles on the screen.
  2. When reading user input. The up/down/left/right need to be interpreted according to the tilted map displayed on the screen.

Here are two introductory videos on YouTube that talk about this.

https://www.youtube.com/watch?v=04oQ2jOUjkU

https://www.youtube.com/watch?v=KvSjJ-kdGio

RafaelBarbosatec commented 2 years ago

Hi @4mitabh !

To render it's OK. But to component’s movements if there are height of different tiles. How a can handle with this without z dimension? Thinking better, i guess it’s possible. I don’t know. I'll study and search more about this. Thanks so much for share this videos! I think that I'll start the support of this without thinking in z dimension.

4mitabh commented 2 years ago

I see what you meant.

Yeah, we'll have to take care of z-order of all the rendered objects. In case of isometric objects, the trick is to simply adjust the z-order of the rendered objects according to the y coordinates.

We already do this correctly in the current maps. The knight can go around the barrel, both behind and in front of it. So, it should just work in the isometric maps too.

invennicoofficial commented 1 year ago

Any plan on this?

RafaelBarbosatec commented 1 year ago

I'm focused in release the bonfire 3.0 and the new Bonfire documentation. After this I will work in the isometric games.

gochev commented 9 months ago

I would love to make an isometric game with bonfire, bonfire is super awesome for beginners.

Btw instead of Z usually most games are made just using x and y even StarCraft :) and for the Z there is just a top, ground and underground