Finalizing the new features

Sep, 25

I’m slowly trying to wrap up this release, and with so many new features, it may take a bit of time. Steelmaking is here, as I described in the previous blog post. The steel furnace is just another manufactory, and requires a minion to attend it. It auto-schedules production based on demand, like the workshop does with traps, although the player can manually order extra steel if they have such need.

It quickly turned out that minions need to be smarter about attending manufactories, otherwise the player would have to micromanage them a lot. A typical example is when minions are forging weapons, and they run out of steel. They switch to the furnace, produce as much as they need, then go back to the forge. To make this automatic, I merged all the crafting tasks into one, and a minion will always try to work at a manufactory that’s not idle at the moment. You can still change their choice by drag and dropping them somewhere else, but you can’t forbid them to attend a specific manufactory anymore.

This works nicely within the crafting task, but minions still won’t switch intelligently from training, studying, etc. to crafting, and vice versa. So when all production is done, they will sit idly at the manufactories. To solve this, I would need to add a priority system, like in Rimworld, for example.

Steelmaking is probably the last major feature that I added to Alpha20. Let’s go into the smaller stuff now. I’ve added wall reinforcing, which mostly makes your dungeon look nicer, improves tile efficiency, and gives use to that extra stone lying around. You can see the new walls in the screenshot above. I’ve added a dedicated skill for every manufactory, and it affects minions’ efficiency there. An orc won’t be as good at the workshop as a goblin anymore. There is also a skill that affects mana production.

Something that I needed to do for a long time was fixing the sokoban level generation. It was always taking too long, as the algorithm uses a lot of computing power. The easiest solution was to take it out of the game, run it separately, and add a bunch of pre-generated levels to the game in the form of a data file. So it’s technically not random anymore, but there are plenty of levels, and they can actually be harder, because I can run the standalone generator for as a long as I want on my machine.

Generating random sokoban levels is actually a pretty interesting topic, and it seems that there hasn’t been much research on it. My current generator isn’t very sophisticated, and the levels it spits out are rather easy to solve, so I want to take the time to improve it. If you want to have a look, you can find the its source code here.

I’ve been also looking for other puzzles to insert into the game in the form of special levels that would leverage existing mechanics (Sokoban and boulders are an excellent example of this). If anyone knows of such puzzles, please let me know.

COMMENTS