|
1 | | -# TODOs (trimmed down version of tasks listed at: https://github.cds.internal.unity3d.com/unity/com.unity.template-starter-kit) |
| 1 | + |
| 2 | +# BossRoom - co-op multiplayer RPG built with Unity MLAPI |
2 | 3 |
|
3 | | -##### Fill in your project template's package information |
| 4 | +>**IMPORTANT**: This project is currently experimental. |
4 | 5 |
|
5 | | - Update the following required fields in `Packages/com.unity.template.mytemplate/package.json`: |
6 | | - - `name`: Project template's package name, it should follow this naming convention: `com.unity.template.[your-template-name]` |
7 | | - (Example: `com.unity.template.3d`) |
8 | | - - `displayName`: Package user friendly display name. (Example: `"First person shooter"`). <br>__Note:__ Use a display name that will help users understand what your project template is intended for. |
9 | | - - `version`: Package version `X.Y.Z`, your project **must** adhere to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). |
10 | | - - `unity`: Minimum Unity Version your project template is compatible with. (Example: `2018.3`) |
11 | | - - `description`: This is the description for your template which will be displayed to the user to let them know what this template is for. This description shouldn't include anything version-specific and should stay pretty consistent across template versions. |
12 | | - - `dependencies`: Specify the dependencies the template requires. If you add a package to your project, you should also add it here. We try to keep this list as lean as possible to avoid conflicts as much as possible. |
| 6 | +BossRoom is a fully functional co-op multiplayer RPG made in Unity and MLAPI. It is built to serve as an educational sample that showcases certain typical gameplay patterns that are frequently featured in similar games. |
13 | 7 |
|
14 | | -##### Update **README.md** |
| 8 | +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](LICENSE) for more legal information. |
15 | 9 |
|
16 | | - The README.md file should contain all pertinent information for template developers, such as: |
17 | | - * Prerequisites |
18 | | - * External tools or development libraries |
19 | | - * Required installed Software |
20 | 10 |
|
21 | | -The Readme file at the root of the project should be the same as the one found in the template package folder. |
| 11 | +``` |
| 12 | +Platforms : Windows, Mac |
| 13 | +``` |
22 | 14 |
|
23 | | -##### Prepare your documentation |
| 15 | +## Getting the project |
| 16 | + - A release version can be downloaded from the [Releases](https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/releases) page. |
| 17 | + - 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. |
24 | 18 |
|
25 | | - Rename and update **Packages/com.unity.template.mytemplate/Documentation~/your-package-name.md** documentation file. |
26 | 19 |
|
27 | | - Use this documentation template to create preliminary, high-level documentation for the _development_ of your template's package. This document is meant to introduce other developers to the features and sample files included in your project template. |
| 20 | +## Opening the project for the first time |
28 | 21 |
|
29 | | - Your template's documentation will be made available online and in the editor during publishing to guide our users. |
| 22 | +Once you have downloaded the project the steps below should get you up and running: |
| 23 | + - Make sure you have installed the version of Unity that is listed above in the prerequisites section. |
| 24 | + - Make sure to include standalone support for Windows/Mac in your installation. |
| 25 | + - Add the project in _Unity Hub_ by clicking on **Add** button and pointing it to the root folder of the downloaded project. |
| 26 | + - The first time you open the project Unity will import all assets, which will take longer than usual - it is normal. |
| 27 | + - Once the editor is ready, navigate to the _Project_ window and open the _Project/Startup_ scene. |
| 28 | + |
| 29 | + - From there you can click the **Play** button. You can host a new game or join an existing game using the in-game UI. |
30 | 30 |
|
31 | | -##### Update the changelog |
32 | 31 |
|
33 | | - **Packages/com.unity.template.mytemplate/CHANGELOG.md**. |
| 32 | +## Testing multiplayer |
34 | 33 |
|
35 | | - Every new feature or bug fix should have a trace in this file. For more details on the chosen changelog format, see [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). |
| 34 | +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. |
36 | 35 |
|
37 | | - Changelogs will be made available online to inform users about the changes they can expect when downloading a project template. As a consequence, the changelog content should be customer friendly and present clear, meaningful information. |
| 36 | +--------------- |
| 37 | +**Local multiplayer setup** |
38 | 38 |
|
39 | | -#### Complete the rest of the steps in the link regarding Legal & Testing |
| 39 | +First we would need a built executable. |
| 40 | + |
| 41 | +To make a build in the menu bar press _File/Build Settings_ and then press **Build**. |
| 42 | + |
| 43 | + |
| 44 | +After the build has completed you can launch several instances of the built executable to be able to both host and join a game. |
| 45 | + |
| 46 | +> Mac users: to run multiple instances of the same app, you need to use the command line. |
| 47 | +> Run `open -n BossRoom.app` |
| 48 | +
|
| 49 | +--------------- |
| 50 | +**Multiplayer over internet** |
| 51 | + |
| 52 | +In contrast to running a local setup, when playing over internet we don't neccessarily need a built executable. We can just run the game in editor. |
| 53 | + |
| 54 | +Running the game over internet currently requires setting up a [Photon Transport for MLAPI](https://github.com/Unity-Technologies/mlapi-community-contributions), which uses Photon relay server to facilitate communication between clients and server living on different networks. |
| 55 | + |
| 56 | +Alternatively you can use Port Forwarding. The wonderful https://portforward.com/ site has guides on how to enable port forwarding on a huge number of routers. BossRoom uses `UDP` and needs a `9998` external port to be open. |
| 57 | + |
| 58 | +------------------------------------------ |
| 59 | + |
| 60 | +## Exploring the project |
| 61 | +BossRoom is an 8-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. |
| 62 | + |
| 63 | +One of the 8 clients acts as the host/server. That client will use a compositional approach so that its entities have both server and client components. |
| 64 | + |
| 65 | +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. |
| 66 | + |
| 67 | +Code is organized into three separate assemblies: **Client**, **Shared** and **Server** which reference each other when appropriate. |
| 68 | + |
| 69 | +For an in-depth overview of the project's architecture please check out our [ARCHITECTURE.md](ARCHITECTURE.md). |
| 70 | + |
| 71 | + |
| 72 | +## Contributing |
| 73 | + |
| 74 | +> __IMPORTANT__: |
| 75 | +> This project uses Git Large Files Support (LFS). See the [link with Git LFS installation options](https://git-lfs.github.com/). |
| 76 | +
|
| 77 | +The project uses the `git-flow` branching strategy, as such: |
| 78 | + - `develop` branch contains all active development |
| 79 | + - `master` branch contains release versions |
| 80 | + |
| 81 | +To get the project on your machine you need to clone the repository from GitHub using the following command-line command: |
| 82 | +``` |
| 83 | +git clone https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop.git |
| 84 | +``` |
| 85 | + |
| 86 | +Please check out [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on submitting issues and PRs to BossRoom! |
0 commit comments