Recent development has concentrated mainly on the new level generator and everything it requires to work. Idea is to write a class, that can generate crypt-like environments and fill them with themed monsters, items and decorations.
Because the previous level generator I wrote for catacombs is quite hard to extend and I’m not really happy with the results it produces, I chose to start from the fresh. Crypt generator is somewhat more modular and should be written in a way that the next generator doesn’t need to be written from scratch.
Basic idea for the generation is following:
- Create a new Level object and fill it with ground
- Partition this level into sections and link them randomly together
- Generate various rooms and corridors inside these sections. Corridors will link sections together at locations defined in previous step
- Decorate level by adding walls, floors, pillars and so on
- Add stairs to link level to other levels
- Add monsters and items
Most of these steps will be performed by separate objects. This will hopefully mean that if I need to change layout of a room, I only need to change that single class and no other classes are effected. This on the other hand means that amount of objects participating to level generation is much more higher and might be harder to understand.
So far the progress has been good. Levels can be now split into sections and sections linked together in a random order. Rudimentary support for branching is in place, but it will need some tuning still. First room generator is working to a degree (making a simple square room in the middle of a section), but corridors have not been implemented yet. I’m hoping that the next room generator won’t take this long to write, because then I should have quite many pieces ready to be reused.