Skip to content
Cong edited this page Jan 22, 2015 · 5 revisions

Classic maps are the randomly-generated maps seen in the original C-Dogs. They're still here in C-Dogs SDL, fully supported, but with a number of enhancements too.

Overview

Here's a basic overview of classic maps. C-Dogs uses a fairly simple random map generator to build its maps, but provides a lot of control over its generator. Starting with an empty rectangular area, it randomly places squares, rooms, pillars and walls around the map. The generator is also careful to avoid blocking off sections too much, so that the maps feel less maze-like and flow better, and there are often multiple paths between any two points on the map.

The following sections describe each of the map elements and how they can be configured.

Squares

square

Squares are 8x8 areas of empty space; no rooms or walls will appear in this area. These areas allow firefights between multiple characters, so it's great to have a few in the map. Squares are always placed first.

  • Sqr: number of squares to place

Rooms

room

Rooms are rectangular walls enclosing room tiles, with doors randomly placed on the walls (zero or one on each side). For classic maps, doors only occur as entrances to rooms, and room tiles only occur inside rooms.

Some rooms can have walls within, to break up the space. This is great for very large rooms.

Doors in C-Dogs are automatic: they are closed until a player (or a corpse 😅) is on either side of it, and you have the key needed to open it, if it needs one.

Rooms are randomly given an access level - that is, a key required to enter it. If a room requires a certain coloured key, that shows up as its doors are shown with that colour. The access level is set so that there are normal doors (requiring no key), one of which may contain the key for the lowest access level (yellow). Inside these yellow rooms in turn may be a key for the next access level (green) and so on. The access levels are assigned by a random algorithm that prefers having lots of unlocked rooms, so if you want locked rooms you'll need a lot of rooms: use a bigger map or smaller rooms.

  • Rooms: number of rooms to place. Since rooms are placed after squares, the map may not be big enough to place this many rooms. The game will try to place this many rooms but if it can't it will give up in the middle.
  • RoomMin, RoomMax: the size of rooms, per side. Rooms are at least RoomMin long and wide, and at most RoomMax long and wide. If RoomMin and RoomMax are the same, then rooms will all be the same size.

edge room

  • Edge rooms: whether to allow placing rooms at the edge of the map. Having edge rooms makes the layout of the map more interesting.

room overlap

  • Room overlap: whether to allow rooms to overlap (and combine). When rooms overlap, their outer walls merge and the overlapped walls disappear, giving the appearance of a single, oddly-shaped larger room.

room walls

  • RoomWalls: how many walls to place inside rooms; 0 to disable. Room walls help break up the interior of rooms, making large rooms more interesting. Room walls never touch the edge of the room.
  • RoomWallLen: length of room walls. Short room walls look like pillars; long room walls can effectively partition the room to seem like a corridor loop.
  • RoomWallPad: how many tiles to leave free between the room walls and the room edge. Small padding will create cramped rooms.

no doors

  • Doors: whether to enable doors. If disabled, doors will be replaced by empty tiles, making rooms feel more like caves or alcoves.

door size

  • DoorMin, DoorMax: size of doors. Small doors form choke points, and the smallest doors can only let one player go through them at a time. Large doors are much easier to pass through and make weaker partitions between the interior and exterior of the room.

Pillars

pillars

Pillars are rectangles of solid wall. They are effective at breaking up the space of an otherwise empty map, and forming interesting paths around them.

Note that pillars are also affected by the edge rooms and room overlap parameters. Edge pillars and overlapped pillars create interesting shapes and map layouts, sometimes having an organic appearance.

  • Pillars: number of pillars.
  • PillarMin, PillarMax: size of pillars, per side. Large pillars don't act like pillars at all; instead they are large obstructions that create paths around them.

Walls

walls

Walls are single-width, sometimes branching, and placed at empty spaces in the map that aren't already occupied by squares, rooms or pillars. They are great at creating windy paths, and together with the line-of-sight system in C-Dogs, creates tense close-range encounters.

  • Walls: number of walls to place. Since walls are placed last, the actual number of walls placed may be much smaller than this.
  • Len: length of walls. The map generator does not try very hard when placing walls, so walls may be much shorter than this unless there's plenty of empty space.

Misc

corridor width

  • CorridorWidth: all map features (rooms, walls etc.) are placed with empty space around them. The size of this is controlled by CorridorWidth. That is, if CorridorWidth is 2, then rooms will be surrounded by at least a two-tile-deep perimeter of empty space. This is effective at making passages more spacious, and reduces tension.