OK, apparently couldn't resist one more feature in #QRPaint (v0.9.4).
Added a Spray tool with a slightly over-engineered random spray and flow rate. 😄
https://bbbbbr.itch.io/game-boy-qr-paint
OK, apparently couldn't resist one more feature in #QRPaint (v0.9.4).
Added a Spray tool with a slightly over-engineered random spray and flow rate. 😄
https://bbbbbr.itch.io/game-boy-qr-paint
A recent gbdev discussion about low discrepancy sequences provided useful ways to think getting the spray both random and evenly distributed in a pleasing way.
Ended up randomizing all 8x8 spray brush pixels into an array with a preferred a min x,y distance between consecutive ones and cycling through those.
The larger sizes upscale the brush and use an offseted counter to randomize which scaled pixels get drawn in which order so that the scaling gets spread over time semi-randomly as well.