Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hexagonal map support ? #22

Open
NoelGraf opened this issue Oct 26, 2020 · 4 comments
Open

Hexagonal map support ? #22

NoelGraf opened this issue Oct 26, 2020 · 4 comments

Comments

@NoelGraf
Copy link

The Tiled Map Editor supports the creation of hexagonal maps. Is it possible to load them ?
When I try to load a hexagonal map it is not displayed. Not sure if I am doing something wrong or if this feature is not supported yet.

@Kurble
Copy link
Contributor

Kurble commented Oct 29, 2020

Currently, bevy_tiled only supports isometric and orthogonal maps

@alice-i-cecile
Copy link

I would also love a hexagonal maps feature :) What needs to be done to get this working?

@Kurble
Copy link
Contributor

Kurble commented Nov 3, 2020

I think it comes down to implementing the required project / unproject functions, to get from tile coordinates to screen coordinates and back. I believe this is a bit more difficult for hexagonal maps because they are in a staggered grid with a variable width per row (or variable height column, depending on the orientation).

@StarArawn
Copy link
Owner

The tiled crate does support hexagon tile maps:
https://docs.rs/tiled/0.9.3/tiled/enum.Orientation.html

One would have to figure out how to generate the correct vertex/index positions from the hexagonal tile map data. The change log for tiled map editor also has a bit more info:
https://doc.mapeditor.org/en/stable/reference/tmx-changelog/?highlight=hexagonal#tiled-0-11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants