Alternative Data Structures for RPGs 1: Graphs

I believe RPG designs can centre around the clever use of a data structure. Many RPGs are based around tables and lists alone. The data structure you use heavily shapes how you interact with the data therein by changing the base verbs you use, so I think if we use a bigger variety of data structures we'll see a bigger variety of cool RPG mechanics.

Graphs

Outside of maths circles you probably know these as networks. Points (nodes) connected by lines (edges), like a train network map. The lines (aka edges) can go one or both ways. The nodes can hold data, but so can the edges.

Also FYI all graphs here are built with the markdown plugin mermaid

Why use them?

Graphs are a good way of pre-encoding complex relationships. These could be between people, places, things, actions that characters can take, or really anything. They can often limit choices, but sometimes that's exactly what you need.

Use Cases

Maps

Relationships

State Machines

One other use for graphs is state machines. These describe a sequence of interdependent actions, and you move around it much like you'd navigate a train network. This is how video games will often manage the AI of NPCs. But why stop there? Sure you could use a state machine for an AI enemy or companion:

...but why not get adventure book-y with a mechanical GM?

or even have your PCs interactions be determined by a complex interlocking network of state machines tracking their different moods and compulsions (I got tired at this point and didn't want to make more graphs but you could try making one for yourself with mermaid). Imagine there's a cool graph here: 🧔→ðŸĪšâ†’☠

Algorithms and Interactions

Graphs are cool because it's really easy to add and remove nodes to make or break relationships, or to change the labels and weights between them. But they also make it easy as a designer or GM to visualise stuff like:

or to provide gameplay that can :

(originally posted to my Cohost but fuck social media tbh)

Find more of my work at my personal site goblin.zone