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

What is the best way to enforce some tiles (simple tiled model) to not be rotated? #86

Open
karimdjemai opened this issue Jun 21, 2023 · 1 comment

Comments

@karimdjemai
Copy link

Hi!

I am trying to generate a picture where some tiles may only be in the original rotation. But I still want to be able to define adjecency relations on all 4 sides of those tiles? How is this possible?

When using Symmety "X", it won't rotate, but then I can't define which tiles are allowed to be below or above (I think?).

Is there a way to do this?
Are there any workarounds?
What would need to be modified in the code for this to work? I might do it, if it is feasable!

Thank you in advance!

@mxgmn
Copy link
Owner

mxgmn commented Jun 22, 2023

Hi! I'm afraid my code can't be easily modified to allow this.

  1. The straightforward way would be to write your own SimpleTiledModel constructor (and you only need to modify the constructor, nothing else). For example, in my tilesets only the left/right neighbors can be defined, and up/down are inferred from left/right. But it seems like you want to specify custom up/down neighbors.
  2. A workaround is to allow tile rotations (use any symmetry type but X), but then ban unwanted rotations in code, similar to how I ban unwanted tiles when constraining the ground level.

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

2 participants