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

Comments

Projects
None yet
3 participants
@hamburml

hamburml commented Mar 12, 2016

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 label Mar 16, 2016

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Mar 16, 2016

Owner

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.

Owner

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

This comment has been minimized.

Show comment
Hide comment
@stefanbeller

stefanbeller Mar 16, 2016

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?

Contributor

stefanbeller commented Mar 16, 2016

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

This comment has been minimized.

Show comment
Hide comment
@hamburml

hamburml Mar 18, 2016

@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.

hamburml commented Mar 18, 2016

@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

This comment has been minimized.

Show comment
Hide comment
@stefanbeller

stefanbeller May 14, 2016

Contributor

tiled1224

This is what is desired IIUC.

Contributor

stefanbeller commented May 14, 2016

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