Generate random tiles from a seed
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 12.9k
- Forks
- 2k
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 8
Description
Is your feature request related to a problem? Please describe.
It would be great if randomly generated tiles didn't completely reshuffle whenever automapping rules are reapplied. For example, once I get the distribution of rocks and flower tiles more or less where I want them, I might want them to regenerate in the same locations, even as I continue to work on the level and add new rules and new rule maps.
Describe the solution you'd like
A custom property that can be added to a layer that allows the user to supply a seed to the random number generator so that it generates the same series of random values every time. If the property is omitted, current behavior is preserved.
Ideally, the same random value would be generated for a given index in the grid whether the user applies the automap rules all at once or uses the brush with automap while drawing enabled.
Describe alternatives you've considered
The Automap While Drawing feature partially solves this, as I can draw over new areas while keeping old areas in place. But there are still scenarios where I might need to reapply the entire map at once; like if I add several new complex rules or new rule maps. Additionally, if I have the automap radius property set while using the brush, I may end up accidentally reshuffling the rocks and grass in the vicinity, when I only meant to add a couple new tiles.
Another workaround is that I could output each terrain type to a different layer, and lock the layers that have random variations. But this adds a lot of complexity and forces me to use a lot of layers and/or separate tiles with random variants onto different layers from those that don't.
Edit: The gif below is just to demonstrate how the random distribution of tiles changes whenever I hit cmd+M
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the automapping random-generation entry points and compare applying rules all at once with the Automap While Drawing brush workflow. Done means an optional layer seed preserves random tile placement across reapplication while retaining current behavior when no seed is supplied, including consistent values by grid index.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100