Random Levels Pt.1

Published June 02, 2007
Advertisement
Hey everyone!

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).

Random Levels
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 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:

Catalog #1
Theme: Laboratory
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....

Map Generator
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!



Previous Entry !
Next Entry Random Levels Pt.2
0 likes 4 comments

Comments

Dragon88
So how much attention is FoT going to be taking away from A22?

How well does the map generator deal with larger numbers of rooms? Does it expand a bit more horizontally when it runs out of room vertically?

How will you be dealing with making sure that rooms are in fact traversable? You mentioned a bunch of furniture items for the tiles, which I am assuming the player will not be able to walk on top of. Isn't there a potential for the RNG to go nasty on you and generate a map that can't be crossed?
June 02, 2007 08:43 AM
Sir Sapo
Right now FoT has our full attention, but its supposed to be a quick couple week long project to get us back in the mood for Angels 22 again, so we should be back to A22 stuff soon.

The map generator expands predominantly upwards, but once it reaches that top bound, it realizes it, and begins to move to a side, and down again, so large room numbers shouldn't be a problem. The array that they are placed in is quite large as well, so overflowing it wont be too big of a deal.

The Room Generator also has a number of safeguards to prevent creating an inescapable room. Before the final room is sent to the game from the generator, it runs an A* path finding routine that will determine if all the doors can be reached. Also, alot of tiles have a one tile radius around them, where additional impassable tiles cannot be placed, so there should always be some walkway around most objects.

Thanks for your comment and questions! (and PM[wink])
June 02, 2007 10:24 AM
Dragon88
How is player movement going to work? Will you move on a tile basis, or will it be free movement over a tiled environment?
June 02, 2007 10:39 AM
Sir Sapo
You'll be able to move freely with the keyboard, and aim with the mouse, like in Ravuya'a Glow (plugged!!!), or HopeDagger's Membrane Massacre (double plug!!!). The gameplay is essentially going to be like Doom only topdown.
June 02, 2007 04:47 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

!

1181 views

'Roids

1483 views

Post Dva

1265 views

Untitled

1100 views

I'm a sad panda...

2106 views

Untitled

1003 views

Progress

1048 views

Angels 2X!!!!!

1470 views

T3H Progress!

1294 views

ZOMG!!!!

1174 views
Advertisement