This is just a proof of concept for the game editor. and you can read more about its inception and evolution starting at day 31 in the log.
Note to previous visitors: I have removed the right arc ")"
. Use a rotated left arc "R("
instead.
Try out a pattern:
"<"
goes back a quarter space." "
(space) goes forward a half space."[]"
combines glyphs."r"
rotates an eighth turn."R"
rotates a complete half-turn."m"
horizontally mirrors the glyph."M"
vertically mirrors the glyph.A decoration (or "deco") is created from one or more small image segments known as glyphs.
A simple divider might be a single straight line, which is created
from a pattern of "="
(equal signs):
Or a dashed line using half-width line glyphs using a pattern of
"-"
(hyphens or minus signs):
That's not very exciting, so let's try some other symbols. These
are all different sized circles made from a period/dot and lower
and upper case letter 'o' (.oO
):
The next trick to learn is combining. Square brackets ("[ ]"
)
combine glyphs together so they all print in the same spot. Here's the three
circles combined in different ways:
(Another thing demonstrated above is that a space in the pattern creates a half-space in the decoration.)
There's a surprising number of neat shapes you can make by combining the available glyphs. You are encouraged to discover new ones and adopt them and name them and keep them in your home.
You can think of the pattern as a series of instructions for a decoration printer. Combining with square brackets keeps the "print head" in place while the glyphs are drawn.
Another decoration pattern feature is the ability to send the "print head"
backward by a quarter space with the "<"
(less than sign)
character:
Tip: Any time you find yourself using four backspaces
like "<<<<"
, remember that you can get the
same effect with a combination. These are identical:
You can see how half-width glyphs which would otherwise not touch can be "put together" to make TIE Fighter decoration:
And "swooshes" can make different patterns when squished together different amounts:
Another way to transform your glyphs is to rotate them. A lower-case
"r"
rotates by 45 degrees (eighth turn) clockwise:
Or an upper-case "R"
does a full 180 degree rotation, which
mirrors the shape, which is the equivalent of four lower-case "r"
rotations:
Using rotations with combining and backspacing can make a huge number of shapes:
A lot of the glyphs make interesting patterns when put together with their rotated selves:
Rotating a half turn works for "mirroring" arcs, but true mirroring
of irregular shapes requires a new operation, "m"
:
That was horizontal mirroring.
To mirror vertically, use "M"
:
To repeat a glyph multiple times, you can put a single digit number (2-9) in front of it:
You can also repeat actions like rotation:
And backspacing. These two do-it-yourself skulls are identical:
But repetition only works for one glyph or one action. Do we really have to copy and paste big chunks of patterns to repeat common elements?
No! That's a good task for computers, not humans!
To make the computer remember a pattern, you just need to group it and give it a single-character "name". It'll be easiest just to show an example:
The start "{"
begins the definition. Then comes a
single-character name, 'z'
. Everything else is the
pattern until the end "}"
.
After that, typing just 'z'
is the same as typing the
whole pattern.
The named pattern becomes another symbol you can use with all the other symbols however you like. Let's see another example:
In the example above, I defined two patterns, 'x'
and
'a'
and they mix just fine, backspaces and all.
It's the same as:
But less painful to type (and read).
Wait, but what about...? Yes, yes you can:
(Note: The pattern renderer tries to detect recursion, or "cycles" in self-including or mutually-including named patterns. It outputs a warning in place of your image. Since there's no proper way to end the cycle, this prevents crashing the browser due to stack overflow!)
Thanks for checking out the decoration pattern editor test-bed. I hope it's been fun to play with!