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

A little insight into the underlying model #1

Open
SleepyBrett opened this issue Dec 19, 2019 · 2 comments
Open

A little insight into the underlying model #1

SleepyBrett opened this issue Dec 19, 2019 · 2 comments

Comments

@SleepyBrett
Copy link

I'm trying to use this library to do some work that is not image based using the SimpleTiledModel. Is there a way to inspect the current solution and know which tile/variant has been selected for each location in the grid? Thought I would ask before I start digging in myself.

@shawnridgeway
Copy link
Owner

Hey @SleepyBrett, thanks for opening your question. Yes, I believe if you look into the model.Wave[x][y][t] field (where x and y are the coordinates in the output and t is the list of possible tiles at that location) there should be just one possible tile t for each coordinate (given it was a successful generation). The value at this point will be an int index of the corresponding tile in model.Tiles[t]. Do you think you'd be able to use this for your task? If not, let me know. Happy to answer more questions:)

@SleepyBrett
Copy link
Author

SleepyBrett commented Dec 20, 2019

No i think that will be fine, i was a little thrown off by the array of tiles!

... hmm now that I'm looking at the data, since the basemodel.Tiles array only holds the pixels for each tile that can be a little hard to track back to which simpletilemodel tile/variant we're talking about at that point. Let me try some things...

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