The following work is a sample of my level and game design skills. It is created to be an open world stealth action game, closely related to the Splinter Cell series. This means that the player can choose their playstyle to be either more combat or stealth oriented. It showcases a level designed outpost to be placed inside an open world game, three game designs that are used within the design, and a scripting showcase demonstrating my scripting skills. The script shown is a working version (in Unreal Engine 4) of one of the game designs included in this document. Considering it is an open world that lives and breathes, this also means that a day-night cycle is present. The stealth genre provides interesting challenge for open world, as the day-night cycle could immediately impact the way the game is played, as enemies would spot players more easily during the day than they would in the dark. While developing my level I aimed to create a full on sandbox experience where players are not forced, but encouraged to perform certain actions or take directions. I have tried to enhance this by creating a set of mechanics that encourage players to use the desired behaviour.
The outpost represents a transformer station that is placed on a hilly terrain. This terrain partially divides the outpost in a higher and a lower area. Enemy AI are defending the outpost by patrolling to provide a challenge for players as they try to complete the objective to complete the scenario: Sabotage three transformers that are spread out throughout the outpost.
Enemy AI + patrol path
Fence (see through)
Additionally, the brown lines that can be observed crossing throughout the layout are height lines inspired by real world maps. They are present to help define height levels.
The 3D design was created to get a better understanding of the space that was designed in the 2D layout. The height can be seen more easily, as well as the size and cover can be identified better.
The 3D layout uses the same visual language as the 2D layout. This is done to easily compare the 2D layout with the 3D layout.
Scale of cover and buildings are given a better understanding as well as that the visual references are given more context in 3D.
1/3 - Alarm System
The intentions of the design are to provide players with a secondary objective which will encourage a stealth playstyle, or lead players to take out the alarm before starting their combat approach. It does this by giving penalties to players, but it does not fail the mission. Instead, it makes the mission more challenging if the alarm is triggered. This way the player changes from an offensive playstyle to a more defensive playstyle, as they now have to evade their hunters, or take them out from defensive positions. This makes players utilise the level in a different way and as such changes the way the level is played. Players can circumvent this by disabling the alarm without being spotted. The alarm is an interactable asset in the game, and players will have to move towards it (see Visual Representation & Placement) to disable it. This encourages them to certain areas of the combat area making them utilise more designed spaces.
Disabling the alarm
Players can disable the alarm by moving to the switchboard and interact with it in melee range. This will prevent enemy AI from triggering the alarm. If the alarm has been disabled by the player and an enemy AI interacts with the alarm, it will not go off and the enemy AI will rejoin combat against the player. If the player manages to kill the enemy moving to trigger the alarm, one other enemy that sees this happen and that is not in deadly combat will move to trigger the alarm. If none are available, the player has managed to stop the triggering of the alarm.
Triggering the alarm
An enemy AI will move to activate the alarm when they have a visual confirmation on the player, if they are not in deadly combat (close quarters and fighting) with the player. Additionally, they will move towards the alarm if they hear gunshots in the combat area and are the closest to the alarm asset of all enemies triggered, or if they find a body. If two or more enemies are at the same distance, one will be randomly selected to trigger the alarm. If the alarm is triggered, siren sound will start playing, alarming players.
AI Response to the Alarm
The alarm is triggered if an enemy AI reaches the alarm and interacts with it. If this happens, all the enemies in the combat area will become aware and take more defensive positions. If they are close enough to the player’s last known position, the enemy AI will move towards it and search.
The alarm has been triggered.
AI 1 is in the combat zone, but not inside the alarm range. He is aware, but will not move in to fight; instead he will take a more defensive position in his current location.
AI 2 is inside alarm range. He will move towards the player’s last know location to take him or her out.
Note: If an AI is outside the combat area, he will react to the alarm as long as he is within alarm range.
When the alarm is triggered, after a set amount of time, a vehicle will approach the outpost and stop outside to dismount AI reinforcements. These reinforcements will move towards the player’s last known location if available. If there no longer is a last known location, the reinforcements will search random parts of the combat area and engage the player if found. If the player is not found, one of the reinforcing AI will disable the alarm, after which all the reinforcements will mount their vehicle again and leave.
In the above figure, both AI 1 and 2 spot the player. However, as AI 2 is in short distance to the player (and thus in deadly combat), AI 1 is moving to trigger the alarm.
Both AI 1 and 2 hear the gunfire between AI 3 and the player and thus become aware. As AI 2 is closest and as no other enemy is moving to the alarm yet, he moves to trigger it.
The actual alarm asset represent a pole with loudspeakers on top, as well as have a switch box on the pole for players to interact with. When placed in the level, one should keep in mind that players should be able to spot it with relative ease, but that it should also be a challenge to reach it. The placement should make sure that players have to go out of their regular path in order to disable it. This is done to utilise as much of the designed outpost space as possible.
While the AI is distracted by searching the area, the player uses the darkness to sneak behind the enemy to his/her goal.
2/3 - Lights
Lights are designed to be a hazard to the player inside combat areas during night time. Night time provides players with the option to hide in the dark, giving advantages for stealth gameplay. As players are more easily spotted in lit up areas than in darker areas, lights can provide players with obstacles they have to circumvent or remove in order to progress.
Combat spaces should be designed with lights in mind to make sure that they provide additional challenges for players to navigate through levels. Lights can be destroyed by shooting out the light bulb, which will cause nearby enemy AI to become suspicious and investigate for a short time. This encourages players to assume a more defensive stance while the enemy AI searching the area. Additionally this will provide players with new options to take them out.
Please note that the lights only function during night time. If players chose to assault a combat area during day time, they will not run into this mechanic. However, they will suffer from the high visibility penalty of the day time, essentially always placing them in the light and making a stealth approach more difficult.
Wherever a light a placed, it casts light during night time. Players can identify this light by a cast of light on the floor. If players stand in this light, they can be spotted by enemy AI from the same distance as they would be spotted during daylight.
The example below shows a scenario where the player has run into an enemy AI blocking their path. The player has to solve this ‘puzzle’ by interacting with the light.
Enemy AI Responses
If an enemy AI runs into a broken light, they will move towards the light and briefly search the area. If the player is not found, they will continue their previous business. Only one enemy AI will investigate the broken light. If another enemy AI has found the light first, other enemy AIs that spot the broken light will ignore it and not investigate.
The player has run into a light they cannot cross without being spotted by the AI.
The player destroys the light, causing the AI to investigate. The player uses the darkness to move ahead and in cover.
The player has managed to reach his/her goal unseen in the darkness. The AI has not found anything and is returning to its original location.
In the image to the left, the player is standing further away from the enemy AI than in the image to the right. However, due to the fact that in the image to the left the player is standing in the light he/she gets spotted by the AI. In the image to the right the player is not standing in the light, but closer to the enemy. Because the player is standing in the dark and is thus harder to spot for the AI, he/she is not spotted.
Players can destroy lights to create new opportunities for traversing the level, or to lure enemy AI to the position of the light so that they can take them out without alarming other enemies. Lights are destroyed when the player uses a ranged weapon and shoots the light bulb. This turns off the light and makes a breaking sound, which will make nearby enemy AI investigate (see Enemy AI Responses).
The lights can be visualised in the game in several different ways. The main requirement is that the asset has an identifiable light source that players can take out to destroy the light. A few recommendations can be seen to the right. The area in which players are lit up by light, are visualised as a circle on the floor which appears more lit up. Please note that when the light source is at an angle, the shape of the light on the floor should change with this, modifying the shape. Physical objects also block the light and cast shadows.
With a central light source the light is spread in a perfect circle on the ground, while with an angled light source the light is spread in a more oval shape. Also note how the ‘wall’ is stopping the casting of light.
Outdoor Light, self standing
3/3 - Transformer Sabotage
The intention of this mechanic is to provide players with an objective that they can only complete by moving in to the outpost, and visit several spots inside before they complete their objective. Additionally, every time a player completes a part of the objective, it is possible that enemy AI will come to investigate. This changes the playstyle from a more offensive style, into a more defensive style. The result of this, is that the level is utilised in several different ways (offensive and defensive), as well as that the space is used as much as possible.
In order to achieve the design intention of slightly altering the way the level is played, lights are connected to the transformer. These lights will turn off when the transformer is sabotaged.To disable a transformer, players will have to move to the transformer’s control panel and interact with it to disable it. When the player disables a transformer, they will have completed a part of their main objective. Additionally, the lights in the level that are connected to the transformer will shut down. As these are lights (see lights design), the visual aspect of this is only visible during night time. If the player sabotages the transformer during night time, more AI will react to it, as the visual aspect can be seen over a larger distance. If the player sabotages during the day time, the range of reacting enemies is limited to hearing distance. Of all the enemy AI that notice the sabotage, the closest one will investigate the transformer. (For more information see Enemy AI Responses.) Note that after the transformer has been sabotaged, it is considered broken and cannot be turned on again.
The above schematic visualises how the day/night cycle influences the reaction range on enemy AI. During the day the effects are less apparent and thus the range is smaller.
The transformer has been sabotaged. The connected lights turn off. However, as the top light is not connected to the transformer, it is not affected by the sabotage and thus stays on.
Enemy AI Response
When the player sabotages a transformer and the lights turn off, all enemy AI within a set range of the effected lights will react. All enemy AI except the closest to the transformer will then continue with their previous business. The enemy AI closest to the transformer will investigate the control panel and briefly search for the player in the area. If he doesn’t find the player, he also will continue with his previous business.
Placement & Location
To achieve the main intention of this mechanic and objective, is by distributing the transformers throughout the outpost to make sure that players utilise as much of the designed outpost space.
Bad example of transformer placement. They are all place closely together and do not fulfill the intention of making players utilise most of the designed space.
Good example of transformer placement. The way they are distributed throughout the outpost makes players traverse throughout the area and utilise the highest possible amount of designed space.
The transformers are rather large box shaped objects and are industrial looking. They are larger than the player, at an estimated size of 500cm x 200cm x 300cm (L x W x H). For the player to interact with them, it is important that the transformer has a console with which the players can interact to sabotage it.
Two visual references of transformer boxes. Please note that even though not present in the above references, they will need a console for player interaction
Visual references of the interaction console for players. The image on the left shows a closed console with the exclamation mark to hint to players where to interact. The image on the right shows the insides with wires and switches which the player can sabotage.
Transformer Sabotage (Blueprint & Unreal Engine 4)
The script uses several components to measure and use to provide the functions required. These are:
Interaction box: An invisible trigger box placed around the transformer console. It is used to enable player input inside this script, in this case the “F” key. Additionally, it is also used to show a button prompt for players to understand they can interact with the console.
Enemy detector (night and day: Two other invisible triggers scaled and placed by the designer around a desired area. It is used to determine when enemy AI are considered ‘nearby’ during different times of the day. Enemies that are nearby will react when the transformer is sabotaged.
Tooltip: a piece of text shown only when the player is within sabotage range of the console.
Particle location: An X, Y, Z value used to determine where to spawn particles as feedback for sabotaging the transformer.
ConnectLights array: An array which has to be filled by the designer with the lights that should be disabled when the transformer is sabotaged.
Allowing Player Interaction
The above code triggers whenever an object overlaps (begin overlap), or stops overlapping (End Overlap) with the interaction box. It then checks if the overlapping entity is of the type ‘ThirdPersonCharacter’ and if it is, progresses with the script. This script is there to make sure that AI Enemies cannot accidentally trigger the remainder of the code.
If the overlapping entity is indeed player, the script checks if the transformer has already been sabotaged. If it has not the script wil progress. The script performs this check to prevent players from being able to execute the script even after the transformer has already been disabled.
When the script has confirmed that the transformer has not been sabotaged yet, it will allow players to give input into this script. Additionally, it shows the tooltip to players to show them that they can press a button to engage the sabotage.
Nearby Enemy AI
Checking for Overlap and Filling an Array
The system uses the enemy detector with overlap to check when enemy AI are within the set area. It does this for both detection boxes at any time, as later in the script it is checked which overlap should be used. After the script has detected an overlap, it checks if the transformer has been sabotaged. If it has, the rest of the script will be ignored to prevent the system working the background without use. When it has been confirmed that the transformer has not been sabotaged yet, the script checks what time of day it is, and then only lets the overlap continue if the overlap was done by the correct overlap box for the time of day. The system then checks if the overlapping entity is indeed an enemy AI using a cast. When it is an enemy AI, the overlapping entity is added to an array. This array will later be used to let ‘nearby’ enemy AI react when the player sabotages.
The script also checks when enemy AI leave the detection boxes to prevent enemies from stacking up in the array even if they are no longer within range. This script uses the same checks as the above described system, but instead uses ‘end overlap’ and ‘remove’ from the array to achieve the required result.
Day or Nighttime
The script uses a boolean to determine which part of the above code to use based on the time of day. This boolean is used as the switch between night and day and it set by catching the global event which sets day and night time. From this event the script then sets the boolean so it can be used in other parts of the script, such as the above check for day and night time.
Nearby Enemy AI
When the player is inside the interaction box so that their input is allowed in this script and they press ‘F’, this script gets called. The script gets the current player character and executes the sabotage function on this character. When this sequence has been completed on the player character, it calls the ‘AnimationFinished’ event in this script which continues the script. When it gets triggered, the script uses a ForEachLoop to loop through the connected lights to this transformer (which are stored in the ConnectedLights array) and individually disable them before moving on with the script.
Provide Feedback on the Transformer
When the loop has been completed and all connected lights have been disabled, the script sets the boolean ‘Sabotaged’ to true. This prevents the player from accidentally triggering the sabotage twice. (see Player Interaction (1/4) ). It then plays a sound at the transformer vector location which is gathers using the ‘GetWorldLocation’ function.
While the sound is playing, the script spawns a particle emitter to provide visual feedback of the sabotage next to the audio feedback. It places the particle at the world location vector of the ParticleLocation to make sure it’s clearly visible.
Additionally, the script hides the tooltip. This is done so that it disappears straight after the transmitter actually being sabotaged.
Finding the Nearest Enemy AI
After the tooltip has been turned off, the script will check if there are any enemy AI placed in the nearby AI array. It does this by checking if the last index of the array is higher or equal to 0. Where in the case that it would contain any enemy AI, it would return true. If it returns false, the rest of the script is ignored, as no nearby enemy can be selected.
The script then proceeds to select the closest enemy AI by looping through the array. During the loop the script will use the function ‘GetDistanceTo’ to measure the distance between an enemy AI and the transformer world location. It then only saves an enemy AI every time it is closer than any of the previously checked enemy AIs. When the loop has been completed and the entire array has been checked, the enemy AI which is at the shortest distance to the transformer is saved in the ‘NearestEnemy’ variable.
When the nearest enemy has been defined, he is removed from the array. The remaining enemy AIs in the array are sent the event to react using a foreach loop. The nearest enemy is going to do the same as soon as the loop has finished, after which the nearest enemy is tasked with investigating the transformer. In order for the enemy AI to know where to move to, it is given the world location of this transformer’s world location.
The script then sets ‘SabotageCompleted’ to true to make sure the adding and removing of enemy AI to the NearbyAI array stops (see Nearby Enemy AI(2/4) ). It then clears the array to prevent unnecessary data from being stored.