Well, I promised you guys a screenshots and a more detailed description of what you can expect our new project (which will from now on be refered to as Fortress of Terror(FoT) in all of my posts).
Pretty much the goal of this game in our minds is to be a new experience everytime you play the game, but we don't want the player to feel like the levels are generated randomly. Hefty goals I know, but I think we can at least meet them halfway[grin]. Anyways, the whole game takes place in "Rooms". The "Rooms" are non-scrolling, one screen arenas, where you do.... stuff. Each "Map" is made up of a series of interconnected "Rooms", with a distinct start, and finish. Since rooms are always square in shape, and because we are limiting doors to being in the four cardinal directions, the entire level can be represented in a 2D array of "Room" objects, and the player can traverse freely through doors to an adjacent "Room".
The Rooms are all tile-based, and each one has a "theme" randomly assigned to it. We build "themes" by placing all the tiles and objects that we want to be in a certain type of room in a sort of catalog that the generator can pick from when creating the Room. By using this system, we can avoid such obvious random behavior such as having pits of lava in a laboratory, or a desk in an aircraft hangar. An example "Catalog" is shown below:
Tiles: Floortile1, Floortile2, Desk1, Desk2, Chair1, Table2, DissectionTable1
Items: Healthkit, Stimpacks, PistolAmmo
Enemies: Doctors, Zombie1, Zombie2, Zombie3, PistolGuard, AK47Guard
Then, using the information in the Catalog, the generator can build a convincing room.
Room's are also split into 4 subtypes to help differentiate their layouts. Each subtype has its own criteria for laying down the main area in the room. The current subtypes are:
Empty - An empty room (*gasp*)
Scattered - Random pillars and stuff
Corridor - Obvious hallways leading to the 4 doors
Maze - Twisting passages
Hopefully, those groups, along with random layouts and objects should be diverse enough. The Room generation is working pretty well right now, but due to a severe lack of quality artwork (Mark's out of town for a week), I'm going to hold off on showing you guys a screeny, sorry....
The Map generator essentially creates the array of "Rooms" that makes up the game. It pretty much works by simply starting at a random point in the array, and then picking a random direction to work in, eventually branching out, until the number of rooms requested has been made. Obviously, there's a little bit more than that involved, but you get the idea[wink] All the rooms are then stored in a list in order of their creation. This allows the generator to make sure that any locked doors have their keys placed before the door itself, and other things like that. Some limitations have to be placed on what rooms can connect to other rooms and whatnot, so that the list doesn't get all screwed up with multiple passages and stuff. Anyways, the Map Generator is working as well, and I'll actually show you a screeny of it "in action", as its just a console app right now. The "H" character is the first (or home) room, all the other rooms have numbers so you can see which way they are flowing. The Rooms with an "S" are where "splits" or forks in the road occur, and the map splits up.
So thats all I'm going to tell you guys for now, tomorrow I'll try and go into more detail on how the Room generator does its magic, but until then, Peace Out!