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

Brush randomization #123

Merged
merged 3 commits into from
Apr 25, 2024
Merged

Brush randomization #123

merged 3 commits into from
Apr 25, 2024

Conversation

white-axe
Copy link
Collaborator

Connections

Description
This adds a checkbox to the top bar to make the brushes use random tiles from the rectangle of selected tiles in the tilepicker, which makes it easier to create randomly distributed tiles. Holding down the Alt key on the keyboard inverts the setting.

There's also a density setting in the top bar that allows making the brush only draw on a percentage of randomly chosen tiles on the map instead of every tile. This is intended to make it easier to create heterogeneous sets of random tiles, like if someone wants to create a map consisting mostly of one set of random tiles but with a small number of a different set of random tiles here and there.

Testing
Needs to be verified that the random patterns created by the Randomize ID setting and the density setting in the top bar are deterministic when drawing over the same region of a map multiple times, including with different brushes. This is important because otherwise the random tiles may not be uniformly distributed when the density setting is less than 1. Other than that, I highly doubt anything else needs to be tested.

Checklist

  • Run cargo fmt.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown -Z build-std=std,panic_abort
  • Run cargo build --release
  • If applicable, run trunk build --release

@white-axe white-axe requested a review from a team as a code owner April 24, 2024 22:52
@white-axe white-axe added the enhancement New feature or request label Apr 24, 2024
@melody-rs melody-rs merged commit 392a9cb into Astrabit-ST:dev Apr 25, 2024
5 checks passed
@white-axe white-axe deleted the random branch April 25, 2024 03:10
MolassesLover pushed a commit to MolassesLover/luminol-molasses that referenced this pull request Jul 23, 2024
* feat: add brush density control

* feat: add brush ID randomization setting

* fix: fix brush undo being broken after upgrade to egui 0.26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Random tile placement
2 participants