Jul 12, 2016
KeeperRL - Michal Brzozowski
I've been fixing a LOT of things in the last two weeks, and there are still more to work on, hence Alpha19 will be delayed a little bit. The previous versions were a bit too unstable, so I think it's a good idea to take some more time and clean things up. Plus I'm in the process of moving to a new country, so I'll have to spend some time packing and unpacking those boxes. :)

One serious bug that I'm pretty ashamed of concerned autosaves. By principle there should always be a recent autosave that can be used to recover the game after a crash (unless it's a new game). Because KeeperRL is a perma-death game, it deleted save files after they were loaded. Which included autosaves. So if the game crashed within 1500 turns of loading, it was completely lost. In the fix, regular save files are renamed to autosave files after being loaded, and files are only deleted after the game ends (when you win, lose or abandon it). This makes cheating a little bit easier, but it's a better alternative than players loosing their progress.



I spent a few days optimizing the rendering code, which brought about a 50% increase in frame rate in the early game. Later in the game other things take more of the CPU, so the improvement gets smaller. I'm planning to optimize gameplay code too, though, so hopefully everything will get faster.

I've fixed lots of other bugs, including one that was almost a year old. On top of this, I'm still replacing parts of the code related to the recent move to SDL2. I've had to implement my own audio library on top of OpenAL and Vorbis, because anything I could find didn't work well enough. This is definitely a downside of not working with a game engine like Unity or Unreal. But when I'm finally done with this s**t, imagine all of that steam going into gameplay improvements. :)

Right now I predict that Alpha19 will come out in about two weeks.
Jul 12, 2016
KeeperRL - Michal Brzozowski
I've been fixing a LOT of things in the last two weeks, and there are still more to work on, hence Alpha19 will be delayed a little bit. The previous versions were a bit too unstable, so I think it's a good idea to take some more time and clean things up. Plus I'm in the process of moving to a new country, so I'll have to spend some time packing and unpacking those boxes. :)

One serious bug that I'm pretty ashamed of concerned autosaves. By principle there should always be a recent autosave that can be used to recover the game after a crash (unless it's a new game). Because KeeperRL is a perma-death game, it deleted save files after they were loaded. Which included autosaves. So if the game crashed within 1500 turns of loading, it was completely lost. In the fix, regular save files are renamed to autosave files after being loaded, and files are only deleted after the game ends (when you win, lose or abandon it). This makes cheating a little bit easier, but it's a better alternative than players loosing their progress.



I spent a few days optimizing the rendering code, which brought about a 50% increase in frame rate in the early game. Later in the game other things take more of the CPU, so the improvement gets smaller. I'm planning to optimize gameplay code too, though, so hopefully everything will get faster.

I've fixed lots of other bugs, including one that was almost a year old. On top of this, I'm still replacing parts of the code related to the recent move to SDL2. I've had to implement my own audio library on top of OpenAL and Vorbis, because anything I could find didn't work well enough. This is definitely a downside of not working with a game engine like Unity or Unreal. But when I'm finally done with this s**t, imagine all of that steam going into gameplay improvements. :)

Right now I predict that Alpha19 will come out in about two weeks.
KeeperRL - Michal Brzozowski
An early Alpha19 build is available for testing on Steam on the 'dev' branch. It's fairly complete in terms of gameplay features, but it still needs some bug fixing and optimizations.

One of the non-gameplay changes in this update is to switch back to the single-threaded mode. It used to be just an option, and by default the rendering loop ran on a separate thread. The main purpose was to have a more responsive UI in case the gameplay loop lagged. In addition, it generally increased FPS, but not by much (less than 25%). The problem was that it wasn't very well designed, and there were some subtle bugs. There were also problems with very low FPS on some multi-core systems.

I decided to go back to a single thread for simplicity. The code needs to be more optimized anyway. With proper optimizations, a single core shouldn't have any trouble with handling both rendering and gameplay. With this in mind, I'm going to spend the next week or two optimizing the hell out of every line of code. (or to be more precise, rewriting entire badly optimized chunks of code) :)

