Rune Widgets

Wed, August 26, 2020
Introducing this innocent-looking rune:

Today, I'll be introducing this rune:

It's the first Rune widget I've built. And I'm calling it the Sub-Spell Rune Widget. This Rune lets you store an entire sub spell inside it. This is a powerful thing -- much like "code folding", which many modern text editors support.

This "folding" ability is even more necessary in Rune-based editing than in text editing. Runes (like Blockly blocks or Blueprint nodes, or any kind of graphical syntax really) take up more real estate than text. Sub-spell Runes let you pack more Runes into a small amount of space. And because you can nest sub-spell Runes arbitrarily deeply, you can pack like crazy.

Before we get to the demo, for those wondering, Rune widgets, in general, are defined as follows:

(rune widgets are ...)

Any Runes that, when clicked, display additional UI that, when edited, changes either 1) the Rune's physical appearance and/or 2) the Rune's compilation value. Often, both will change.

You can test this definition on the Rune above. When you click it, you'll find yourself looking at a Rune editor. When you add Runes to the editor and click the button in the top left, the originally clicked Rune will contain a tiny preview of the Runes you added to the editor.

For additional fun: Try adding a Sub-Spell Rune or two to an editor like this one. How deeply can you nest sub-spells? How many sub-spells can you have in one spell? Try it!

With these Sub-Spell Runes implemented, I feel confident that other Rune widgets for simpler things (like String Runes or Number Runes) will be easy enough.

This gives me confidence to begin pulling the editors I built this week into Unreal. The UI isn't complete -- but it is built for growth -- which (I would argue) is better. This lets me continue growing the UI in the context of writing actual spells. At the end of the day, CodeSpells is as much about casting spells as it is about writing them. It's time to merge the writing experience and the casting experience (back) together. Hoping to demo this by Friday!

- Stephen R. Foster

P.S. Please consider supporting us on Patreon. We can't do this without you!