Today I'm going to be talking about how the level generators decide what kind of crap to put in the rooms, and what kinds of controls the user has to regulate the types of rooms that are created.
The map parameters are a set of data that essentially gives the Map generator a checklist of things that should be included in the map. While the final list of parameters is going to be quite long, the current one is pretty small, as you can see below:
# of rooms - How many rooms are in the map?
% fork - How often will the path randomly fork and branch into two paths?
Weapons Level - What kind of weapons will be found on the map
Monster Level - How difficult will the monsters be in the map
# of Locked Doors - How many locked doors (and therefore keys) are there?
# of "Monster Traps" - How many rooms are traps you fight your way out of?
# of Supply Rooms - How many rooms with supplies are there?
# of Bosses - How many bosses are there on the map (handy for mini-bosses)
Possible Catalogs - What tilesets are allowed to be used?
As you can see, by modifying these parameters, the level can be tailored to fit the kind of experience you want, while still retaining the random layouts that are the foundation of the game.
Like the map parameters, the room parameters are a set of data that is used to generate the correct type of room that the map generator requires. Unlike the map parameters though, the room parameters are used more to make sure the random room has what it needs, rather than shaping how the room is made itself. The current set of parameters is rather simple, with thing such as where the doors are in the room, which ones are locked,etc. As the game gets more features added to it, the parameter list will obviously grow to accomodate the new things.
Today I implemented "GameObjects", or anything that isn't a tile or GUI element. GameObject is an abstract base class that serves as a template for anything that needs to interact with other objects in a specific manner, such as a healthkit healing something, or a door opening. I also implemented a few small items to test out the functionality of the "GameObject". You can see the objects in the screeny below(Note: Mark's still gone, sorry about the eye-bleeding sprites[wink])
As you can see in the screeny, I've implemented both locked and unlocked doors, healthkits, keys, and decals. The locked and unlocked doors are both animated, and the locked door will only open if the object attempting to open it has an accesslevel greater than or equal to the security level of the door. The keys boost the access level of whatever object touches them, allowing entrance into the locked door. The healthkit is actually what I use to test collision detection and object reactions, so it can be moved around with the arrow keys. The decals (the crappy red blood spots) are randomly placed, and rotated. Once Mark gets back he can start making a variety of blood splatters so the carnage doesn't get too monotonous!
Well, thats all I have for now, tomorrow I'm planning on getting a few Room's actually linked together, so check back soon, and feel free to leave a comment if you have any questions. Peace Out!