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

Cellular with { topology: 6 } and display with { layout: "hex" } include malformed coordinates. #73

Closed
blinks opened this issue Aug 26, 2015 · 3 comments
Assignees

Comments

@blinks
Copy link

blinks commented Aug 26, 2015

    var display = new ROT.Display({ layout: "hex" });
    var mapGen = new ROT.Map.Cellular(null, null, {
        topology: 6,
        born: [4, 5, 6],
        survive: [3, 4, 5, 6]
    });

If I then call mapGen.create, I get 1s where walls exist and 0s both in legal empty hexes and in illegal locations. By the latter, I mean that if I have the display draw at each coordinate that comes out of the map, it'll have many overlapping hexes.

While a simple workaround for the walls is to only store 1s, that doesn't allow me to determine a good coordinate for placing the player. I assume there's some good way to filter it on my end (perhaps only even/odd x coords should be accepted), but it'd be better if the map generator didn't output those coords.

@ondras
Copy link
Owner

ondras commented Aug 27, 2015

Hi @blinks,
this looks like a fair issue. I will investigate.

@ondras ondras self-assigned this Aug 27, 2015
@ondras
Copy link
Owner

ondras commented Sep 2, 2015

Should be fixed in 658a7b2. @blinks, can you confirm please?

@blinks
Copy link
Author

blinks commented Sep 2, 2015

Confirmed! Many thanks for the quick response.

@blinks blinks closed this as completed Sep 2, 2015
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