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

Directional bias #12

Open
4 tasks done
mjrlowe opened this issue Jun 22, 2020 · 1 comment
Open
4 tasks done

Directional bias #12

mjrlowe opened this issue Jun 22, 2020 · 1 comment
Labels
feature a feature request

Comments

@mjrlowe
Copy link
Owner

mjrlowe commented Jun 22, 2020

Some algorithms could have functions that pick neighbor cells to connect to that aren't completely random. Some examples:

  • Horizontal and vertical bias (e.g. picking a vertical neighbor is twice as likely as picking a horizontal neighbor)
  • Pick neighbors according to a perlin/open-simplex noise function (creates blobby patterns)
  • Other functions (see this p5.js sketch I made a while ago: change "select neighbor mode")
  • Custom functions? It wood be cool if the user was able to give the algorithm a custom function to pick the neighbors with. (Maybe it takes in the cell's x and y position and it's possible neighbors and it outputs which neighbor/direction to chose?)

This will work best for algorithms like the recursive backtracker, where almost every step we have to make a decision about which neighbor we should connect to.

@mjrlowe mjrlowe added the feature a feature request label Jun 22, 2020
@mjrlowe
Copy link
Owner Author

mjrlowe commented Dec 4, 2020

Added this in version 0.4.0, using custom functions, but currently it is only compatible with some of the algorithms due to the way it is implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request
Projects
None yet
Development

No branches or pull requests

1 participant