Difference between revisions of "Level Transitions"

From Valve Developer Community
Jump to: navigation, search
(Otherlang2 -> Lang. Src will always have limits (as every engine). Packed gallery. Re-organized headings.)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{otherlang2
+
{{lang|Level Transitions}}
|zh-cn=Level Transitions:zh-cn}}
+
{{Abstract Mapping}}
Level transitions allow you transfer the player from one map to another, essentially making two separate levels seem like one larger map.
+
'''Level Transitions''' allow you transfer the [[player]] from one map to another, essentially making two separate levels seem like one larger map.
  
== Why change levels? ==
+
A level transition can be '''one way''' or '''two way''':
The Source Engine, while expansive, still has limits as to the the amount data that can be processed. Breaking up levels also helps split up the work load and compile times during the design process.
+
*A two way level transition allows a player to travel back and forth between two connected maps.
 +
*One way level transitions prevent the player from traveling back to previously explored areas after being completed. An obstacle or chain of events makes a previous area inaccessible.
  
== Types of level transitions ==
+
A level transition can be '''seamless''' or '''displacing''':
 +
* Seamless transitions give the impression that the player stays in the ''same'' location as before the transition. For that, the two maps have an area in common, with the intention of being the ''same'', for example a door or hallway connecting two rooms.
 +
* Displacement transitions give the impression that the player has moved, for example by a portal connecting two worlds or the player is knocked unconscious and wakes up in a new area.
  
=== Two way transitions ===
+
== Why change levels? ==
A two way level transition allows a player to travel back and forth between two connected maps.
+
The [[Source Engine]], while expansive, has limits as to the the amount data that can be processed. Breaking up levels also helps split up the work load and compile times during the design process.
 
 
=== One way transitions ===
 
One way transitions prevent the player from traveling back to previously explored areas after being completed.  An obstacle or chain of events makes a previous area inaccessible.  
 
 
 
== Methods / Styles of transitioning ==
 
 
 
=== Seamless ===
 
* Example:
 
** A door or hallway connecting two rooms
 
  
=== Displacement ===
+
== Seamless Transitions ==
* Example:
 
** A portal connecting two worlds
 
** A character getting knocked unconscious and dragged into a new area
 
  
== Example of a seamless transition in-game ==
+
=== Example of a seamless transition in-game ===
To create a seamless transition, parts of one level are included inside the next level being loaded. The exception being "teleportation" style transitions, where the players are transported into an entirely new world or environment.  Below is an example from Half-Life 2's {{ent|d1_trainstation_01}}, the first level of the game.
+
To create a seamless transition, parts of one level are included inside the next level being loaded. The exception being "teleportation" style transitions, where the players are transported into an entirely new world or environment.  Below is an example from {{game name|hl2|name=Half-Life 2}}'s {{ent|d1_trainstation_01}}, the first level of the game.
 
<br>
 
<br>
[[Image:D1 trn sta 01.jpg|150px]]
+
<gallery mode=packed heights=200px>
[[Image:D1 trn sta 02.jpg|150px]]
+
Image:D1 trn sta 01.jpg|The [[trigger_changelevel]] in the doorway loads the next map.
[[Image:D1 trn sta 03.jpg|150px]]
+
Image:D1 trn sta 02.jpg|The map actually ends at the staircase just beyond the door in the first picture. Most of the level lies on the right of the picture here.
[[Image:D1 trn sta 04.jpg|150px]]
+
Image:D1 trn sta 03.jpg|Once the player touches the changelevel, they're greeted by a loading, the next map is loaded over the current map.
[[Image:D1 trn sta 05.jpg|150px]]
+
Image:D1 trn sta 04.jpg|Now the player is in an entirely new map, but from the other side of the door, it appears the old level is still there.
 +
Image:D1 trn sta 05.jpg|However, if you zoom out, you can see that a new level was loaded and the original level was almost entirely removed. There is no longer the any parts of the level that were in the right on the second screenshot, but an entirely new area in the upper left.
 +
</gallery>
  
* In the 1st image you can see the trigger_changelevel in the doorway that loads the next map.
+
=== Creating a seamless transition ===
 +
{{main|trigger_changelevel}}
 +
* First, have the exact same brushes and entities in the visible area. This will make the level change seamless. You can use copy and paste in [[Hammer]].
 +
* Next, in both levels, place an [[info_landmark]] in the exact same location relative to the map. Name them Level01-Level02 (This can be changed)
  
* In the 2nd image, zoomed out you can see the map actually ends at the staircase just beyond the door in the first picture. Most of the level lies on the right of the picture here.
+
* Next, create a [[trigger_changelevel]] in both levels. This can be named anything. Link them to the corresponding info_landmark inside the properties panel. Set the new map name to either the previous or next level, depending on which level the trigger_changelevel is located within. {{Warning|Do not have these in the same relative area. This will create a looping effect, and when you get into one level you immediately are teleported back.}}
 +
* Finally, you can (but needn't) create a [[trigger_transition]] in both levels. This will be the area where [[Prop Types Overview|props]] will be taken between levels. These should be named the same as the info_landmarks.
  
* Once the player touches the changelevel, they're greeted by a loading seen as demonstrated in the 3rd image, the next map is loaded over the current map.
+
== Displacement Transition ==
  
* Now the player is in an entirely new map, but from the other side of the door, it appears the old level is still there.
+
=== Creating a displacement transition ===
 +
There are 4 different methods:
 +
* Mimicking the method above, but without the seamless transition.
 +
* Triggering the trigger with logic.  
 +
* [[point_changelevel]] {{Only|{{portal2}}}}
 +
* [[info_changelevel]] {{Only|{{l4ds}}}}
  
* However, if you zoom out, you can see that a new level was loaded and the original level was almost entirely removed. There is no longer the any parts of the level that were in the right from the zoomed out screenshot above, but an entirely new area in the upper left.
+
==== Method 1 ====
 +
Follow the steps for a seamless transition, but do not include the same level geometry. You can disable the trigger_changelevel to the previous level if required.
  
== Creating a seamless transition ==
+
==== Method 2 ====
 
To start, you must have:
 
To start, you must have:
* An info_landmark in each level
+
* An [[info_landmark]] in each level
* A trigger_changelevel in each level
+
* A [[trigger_changelevel]] in each level
* A trigger_transition in each level.
+
* A [[trigger_transition]] in each level (Optional)
 
 
First, have the exact same brushes and entities in the visible area. This will make the level change seamless.
 
 
 
Next, in both levels, place an info_landmark in the exact same location relative to the map. Name them Level01-Level02 (This can be changed)
 
  
Next, create a trigger_changelevel in both levels. This can be named anything. Link them to the corresponding info_landmark inside the properties panel. Note: do not have these in the same relative area. This will create a looping effect, and when you get into one level you immediately are teleported back.
+
First, create a small brush with the trigger texture in the first level. This will be the trigger_changelevel. Set the new map name to the second map. Set the landmark name to the name of the landmark.
 +
Then, create a landmark somewhere. This may take some trial and error to figure out where this should be best placed as to not cause issues with changing level into a wall in level 2.
 +
Next, if you want props to carry over, create a trigger_transition and call it the same name as the info_landmark. This volume is where any entities will transfer over to the next level.
 +
You can then create a logic_relay pointing at your trigger_changelevel. Set the Target Input to ChangeLevel. You can put this somewhere where the player cannot contact it.
 +
Within the second level, add the info_landmark (named the same as the previous one).
 +
You will have to create a second trigger_changelevel in the second map, but this can be disabled and out of the player's reach. Set the new map name to the first map. Set the landmark name to the name of the landmark.
 +
 +
==== Method 3 ====
 +
({{portal2}} Only)
 +
To start you must have:
 +
* A [[point_changelevel]]
  
Finally, in both levels create a trigger_transition. This will be the area where props will be taken between levels. These should be named the same as the info_landmarks.
+
Add the point_changelevel, and create an input with the input set to ChangeLevel, with the parameter as the map name. Nothing else is required.
  
== Creating a displacement transition ==
+
==== Method 4 ====
 +
({{l4ds}} Only)
 +
To start you must have:
 +
* An [[info_changelevel]]
 +
* An [[info_landmark]]
  
 +
First, create an info_landmark in both levels. Set it to the same name in both levels.
 +
Finally, Create an info_changelevel brush over the saferoom. Set the new map name to the next map. Set the landmark name keyvalue to the name of the landmark.
  
 
== See Also ==
 
== See Also ==
Line 65: Line 80:
 
*[[info_landmark]]
 
*[[info_landmark]]
 
*[[trigger_transition]]
 
*[[trigger_transition]]
*{{P2 add|[[point_changelevel]]}}
+
* {{P2 add|[[point_changelevel]]}}
*{{L4D add|[[info_changelevel]]}}
+
* {{L4D add|[[info_changelevel]]}}
 +
 
 +
[[Category: Abstract Mapping]]
 +
[[Category: Level Design]]

Latest revision as of 20:04, 16 October 2021

English 简体中文
Abstract Mapping series Discuss your thoughts - Help us develop the articles or ideas you want

Ammunition | Animals & Creatures | Antlions | Beams & Lasers | Cables & Ropes | Clouds & Sky | Color Theory | Combat | Combine | Doors | Dust, Fog & Smoke | Elevators | Level Transitions | Environmental Lighting & Weather | Explosions | Fire | Foliage | Glass | Headcrab | Health | Ladders | Lighting | Optimization | Physics | Retinal scanners | Sound & Music | Special effects | Terrain | Trains | Turrets | Water | Weapons | Zombie

Level Transitions allow you transfer the player from one map to another, essentially making two separate levels seem like one larger map.

A level transition can be one way or two way:

  • A two way level transition allows a player to travel back and forth between two connected maps.
  • One way level transitions prevent the player from traveling back to previously explored areas after being completed. An obstacle or chain of events makes a previous area inaccessible.

A level transition can be seamless or displacing:

  • Seamless transitions give the impression that the player stays in the same location as before the transition. For that, the two maps have an area in common, with the intention of being the same, for example a door or hallway connecting two rooms.
  • Displacement transitions give the impression that the player has moved, for example by a portal connecting two worlds or the player is knocked unconscious and wakes up in a new area.

Why change levels?

The Source Engine, while expansive, has limits as to the the amount data that can be processed. Breaking up levels also helps split up the work load and compile times during the design process.

Seamless Transitions

Example of a seamless transition in-game

To create a seamless transition, parts of one level are included inside the next level being loaded. The exception being "teleportation" style transitions, where the players are transported into an entirely new world or environment. Below is an example from Half-Life 2 Half-Life 2 's d1_trainstation_01, the first level of the game.

Creating a seamless transition

Main article: trigger_changelevel
  • First, have the exact same brushes and entities in the visible area. This will make the level change seamless. You can use copy and paste in Hammer.
  • Next, in both levels, place an info_landmark in the exact same location relative to the map. Name them Level01-Level02 (This can be changed)
  • Next, create a trigger_changelevel in both levels. This can be named anything. Link them to the corresponding info_landmark inside the properties panel. Set the new map name to either the previous or next level, depending on which level the trigger_changelevel is located within.
    Warning.png Warning: Do not have these in the same relative area. This will create a looping effect, and when you get into one level you immediately are teleported back.
  • Finally, you can (but needn't) create a trigger_transition in both levels. This will be the area where props will be taken between levels. These should be named the same as the info_landmarks.

Displacement Transition

Creating a displacement transition

There are 4 different methods:

Method 1

Follow the steps for a seamless transition, but do not include the same level geometry. You can disable the trigger_changelevel to the previous level if required.

Method 2

To start, you must have:

First, create a small brush with the trigger texture in the first level. This will be the trigger_changelevel. Set the new map name to the second map. Set the landmark name to the name of the landmark. Then, create a landmark somewhere. This may take some trial and error to figure out where this should be best placed as to not cause issues with changing level into a wall in level 2. Next, if you want props to carry over, create a trigger_transition and call it the same name as the info_landmark. This volume is where any entities will transfer over to the next level. You can then create a logic_relay pointing at your trigger_changelevel. Set the Target Input to ChangeLevel. You can put this somewhere where the player cannot contact it. Within the second level, add the info_landmark (named the same as the previous one). You will have to create a second trigger_changelevel in the second map, but this can be disabled and out of the player's reach. Set the new map name to the first map. Set the landmark name to the name of the landmark.

Method 3

(Portal 2 Only) To start you must have:

Add the point_changelevel, and create an input with the input set to ChangeLevel, with the parameter as the map name. Nothing else is required.

Method 4

(Left 4 Dead Left 4 Dead 2 Only) To start you must have:

First, create an info_landmark in both levels. Set it to the same name in both levels. Finally, Create an info_changelevel brush over the saferoom. Set the new map name to the next map. Set the landmark name keyvalue to the name of the landmark.

See Also