Evan's Dev Blog

Capstone Chronicles


Generated, Part 2

The second major mechanic and challenge was the idea of the character having an injured head cause memory loss. Initially, the thought was that a room you were in some time ago is reformed into a new room. It immediately became apparent that this would cause many issues, like replacing the room with a new room that is just the same size thus appearing as if it never changed at all. Fortunately it was realized that because of BSP, the algorithm generating the rooms, it is simple to regenerate groups of rooms with a group size choice of 4, 8, 16, 32, but 4 is sufficient for creating a noticeable difference. One issue that arises from this mechanic is the possibility of a room changing while the player is inside it. This has an easy fix just by adding a “bubble” around the player that prevents any rooms touching the bubble to change. Adjacent rooms are also protected so the player doesn’t watch the room next to them disappear.

The process used in regenerating rooms also serves purposes other than simulating poor memory. As the player progresses through the game picking up keys, the theme of the rooms change bringing about different environments. This way when a new theme is activated, many rooms can be selected and regenerated to that the player experiences this progression.


css.php