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

Creep.moveTo tries to path through walls where there is no room exit #98

Closed
tcdejong opened this issue Sep 12, 2018 · 1 comment
Closed

Comments

@tcdejong
Copy link

Take a hypothetical scenario of two rooms, say Shard 2 W39N23 and W38N23.

Using moveTo to go from one to the other will cause the creep to try to move up against the wall and stay there, even though JSON.stringify(Game.map.describeExits("W38N23") returns {"1":"W38N24","3":"W37N23","5":"W38N22"} (i.e. no exit connecting both rooms.

This applies to all edges where the most extreme coordinate (x or y is 0 or 49) is a wall but it is adjacent to moveable tiles.

@Flya
Copy link

Flya commented Sep 12, 2018

This is not a bug, the path finder algorithm is reach CPU limit and its return a closest position to the goal position. You need to try increase maxOps to solve this problem, or decrease cost for swamp, or allowing only rooms that returned by Game.map.findExit. Unfortunately sometime it's dificalt to find path from one point to another.

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