Toasty's blog

The game language

Gealdor, the magic game I'm working on, involves a simple language for manipulating characters within a plane. The grammar is quite simple: there are several types of statements which do things, and statements can also be grouped together in a spell. (The bores out there might call spells 0-ary functions, but I find "spell" much more captivating.)

Movement

With this language, you can move (or not) a character:

stay
stay twice
step east thrice
step south five times

Casting

In English, the word cast most commonly means to throw or sling something. But from that (I assume, anyway) came a number of metaphorical meanings: you can cast your eyes on (i.e. look at) something; cast metal (i.e. shape it while molten); etc. It apparently even meant to vomit at one point. More relevantly, I hope, you can also cast a spell, meaning to perform or undertake it. This ambiguity makes cast a nice keyword for a magical language, in my opinion.

Some or all characters will be able to cast things:

cast stone
cast fireball west
cast spell do_something_exciting

A stone is just an obstacle, in this game. The latter two should be self-explanatory.

Summoning

The word summon is a bit more straightforward: you call for things to appear, sometimes by magic.

The more magical characters in Gealdor can also summon things:

summon ghoul
summon demon heading north
summon familiar casting spell do_something_exciting

I haven't worked out all the details of what ghouls and demons will do. Possibly they will need to be summoned from somewhere. It depends on what allows for the best puzzles.

A familiar (the noun) tends to mean a kind of spirit or creature that accompanies or watches over someone (normally magical). In this game, a familiar has a slightly different, but more concrete definition: it is a magical clone of the current character, who casts a spell upon its creation. Since a spell can invoke further spells, this will allow for recursion joyful mess. Players will have to use such recursive magic to solve the tougher problems in Gealdor.

Spells

Spells are magic, but they often come written down. Therefore anybody can observe a spell, which is just a list of commands.

observe spell do_something_exciting
  summon ghoul
  step north
  cast fireball west
  cast spell do_something_else
obverse

I'm not sure about the observe keyword, and even less sure about obverse. I'm trying to be clever and I think it's failing. These could well change in future.

Natural language

I like that this syntax feels less rigidly computational and more like natural language than most programming languages. Probably it doesn't go far enough, and I would quite like to make it flow even more like a spoken language.