Saturday, 27 April 2013

Plan B, part 2, phase 2

Connections between "rogue" rooms work now, in the simple form without any complex routes for corridors. Some room types prefer to have a centered doorway and it also works, but with the assumption that rooms always start from the edge of the room space. Also, there is a need for a new type of space searching routines which understands different room shapes (the current one checks a rectangular area).

Now I can move to the next phase which is generating other stuff in the level beside the important theme rooms. I have not tried it yet, but I think it's going to be interesting. The manual generation process will hopefully make it easier to control the generation, but I have a feeling that I need to change something. The good thing is that I have sanded the parts of the generation to such a perfection that there is hardly anything left to do but connect the dots.

I also realized that I can change the way small "auxiliary" rooms are connected to other parts of the dungeon. There can be different rules to produce complex houses with room types logically connected to each other. Let's say a shop can have a small storeroom and also a bedroom where the shopkeeper is staying. The storeroom can be connected to the bedroom as well so if you sneak into the storeroom you need to go past the sleeping shopkeeper.

Friday, 19 April 2013

Room refactoring

Yesterday was a bit depressed, because I have to refactor rooms - again. How long it's going to take to get this right? The plan requires a new kind of connection scheme for rooms which are generated "rogue" without corridor nodes. Of course I started to think all sorts of ways to connect rooms - with other rooms, caverns or whatever. I'm thinking too much.

Today it seems to be easier to start with simple tasks. First, rooms need more detailed connection data which means they know exactly where they are connected and how. The second task is creating manual connection routine between rooms and checking out existing connections. After that it starts to get complicated, but I can only test it to see how everything else works with rooms.

It may be not that difficult as it seems, because I have created a lot of routines and most of the refactoring is using those routines slightly different way.

Thursday, 11 April 2013

Planning on paper

Planning on paper works really well. Yes, even when you plan random generated levels. It's easier to think what types of rooms or other features you need in that level theme.

Of course I ran into problems when a new shape for specific type of room was needed. The way walls are created works only for rectangle shapes and it's possibly difficult to fix so I'm doing it the easy way with blueprint tech developed for Teemu.

I also came to a conclusion that it's simply impossible to create all level themes with a single routine and data input. It's not that bad, I just need to write routines for each level theme using tools that already exist. That way I can do all types of funny stuff to create special themes. The order of creation plays an important role here, because changing the order makes funny level themes possible.

Another big thing is also the amount of randomness in some level themes. I was thinking that a long time and wondering how I could make level themes random enough. It's not the issue really. I could make endless number of variations or then I could start to finish level themes and make them less random. If it's creating too static themes I'm changing the game from a roguelike to RPG with save/load game and removing permadeath.