You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Assets/Scripts/ConnectionManagement/ConnectionState/HostingState.cs
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -84,6 +84,8 @@ public override void OnUserRequestedShutdown()
84
84
/// Multiple things can be done here, some asynchronously. For example, it could authenticate your user against an auth service like UGS' auth service. It can
85
85
/// also send custom messages to connecting users before they receive their connection result (this is useful to set status messages client side
86
86
/// when connection is refused, for example).
87
+
/// Note on authentication: It's usually harder to justify having authentication in a client hosted game's connection approval. Since the host can't be trusted,
88
+
/// clients shouldn't send it private authentication tokens you'd usually send to a dedicated server.
87
89
/// </remarks>
88
90
/// <param name="request"> The initial request contains, among other things, binary data passed into StartClient. In our case, this is the client's GUID,
89
91
/// which is a unique identifier for their install of the game that persists across app restarts.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@ Additional documentation and release notes are available at [Multiplayer Documen
9
9
## [Unreleased] - yyyy-mm-dd
10
10
11
11
### Added
12
+
* Added TOC and Index of educational concepts to readme (#736)
12
13
* Added tests for connection management (#692). These are integration tests to validate that the state machine works properly. They use Netcode's NetworkIntegrationTest
13
14
* Added handling the OnTransportFailure callback (#707). This callback is invoked when a failure happens on the transport's side, for example if the host loses connection to the Relay service. This won't get called when the host is just listening with direct IP, this would need to be handled differently (by pinging an external service like google to test for internet connectivity for example). Boss Room now handles that callback by returning to the Offline state.
14
15
* Pickup and Drop action added to the Action system. Actionable once targeting a "Heavy"-tagged NetworkObject. (#372) - This shows NetworkObject parenting with a pattern to follow animation bones (the hands when picking up)
Copy file name to clipboardExpand all lines: README.md
+97-12Lines changed: 97 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,34 @@
1
1

2
-
#Boss Room - Co-op multiplayer RPG and utilities built with Unity Netcode for GameObjects
2
+
##Co-op multiplayer RPG and utilities built with Unity Netcode for GameObjects
3
3
4
-
|Solutions architects are available on [Discord](https://discord.gg/mNgM2XRDpb) and [forums](https://forum.unity.com/forums/multiplayer.26/) to help you work through issues you may encounter when using Boss Room. |
4
+
|Support is available on [Discord](https://discord.gg/mNgM2XRDpb) and [forums](https://forum.unity.com/forums/multiplayer.26/) to help you work through issues you may encounter when using Boss Room. |
5
5
| -- |
6
6
7
+
## Table of content
8
+
9
+
<!-- TOC generated from https://luciopaiva.com/markdown-toc/ -->
10
+
11
+
12
+
-[Boss Room](#boss-room)
13
+
-[Index of resources in this project](#index-of-resources-in-this-project)
-[Installing Git LFS to clone locally](#installing-git-lfs-to-clone-locally)
22
+
-[Registering the project with Unity Gaming Services (UGS)](#registering-the-project-with-unity-gaming-services-ugs)
23
+
-[Opening the project for the first time](#opening-the-project-for-the-first-time)
24
+
-[Testing multiplayer](#testing-multiplayer)
25
+
-[Exploring the project](#exploring-the-project)
26
+
-[Other samples](#other-samples)
27
+
-[Bite-size Samples](#bite-size-samples)
28
+
-[Contributing](#contributing)
29
+
30
+
## Boss Room
31
+
7
32
Boss Room is a fully functional co-op multiplayer RPG made with Unity Netcode. It is built to serve as an educational sample that showcases certain typical gameplay [patterns](https://docs-multiplayer.unity3d.com/netcode/current/learn/bossroom-examples/bossroom-actions) that are frequently featured in similar networked games.
8
33
9
34
You can use everything in this project as a starting point or as bits and pieces in your own Unity games. The project is licensed under the Unity Companion License. See [LICENSE.md](LICENSE.md) for more legal information.
@@ -25,16 +50,78 @@ See [ART_NOTES.md](Documentation/ART_NOTES.md) for more information on the art o
25
50
26
51

27
52
53
+
## Index of resources in this project
54
+
55
+
### Gameplay
56
+
* Action anticipation - AnticipateActionClient() in [Assets/Scripts/Gameplay/Action/Action.cs](Assets/Scripts/Gameplay/Action/Action.cs)
57
+
* Object spawning for long actions (archer arrow) - LaunchProjectile() in [Assets/Scripts/Gameplay/Action/ConcreteActions/LaunchProjectileAction.cs ](Assets/Scripts/Gameplay/Action/ConcreteActions/LaunchProjectileAction.cs)
* Client side input tracking before an action (archer AOE) - OnStartClient() in [Assets/Scripts/Gameplay/Action/ConcreteActions/AOEAction.cs ](Assets/Scripts/Gameplay/Action/ConcreteActions/AOEAction.cs)
61
+
* Time based action (charged shot) - [Assets/Scripts/Gameplay/Action/ConcreteActions/ChargedLaunchProjectileAction.cs ](Assets/Scripts/Gameplay/Action/ConcreteActions/ChargedLaunchProjectileAction.cs)
62
+
* Object parenting to animation - [Assets/Scripts/Gameplay/Action/ConcreteActions/PickUpAction.cs ](Assets/Scripts/Gameplay/Action/ConcreteActions/PickUpAction.cs)
* Dynamic imp spawning with portals - [Assets/Scripts/Gameplay/GameplayObjects/ServerWaveSpawner.cs ](Assets/Scripts/Gameplay/GameplayObjects/ServerWaveSpawner.cs)
65
+
* In scene placed dynamic objects (imps) - [Packages/com.unity.multiplayer.samples.coop/Utilities/Net/NetworkObjectSpawner.cs ](Packages/com.unity.multiplayer.samples.coop/Utilities/Net/NetworkObjectSpawner.cs)
66
+
* Static objects (non-destroyables like doors, switches, etc) - [Assets/Scripts/Gameplay/GameplayObjects/SwitchedDoor.cs](Assets/Scripts/Gameplay/GameplayObjects/SwitchedDoor.cs)
* Character movements - [Assets/Scripts/Gameplay/GameplayObjects/Character/ServerCharacterMovement.cs](Assets/Scripts/Gameplay/GameplayObjects/Character/ServerCharacterMovement.cs)
78
+
* Player spawn - SpawnPlayer() in [Assets/Scripts/Gameplay/GameState/ServerBossRoomState.cs](Assets/Scripts/Gameplay/GameState/ServerBossRoomState.cs)
* Game flow state machine - All child classes in [Assets/Scripts/Gameplay/GameState/GameStateBehaviour.cs ](Assets/Scripts/Gameplay/GameState/GameStateBehaviour.cs)
83
+
* Scene loading and progress sharing - [ackages/com.unity.multiplayer.samples.coop/Utilities/SceneManagement/](Packages/com.unity.multiplayer.samples.coop/Utilities/SceneManagement/)
84
+
* Synced UI with character select - [Assets/Scripts/Gameplay/GameState/ClientCharSelectState.cs ](Assets/Scripts/Gameplay/GameState/ClientCharSelectState.cs)
* Win state - [Assets/Scripts/Gameplay/GameState/PersistentGameState.cs](Assets/Scripts/Gameplay/GameState/PersistentGameState.cs)
87
+
88
+
### Connectivity
89
+
* Connection approval return value with custom messaging - WaitToDenyApproval() in [Assets/Scripts/ConnectionManagement/ConnectionState/HostingState.cs ](Assets/Scripts/ConnectionManagement/ConnectionState/HostingState.cs)
90
+
* Connection state machine - [Assets/Scripts/ConnectionManagement/ConnectionManager.cs ](Assets/Scripts/ConnectionManagement/ConnectionManager.cs) <br> [Assets/Scripts/ConnectionManagement/ConnectionState/](Assets/Scripts/ConnectionManagement/ConnectionState/)
* Scene utils with synced loading screens - [Packages/com.unity.multiplayer.samples.coop/Utilities/SceneManagement/ ](Packages/com.unity.multiplayer.samples.coop/Utilities/SceneManagement/)
- The pre-release version can be downloaded from the [Releases](https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/releases) page.
31
118
- Alternatively: click the green `Code` button and then choose to download the zip archive. Remember, that you would download the branch that you are currently viewing in Github.
32
119
- For Windows users: Using Windows' built-in extracting tool may generate a "Error 0x80010135: Path too long" error window which can invalidate the extraction process. A workaround for this is to shorten the zip file to a single character (eg. "c.zip") and move it to the shortest path on your computer (most often right at C:\\) and retry. If that solution fails, another workaround is to extract the downloaded zip file using 7zip.
33
120
34
121
35
-
## Installing Git LFS to clone locally
122
+
###Installing Git LFS to clone locally
36
123
37
-
This project uses Git Large Files Support (LFS), which ensures all large assets required locally are handled for the project. See [Git LFS installation options](https://github.com/git-lfs/git-lfs/wiki/Installation) for Windows and Mac instructions.
124
+
This project uses Git Large Files Support (LFS), which ensures all large assets required locally are handled for the project. See [Git LFS installation options](https://github.com/git-lfs/git-lfs/wiki/Installation) for Windows and Mac instructions.
38
125
39
126
## Registering the project with Unity Gaming Services (UGS)
40
127
@@ -47,7 +134,6 @@ Once you have downloaded the project, the steps below should get you up and runn
47
134
- Make sure to include standalone support for Windows/Mac in your installation.
48
135
- Add the project in _Unity Hub_ by clicking on **Add** button and pointing it to the root folder of the downloaded project.
49
136
- The first time you open the project Unity will import all assets, which will take longer than usual - it is normal.
50
-
- Once the editor is ready, navigate to the _Project_ window and open the _Project/Startup_ scene.
51
137

52
138
- From there you can click the **Play** button. You can host a new game or join an existing game using the in-game UI.
53
139
@@ -84,21 +170,20 @@ Alternatively you can use Port Forwarding. The https://portforward.com/ site has
84
170
------------------------------------------
85
171
86
172
## Exploring the project
87
-
BossRoom is an eight-player co-op RPG game experience, where players collaborate to take down some minions, and then a boss. Players can select between classes that each have skills with didactically interesting networking characteristics. Control model is click-to-move, with skills triggered by mouse button or hotkey.
173
+
BossRoom is an eight-player co-op RPG game experience, where players collaborate to take down some imps, and then a boss. Players can select between classes that each have skills with didactically interesting networking characteristics. Control model is click-to-move, with skills triggered by mouse button or hotkey.
88
174
89
175
One of the eight clients acts as the host/server. That client will use a compositional approach so that its entities have both server and client components.
90
176
91
-
The game is server-authoritative, with latency-masking animations. Position updates are done through NetworkedVars that sync position, rotation and movement speed. NetworkedVars and Remote Procedure Calls (RPC) endpoints are isolated in a class that is shared between the server and client specialized logic components. All game logic runs in FixedUpdate at 30 Hz, matching our network update rate.
92
-
93
-
Code is organized into three separate assemblies: **Client**, **Shared** and **Server** which reference each other when appropriate.
177
+
The game is server-authoritative, with latency-masking animations. Position updates are done through NetworkedVars that sync position, rotation and movement speed. NetworkedVars and Remote Procedure Calls (RPC) endpoints are isolated in a class that is shared between the server and client specialized logic components.
94
178
95
-
For an overview of the project's architecture please check out our [ARCHITECTURE.md](ARCHITECTURE.md).
179
+
Code is organized in domain based assemblies. See our [ARCHITECTURE.md](ARCHITECTURE.md) file for more details.
96
180
97
181
---------------
98
182
99
183
For a deep dive in Unity Netcode and Boss Room, visit our [docs site](https://docs-multiplayer.unity3d.com/).
100
184
101
-
## Bite-size Samples
185
+
## Other samples
186
+
### Bite-size Samples
102
187
This repository contains a collection of bitesize sample projects and games that showcase different sub-features of NGO. You can review these samples with documentation to understand APIs and features better.
103
188
-[Our various bitesize samples](https://github.com/Unity-Technologies/com.unity.multiplayer.samples.bitesize)
104
189
@@ -113,7 +198,7 @@ To get the project on your machine you need to clone the repository from GitHub
0 commit comments