|
1 | | - |
2 | | -# Boss Room - co-op multiplayer RPG built with Unity Netcode for GameObjects |
| 1 | +# Boss Room's Utilities package |
3 | 2 |
|
4 | | -| 🛑 IMPORTANT - Early Access 🛑 | |
5 | | -| -- | |
6 | | -| Boss Room: Small Scale Co-op Sample is built on top of the Netcode for GameObjects (Netcode) package. The Netcode package is on the road to being a fully featured solution. We have solutions architects available on Discord and forums to help you work through issues you encounter. | |
7 | 3 |
|
8 | | -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 that are frequently featured in similar games. |
9 | | - |
10 | | -Our intention is that 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. |
11 | | - |
12 | | -> __IMPORTANT__: |
13 | | -> - Boss Room supports those platforms supported by Netcode (Windows and Mac). |
14 | | -> - Boss Room is compatible with Unity 2020.3 and later. |
15 | | -> - Make sure to include standalone support for Windows/Mac in your installation. |
16 | | -
|
17 | | - |
18 | | -``` |
19 | | -Platforms : Windows, Mac |
20 | | -``` |
21 | | - |
22 | | - |
23 | | - |
| 4 | +This package offers reusable utilities for your own projects. |
24 | 5 |
|
25 | 6 | ## Getting the project |
26 | | - - The early access version can be downloaded from the [Releases](https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/releases) page. |
27 | | - - 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. |
28 | | - - 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. |
29 | | - |
30 | | - |
31 | | -## Installing Git LFS |
32 | | - |
33 | | -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. |
34 | | - |
35 | | -## Opening the project for the first time |
36 | | - |
37 | | -Once you have downloaded the project, the steps below should get you up and running: |
38 | | - - Make sure you have installed the version of Unity that is listed above in the prerequisites section. |
39 | | - - Make sure to include standalone support for Windows/Mac in your installation. |
40 | | - - Add the project in _Unity Hub_ by clicking on **Add** button and pointing it to the root folder of the downloaded project. |
41 | | - - The first time you open the project Unity will import all assets, which will take longer than usual - it is normal. |
42 | | - - Once the editor is ready, navigate to the _Project_ window and open the _Project/Startup_ scene. |
43 | | - |
44 | | - - From there you can click the **Play** button. You can host a new game or join an existing game using the in-game UI. |
45 | | - |
46 | | -## Testing multiplayer |
47 | | - |
48 | | -In order to see the multiplayer functionality in action we can either run multiple instances of the game locally on our computer or choose to connect to a friend over the internet. |
49 | | - |
50 | | ---------------- |
51 | | -**Local multiplayer setup** |
52 | | - |
53 | | -First we need to build an executable. |
54 | | - |
55 | | -To build an executable press _File/Build Settings_ in the menu bar, and then press **Build**. |
56 | | - |
57 | 7 |
|
58 | | -Once the build has completed you can launch several instances of the built executable in order to both host and join a game. |
| 8 | +You can add this package via the Package Manager window in the Unity Editor by selecting add from Git URL and adding the following URL: https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop.git?path=/Packages/com.unity.multiplayer.samples.coop#main |
59 | 9 |
|
60 | | -> Mac users: to run multiple instances of the same app, you need to use the command line. |
61 | | -> Run `open -n BossRoom.app` |
| 10 | +Or you can directly add this line to your manifest.json file: |
62 | 11 |
|
63 | | ---------------- |
64 | | -**Multiplayer over internet** |
| 12 | +"com.unity.multiplayer.samples.coop": "https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop.git?path=/Packages/com.unity.multiplayer.samples.coop#main" |
65 | 13 |
|
66 | | -To play over internet, we need to build an executable that is shared between all players. See the previous section. |
| 14 | +The project is licensed under the Unity Companion License. See [LICENSE.md](LICENSE.md) for more legal information. |
67 | 15 |
|
68 | | -It is possible to connect between multiple instances of the same executable OR between executables and the editor that produced said executable. |
69 | | - |
70 | | -Running the game over internet currently requires setting up a [Photon Transport for Netcode](https://github.com/Unity-Technologies/multiplayer-community-contributions), which uses Photon relay server to facilitate communication between clients and server living on different networks. |
71 | | - |
72 | | -> Checkout our Photon-Realtime setup guide, here: |
73 | | -> [Boss Room Photon Setup Guide](Documentation/Photon-Realtime/Readme.md) |
74 | | -
|
75 | | -Alternatively you can use Port Forwarding. The https://portforward.com/ site has guides on how to enable port forwarding on a huge number of routers. Boss Room uses `UDP` and needs a `9998` external port to be open. |
76 | | - |
77 | | ------------------------------------------- |
78 | | - |
79 | | -## Exploring the project |
80 | | -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. |
81 | | - |
82 | | -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. |
83 | | - |
84 | | -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. |
85 | | - |
86 | | -Code is organized into three separate assemblies: **Client**, **Shared** and **Server** which reference each other when appropriate. |
87 | | - |
88 | | -For an overview of the project's architecture please check out our [ARCHITECTURE.md](ARCHITECTURE.md). |
89 | | - |
90 | | ---------------- |
91 | | - |
92 | | -For a deep dive in Unity Netcode and Boss Room, visit our [doc](https://docs-multiplayer.unity3d.com/) and [Learn](https://docs-multiplayer.unity3d.com/docs/learn/introduction) sections. |
93 | | - |
94 | | -## Contributing |
95 | | - |
96 | | -The project uses the `git-flow` branching strategy, as such: |
97 | | - - `develop` branch contains all active development |
98 | | - - `main` branch contains release versions |
99 | | - |
100 | | -To get the project on your machine you need to clone the repository from GitHub using the following command-line command: |
101 | | -``` |
102 | | -git clone https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop.git |
103 | | -``` |
| 16 | +> __IMPORTANT__: |
| 17 | +> - The Utilities package supports those platforms supported by Netcode for GameObjects. |
| 18 | +> - Utilities is compatible with Unity 2020.3 and later. |
| 19 | +> - Make sure to include standalone support for Windows/Mac in your installation. |
104 | 20 |
|
105 | | -> __IMPORTANT__: |
106 | | -> You should have [Git LFS](https://git-lfs.github.com/) installed on your local machine. |
| 21 | +## Features |
107 | 22 |
|
108 | | -Please check out [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on submitting issues and PRs to BossRoom! |
| 23 | +Multiple utilities classes are available in the [Utilities](Utilities) folder. For example the [ClientNetworkTransform](Utilities/Net/ClientAuthority/ClientNetworkTransform.cs) and [Session Manager](Utilities/Net/SessionManager.cs). |
109 | 24 |
|
110 | | -For further discussion points and to connect with the team, join us on the Unity Multiplayer Networking Discord Server - Channel #dev-samples |
| 25 | +## Usage |
111 | 26 |
|
112 | | -[](https://discord.gg/FM8SE9E) |
| 27 | +For example usage, please see [Boss Room](https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop). |
0 commit comments