Brush Patterns Feature #23
Label
Kein Label
bug
doodad
enhancement
levels & doodads
security
ui toolkit
wontfix
Kein Meilenstein
Niemand zuständig
1 Beteiligte
Nachrichten
Fällig am
Kein Fälligkeitsdatum gesetzt.
Abhängigkeiten
Keine Abhängigkeiten gesetzt.
Referenz: SketchyMaze/doodle#23
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren
Keine Beschreibung angegeben.
Branch "%!s()" löschen
Das Löschen eines Branches ist permanent. Obwohl der Branch für eine kurze Zeit weiter existieren könnte, kann diese Aktion in den meisten Fällen NICHT rückgängig gemacht werden. Fortfahren?
This is an idea how to implement patterned brushes for drawing levels in Doodle.
Instead of each palette being just a simple solid color (red, black, blue) a palette swatch could have a "pattern" image associated to it.
A pattern could be a small, tile-able image (say 32x32 pixels). When a pixel is plotted in the level, it would sample the pattern image to pick the color for the pixel instead of just setting a simple color.
The pixel sampling algorithm would be:
(1200,1234)
)1200 % 32, 1234 % 32
)Importantly, the color choice is handled dynamically, not hard-set in the level data; the level data just says, "the palette swatch with pattern X.png has a pixel set at world coordinate X,Y" and the color is computed as it's being rendered (and the chunk cached to image as normal).
Possible applications of this are:
A possible "mode" of the pattern could combine the swatch Color with the greyscale pattern so it can be applied to any color. For example the "pencil graphite texture" would be a grayscale image and a black, red, or blue swatch color would be able to use it.
Data attributes to be added to a palette swatch:
When Doodle supports embedding assets inside level files, the user can attach a custom pattern image and otherwise it will use the built-in patterns.