As a bonus for this week, I compiled a list of the most deadly enemies in KeeperRL.

Keeper games:
  • Bandit (16% of all deaths)
  • Knight 11%
  • Lizardman 8%
  • Archer 6%
  • Warrior 4%
  • Dwarf 4%
  • Cyclops 3%
  • Tree spirit 3%
  • Red dragon 2%
  • Dog 2%
Adventurer games:
  • Harpy 12%
  • Boulder 12%
  • Orc 9%
  • Keeper 8%
  • Minotaur 7%
  • Ogre 5%
  • Vampire 4%
  • Drowning 4%
  • Doppelganger 2%
  • Wolf 2%
Percentage of games won:
  • Keepers: 11%
  • Adventurers 5%.
Total number of games taken into account: 24661.
KeeperRL - Michal Brzozowski
An early Alpha19 build is available for testing on Steam on the 'dev' branch. It's fairly complete in terms of gameplay features, but it still needs some bug fixing and optimizations.

One of the non-gameplay changes in this update is to switch back to the single-threaded mode. It used to be just an option, and by default the rendering loop ran on a separate thread. The main purpose was to have a more responsive UI in case the gameplay loop lagged. In addition, it generally increased FPS, but not by much (less than 25%). The problem was that it wasn't very well designed, and there were some subtle bugs. There were also problems with very low FPS on some multi-core systems.

I decided to go back to a single thread for simplicity. The code needs to be more optimized anyway. With proper optimizations, a single core shouldn't have any trouble with handling both rendering and gameplay. With this in mind, I'm going to spend the next week or two optimizing the hell out of every line of code. (or to be more precise, rewriting entire badly optimized chunks of code) :)

As a bonus for this week, I compiled a list of the most deadly enemies in KeeperRL.

Keeper games:
  • Bandit (16% of all deaths)
  • Knight 11%
  • Lizardman 8%
  • Archer 6%
  • Warrior 4%
  • Dwarf 4%
  • Cyclops 3%
  • Tree spirit 3%
  • Red dragon 2%
  • Dog 2%
Adventurer games:
  • Harpy 12%
  • Boulder 12%
  • Orc 9%
  • Keeper 8%
  • Minotaur 7%
  • Ogre 5%
  • Vampire 4%
  • Drowning 4%
  • Doppelganger 2%
  • Wolf 2%
Percentage of games won:
  • Keepers: 11%
  • Adventurers 5%.
Total number of games taken into account: 24661.
KeeperRL - Michal Brzozowski
The basic parts of adventurer campaign are done. It's not much different from the keeper campaign, except that you don't build a base, and some enemies are turned into allies and vice-versa. The retired keepers are still hostile, of course. The influence zone works identically, but you start the game on one of the existing locations (it can be both hostile or allied).

The big benefit of this mode, compared to the single map adventure, is that you can build up your character in various locations before you engage with your main enemies. The allied settlements like the castle and dwarf cave have shops where you can buy equipment. I'm also planning to add some generic dungeons specifically to the adventure mode to turn it into more of an rpg experience.

There still isn't nearly as much progression in the game as I'd like of course. Ideally, there would be various strategies to progress your adventurer, and the characters would be very differentiated by the end of the game. At this point, we could think about uploading retired adventurers to spawn them as enemies in keeper games.

Another thing that I want to add in later updates is getting companions by hiring and other ways.



