Words of Power devlog #1: Theory of Magic

Welcome to the first ever texnoforge devlog about magic system in our upcoming game Words of Power which is focused on spellcasting and interactive invocation of magic using hand-drawn symbols.

This post describes high level concepts of proposed magic system such as symbols, words, alphabets and sentences without going into detail about technical implementation.

Basis of Magic

Let's start by the most well-known of Arthur C. Clarke's three laws:

"Any sufficiently advanced technology is indistinguishable from magic."

I'll go a little bit further and state that magic is, in fact, a technology not understood by the observer. To many, today's computers are magic in this sense and thus modern videogaming systems are magical systems that can be used to simulate magic.

One doesn't need to understand magic in order to use it, but one needs to understand magic in order to create it.

I want to create state of the art magic system so I need to understand both the underlying computer magic and the magic system itself. I try to describe its core concepts here in order to gain better understanding of what exactly I'm creating.

Symbol

Wikipedia defines symbol as follows:

"A symbol is a mark, sign, or word that indicates, signifies, or is understood as representing an idea, object, or relationship."

"All communication (and data processing) is achieved through the use of symbols. Symbols take the form of words, sounds, gestures, ideas, or visual images and are used to convey other ideas and beliefs."

Symbol is indeed a very basic, universal, and powerful concept. In Words of Power, symbols are the basic atomic elemnts of the magic system and take form of visual images much like symbols of latin alphabet used to transfer this text into your brain.

Here's a few examples of symbols:

A 速 ☢ 🗲

Symbol Drawing

In practice, a single symbol can have many different representations, for example see following drawings of letter A in various fonts:

This is especially important in Words of Power where symbols are drawn by user's hand and the system must be able to recognize various drawings of symbols by different individuals.

Symbol Model

Symbol model is a model that represents all possible drawings of a symbol and it can be used to recognize drawings that refer to a particualr symbol.

In current implementation, I use many drawings of a symbol to train Gaussian Mixture Model which is able to determine a probabily of a particular point belonging to a symbol. Basically, I describe symbols as probability distributions in space using multiple 3D gaussian curves.

This works surprisingly well for a relatively simple approach, but models can be changed as needed. It's likely Words of Power will support multiple different models for symbols in the end to accomodate various kinds of symbols.

Symbol Name

For convenience, each symbol has a unique name in english alphabet. Symbol names (which are symbols themselves) make it easier to refer to individual symbols.

AA
haya
radiocative
🗲 lightning
yok

Word

Let's refer to Wikipedia once more for a definition of the word word:

"In linguistics, a word of a spoken language can be defined as the smallest sequence of phonemes that can be uttered in isolation with objective or practical meaning. For many languages, words also correspond to sequences of graphemes ("letters") in their standard writing systems that are delimited by spaces wider than the normal inter-letter space, or by other graphical conventions."

In written form, words in latin-based alphabets are usually composed of multiple letters and individual letters don't carry particular meaning (such as letter E).

I decided such complexity is unnecessary in my magic system and thus magic words will be composed of exactly one symbol.

In Words of Power, words are symbols and symbols are words.

Word Meaning

Each word/symbol is supposed to be associated with certain meaning/concept and its effect in spells should be consistent with its meaning.

For example, Yok rune from Arx Fatalis means "fire" and it's always used to create fire spells:

Yok

Alphabet

Alphabet is a set of symbols.

Words of Power aim to support multiple different magic alphabets and even creation of new ones from user drawings.

An example of rune alphabet from Arx Fatalis:

Spell

Spell is a specific sequence of words (a setnence) with associated effects.

A valid sequence of words will result in a spell with effects determined by meanings of words used.

An example of fireball spell from Arx Fatalis:

Aam Yok Taar

(create fire missile)

Language

Magic language is a set of spells.

In simplest form, magic language could be a mapping of words sequences to individual spells, but I plan to use the power of today's linguistic tools so in Words of Power, magic language will be defined by a grammar. I plan to use Parsing Expression Grammar (PEG) or similar to formally describe flexible, dynamic, and consistent magic language.

I also plan to support multiple magical languages and I'd like them to be usable across different magic alphabets if possible.


Next log: #2: Invocation of Magic

Words of Power