Thursday, 18 December 2008

Mask map access

There are two mask maps used in creation stage of the level. Regular mask map and room mask id, which stores the room id for each tile. They are accessed through various creation routines such as corridor and cavern classes, which are not part of the Level. I think I can still make it somewhat clean if I just make a routine for Level to write mask maps, like current_level->Put_Mask_Map(x, y, value). Terrain map access is going to be similar, while at the moment terrain can be changed everywhere.

In theory things like corridor, cavern and even room creation could be inside Level class as regular routines, but I think that would make the Level class quite big and overloaded with function names. I'm somewhat worried with current_level-> which is going to have more references, but on the other hand I can really concentrate on Level routines and possibly even reduce the amount of functions, which actually has happened already. In large project like this it's even possible to write a function which makes something very similar than another function. This has been the case in Kaduria, mostly because of the missing structure of the class hierarchy.

No comments:

Post a comment