I've finished the mechanism of uploading game statistics. I think they will be extremely useful. I'll get info about what game modes are being played and how long individual playthroughs are. This will give me good data on whether we can remove the single map mode from the game (I won't remove it if a lot of people keep playing it). All the data will be anonymous, of course, and there will be a description of what exactly is being sent, and you'll be able to turn it off.

I've also implemented message boards. As I've already mentioned, they can be built by keepers and anyone passing by can write anything on them. The messages are stored on the server and are automatically updated.

I'm planning to upload a build to the testing branch on Steam in the coming week. My current estimate for release date is early July.
KeeperRL - Michal Brzozowski
The basic parts of adventurer campaign are done. It's not much different from the keeper campaign, except that you don't build a base, and some enemies are turned into allies and vice-versa. The retired keepers are still hostile, of course. The influence zone works identically, but you start the game on one of the existing locations (it can be both hostile or allied).

The big benefit of this mode, compared to the single map adventure, is that you can build up your character in various locations before you engage with your main enemies. The allied settlements like the castle and dwarf cave have shops where you can buy equipment. I'm also planning to add some generic dungeons specifically to the adventure mode to turn it into more of an rpg experience.

There still isn't nearly as much progression in the game as I'd like of course. Ideally, there would be various strategies to progress your adventurer, and the characters would be very differentiated by the end of the game. At this point, we could think about uploading retired adventurers to spawn them as enemies in keeper games.

Another thing that I want to add in later updates is getting companions by hiring and other ways.



I've finished the mechanism of uploading game statistics. I think they will be extremely useful. I'll get info about what game modes are being played and how long individual playthroughs are. This will give me good data on whether we can remove the single map mode from the game (I won't remove it if a lot of people keep playing it). All the data will be anonymous, of course, and there will be a description of what exactly is being sent, and you'll be able to turn it off.

I've also implemented message boards. As I've already mentioned, they can be built by keepers and anyone passing by can write anything on them. The messages are stored on the server and are automatically updated.

I'm planning to upload a build to the testing branch on Steam in the coming week. My current estimate for release date is early July.
Jun 6, 2016
KeeperRL - Michal Brzozowski
Porting to SDL took about a week. A little bit more than I thought, because it turned out that text rendering and audio playback are a bit lacking (actually, they are not part of the core library, and of much lower quality). So I had to search for replacement libraries. They seem to work well, but I still need to test them on platforms other than Linux. I sincerely hope that the game gets more stable after the whole ordeal of moving away from SFML.

After the last three weeks of refactoring and platform stuff, I finally had some time for gameplay changes! I added wildlife to the maps. So far: deer, foxes and boars. Their simple AI tries to run away from everything else and attack only when adjacent to another creature. Other creatures normally don't chase nor attack wildlife.

I also added some extra settlements to maps. They don't take much part in the game except just being there and adding variety. For now they are: human, elven and lizardman cottages, and dwarf and kobold caves. Besides the usual civilians, they now also have a small number of guards. I want to add a lot more content like that (and also some surprises and mysteries), but probably not all of it in this release.


Finally, I worked a bit on sending game event statistics to the server. It was already used in the last update for stats on retired dungeons, but it was somewhat broken. This time it should be more reliable and I will get richer data. It will super useful to have when working on gameplay, and also to know about any problems that might happening in the game. The statistics are of course completely anonymous, and you'll be able to opt-out in the settings. I'll also display text with all the details, so you'll know exactly what is being gathered.

I'll talk soon about more gameplay changes. At the moment I predict Alpha19 to come out in the beginning of July.
Jun 6, 2016
KeeperRL - Michal Brzozowski
Porting to SDL took about a week. A little bit more than I thought, because it turned out that text rendering and audio playback are a bit lacking (actually, they are not part of the core library, and of much lower quality). So I had to search for replacement libraries. They seem to work well, but I still need to test them on platforms other than Linux. I sincerely hope that the game gets more stable after the whole ordeal of moving away from SFML.

After the last three weeks of refactoring and platform stuff, I finally had some time for gameplay changes! I added wildlife to the maps. So far: deer, foxes and boars. Their simple AI tries to run away from everything else and attack only when adjacent to another creature. Other creatures normally don't chase nor attack wildlife.

I also added some extra settlements to maps. They don't take much part in the game except just being there and adding variety. For now they are: human, elven and lizardman cottages, and dwarf and kobold caves. Besides the usual civilians, they now also have a small number of guards. I want to add a lot more content like that (and also some surprises and mysteries), but probably not all of it in this release.


Finally, I worked a bit on sending game event statistics to the server. It was already used in the last update for stats on retired dungeons, but it was somewhat broken. This time it should be more reliable and I will get richer data. It will super useful to have when working on gameplay, and also to know about any problems that might happening in the game. The statistics are of course completely anonymous, and you'll be able to opt-out in the settings. I'll also display text with all the details, so you'll know exactly what is being gathered.

I'll talk soon about more gameplay changes. At the moment I predict Alpha19 to come out in the beginning of July.
May 31, 2016
KeeperRL - Michal Brzozowski
I always try to make bigger code changes right after releasing a new version, so they get tested as much as possible before seeing the light of the day. This time the first task was to factor out creature body simulation out of other creature logic (like movement and other interactions). It was partly to have cleaner code, and partly to introduce new features. In essence, all the code to simulate the body, like keeping track of body parts, health and attributes like size, weight, applying damage, etc. is now self contained and independent of other calculations.

This breaks ground for more detailed features, like new body materials, different damage models or attack types. Before, they had to be implemented as special cases, so it’s a nice step forward.

After working on bodies, I dove in to decrease memory consumption of the game. Alpha18 typically uses a bit over 1gb of RAM for the maximum campaign settings, but there is also a rapid increase during saving the game (up to 500mb). Most of the memory is used for storing the terrain, as there are about half a million squares altogether in all of the maps. I used some tricks to have much of the terrain objects share the same memory, so for example, if there are a thousand trees on a map, they are all actually represented by the same object. If you make any change to a square, for example burn a tree or drop an item, the game creates a separate copy of that square to be to modify it. Memory usage was this way reduced by half. I have further plans for another 50% decrease, which will give some room to increase map numbers in campaign.

Lastly, I started to port KeeperRL to SDL, which is the standard library in the game industry used for graphics, sound and other things. It should let me get rid of a few annoying bugs, and add some minor features, like a custom mouse cursor and more detailed minimap.

Last time I promised another hotfix update to Alpha18, but I decided to rush with releasing Alpha19 instead, as it’s not a huge update, and have most of the (known) bugs fixed there. I hope that 2-3 weeks will be enough to wrap it up.
May 31, 2016
KeeperRL - Michal Brzozowski
I always try to make bigger code changes right after releasing a new version, so they get tested as much as possible before seeing the light of the day. This time the first task was to factor out creature body simulation out of other creature logic (like movement and other interactions). It was partly to have cleaner code, and partly to introduce new features. In essence, all the code to simulate the body, like keeping track of body parts, health and attributes like size, weight, applying damage, etc. is now self contained and independent of other calculations.

This breaks ground for more detailed features, like new body materials, different damage models or attack types. Before, they had to be implemented as special cases, so it’s a nice step forward.

After working on bodies, I dove in to decrease memory consumption of the game. Alpha18 typically uses a bit over 1gb of RAM for the maximum campaign settings, but there is also a rapid increase during saving the game (up to 500mb). Most of the memory is used for storing the terrain, as there are about half a million squares altogether in all of the maps. I used some tricks to have much of the terrain objects share the same memory, so for example, if there are a thousand trees on a map, they are all actually represented by the same object. If you make any change to a square, for example burn a tree or drop an item, the game creates a separate copy of that square to be to modify it. Memory usage was this way reduced by half. I have further plans for another 50% decrease, which will give some room to increase map numbers in campaign.

Lastly, I started to port KeeperRL to SDL, which is the standard library in the game industry used for graphics, sound and other things. It should let me get rid of a few annoying bugs, and add some minor features, like a custom mouse cursor and more detailed minimap.

Last time I promised another hotfix update to Alpha18, but I decided to rush with releasing Alpha19 instead, as it’s not a huge update, and have most of the (known) bugs fixed there. I hope that 2-3 weeks will be enough to wrap it up.
...