Right now, I’m making Dungeon Master like game. The game have to be more sword-and-magic-related than Legends of Grimrock; something like Corridor Wizardry 8. I’m going to make some decent graphic look so I’m thinking about the right cell system algorithm.
First I was thinking about BSP. I get some info from these links
- Simple example of BSP dungeon generation
- http://roguebasin.roguelikedevelopment.org/index.php?title=Basic_BSP_Dungeon_generation
but I don’t know. BSP in its basic form is useful only for 2D-rogue-like dungeons.
I’m using C# XNA so I’m thinking about my own system defining cell by cell in xml, first their positions in space (making some tunnel-map system), then all of their details such as textures. But then, I’m afraid of placing “mapfile” generated objects like torches on the walls, treasure boxes, secret buttons, traps another items etc.
I want to know, which way should be the best to fulfill my in-game requirements and I don’t want to spend months by exploring BSP and then choose another way.
In general, what you would be after for this purpose is Maze Generation Algorithms of which the BSP is one way of doing it.
However, you should decide on how are you going to represent your world first.
If you want to create a set of “linked areas” then you could go for a DFS type of algorithm which would attempt to link the individual areas in a complex way. (Think of it like the areas you navigate in MUD type games)
Otherwise, if you would like to go for one big solid Maze representing your dungeon then you could generate a simple bitmap with one of the algorithms in that wikipedia link and then use this as your “floor plan”. This can then be extruded upwards to create the walls and give you a very basic “Doom”-like space which you can then enrich with torches / textures / any other objects.
I hope this helps.