(13 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | The Safe Zone Lobby is a game lobby inside the region. It is where players are moved when they first arrive in the scene and it is where they respawn when they die. Players cannot shoot or be take damage in the safe zone. Leaderboards, game instructions and other game options can be made available to players in the game lobby. | + | |
+ | <div class="content-nav"> | ||
+ | <h4>FPS Components</h4> | ||
+ | <ul> | ||
+ | <li>[[Shooter_games_FPS|Shooter games FPS]]</li> | ||
+ | <li>[[Player_spawn_points|Player spawn points]]</li> | ||
+ | <li>[[Guns_and_gun_givers|Guns and gun givers]]</li> | ||
+ | <li>[[Health_and_ammo_givers|Health and ammo givers]]</li> | ||
+ | <li>[[Traps|Traps]]</li> | ||
+ | <li>[[King_of_the_hill_zone|King of the hill zone]]</li> | ||
+ | <li>[[Enemy_NPCs_and_NPC_spawners|Enemy NPCs and NPC spawners]]</li> | ||
+ | </ul> | ||
+ | </div> | ||
+ | |||
+ | The Safe Zone Lobby is a game lobby inside the region. It is where players are moved when they first arrive in the scene and it is where they respawn when they die. | ||
+ | |||
+ | Players cannot shoot or be take damage in the safe zone. Leaderboards, game instructions and other game options can be made available to players in the game lobby. | ||
The core mechanics of the game are governed though the Combat Meter which is part of the Safe Zone Lobby. | The core mechanics of the game are governed though the Combat Meter which is part of the Safe Zone Lobby. | ||
Line 9: | Line 25: | ||
− | + | {{#ev:youtube|ZRmO57uyGdU}} | |
Line 20: | Line 36: | ||
'''Public variables''' | '''Public variables''' | ||
+ | |||
The public variables can be made available inworld if you want to you can allow individual players to configure these in their regions. | The public variables can be made available inworld if you want to you can allow individual players to configure these in their regions. | ||
Line 41: | Line 58: | ||
'''Channel.''' This is the channel the components communicate on. You should not need to alter this from the defaults. | '''Channel.''' This is the channel the components communicate on. You should not need to alter this from the defaults. | ||
+ | |||
'''Resources''' | '''Resources''' | ||
+ | |||
There is one resource referenced on the Combat Meter; the gunBarIcon. This is a canvas element that sits behind the individual gun icons in the gun bar when players have one or more guns enabled during gameplay. | There is one resource referenced on the Combat Meter; the gunBarIcon. This is a canvas element that sits behind the individual gun icons in the gun bar when players have one or more guns enabled during gameplay. | ||
Line 50: | Line 69: | ||
'''Events''' | '''Events''' | ||
+ | |||
There are seven events referenced on the Combat Meter; | There are seven events referenced on the Combat Meter; | ||
Line 77: | Line 97: | ||
'''npcKill''' and '''avatarKill''' are events that can be triggered when NPCs or other players are killed by the player. | '''npcKill''' and '''avatarKill''' are events that can be triggered when NPCs or other players are killed by the player. | ||
+ | |||
'''Object references''' | '''Object references''' | ||
+ | |||
The 11 object references on the Combat Meter reference the various active canvas elements in the player HUD. The references do not require manual configuration. | The 11 object references on the Combat Meter reference the various active canvas elements in the player HUD. The references do not require manual configuration. | ||
Line 100: | Line 122: | ||
===Proximity activator=== | ===Proximity activator=== | ||
− | The '''Proximity Activator''' on the base of the safe zone is triggered when the player within a certain radius of it. It switches the combat HUD off and disables gameplay when the player is inside the Safe Zone Lobby. | + | The '''Proximity Activator''' on the base of the safe zone is triggered when the player within a certain radius of it. |
+ | |||
+ | It switches the combat HUD off and disables gameplay when the player is inside the Safe Zone Lobby. | ||
+ | |||
It should be set to '''Client Only''' – if unticked, whenever one player entered the safe zone the game would stop for everyone! | It should be set to '''Client Only''' – if unticked, whenever one player entered the safe zone the game would stop for everyone! | ||
Line 107: | Line 132: | ||
[[File:Proximity Activator.png|500px]] | [[File:Proximity Activator.png|500px]] | ||
+ | ===Bullet pool manager=== | ||
+ | The '''Bullet Pool Manager''' creates a pool of reused bullets in the viewer, as a more efficient method of managing bullets than creating and destroying individual game objects. | ||
+ | The pool defaults to a pool of 20 bullets. If you are creating a gun with a very high fire rate you might need to expand that pool but we limit network messages to 12 per second so you will hit performance issues if you go too high. | ||
− | |||
− | |||
The '''poolItemTtl''' field is the lifetime of the bullet, in seconds. | The '''poolItemTtl''' field is the lifetime of the bullet, in seconds. | ||
Line 116: | Line 142: | ||
[[File:Bullet Pool Manager.png|500px]] | [[File:Bullet Pool Manager.png|500px]] | ||
− | |||
− | |||
===Owner control panel=== | ===Owner control panel=== | ||
Line 124: | Line 148: | ||
− | + | [[File:OwnerControl.png|500px]] |
The Safe Zone Lobby is a game lobby inside the region. It is where players are moved when they first arrive in the scene and it is where they respawn when they die.
Players cannot shoot or be take damage in the safe zone. Leaderboards, game instructions and other game options can be made available to players in the game lobby.
The core mechanics of the game are governed though the Combat Meter which is part of the Safe Zone Lobby.
The public variables on the Combat Meter allow developers and players to configure game settings including player health and max bullets.
This video tutorial shows how to wire up and publish your own Safe Zone Lobby as a spawnable item players can in place in their own customised multi-player maps in Sinespace;
The core functions of the game are managed by the Combat Meter.
Public variables
The public variables can be made available inworld if you want to you can allow individual players to configure these in their regions.
If you want to expose the public variables inworld, when you upload to Sinespace, on the virtual goods component set the Customisation Capabilities to Full. If you want to hide the public variables set the Customisation Capabilities to Basic or Disallowed.
PlayerSpawnMinRange and PlayerSpawnMaxRange defines a radius from the centre of the safe zone where players will spawn and respawn. It defaults to 5 meters.
PlayerMaxHealth allows you to set the player max health.
PlayerMaxBullets allows you to set the max bullets per gun. This is currently a universal value across guns.
DeathSequenceDuration sets the time from dying to arriving back at the safe zone. It defaults to five seconds which is time to play a death animation and change camera angles during the player death event.
TeleportEffectDuration This sets the amount of time for particles you can trigger when the player teleports from the safe zone to a spawn point in the game.
PlayerStartHealth is the amount of health a player has when they spawn into the game.
Channel. This is the channel the components communicate on. You should not need to alter this from the defaults.
Resources
There is one resource referenced on the Combat Meter; the gunBarIcon. This is a canvas element that sits behind the individual gun icons in the gun bar when players have one or more guns enabled during gameplay.
Events
There are seven events referenced on the Combat Meter;
The damage and die events trigger animation events in the Animation Controller attached to the Combat Meter. These events are both canvas based; a damage vignette when the player is hit and a message on screen when they die.
These canvas events occur in parallel with the animations triggered in the player’s Animation Override, which is part of the gun the player has enabled during gameplay.
teleportStart and teleportEnd can trigger particles or other events at the Safe Zone Lobby and at the spawn point when a player leaves the lobby and enters the playable map.
AmmoAdd and hpUp events trigger when the player collects ammo or health from the Health or Ammo Givers.
showOwnerControl exposes a canvas based toggle inworld that players can use to disable the game when in room edit mode.
npcKill and avatarKill are events that can be triggered when NPCs or other players are killed by the player.
Object references
The 11 object references on the Combat Meter reference the various active canvas elements in the player HUD. The references do not require manual configuration.
The PlayerHUD presents the number of kills, the health bar, game points and ammo levels. You can move elements on the canvas around, change fonts, colour, etc. to bring the HUD in line with your art.
The Nav Mesh Obstacle on the base of the Safe Zone ensures that when a player places the Safe Zone Lobby in their region, any NPCs in the region will not walk through it.
The Proximity Activator on the base of the safe zone is triggered when the player within a certain radius of it.
It switches the combat HUD off and disables gameplay when the player is inside the Safe Zone Lobby.
It should be set to Client Only – if unticked, whenever one player entered the safe zone the game would stop for everyone!
The Bullet Pool Manager creates a pool of reused bullets in the viewer, as a more efficient method of managing bullets than creating and destroying individual game objects.
The pool defaults to a pool of 20 bullets. If you are creating a gun with a very high fire rate you might need to expand that pool but we limit network messages to 12 per second so you will hit performance issues if you go too high.
The poolItemTtl field is the lifetime of the bullet, in seconds.
The Owner Control Panel allows the map owner to set the Safe Zone Lobby to be inactive while they move it around in the scene and spawn other game items.