Deep Dive: Flexiscope, the play-time aware dungeon generator in Book of Demons
My gamedev career started in 2004 when I was still in college. Together with a friend, we founded Codeminion with an idea to create casual downloadable games, and that turned out great. Casual games were booming and project scopes were suitable for a small, inexperienced team. We had some great success with titles such as Magic Match (first game with drag-to-select match-3 mechanics), Ancient Quest of Saqqarah and Phantasmat. We even founded and published some games like Brunhilda and the Dark Crystal.
The casual market got crowded fast and settled on making countless HOPA clones (hidden object puzzle adventure), so I decided to move on to some more ambitious projects. In 2012, together with Filip Starzynski and Konstanty Kalicki, we founded Thing Trunk. The plan was to create Return 2 Games, a series in which we could combine our experience in casual games with our passion and sentiment for classic PC hardcore titles.
Book of Demons, our first game in the R2G series, recently had a successful launch and we can now take an analytical look at how we managed to accomplish some of the goals we’ve set for ourselves.
https://www.youtube.com/watch?v=Nra-iXBBLrM (video to embed)
Making the game fun in both short and long sessions
One of the main goals of the R2G series is making games accessible and fun to both casual and hardcore audiences. Making such mid-core games is always tricky as most hardcore gamers detest casual designs or mechanics and vice versa. This is why when designing Book of Demons, a hack & slash for everyone, we tried to make sure that each decision we make is acceptable to a widest possible audience. It’s the reason why we went with pop-up book paper art style as it allows us to present hardcore themes (gore, zombies, demons) in a lightweight form acceptable to casual gamers.
But in some cases, it’s just not possible to make a single design decision that works for everyone. For example, we wanted very much to have a single difficulty level that would adjust to the player, but during the course of Early Access we ended up adding a usual difficulty selector at the start of the game as this was the easiest solution.
Another notable difference between casual and hardcore gamers is game session length. Normally, when you design for a casual audience you try to make the levels small and space goals in such a way that meaningful progress can be made even in very short sessions. Hardcore gamers, on the other hand, expect bigger levels and longer quests, especially in a cRPG game. This is why we came up with the Flexiscope system.
The basic idea behind “Flexiscope” is very simple – it lets players divide the game into sessions of any size to fit their playing schedule. This is a feature that might seem strange at first glance. After all, the game can be saved and resumed at any time, so what’s the point? As it turns out, nobody likes to break in the middle of a mission, or between checkpoints. And this is exactly what Flexiscope tries to solve.
When you start a game in Book of Demons you are presented with a setup window that lets you decide the size of the dungeon you will be entering. It can be anything from a “Very Small”, 2-level dungeon to a “Very Big” journey through multiple vast levels. Each size option is presented with a playtime estimate, so you can choose basing on your preference or basing on how much time you currently have.
The time estimates tend to be accurate, as we’ve been gathering all the average play-times during the entire run of the game’s Early Access (separately for each class and at multiple points along the progress of the game). On top of that, the game learns the gamer’s individual play-style, so if someone likes to spend a lot of time chatting to the townsfolk and browsing through their goods during an open dungeon, the time estimates will quickly adjust and start to reflect that.
Under the hood, the Flexiscope algorithm is quite simple, but it wouldn't be possible without adopting a certain architecture for the game’s balancing and feature placement engine.
Book of Demons balancing tool with all charts enabled
The game’s campaign is designed in a linear fashion - we entered all the monsters, and created charts for the various stats (player level, amount of gold, cards dropped, etc.) and placed them on a timeline. When a player creates a new game session, the system samples all the charts over the size selected by the player and sums everything that should happen during this game.
With that knowledge, the Flexiscope algorithm creates a set of dungeon levels and distributes all the sampled obstacles and prizes in the right places to make the game interesting. The size of the actual dungeons (we measure this as path length) is proportional to the game size selected by the player.
A typical random dungeon layout in Book of Demons
The maps are generated using a typical tile-based map generator, but most of the Flexiscope system work is done before this when it distributes monsters and prizes to the actual levels inside the game. This probably sounds more complicated than it actually is, so let’s look at bosses as an example. The algorithm takes the most powerful boss in the selected time range and places it near the end of the final dungeon and distributes other bosses regularly throughout the levels in the session. Basically, the system tries to make a game that starts easier and gets more obstacle and prize heavy near the end for a satisfying experience.
This kind of approach also guarantees that Flexiscope doesn’t favor any size of a game session over the other. A player won’t complete the game faster or get better loot when choosing large dungeons over small ones. It’s just a matter of personal preference and a way to make the game as enjoyable as possible in the time the player has.
Book of Demons game setup screen
One thing that we didn't get right initially was that many people were confused and thought that selecting bigger games might yield some advantages or increased difficulty over selecting smaller sizes. To solve this, we added prize, progress and gold counters that change with the player moving the size slider. This was enough to explain that two 10 minute games have the same contents as a single 20-minute game, only the sequence of events differs.
Delivering gameplay comfort
Flexiscope is just one of many Book of Demons features that we designed with gameplay comfort in mind. Points of interest are marked at the top of the screen and get revealed once the player gets closer. Player character leaves footprints, which can be used to track your way back or notice paths already visited without opening the map. There is also an always visible clock, so the “don’t waste my time” vibe resonates throughout the entire game.
Adding a Flexiscope style system to a completed game or a game in mid-production would probably be very challenging but since we knew we wanted to make this happen right from the start we planned all systems accordingly and it was relatively painless.
As a side note, once the system was implemented and the game was already a year in Early Access we found out that “flexiscope” is actually a name of a rubber hose used for colonoscopy. We decided to own to our mistake of not googling the term beforehand and stick to the name anyway. We just make sure to apply more delicately and painlessly than its namesake is applied ;)
A rather pleasant surprise
When we designed Flexiscope we didn’t know if it would be something players would care about. When we released the game first in Early Access we were pleasantly surprised how many people noticed and praised it. We feared that it would only appeal to casual gamers, but it turns out that even on the enthusiast end of the gamer spectrum there is an appreciation for games that can be played in a time-aware manner.
Book of Demons is a Hack & Slash spiced up with deck-building. It’s not a secret that it’s also a tribute to the original 1996 Diablo game (though it employs some pretty unique gameplay mechanics). Many people who played the original Diablo have now grown up, they have jobs and families so many of them don't have the time to play as much as they used to. This is in our understanding a big chunk of the mid-core segment and a group that we identify with. It’s people who don't have the time to learn a new game during tedious tutorials or by hours of trial and error, but they also don’t want to play Candy Crush. It’s a pity that so few games are designed with this in mind.
In the end, we’re happy how it all turned out, and we think the extra effort paid off. We are already thinking about how we can improve on the Flexiscope formula in the next games in the R2G series.
If you’re interested in Book of Demons and would like to see (the good kind of) Flexiscope in action, be sure to check out our free demo on Steam.