Early mapping tips for Alien Swarm: Infested

This guide contains hints and tips on how to get started mapping for AS:I before the launch of the game. It doesn't cover AS:I specific entities, but should give you enough information to begin blocking out your level and allow you to build your own props to the correct scale.

Getting Started

To make maps for AS:I, you'll be using the Hammer Editor which is included in the Source SDK. You'll want to familiarize yourself with this tool. You can find an excellent guide on how to install and build your first map in Hammer, on the Valve Developer Community wiki. It will take you through making your basic Half Life 2 map (and thus familiarizing you with Hammer). Definitely recommended if you haven't worked with Hammer before.

Making levels for AS:I

Walls and level geometry

AS:I maps are required to be open top corridors and rooms, with plenty of room left for the camera above and to the sides of every location. The easiest way to achieve this is to have a large empty room in which your level resides.

AS:I will have two camera modes, the classic top down one (90°) and a 60° tilted one. The tilted camera in AS:I looks great, gives more immersion and really allows a mapper to show off his architectural skills, BUT it requires some discipline for the maps to play well.

The tilted view means anything close to a south wall becomes hidden from view. This is a disaster for gameplay when a marine or Swarm drone is hidden and the players can't see what's going on.

There's two ways to solve this problem:

The ideal wallheight is something between 120 and 160 units high.

Lighting

To get the harsh shadows and contrasting lighting that we wanted for AS:I, we've used custom finite lights. These are lights that reach only to a fixed distance, with a smooth decrease in intensity as they head towards the limit. HL2 uses lights that reach infinitely far, so any lighting you place in your level before AS:I is released will have to be temporary.

tools/toolsblack

Give any large surface that the player doesn't need to see lit up the texture tools/toolsblack, this black texture will skip any light calculations on that surface, speeding up VRAD a lot. Also use it for the sides of your outer shell box, as well as most top surfaces of walls.

List 'o tips

How to get a tilted camera in Half Life 2

There are a couple of console commands that you can execute while in developer mode, this will essentially give you an unlocked camera that somewhat resembles the one in AS:I. The main difference is that the one in Half Life 2 rotates when you move the mouse and the one in AS:I moves the crosshair.

The commands, (executed in succession) are:

  1. developer 1
  2. thirdperson
  3. cam_idealdist 400
  4. cam_idealpitch 60
  5. cam_idealyaw 0

Or you can download this handy dandy asi-view.cfg file to "Steam\steamapps\steamlogin\half-life 2\hl2\cfg" which allows you to simply type "exec asi-view" in the Half Life 2 console to execute all those commands in succession.

Note that in order to be able to open the console, you need to check the "Enable Developer Console (~)" option in the Advanced Keyboard settings. Also note that the thirdperson command in Half Life 2 is somewhat buggy. The first time you run the command it will not show you any sort of player model. The model will only show up after you reload the map a second time.

Example map

We've prepared a sample map that you can use as reference material. It basically shows you two of the possible solutions you could use to get around the tilted map problem as well as an example of what it would look like without these measures in place.

Download the example map (19,9KB)

The .bsp file goes into "\Steam\steamapps\steamlogin\half-life 2\hl2\maps"
The .vmf file goes into "\Steam\steamapps\steamlogin\sourcesdk_content\hl2\mapsrc"

From there, you can either just run the map in Half Life 2 by typing "map asi-example" or open the .vmf file in Hammer.

Further information

We'll have a full range of mapping documentation available after AS:I is released. For now, make use of the excellent Valve Developer Community wiki for more information on working with Hammer and the Source engine.