You might ask why a game with random levels needs a level editor...
Well, roguelikes are not completely random.
Most roguelikes use predefined rooms in their level generation algorithm. Usually these are rectangles, but they might also be another shape, such as an oval or a rectangular donut or a cross.
I'm going to be doing the same, so that I don't have only rectangular or square rooms. But as well as simple primitives (square, rectangle, torus) I'm going to include quite a lot of themed rooms and even themed areas. These might include mazes or an array of dungeon cells or an underground fortress, or a subterranean village or whatever.
For that I need a quick and easy way of creating these prefabricated areas and saving them to disk ready to be called up by the game.
Introducing the prefab editor V0.4:
You can place rooms, corridors, stairs up and down, secret doors and encounter areas (the numbers on the map above).
The encounter areas are my favorite bit so far. They will be added to the level's dictionary of encounter areas and random monsters or treasure or furniture items will be placed there according to a theme when the level is created. There's a good chance that an encounter area won't spawn an encounter but if it does, the encounter parts should be constrained to the tiles specified in the level editor.
The level hook is a tile marked for connection to the other parts of the dungeon. There can be multiple level hooks, or just one. If the prefab contains stairs it will be stored in the "stairs" dictionary along with an entry detailing the length of it's longest edge, so it can be rotated or flipped and fitted in to the BSP generator I talked about earlier.
There will be a lot of prefabs built, so the chance of encountering any 2 identical areas is pretty low. In any case they may have a different tileset, different encounters, furniture or other features so they won't be instantly recognizable.
Well, roguelikes are not completely random.
Most roguelikes use predefined rooms in their level generation algorithm. Usually these are rectangles, but they might also be another shape, such as an oval or a rectangular donut or a cross.
I'm going to be doing the same, so that I don't have only rectangular or square rooms. But as well as simple primitives (square, rectangle, torus) I'm going to include quite a lot of themed rooms and even themed areas. These might include mazes or an array of dungeon cells or an underground fortress, or a subterranean village or whatever.
For that I need a quick and easy way of creating these prefabricated areas and saving them to disk ready to be called up by the game.
Introducing the prefab editor V0.4:
You can place rooms, corridors, stairs up and down, secret doors and encounter areas (the numbers on the map above).
The encounter areas are my favorite bit so far. They will be added to the level's dictionary of encounter areas and random monsters or treasure or furniture items will be placed there according to a theme when the level is created. There's a good chance that an encounter area won't spawn an encounter but if it does, the encounter parts should be constrained to the tiles specified in the level editor.
The level hook is a tile marked for connection to the other parts of the dungeon. There can be multiple level hooks, or just one. If the prefab contains stairs it will be stored in the "stairs" dictionary along with an entry detailing the length of it's longest edge, so it can be rotated or flipped and fitted in to the BSP generator I talked about earlier.
There will be a lot of prefabs built, so the chance of encountering any 2 identical areas is pretty low. In any case they may have a different tileset, different encounters, furniture or other features so they won't be instantly recognizable.
Comments
Post a Comment