Object Oriented Principles in RPGs

Being a programmer, I like to think programming concepts with regard to games and rules systems. Sometimes I go a bit further, like the time I built a .NET Silhouette vehicle design program or built a SQL database out of the Mekton Zeta Plus construction rules. Today’s topic is object oriented principles in roleplaying games. Before we get into that, a couple caveats:
First, I wouldn’t be surprised if this post has one of the lowest view counts of any post on this blog. I’m fine with that – it’s more of a philosophical pondering than anything else.
Second, for anyone who’s not familiar with object oriented programming languages this is a really good article (it is long, I’ll wait while you read it): What Is OOP. If you don’t want to read it (or just want to hit the salient parts) I will only be discussing these three things:
  • Abstraction: Stripping something down to its basic elements or characteristics.
  • Inheritance: The reuse of abstractions to build new ones.
  • Polymorphism: The ability to use the same interface but with a different implementation.
Now almost all game systems do these to some degree (as well as many of the things the article’s author says “isn’t OOP”).  A good example of abstraction is a weapon. In the real world,  the subtle differences between weapons probably have an impact, but it’s too hard to keep track of that stuff in an RPG. Instead, the system abstracts out the basic elements: damage, range, accuracy or balance, etc. Some of them go into more detail than others – such as durability or quality – but all weapons have the same basic characteristics. They use inheritance to create, say, a magic weapon. It uses the base weapon class but then adds a attribute such as “+1” to it.
Polymorphism can typically be seen in mechanics. Fate Core is a perfect example of this. Each of the four basic actions you can perform with a skill (overcome, create advantage, attack or defend) has the same interface (the die roll), but the implementation within each of them is different (the rules inside them are different). The output – failure, tie, success or success with style – is also the same. As an aside this is also an example of encapsulation – the inputs and outputs are the same, but the interior “code” of the action is a “black box” (at least in terms of the output not caring what happened inside the action).
Fate does an excellent job of embodying these concepts. Take the “Fate Fractal” for example. Anything can have an aspect, or a skill, or a stress track – up to and including the setting itself. I recently implemented survival rules where as the players run out of Resources, the setting gains an aspect representing their Struggle For Survival. As their Resources go into the negative, the setting picks up three skills: Hunger, Thirst and Exposure. These skills can be used to “attack” the characters. This implementation is fundamentally object oriented in nature.
Most systems can accommodate something like this, but Fate Core (and other Fate games) facilitate it through design, and are especially good at it. This isn’t to say that an rpg based on  OOP principles is “good” and one that doesn’t is “bad”. Game systems aren’t code or operating systems in the most technical terms. But I think some games, like Fate Core, definitely do it better than others. There is at least one game, Alternate Realities, that claims to “object oriented”. I’ve taken a look at it and think it’s much more complicated than it needs to be.
Also, on a related topic to object oriented principles is a rather lengthy PDF called Design Patterns of Successful Roleplaying Games by John Kirk. Kirk identifies various design elements and then uses those to try to determine the design patterns in various rpgs, through a lens similar to software design patterns. It is highly detailed and I think it’s successful in a lot of ways. Obviously, because of the sheer variety of rpgs there are likely to be some that slip through the cracks (and I predict at least one comment saying how such-and-such rpg doesn’t fit any of those patterns). I wouldn’t say it’s required reading for all game designers, but just as it can be helpful to have an eye toward high level object oriented principles when designing an rpg, being aware of the possible design patterns can’t hurt either.

7 thoughts on “Object Oriented Principles in RPGs

  1. Interesting. You've made the case to look at Fate Core more compelling. I downloaded “Design Patterns of Successful Roleplaying Games” and I'm eager to read it once I have more than a few minutes to spare.


  2. Awesome! There's a whole lot packed into Fate Core…a lot of it is really subtle. The Fate Fractal is something that has existed as a concept in Fate for a long time, but it takes awhile to get into the headspace of thinking that way. The setting having skills? That's just crazy talk! But if you look at other games with, say, environmental mechanics (Saving Throw vs. Whatever or get frostbite) that's exactly what they are doing – giving the setting a skill. In Fate Core it just follows the same pattern as characters.Tomorrow I'm going to be looking at messaging and the actor model in relation to RPGs and specifically Fate Core. It's like a computer science course for gamers! 😀


  3. Most RPG's are suited to an OOP style which is lucky because I have written a few character generators based on them! The concept of the Character in most games is an OOP situation where really the character is a collection of Objects. In most RPG's this would boil down to an attribute object, skill object, (something like Pathfinder would have Feat objects) etc. The wrapping of concepts into components that build a character is a clear decision by RPG designers to have a clear vision on what a character is. Am I as an actual person a conglomeration of numbers and skills and appearance, no. But to understand me as a person I could build a stat block that may give you a clearer understanding of what I think of myself.I really like this article and also second your comment about Fate Core. I think Fate builds a lot from the principles of OOP in the best way, if it was intentional or not who knows. It works well, is simple and elegant. All of the things an OOP should be.


  4. Unfortunately I've run into a lot of games that don't do well when a relational model is applied (which is sad for me, because I'm a SQL kind of guy). Mekton Zeta was one of them. OOP principles were easy to apply, but storing everything about the design system relationally was a pain in the ass (there are too many inconsistencies to normalize it properly). I finally gave up and just popped it all into an XML file with a hierarchical structure. Of course, once I did this and got a basic UI going that finally worked I lost interest and now the whole thing is languishing on my hard drive.


  5. In Fate everything is an abstraction because there is no hard reality that cannot be altered at the discretion of the narrative. Since the system isn't really designed to track a set of physical laws there are no real restrictions to what can and can't happen aside from the limits set by the persons playing the game.The hardest thing for people to realize is that there is no spoon and to pay no attention to the man behind the curtain. In ten years we will be back to just telling a story by a digital campfire and wonder what all the fuss about dice was about.


  6. While it's true that Fate is “fiction over physics”, there's still mechanical limits on what can and can't be done narratively. The +2 bonus that an aspect gives isn't a reflection of the quality of the aspect – it's not GURPS where one aspect is worth 5 points and another is worth 3. It's an evaluation of how much an aspect can change the narrative. In that, all aspects are “equal” and are restricted in what they can and cannot do. The mechanics that “simulate reality” in other games just got bumped over to “simulating fiction” in Fate.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s