-
-
Notifications
You must be signed in to change notification settings - Fork 19.5k
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
Autotiling does not work in combination with half offsets. #17065
Comments
I like your suggestion but I think it would mess with the quadrants used for tilemap optimisation. Another possibility would be to use the central bit of the autotile bitmask to determine whether the tile is on a odd or even row. What do you think about that? |
@MarianoGnu What would you suggest to solve this problem. I could implement it but I would really like to hear a second opinion on this. |
I actually like this idea quite a lot as it would probably be the most intuitive way to implement this without breaking backwards campatibility. I think I could implement this very quickly but I would really like to here the opinion of someone who knows a little bit more about the plans for this engine as I'm just a developer. |
Can anyone still reproduce this bug in Godot 3.2.3 rc3 or any later release? If yes, please ensure that an up-to-date Minimal Reproduction Project (MRP) is included in this report (a MRP is a zipped Godot project with the minimal elements necessary to reliably trigger the bug). You can upload ZIP files in an issue comment with a drag and drop. |
No answer, so closing. Please comment if you can still reproduce it, and this issue can be reopened. Or open a new issue with a MRP if this would be better suited. |
It's less of a bug and more of just the way the tile set auto tile works, so until one of the suggested fixes are implemented it will always be reproducible. |
Godot version:
3.0
Issue description:
Autotiling determines the tile to be drawn by looking at the neighbor cells. These are defined by having an x- or y-index that differs by at most 1. With an activated half-offset, this neighborhood-logic breaks.
What is the upper-right neighbor in a regular grid, can become two different things in a half-offset grid: Either a cell that does not touch the original cell anymore, or a cell that shares half an edge with the cell.
![regular_grid](https://user-images.githubusercontent.com/3463790/36701398-8c8fca66-1b53-11e8-974a-fa3528b3c4c4.png)
![half_offset_grid](https://user-images.githubusercontent.com/3463790/36701412-9805ce68-1b53-11e8-8519-89c0d2a28611.png)
This are diagonal neighbors on the regular grid:
And here are two pairs of diagonal neighbors on the half offset grid
That means the concept of a neighbor depends on what cell you are looking at.
Therefore it does not make sense to look at the neighboring cells to determine the tile to draw.
I have a suggestion for fixing that. Maybe you find it helpful:
I suggest the following change in the half-offset functionality: Instead of making the cells go zig-zag, when turning on half offset, make them go skewed (Each row is shifted by one half cell more than the previous one, instead of going back and forth). With that arrangement, autotiling would work for half offset grid, without any other changes.
The text was updated successfully, but these errors were encountered: