Skip to content

Commit

Permalink
snap 10213
Browse files Browse the repository at this point in the history
  • Loading branch information
pandr committed Oct 23, 2018
1 parent 95685be commit afe712c
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 26 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

This file contains a summary of the changes that went into each release.

## [0.1] - 2018-10-20
## [0.1] - 2018-10-22
### Added
- First public release, Unite L.A. 2018
2 changes: 1 addition & 1 deletion Documentation/Animation.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ Characters and weapon are separate hierarchies, but need to play in sync, so an
### Setting up the First Person Controller

The Animator Controller is not references in the Characters Animator Component, but assigned to an Animator Controller Template
The Animator Controller is not referenced in the Characters Animator Component, but assigned to an Animator Controller Template
(`AnimGraph_AnimatorController`). This template wraps the controller in an AnimatorControllerPlayable and forwards game state
to the Animator Controllers parameters etc.

Expand Down
5 changes: 3 additions & 2 deletions Documentation/Characters.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# Character Pipeline

### Iteration
We assume an iterative workflow where characters are put into game in their earliest/mockup phase and continuously updated as the projects progresses, bug surface and standards change late in production.
We assume an iterative workflow where characters are put into game in their earliest/mockup phase and continuously
updated as the projects progresses, bug surface and standards change late in production.

### Authoring
Characters are Modeled and Rigged in Maya and exported into FBX files.

> E.G: //Assets/Models/Characters/Terraformer/Terraformer_A.fbx
### Prefabs
Prefab are where Materials are assigned and additional components for game play systems are added and configures.
Prefab are where Materials are assigned and additional components for game play systems are added and configured.
We use Prefab Variants as they allow the prefab to stay up to date as mesh, skeleton and skinning changes throughout production.

![](Images/CharacterPrefabs.png)
Expand Down
15 changes: 10 additions & 5 deletions Documentation/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,27 @@ Alt+Enter | Toggle full screen
Working with a multiplayer game in Unity means you will be working a lot with the
standalone player. To make a client and a server that talks over a network connection there
has to be two processes. To make this workflow as frictionless as possible, we
use assetbundles for all the content (levels and characters etc.). The only thing that
goes into the standalone player is the code and a single,
very small, bootstrapper scene. Only if you have made changes to a level or a prefab
do you have to rebuild the assetbundles. (And you can rebuild selectively -- to some degree.)
use assetbundles for all the content (levels and characters etc.).
The only thing that goes into the standalone player is the code and a single, very small, bootstrapper scene.
Only if you have made changes to a level or a prefab do you have to rebuild the assetbundles.
(And you can rebuild selectively -- to some degree.)

The Project Tools window is used to make this workflow function in practice. The most commonly used functions here are:

Button | Function
--- | ---
__Open__ | Open all the scenes that make up a level
__Levels [force]__ | Build all the levels into bundles
__Assets [force]__ | Build all prefabs into bundles (players etc)
__Assets [force]__ | Build all prefabs into bundles (players etc)
__All [force]__ | Build all levels and prefabs into bundles
__Build game__ | Build code and bootstrapper scene
__Run__ | Start game in _boot mode_. No level loaded, only bootstrapper.
__Open build folder__ | Open the folder containing the standalone player
__Update Registry__ | Updates the registry used when building prefab bundles.

Updating the registry only needs to be done when new game elements (ect. Character, Replicated entity, Hero definition)
are added to the project


From the _boot mode_ a standalone player can enter other modes. Some examples:

Expand Down
26 changes: 11 additions & 15 deletions Documentation/SourceCode.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ This document gives a brief overview of main areas of the FPS Sample source code

## Game class
The Game class (Game.cs) is a MonoBehavior that defines the main loop of the game.
All gamecode is run from Game.cs Update method (with a few exceptions).
All gamecode is run from Game.Update method (with a few exceptions).
The game class is one of first classes to be instantiated and is always present no matter what state the game is in.
The Game class instantiates various systems like Audio and Input and has other app level utility functionality.

The game class can be requested to update a specific _GameLoop_ class.
The game class can be requested to update a specific _GameLoop_.
Gameloops implements various mode the game can be in.
They handle initialization and shutdown of required systems and updates systems in correct order.
Active gameloop can be changed at runtime.
Expand All @@ -17,13 +17,12 @@ Currently implemented gameloop types are Server, Client and Preview
## ServerGameLoop
ServerGameLoop (ServerGameLoop.cs) handles connection to a list of clients and update all server systems.

## ClientGameLoop.cs
## ClientGameLoop
ClientGameLoop (ClientGameLoop.cs) handles a single connection to a server and updates all client systems.

## PreviewGameLoop
PreviewGameLoop (PreviewGameLoop.cs) is mutations of Server and Client game loops slapped together.
This is used as a way to preview game without having to start up both server and client.
It uses a mix of server and client systems and that can lead to features not working correctly.
It uses a mix of server and client systems and is used as a way to preview game without building bundles and starting up server and client.
This is the gameloop that is used when user presses play in editor with a game scene loaded.

