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

Fill tool not working properly for Hexagonal maps #883

Closed
rafaelvcaetano opened this issue Feb 1, 2015 · 4 comments
Closed

Fill tool not working properly for Hexagonal maps #883

rafaelvcaetano opened this issue Feb 1, 2015 · 4 comments
Assignees
Labels
bug Broken behavior.
Milestone

Comments

@rafaelvcaetano
Copy link

When using the fill tool on hexagonal maps where two tiles are only connected to each other non-horizontally (when offsetting odd rows), not all tiles are detected.

Here is an example:
bug

Selected tiles are the ones in turquoise. The selection should extend to the tiles below.

@bjorn bjorn added the bug Broken behavior. label Feb 2, 2015
@bjorn
Copy link
Member

bjorn commented Feb 2, 2015

You're right of course, but this one is a little tricky to solve due to the neighbors being different than with a standard orthogonal or isometric tile grid.

Please consider supporting me financially. As it is now I would never get around to fixing such issues.

@gostay
Copy link

gostay commented Jan 26, 2016

Hi! I ran into this, too. I've been a Tiled supporter on Patreon for just a few months. My interest in Tiled currently is its Hex Map support. I recognize that my small monthly contribution may not justify big chunks of work, bug please consider this a vote for a fix to this bug and improved support for hex maps in general. Thanks!

@bjorn
Copy link
Member

bjorn commented Feb 2, 2016

@gostay I really appreciate your support and will definitely look into a solution for this! Also, do let me know what else you think should be improved about the support for hex maps.

@bjorn bjorn added this to the Tiled 1.0 milestone Feb 2, 2016
bjorn added a commit that referenced this issue Apr 17, 2017
This fixes the computation of the fill area for hexagonal maps using a
staggered Y axis (pointy-top hexagons). Maps using a staggered X axis and
isometric staggered maps still have problems and will be somewhat more
work to fix.

This kind of map was easy to fix because the hexes connect with each
other horizontally, which is a basic assumption made in the fill region
algorithm.

Issue #883
@bjorn bjorn self-assigned this Apr 17, 2017
@bjorn bjorn closed this as completed in d4ca399 Apr 17, 2017
@bjorn
Copy link
Member

bjorn commented Apr 17, 2017

Turned out this wasn't that hard to fix for hexagonal maps. It did make the code a lot larger, but its basic workings could stay the same. :-)

Unfortunately, the same isn't the case for staggered isometric maps. They are now better supported as well, but a problem remains in that diagonal neighbors are considered connected (though, that's a valid filling mode I guess, it's just not consistent with the behavior for orthogonal maps).

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

No branches or pull requests

3 participants