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

Automap doesn't recognize rules when they the region is out of bounds #1224

Closed
hamburml opened this issue Mar 12, 2016 · 4 comments
Closed
Labels
bug Broken behavior.

Comments

@hamburml
Copy link

I am using automap for border generation in Tiled.
It works (but I think there is a memory leak issue.. while working with lots of rules (and using them often) I sometimes have over 1 GB Ram usage.)

Nevertheless I have a rule (region) (3x3) where only the middle cell is tested (input). The other cells should be set (output). Automapping doesn't accept this rule for border-cells.
I could create new rules for solving this, but one rule would be perfectly fine when the automapping just ignores the out of bounds situation and just goes on.

I have uploaded a short example. Just open example.tmx
automap.zip

Thanks!

@bjorn bjorn added the bug Broken behavior. label Mar 16, 2016
@bjorn
Copy link
Member

bjorn commented Mar 16, 2016

Sounds like a bug but it might be tricky to fix. I'll try to get to it eventually, or maybe @stefanbeller would like to come back to have a look at it?

(but I think there is a memory leak issue.. while working with lots of rules (and using them often) I sometimes have over 1 GB Ram usage.)

Regarding this, I think it is likely just the undo history, which is unlimited at the moment. The automapper tries to reduce the amount of information stored by calculating a diff, but if it affects the entire border then the changed region will be the whole map.

@stefanbeller
Copy link
Contributor

That sounds like a bug (originally designed as a feature) to me.

What is intentional is that the output may be larger than the investigated area for the inputs. This however doesn't apply rules when the output would not fit completely on the map, i.e. if the output would be cropped by the map border, the rest which would end up on the map is not put out correctly?

Do I understand that right?

@hamburml
Copy link
Author

@stefanbeller Yes. The output is larger than the input. The input is found, the output can't be fit perfectly on the map and should be cropped by the map border.

@stefanbeller
Copy link
Contributor

tiled1224

This is what is desired IIUC.

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