## Modules
Expand All @@ -40,7 +39,7 @@ This will ensure prefab is registered in ReplicatedEntityRegistry (when build to
Server and client have different ReplicatedEntityRegistry allowing for different prefabs to be spawned on server and client each representing the same entity (but they both need same set of serializable components)
Components that has data that should be replicated needs to implement the INetworkSerializable interface and be attacheds to same gameobject as ReplicatedEntity component.

To replicate an entity you need to create a scriptable object deriving from ReplicatedEntityFactory.
To replicate an ECS entity you need to create a scriptable object deriving from ReplicatedEntityFactory.
This class is also registered in ReplicatedEntityRegistry and has abstracts methods that needs to be implemented to create entity and create classes that serializes/deserializes component

### Player Module
Expand All @@ -55,33 +54,30 @@ E.g. the *LocalPlayerCharacterControl* from the CharacterModule is attached to L

### Character Module
Character module handles character abilities, animation and UI.
A character is define a prefab with either Character or Character1P MonoBehavior attached.
A character is define by prefab with either Character or Character1P MonoBehavior attached.
Character is used on server and on client for 3P characters whereas Character1P is used for 1P view of character.
Characters are setup using the *CharacterTypeDefinition* scriptable object.
It has references to Server and Client versions of the 3P character prefab, and reference to the 1P prefab character that is instantiated in 1P view.

All character behaviour is handled by *Abilities* (in Character/Behaviours/Abilities).
What abilities are active is controlled by the *AbilityController*.
In current implementation characters always have the movement ability active and allow for only one other ability to be active (e.g. sprint, melee, shoot)

Characters are setup using the *CharacterTypeDefinition* scriptable object.
It has references to Server and Client versions of the 3P character, and reference to the 1P character that is instantiated in 1P view.

HeroTypeAsset (HeroTypeAsset.cs) is used to setup a game hero. (note: in comments and naming the word character is often used for hero)
The HeroTypeAsset defines the stats of the hero and what character, weapons, abilities should be used.

Each character is defined by 3 prefabs. Client version (3P), Server version (3P) and a 1P version.
The first two represents the client and server version of the same replicated entity.

### Item Module
Handles character items.
Items are replicated but currently only client versions of prefabs have any logic or presentation.
Items are replicated but currently only client versions of prefabs have any logic or presentation.
When items are updated they read state of relevant abilities and uses that to trigger effects.

### Effect Module
Effect module is responsible for showing short clientside effects (gfx and sound).
Effects are "fire and forget" and cannot be canceled.
Currently supports two kinds of effects: *SpatialEffect* and *HitscanEffect*.
Effects are created in a static pools at startup and reused.
Each effect is setup using a scriptable object (e.g. SpatialEffectTypeDefinition) that defines what prefab should be used for the effect and how large effect pool should be.
Effect are requested by gamecode by creating components (e.g SpatialEffectRequest) that are then picked up by effect systems and effct is triggered.
Effect are requested by gamecode by creating entities with request component (e.g SpatialEffectRequest) that are then picked up by effect systems and effct is triggered.

## Grenade Module
Grenade module handles creation and updating of grenades. Grenades is updated on server and interpolated on client.
Expand Down
2 changes: 1 addition & 1 deletion Packages/com.unity.multiplayer/LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[MyPackageName] copyright © [YEAR] Unity Technologies ApS
Unity Transport copyright © 2018 Unity Technologies ApS

Licensed under the Unity Companion License for Unity-dependent projects--see [Unity Companion License](http://www.unity3d.com/legal/licenses/Unity_Companion_License).

Expand Down
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ all content has been authored for HDRP. We are also using the new
[network transport layer](https://github.com/Unity-Technologies/multiplayer) as well as the [Entity-Component System](https://unity3d.com/unity/features/job-system-ECS).
In the case of ECS, we have primarily adopted the "ECS-pattern" and use it in
hybrid mode with a lot of regular components. As more and more features of
Unity become availble in ECS-aware versions, we will migrate to them.
Unity become available in ECS-aware versions, we will migrate to them.

## Status and prerequisites

Expand Down Expand Up @@ -66,6 +66,7 @@ to import all the assets.
the following steps right after the initial import:
> 1. Search for `t:prefab` in the Project search field. Then click on the first prefab and shift+click on the last to select them all. Right click and select __Reimport__.
> 2. Search for `t:model` in the Project search field. Repeat the same steps as for prefabs to reimport them all.
> 3. __IF__ you are on a version older than beta 6, you may have had a few crashes during import. In that case you need to find `GooRocket` and `GooRifle` in project, right click and select __Reimport__.
>
> One day soon we will remove this note and there will be cake.
Expand Down Expand Up @@ -117,6 +118,21 @@ Now hit the green __Start__ button. This should launch two processes: one is
a standalone, headless server, the other is a client that will attempt to
connect to the server.

Congratulations! If you made it this far you should celebrate a bit!

## Development of FPS Sample, Contributions etc.

As of today, internally development of the project happens on Perforce. We
push versions of the project to github from there. As we do that we will update
the [CHANGELOG](CHANGELOG.md) with highlights but the full history is not
carried over.

For legal and practical reasons we are not able to take larger contributions
just now. We are working to see how we can make it happen and we are always happy
to hear about bugfixes and ideas for improvements in our forum. If you post
bugfixes, we remind you that they will be covered by
[Unity Contribution Agreement](https://unity3d.com/legal/licenses/Unity_Contribution_Agreement).

## More information

Check out the [Documentation](Documentation/) folder for more information. In particular, the [Getting Started Guide](Documentation/GettingStarted.md) is a good place to, well, start.
Expand Down

0 comments on commit afe712c

Please sign in to comment.