Interview: Peter Eijk
Using Python to help design A Visit to San Sibilia
What I thought might be a single interview with a creator who used Python to help develop their game, turned into a series of three interviews! Previously I shared my recent conversations with M. Allen Hall and Spring Villager.
This week is the third and final interview of the series, with Peter Eijk (a.k.a. JimmyShelter and MonsterMind). He’s the creator of Pine Shallows, Blood Mountain Resort & Spa, and A Visit to San Sibilia, among others.
We talked about game design, learning to code, and chickens. I hope you enjoy it!
Thank you so much for taking the time to talk!
Let’s start with a little bit about you and your background. Tell me about how you ended up making games!
I'm from the Netherlands, currently living in Zaandam (close to Amsterdam). I've always lived in or close by Amsterdam.
I've started gaming originally in high school, when some class mates were talking about D&D, and I managed to gather some courage to ask them about it. This would have been somewhere around 1992-1993?
When I joined we played from the D&D Rules Cyclopedia, but quickly switched to AD&D 2nd edition. This might make me a grognard.
After losing contact with them, I mostly played online through forums, discovered there were waaaaay more games, some of the simpler, some even more complex. I played a few of them, but play-by-post campaigns were pretty hard to sustain.
In this time I thought about making my own stuff, but the barriers always felt pretty high. Slowly I drifted away from the hobby, eventually storing all my books in a box. This leads to the lockdown...
We had to hurry up with our home office suddenly and after we finished, I unpacked some boxes... I started selling some of the TTRPG books (GURPS and AD&D mostly), but kept a few. I joined some online groups again to sell my stuff, and then I learned about ZineQuest.
ZineQuest really opened my eyes about what TTRPGs could be and do. I backed quite a bunch, discovered TTRPG Twitter, Discords and, very importantly, game jams!
I published my first game jam entry in March 2021, and I never stopped making games since.
What’s the story of you becoming a coder? Do you have a professional background in coding?
I majored in AI in college (pretty ironic, I know), and then already before finishing drifted into web development. So, I've been coding forever, and professionally for 20+ years.
In college I learned C, then started web dev with PHP, and when I got to Python I never looked back. Way cleaner code, simple to learn, and great libraries (certainly for simple statistics stuff).
I’m always curious about the workflows of other people. What does writing code look like for you?
At work I use Ubuntu Linux, and VS Code, but my old MacBook is still running Atom.
For the small scripts I write for game development, I don't need much more. I tend to stick to the default Python libraries, math, random. Because I usually don't publish my results, I don't make fancy graphs, just badly formatted tables. 🙃
In my day job I usually go by, “First make it work, then make it pretty.” I tend to skip the pretty part for game dev scripts.
You have two games to talk about, but let's start with A Visit to San Sibilia — a solo journaling game. Can you tell me about the game?
Lemme grab a quote, because other people have been very nice!
This is such a good balance between guided exploration and open creation, and that can be such a hard balance to get right. San Sibilia hits it perfectly. I get lost in a new world every time.
This is a beautiful journaling game! The art nouveau layout and excellently curated artwork evoke a strong sense of time & place that help bring San Sibilia to life. The prompts are clear and tightly written, but open-ended enough to let you bring your own impressions of the city into your journal entries.
Two very nice quotes. 😊
It's a solo journaling game in which you visit an ever-changing city. The structure is familiar for more people playing solo journaling games: you draw some cards and get new prompts. Part of these prompts change the city in unexpected ways.
This was the first game where I modelled the game loop in Python. While I like the Alone Between the Stars type of games, I like the sense of an impending ending in games like the Wretched & Alone games and The Machine by Adira Slattery.
So, with San Sibilia you will have to leave the city, but when is unpredictable.
What's the San Sibilia core game loop, and how is the end game triggered?
After character generation each turn consists of drawing two cards, which combine two prompts. If the cards have the same suit or with the same value, the city changes and you move closer to the end.
When this happens four times, the game ends with some final leading questions.
This end game system sounds good. How and why did you use Python to modify it?
This works great. For most games.
While most games (just over 70%) using the default ending rules will have a duration between 7 and 15 turns with an average of 11, it is possible to play a game that is over in just 4 turns or one that can even take up to 26 turns.
Especially if people don't replay it, it might give way different experiences. After getting this feedback, I fired up my editor, and started trying out different methods that I could add as alternative endings without changing the main game loop.
A trade-off was some extra calculation for more predictability.
Each turn, add the value of the highest of the two cards you drew to a running tally. All face cards have a value of 10. An ace can be counted as either 1 or 11, depending on how quick you want your game to end. The game now ends when you reach 90 points.
This was a great learning experience, which I took to heart when writing Hiria.
Let’s talk about your upcoming game, Hiria: The Eternal City. What can you tell me about it?
As you can tell, I love cities. Changing cities? Even better.
In this case, the city doesn't really change, but the player moves between different versions of the city. It has quite some things in common with San Sibilia, but I wanted to approach it from a different angle.
So, with San Sibilia, the artwork, layout and prompts all tried to evoke a mysterious southern city, where art & music plays a major role: think New Orleans, Barcelona, Paris. The way the city changes was left to the player.
In Hiria: the Eternal City, we turn it on it's head. Here we have some kind of Mad Libs scheme to determine the city.
Roll a twenty-sided die for each of the Color, Flavor, and Weird tables to define the version of Hiria you start in. For example, a result could be: Hiria, the cosmopolitan city of heavy smog and cobbled streets which is connected by waterways instead of streets, or the erudite city of open squares and low buildings which is without ends or bounds, or any other of thousands of combinations.
Another difference is that in San Sibilia a card draw determines your character, while in Hiria your quarry, the person you are tracking down, is picked randomly, and you base your character on that.
Each turn you roll one or two four-sided dice, the outcome of which determines how much the city changes, and if you get closer to your quarry, or they get closer to escaping.
Did you end up using Python to help modify the Hiria design similar to how you did with San Sibilia?
So, did I learn from developing San Sibilia? Yes and no.
My initial end game mechanism was pretty different and way too swingy. I found out early, because I had more playtesters, multiple of which reported this. Should I have modelled it before? Probably!
So, the original idea worked with rolling doubles. Which happens in about 25% of the turns. But there's two tracks to fill, so it could take a long time to fill up a track.
To investigate I wrote a python script to simulate 10.000 games. The result:
Average turns: 24
Games 6 turns or shorter: 1.1%
Games between 7 and 15 turns: 19.3%
Games 16 turns or longer: 79.6%
I was aiming for around 10 turns. I aimed very badly. Even worse, the longest game could take up to almost a 100 turns!
So, at this point I just started trying out different tactics. Different die sizes, different track lengths to fill, etc. This didn't make it less swingy, just shorter or longer.
Different ways to handle the dice worked better: subtracting, adding, etc., but a mechanism always needs to be at least somewhat elegant. A simple solution was to use if the outcome of the main die was odd or even to determine which track advances. So each turn a track advances. A second die can be added by the player, having an extra possibility of advancing one of the two tracks with two steps in one turn.
This also adds agency: solo journaling games are usually just responding to prompts, but now you can decide if you want to risk losing your quarry.
So how did it turn out?
Average turns: 10
Games 6 turns or shorter: 3.6%
Games between 7 and 15 turns: 96.4%
Games 16 turns or longer: 0%
This was pretty much what I aimed for, not more complex, and still not completely predictable.
What would this type of testing look like without using coding?
To be honest, some of the playtesters did some math to school me (in a very nice way!).
So proper math and playtesting! But just running a game simulation a 100,000 times is always very helpful. I don't have that many playtesters.
Any thoughts on how to know what to test in Python/code vs. what will require actual playtesting with humans?
You can only really test mechanics. So for the prompts, I really rely on playtest feedback and my editor, but I can control the game loop, especially the end game, so that's what I focused on. For a solo journaling game Hiria is already on the crunchy side, and it's just one main loop.
What advice would you give to Skeleton Code Machine readers who would like to do similar things with Python? How can they get started?
For basic modeling you don't need much except the main ‘for’ loop and some random libraries.
One tool I can really recommended is Project Euler. Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.
It helps you learn basic loops, but also math and other helpful functions. And if you want to get your answer before the end of the universe, you also need to be clever (after a few challenges at least). It's a site I've used before when I switched programming languages.
Most important question: What’s your favorite dinosaur?
Tell me more about Dungeon23 and drawing a chicken every day! How did that start… and why?!
I quickly burned out on writing a Dungeon23 entry every day, and I do want to draw more. Hence Chicken23.
Do you think it has improved your drawing over time? I've heard that just drawing anything every day is the fastest way to get better!
Not the chickens per se, but setting a tiny tiny goal already made me pick up my sketchbook more. I just have to draw one small thing. 🤷
Want to help support Skeleton Code Machine? Please share it with a friend!
See you next week!
— E.P. 💀
Thanks for reading Skeleton Code Machine! Subscribe for free to receive new posts each week.