Difference between revisions of "Player Avatar"

From bo-wiki.snapjawgames.com
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 39: Line 39:
  
 
For the Ship:
 
For the Ship:
A collision occurs with the Environment outside the Ship which includes (Asteroids, Debries, Ships, Stations, Drones, Missiles, Planets, Structures, and Cargo)
+
A collision occurs with the Environment outside the Ship which includes (Asteroids, Debris, Ships, Stations, Drones, Missiles, Planets, Structures, and Cargo)
 +
 
 +
==== Interior vs Exterior ====
 +
 
 +
It's important to note that the Interior of the ship is placed at the local star/black hole of the current map.
 +
 
 +
The player '''unity layer''' is a different layer than the layer of the exterior view, this is to make sure that in the exterior view you cannot see the interior models in the local star.
 +
 
 +
This also avoids collisions with the interior of the ship (Which would be a kinda inception style).
  
 
== UI ==
 
== UI ==
  
 
[[File:UI Example.png|frame|left]]
 
[[File:UI Example.png|frame|left]]

Latest revision as of 15:45, 9 June 2021

The Player Avatar is the body that a player inhabits while playing the game.

Actions

Crouch

Jump

Inventory

Each Player Avatar has 5 Inventory Slots (variable number). Items can be placed into these slots. When a player adds an item to their inventory, the item is placed in the next available Inventory Slot (starting with 1, going through to the last).

Adding items to the inventory is primarily done in one of two ways:

  • The player interacts with the item directly (as in, with the item, representation mesh in 3D game space) and uses the Interact Key (default E, changeable) on it. Each item should be considered to have its own interact key behavior, although most will likely default to being picked up into the player's inventory
  • The player uses an item in his Hotbar by selecting it then using the Item Use Key (Left Mouse Button by default). Some items may have a secondary Use key or none.
  • The player moves items between their own inventory and a container. In this case, the player is interacting with their inventory UI and a container UI, moving items between them via drag and drop. The player is also able to shift + left click an item to instantly transfer it from its current position to a free position in the other inventory ( container to player or player to container ). Shift + left click requires free space to be available in the receiving inventory. Dragging and dropping an item onto space already occupied by another item swaps the position of the two items, this works both when swapping items between inventories of container and player, or when reordering the inventory of just a container or player. ( A player should also always be able to call up their own inventory UI and do this )

A player cannot add a new item to their inventory while all inventory slots are filled with an item already.

Dropping Items

Players can drop items out of their inventory by placing them into other containers or by directly placing them into the world. Placing it in the world is done with the Drop Key. The Drop Key can be pressed once, or held. Each has different behavior. Pressing the Drop Key (press/release in short order ) quickly drops the selected item in the nearest available position based on where the player is looking right now ( cursor position ) Holding the Drop Key triggers the placement system, in which the item representation ( 3D mesh ) hovers in front of the player and snaps to the ship geometry if the player moves close enough to it.

The ship has dead zones where no items may be placed and areas in which placing items is allowed. if the player is targeting ( hovering the item over ) a dead zone, the item's mesh should be tinted red to indicate that it cannot be placed there. ( in terms of coding, dead zones should be the default of "no zone declared". Allowed areas need to be specifically declared as such and anything, not an allowed area is a dead zone automatically ) When hovering over an allowed area, the player can press the left mouse button to place the item in that spot, removing it from the inventory and spawning it as a mesh object in that spot on the ship. Left-clicking in a disallowed area should give some form of audio feedback to indicate that this cannot be done. If the quick drop is employed ( single press instead of holding ) then the same happens, but there is no visual feedback as no item hovers in front of the player, the game simply checks if the cursor is currently pointing at an allowed zone, and if it is, place the item at the nearest approximate space to the cursor. Some components ( conveyor belts for instance ) can have special interactions if items are placed on them. Their placeable areas that trigger the interaction are called reception zone. When targeting a reception zone ( standing close enough and looking at it, the zone should be highlighted with an outline for the player ) and pressing instead of hovering the Drop Key automatically places the item onto the reception zone.

Action Bar

The bottom center of the screen displays the player's action bar. The action bar consists of 5 empty slots ( changeable, up to 10 ). Players can drag items from their inventory into these slots, this does not change the position of the item in their inventory but merely acts as a quick link to that item. Pressing the number keys 1 through 5 ( 1 through 0 if it goes up to 10 ) when an item is in the corresponding slot selects the item for quick use. ( Consideration for later, it is planned for players to gain abilities that can be used to perform specific functions in the game, these would also be placed into the action bar by the player, so inventory quick access is not the full scope of the action bar in the long run ) When an item is selected in the action bar, pressing the left mouse button or Drop Key uses or drops the item.

Multiplayer

Collision

For a Player: Collisions occur with the Environment, other players, Terrain and NPCs.

For the Ship: A collision occurs with the Environment outside the Ship which includes (Asteroids, Debris, Ships, Stations, Drones, Missiles, Planets, Structures, and Cargo)

Interior vs Exterior

It's important to note that the Interior of the ship is placed at the local star/black hole of the current map.

The player unity layer is a different layer than the layer of the exterior view, this is to make sure that in the exterior view you cannot see the interior models in the local star.

This also avoids collisions with the interior of the ship (Which would be a kinda inception style).

UI

UI Example.png