Essays about game development, thinking and books

Dungeon generation — from simple to complex

What we should get.

What we should get.

This is a translation of a post from 2020

This is a step-by-step guide to generating dungeons in Python. If you are not a programmer, you may be interested in reading how to design a dungeon [ru].

I spent a few evenings testing the idea of generating space bases.. The space base didn't work out, but the result looks like a good dungeon. Since I went from simple to complex and didn't use rocket science, I converted the code into a tutorial on generating dungeons in Python.

By the end of this tutorial, we will have a dungeon generator with the following features:

  • The rooms will be connected by corridors.
  • The dungeon will have the shape of a tree. Adding cycles will be elementary, but I'll leave it as homework.
  • The number of rooms, their size, and the "branching level" will be configurable.
  • The dungeon will be placed on a grid and consist of square cells.

The entire code can be found on github.

There won't be any code in the post — all the approaches used can be easily described in words. At least, I think so.

Each development stage has a corresponding tag in the repository, containing the code at the end of the stage.

The aim of this tutorial is not only to teach how to generate dungeons but to demonstrate that seemingly complex tasks can be simple when properly broken down into subtasks.

Read more

«Slay The Princess» — combinatorial narrative

My favorite version of the Princess.

My favorite version of the Princess.

It's hard to impress me as a player and even harder as a game developer. The last time it happened with Owlcat Games in Pathfinder: Kingmaker, when they added a timer to the game's plot.

But Black Tabby Games managed to do it. And they did it not with some technological complexity but with a visual novel on a standard engine (RenPy), which is cool in itself.

I'll share a couple of thoughts about the game and its narrative structure, while I'm still under the impression. I need to think about how to adapt this approach to my projects.

ATTENTION: SPOILERS!

If you haven't played Slay The Princess yet, I strongly recommend you to catch up — the game takes 3-4 hours. You'll not regret it.

Read more

Simulating public opinion in a game

The demonstration (in Russian) of a technical prototype of manipulating public opinion and explanation of how it works.

I continue participating in World Builders school. For the last month, I've created a technical prototype of game mechanics for manipulating public opinion.

You play as the chief editor of a news agency, who sends journalists on quests and publishes articles based on the results of investigations focusing on themes that you want to promote.

The top video is in Russian, so I'll go through the main points below.

Read more