Sunday, 28 December 2008

Dungeon generation: data-driven or linear?

I'm back in developing some content to Kaduria, namely dungeon generation. Kaduria is quite heavily data-driven, but I think it has two downsides: 1. it's harder to create an engine to process the data and 2. it's more vulnerable to changes. There can be sudden special cases that can require a change in the engine which then is reflected to the entire game world creation. This actually happened to me when I changed the ground objects to become "real" objects of the game object class hierarchy.

In Teemu I'm using "linear" dungeon generation in which level themes are created with separate functions like Create_Island(); and those functions are modular so changing one will not be reflected to other functions and there are only few data-driven functions (such as creating random creatures and items). The downside of linear approach is that you need more source code to generate different level themes, depending on the complexity of the level. It's more work and maintaining to produce the game content.

I think special cases are not bad if you can control them. It's not always good thing to add functionality of the special case in the engine just because you want to make a "perfect" engine. It can be a waste of time and also a potential hazard to the engine itself.

No comments:

Post a Comment