Level Design Introduction (Portal 2)/Gotchas

From Valve Developer Community
Jump to: navigation, search
Deutsch Español Magyar Русский

This is a list of common problems ("gotchas") level designers may encounter. The solutions to these gotchas are not obvious so they have been listed here. This section also contains some tips and tricks that level designers may find helpful.


Brush panels that portals can be placed on should be 16 units deep to prevent the portal from flickering when viewing from a distance. To test coop maps as one robot you will need to type mp_dev_wait_for_other_player 0 in the console before loading the coop map.

Coop maps names need to start with mp_coop_*



If you are working in Hammer with a map open and you create a new instance that is used in that opened map. You should shutdown Hammer before you place the instance in the map. This is because the instance needs to be on disk when the map is loaded in Hammer other wise you might get an incorrent instance placed in the map.

When naming instances you must set the Entity Name Fix Up to prefix or postfix.


For Coop maps the target for a trigger_catapult (usually a info_target entity) should have the transmit to client flag checked.

Trigger catapult flag.JPG

Debugging the trigger_catapult

Ent text catapult.JPG

  • This will display the path the trigger_catapult will launch the player at.
  • If you are using the threshold check it will show you the exact speeds that the player needs to be traveling at to activate the trigger_catapult.
Catapult debug.JPG


To use Paint in a map you need to set paint in Map to Yes in the map properties dialog.
Paint map props.JPG
Paint in map.JPG
Limit the number of paint blobs used to be as low as possible. The lower the number the better performance you will get.
Number of blobs.JPG


Flashlight prop.JPG

There can only be one env_projectedtexture on at a time. When you turn a env_projectedtexture on it will turn off all other env_projectedtexture entities that were previously on.

Limit FOV the to 85 degrees wide. Angles wider than that can cause shadowing artifacts and will affect performance.

Try to keep the Near and Far Z as tight as possible so the light only projects onto surfaces you want. The bigger the env_projectedtexture the more it will cost your performance.
Debug flashlight.JPG
Type r_shadowwireframe 1 in the console and it will show you all the geometry the env_projectedtexture is affecting. This debug command can be useful for tuning the env_projectedtexture.

Level Design Introduction
Your First Level