Try Jumping

Open Source game development.

This Week in Dose Response 4

This Week in Dose Response highlight game changes done in the last week or so. It is inspired by the weekly thread at the roguelikedev subreddit.

(Dose Response is a small open-world roguelike where you play an addict)

Slow week, but a week of progress nonetheless! Mostly polishing up the Victory NPC situation.

At the beginning of the endgame section, a special NPC is generated. The player's goal is to reach that NPC to win (see last week's update).

To make sure the NPC is actually reachable by the player, I run a pathfinding algorithm and pick a different location if it fails. Because the world of Dose Response is potentially infinite, we need to limit the pathfinding computation. I used to have a situation where it would just take forever trying to inspect every corner of the world.

The previously hardcoded limit did not reach far enough to the expected NPC distance (80-120 tiles away) and just increasing it meant more computation work from the monsters, slowing the game down. So this is now configurable and the current values seem to work fine in all cases.

When the Victory NPC appears, the camera briefly scrolls towards them. This was broken, because we were always only rendering tiles within a small distance from the player. So when the "camera" left that area, all you could see was black.

This is now fixed and the rendering code correctly identifies which tiles to show.

Tomas Sedovic on 10 November, 2018