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

About the book "The Net And The Butterfly"

The cover of the book "The Net And The Butterfly".

I bought "The Net And The Butterfly" by mistake when I was in St. Petersburg about 5 years ago and organized a book-shopping day. I bought about 10 kilograms of books :-D, grabbed this one on autopilot without reading the contents. I thought the book would be about the network effect and the spreading of ideas, but it turned out to be about how to "manage" a brain relying on one of the neural networks in it. Which network? For the book and its content it does not matter at all.

My opinion of "The Net And The Butterfly" is twofold. On the one hand, I cannot deny its usefulness, on the other… the material could have been presented 100 times better and 3 times shorter. Sometimes, the authors walk on thin ice and risk falling into information peddling/marketing fraud.

Read more

Two years of writing RFCs — statistics

The number of RFCs over two years

Slightly more than two years ago, I became a Lead/Engineering Manager for Palta's payment team. I left the company at the end of 2023 for another sabbatical [ru].

It is time to sum up. I will start with my favorite initiative.

From the first month, I promoted the idea of preceding major changes with text documents — RFC — Request for Comments.

In this post, I will analyze two years of applying this practice to share the experience, summarize the results, and have convincing arguments for my next job.

Read more

About the book "Economics: The User's Guide"

Cover of the book "Economics: The User's Guide"

Cover of the book "Economics: The User's Guide"

This is the second book by Ha-Joon Chang that I've read. The first one, Bad Samaritans [ru], left a good impression, and it was also positively reviewed by Tim O'Reilly in his book WTF? [ru]. So, "Economics: The User's Guide" took its place on my reading list, and finally, I have read it.

Here and further, all quotes point to the Russian edition of the book and are translated into English by me (I have only the Russian edition) => inconsistencies are possible because of double translation English->Russian->English.

According to Chang, the book was conceived as an "introduction to economic theory for the widest possible audience" (page 299), and this reflects its essence well. I would only add, from the perspective of my post-Soviet education, that the book looks more like an "overview of the diversity and complexity of economics, supplemented with an introduction to the theory" rather than an "introduction to the theory".

The book contains no mathematical formulas or jaw-dropping statistics, just concrete facts. What makes it valuable, however, is a set of prisms through which you can — and should — view the economy to gain a basic understanding of what's happening around you.

Chan provides a set of points of view through which you can examine economic processes; describes their advantages and disadvantages; accompanies all this with examples, historical references, and facts.

Since the book serves as a sort of textbook, I won't attempt to retell it in full — this would lead to an attempt to repeat the book in a couple of pages, and I definitely can't do that. I will limit myself to describing the author's view of the economy as a whole as I understood it.

Read more