Understanding Leitmotifs, and using them in your Roguelike
Lachlan Kingsford Last updated 12/15/06
Music is a major element of almost every major commercial game and movie. Using
music well can render an otherwise ordinary roguelike extraordinary and
skillful use of music can make a 'plot-orientated' roguelike have a lasting
effect. Music done badly can force a user into turning the sound on a permanent
mute... In this document, I intend to introduce you to a range of musical
devices, and in particular give you a grounding knowledge in Leitmotifs, and
give you some ideas on how they can be effectively used within your roguelike.
I will be using real musical examples which will be shown on sheet music
throughout the document, which will be 'clickable' to be able to hear a MIDI of
the written music. Some musical knowledge will help, but I aim to make sure
that it is not actually essential. I will not be providing any source code
though... if you understand the lessons, you will have to implement yourself in
the short term - I haven't written any myself yet! At the moment, it is fairly
theoretical... Further warning that some plot spoilers for various pieces of
fiction exist within this document - but nothing that a self-respecting RL
developer shouldn't already know.

Figure 1
A Motif (in a musical context) is a small theme that is repeated often, or is
used in many forms for a piece to be built around. Arguable the most famous
recognizable motif is shown in Figure 1. Beethoven uses it consistantly
throughout his fifth symphony, particularly in its first movement. If you
listen to the first movement of the fifth symphony, you hear this motif used
regularly - however not always in its complete form. Often he simply cites the '
short short short long' rhythm or the 'high high high low' shape of the melody.
Every instrument in the orchestra plays the motif and some point.
A Leitmotif (or Leading Motif) extends this concept. Leitmotifs are motifs which
are attatched to a character, or a feeling, or a sword - to whatever. Some
Leitmotifs are melodic, some are rhythmic and sometimes they are simply small
snippets of intervals. Leitmotifs were pioneered by Richard Wagner, who
is best known for his fourteen hour 'Der Ring des Nibelungen' - if you have the
patience (and a translation), have a listen to it.
Figure 2
However, perhaps the way you would best recognise a leitmotif is in the
examples given to us by John Williams in his work within the Star Wars saga(as
well as many other movies, and many other composers however Star Wars
demonstrates the prospect of a leitmotif particularly well. The most obvious
example is 'Darth Vader's Theme' - better known as The Imperial March (2 bars
of the theme are shown in Figure 2). The same Leitmotif or 'theme' (I will use
the terms interchainably henceforth)is used throughout the movies, whenever
Lucas has a ' Touch of Vader'. Whenever Darth Vader is seen on screen, his
theme plays. When he dies, the theme is played solmnely on a harp, in a minor
key. Throughout the prequel trilogy, the theme is sometimes used with Anakins
theme to 'suggest' his eventual fate - normally played slowly and only in
glimpses. There are countless themes which Williams uses through the entire
Hexicology. Other examples include the Han/ Leia love theme, and the four chord
Death Star theme from the original movie.
These Leitmotifs can be very powerful devices, especially in a game such as
your roguelike. They can be used in a variety of ways, both in static and
dynamic music systems. If thought about when composing a score as a set of
different pieces that are played on a 'Per Level' basis, you can add a sense
of conformity and familiarity to your works, and allow the music to in many ways
mirror the plot. If you are using a specially written scripted dynamic music
system, you can use Leitmotifs to provide instant musical feedback to your
characters actions and developments in the plot.

Figure 3

Figure 4

Figure 5
You can create Leitmotifs for your main characters - your PC, your PCs major
allies, your PCs major enemy and often your PCs God (or the different Gods
that one may follow) - and whoever else you want to. If you want to write a
theme for a minor character who your PC will only ever meet once, you can feel
free to do so. You may choose to write a 'Shopkeepers Theme' - which will be
playing when you enter a shop for example. And when you steal from that shop,
the Shopkeepers Theme may play faster and more aggrevated as he chases you
around. If you came around a corner and found a brutily murdered shopkeeper,
then the motif would be repeated but this time slowly, mysteriously and in a
minor key. Perhaps you would choose to hint of the murder through playing a few
notes of the murders leitmotif. Examples of the shopkeeper are shown. Figure 3
demonstrates the initial Shopkeepers theme. Figure 4 demonstrates the angry
Shopkeepers theme - transposing it to a Harmonic Minor scale and adding the 12/
8 triplet feel. Figure 5 demonstrates a potential use of the theme when the
shopkeeper is dead - however the major modulation in the final chord suggests
mystery, or a positive element out of the shopkeepers death. Perhaps the PC
found a mysterious note, or an artifact which has its own Leitmotif - perhaps
featuring the major 3rd interval as it was played then.
You may also create Leitmotifs for other elements of your game. In some games,
certain objects, such as ADOMs Orbs of Chaos or Nethack's Amulet of Yendor are
such important plot elements that they deserve their own themes. These themes
can reference another theme - if you were writing a Lord of the Rings game, the
One Ring's theme should reference the theme of its creator Sauron while
maintaining its own musical identity. Themes for essential objects like the Orbs,
the Amulet or Ring can be used sparcely as the game starts (except perhaps being
played when learning the 'legend') and interspersed more into the games
soundtrack as the quest continues, becoming more noticible and important as the
goal becomes closer and closer to achievement. Important quests can sometimes
have their own themes. You can associate a single chord, or scale form to a
mood or theme in the game - perhaps associating a dominant seventh chord with
an innocent death and referencing it when an innocent character dies. If he
died at the hands of Sorgoth - the evil underlord then use the underlords theme
in conjunction with the dominant seventh chord. You can build up musical
relationships in many ways, your use of Leitmotifs and themes are limited only
by your imagination.
Sources of Inspiration
- 'Der Ring des Nibelungen', Wagner - perhaps the most influential
work using Leitmotifs ever written. Difficult to listen to... not for the faint
hearted
- 'Star Wars', Williams - John Williams' soundtrack for Star Wars is
one of the most influential ever written. The music uses a great variety of
themes and motifs, many which stretch across the entire 6 movies, and many
which are referenced in the themes for many of the Star Wars games. Most of
Williams' work since is written in the similar style.
- 'The Lord of the Rings', Shore - Howard Shore's soundtrack to the
most recent adaption of Tolkiens masterwork is a masterpiece in itself, and has
been likened favourably to Wagners magnum opus reference so many time already.
He establishes Leitmotifs for characters, many objects and many of the central
themes and places throughout Tolkiens world
- Symphony #9, Beethoven - Beethovens penultimate symphony though not
containing Leitmotifs contains many Motifs which are used extensively throughout
the four movements of the work. This is especially notable when listening
through the entire work during the forth movement when many themes and patterns
which were used throughout the first three movements are referenced, as well
as the forth movements consistant references to other sections of itself. Though
not technically Leitmotifs, the ways that Beethoven treats motifs can be treated
as examples of what can be done with motifs.
Musical Excerpts Used
- Figure 1 - Beethoven, Symphony #5 in C Minor, 1st Movement 'Sonata Allegro'
- Figure 2 - Williams, Star Wars: The Empire Strikes Back, Imperial March,
© John Williams 1980'
All other excerpts are Copyright © Lachlan
Kingsford 2006. Both the excerpts, and the article are not in the public
domain. Please contact Lachlan Kingsford
if you wish to use this article, or its contents elsewhere.