diff --git a/Packages/com.unity.multiplayer.samples.coop/CHANGELOG.md b/Packages/com.unity.multiplayer.samples.coop/CHANGELOG.md index 105c8fede..f5d0d7c5b 100644 --- a/Packages/com.unity.multiplayer.samples.coop/CHANGELOG.md +++ b/Packages/com.unity.multiplayer.samples.coop/CHANGELOG.md @@ -4,8 +4,6 @@ All notable changes to this project template will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [0.1.0] - 2020-10-09 +## [0.1.0-experimental] - 2021-04-07 -### This is the first release of *Unity Package com.unity.template.mytemplate*. - -*Short description of this release* +### This is the experimental release of *Boss Room: Small scale coop sample*. diff --git a/Packages/com.unity.multiplayer.samples.coop/Documentation~/Boss Room.md b/Packages/com.unity.multiplayer.samples.coop/Documentation~/Boss Room.md new file mode 100644 index 000000000..28f7a4649 --- /dev/null +++ b/Packages/com.unity.multiplayer.samples.coop/Documentation~/Boss Room.md @@ -0,0 +1,5 @@ +**_Boss Room documentation_** + +This sample project is an educational template that, alongside tutorials, teaches a specific approach to creating and networking in Unity. Boss Room has tools to help you learn how to build and network a small-scale cooperative game. + +For further, more in-depth documentation, please refer to this project's README.md. diff --git a/Packages/com.unity.multiplayer.samples.coop/Documentation~/images/example.png b/Packages/com.unity.multiplayer.samples.coop/Documentation~/images/example.png deleted file mode 100644 index b2000e98d..000000000 --- a/Packages/com.unity.multiplayer.samples.coop/Documentation~/images/example.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:55f68a5638d688a4fff36bfaa11d9453ebc287640dc958b1568260d98ed757ed -size 52261 diff --git a/Packages/com.unity.multiplayer.samples.coop/Documentation~/images/gitlab_ci_secret_variables.png b/Packages/com.unity.multiplayer.samples.coop/Documentation~/images/gitlab_ci_secret_variables.png deleted file mode 100644 index 44e308394..000000000 --- a/Packages/com.unity.multiplayer.samples.coop/Documentation~/images/gitlab_ci_secret_variables.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:377a4e4eafc775ef5782960326dcae87bc5e9e33c5ec1aa2f7cab8db9905734e -size 16691 diff --git a/Packages/com.unity.multiplayer.samples.coop/Documentation~/images/gitlab_pipeline_download.png b/Packages/com.unity.multiplayer.samples.coop/Documentation~/images/gitlab_pipeline_download.png deleted file mode 100644 index e59df96df..000000000 --- a/Packages/com.unity.multiplayer.samples.coop/Documentation~/images/gitlab_pipeline_download.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cb9b0ad5149e4ac69665bfb5e185a7fa7c1e6b7824e6704a5658a339b0715141 -size 53862 diff --git a/Packages/com.unity.multiplayer.samples.coop/Documentation~/images/gitlab_pipelines.png b/Packages/com.unity.multiplayer.samples.coop/Documentation~/images/gitlab_pipelines.png deleted file mode 100644 index 7e6595c04..000000000 --- a/Packages/com.unity.multiplayer.samples.coop/Documentation~/images/gitlab_pipelines.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8434696c3896f4304e9b6834e82ce3845da36bce4df2d547064c7e92487d4e92 -size 103335 diff --git a/Packages/com.unity.multiplayer.samples.coop/Documentation~/images/template_in_new_project.png b/Packages/com.unity.multiplayer.samples.coop/Documentation~/images/template_in_new_project.png deleted file mode 100644 index 7b9693292..000000000 --- a/Packages/com.unity.multiplayer.samples.coop/Documentation~/images/template_in_new_project.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:99007ae027a377e71b5bd4d766a13879c116b1a94a5d268ca07ad4cfa2895b30 -size 125733 diff --git a/Packages/com.unity.multiplayer.samples.coop/Documentation~/index.md b/Packages/com.unity.multiplayer.samples.coop/Documentation~/index.md deleted file mode 100644 index 79617e238..000000000 --- a/Packages/com.unity.multiplayer.samples.coop/Documentation~/index.md +++ /dev/null @@ -1,137 +0,0 @@ ->>> -**_Project Template Documentation_** - -Use this template to create preliminary, high-level documentation meant to introduce users to the feature and the sample files included in this project template. When writing your documentation, do the following: - -1. Follow instructions in blockquotes. - -2. Replace angle brackets with the appropriate text. For example, replace "<template name>" with the official name of the project template. - -3. Delete sections that do not apply to your project template. For example, a template containing only sample files does not have a "Using <template name>" section, so this section can be removed. - -4. After documentation is completed, make sure you delete all instructions and examples in blockquotes including this preamble and its title: - - ``` - >>> - Delete all of the text between pairs of blockquote markdown. - >>> - ``` ->>> - -# About <template name> - ->>> -Name the heading of the first topic after the **displayName** of the project template as it appears in the template's manifest. Check with your Product Manager to ensure that the template is named correctly. - -This first topic includes a brief, high-level explanation of the project template and, if applicable, provides links to Unity Manual topics. ->>> - -**_Example:_** - ->>> -Here is an example for reference only. Do not include this in the final documentation file: - -*The First Persion Shooter project template includes examples of First Person Shooter assets, First Person Shooter Instances, animation, GameObjects, game mechanics and scripts that will help you get started quickly with creating your own first person shooter game.* ->>> - - -# Using <template name> ->>> - -The contents of this section depends on the type of project template. - -* At a minimum, this section should include reference documentation that describes the assets, structure, and properties that makes up the project template's content. This reference documentation should include screen grabs (see how to add screens below), a list of assets or settings, an explanation of what each asset or setting does, and the default values of each asset or setting. -* Ideally, this section should also include a workflow: a list of steps that the user can easily follow that demonstrates how to use the project template. This list of steps should include screen grabs (see how to add screens below) to better describe how to use the feature. - -For project templates that include sample files, this section may include detailed information on how the user can use these sample files. Workflow diagrams or illustrations could be included if deemed appropriate. - -## How to add images - -*(This section is for reference. Do not include in the final documentation file)* - -If the [Using <template name>](#UsingProjectTemplate) section includes screen grabs or diagrams, a link to the image must be added to this MD file, before or after the paragraph with the instruction or description that references the image. In addition, a caption should be added to the image link that includes the name of the screen or diagram. All images must be PNG files with underscores for spaces. No animated GIFs. - -An example is included below: - -![A cinematic in the Timeline Editor window.](images/example.png) - -Notice that the example screen shot is included in the images folder. All screen grabs and/or diagrams must be added and referenced from the images folder. - -For more on the Unity documentation standards for creating and adding screen grabs, see this confluence page: https://confluence.hq.unity3d.com/pages/viewpage.action?pageId=13500715 ->>> - - - -# Technical details -## Requirements - ->>> -This subtopic includes a bullet list with the compatible versions of Unity. This subtopic may also include additional requirements or recommendations for 3rd party software or hardware. If you need to include references to non-Unity products, make sure you refer to these products correctly and that all references include the proper trademarks (tm or r) ->>> - -This version of <template name> is compatible with the following versions of the Unity Editor: - -* 2018.3 and later (recommended) - -To use this project template, you must have the following 3rd party products: - -* <product name and version with trademark or registered trademark.> -* <product name and version with trademark or registered trademark.> -* <product name and version with trademark or registered trademark.> - -## Known limitations ->>> -This section lists the known limitations with this version of the project template. If there are no known limitations, or if the limitations are trivial, exclude this section. An example is provided. ->>> - -<template name> template version <template version> includes the following known limitations: - -* <brief one-line description of first limitation.> -* <brief one-line description of second limitation.> -* <and so on> - ->>> -*Example (For reference. Do not include in the final documentation file):* - -The First Person Shoot template version 1.0 has the following limitations:* - -* The First Person Shooter template does not support sound. -* The First Person Shooter template's Recorder properties are not available in standalone players. -* MP4 encoding is only available on Windows. ->>> - -## Project template contents ->>> -This section includes the location of important files you want the user to know about. For example, if this project template containing user interface, models, and materials separated by groups, you may want to provide the folder location of each group. ->>> - -The following table indicates the <describe the breakdown you used here>: - -|Location|Description| -|---|---| -|``|Contains <describe what the folder contains>.| -|``|Contains <describe what the file represents or implements>.| - ->>> -*Example (For reference. Do not include in the final documentation file):* - -The following table indicates the root folder of each type of sample in this project template. Each sample's root folder contains its own folders: - -|Folder Location|Description| -|---|---| -|`WoodenCrate_Orange`|Root folder containing the assets for the orange crates.| -|`Characters`|Root folder containing the assets and animators for the characters.| -|`Levels`|Root folder containing scenes for the sample game's levels.| ->>> - -## Document revision history ->>> -This section includes the revision history of the document. The revision history tracks when a document is created, edited, and updated. If you create or update a document, you must add a new row describing the revision. The Documentation Team also uses this table to track when a document is edited and its editing level. An example is provided: - -|Date|Reason| -|---|---| -|Sept 12, 2017|Unedited. Published to production.| -|Sept 10, 2017|Document updated for project template version 1.1.
New features:
  • audio support for capturing MP4s.
  • Instructions on saving Recorder prefabs| -|Sept 5, 2017|Limited edit by Documentation Team. Published to production.| -|Aug 25, 2017|Document created. Matches project template version 1.0.| ->>> diff --git a/Packages/com.unity.multiplayer.samples.coop/LICENSE.md b/Packages/com.unity.multiplayer.samples.coop/LICENSE.md index 5b1268f2e..bb8c73b1a 100644 --- a/Packages/com.unity.multiplayer.samples.coop/LICENSE.md +++ b/Packages/com.unity.multiplayer.samples.coop/LICENSE.md @@ -1,5 +1,5 @@ -com.unity.multiplayer.samples.coop copyright © 2020 Unity Technologies ApS +Boss Room: Small scale coop sample © 2021 Unity Technologies -Licensed under the Unity Companion License for Unity-dependent projects--see [Unity Companion License](http://www.unity3d.com/legal/licenses/Unity_Companion_License). +Licensed under the Unity Companion License for Unity-dependent projects (see https://unity3d.com/legal/licenses/unity_companion_license); otherwise licensed under the Unity Package Distribution License (see https://unity3d.com/legal/licenses/Unity_Package_Distribution_License). -Unless expressly provided otherwise, the Software under this license is made available strictly on an “AS IS” BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. Please review the license for details on these and other terms and conditions. +Unless expressly provided otherwise, the Software under this license is made available strictly on an “AS IS” BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. Please review the license for details on these and other terms and conditions. \ No newline at end of file diff --git a/Packages/com.unity.multiplayer.samples.coop/README.md b/Packages/com.unity.multiplayer.samples.coop/README.md index e7ef775eb..ddd7573bf 100644 --- a/Packages/com.unity.multiplayer.samples.coop/README.md +++ b/Packages/com.unity.multiplayer.samples.coop/README.md @@ -1,39 +1,86 @@ -# TODOs (trimmed down version of tasks listed at: https://github.cds.internal.unity3d.com/unity/com.unity.template-starter-kit) +![Banner](Documentation/Images/Banner.png) +# BossRoom - co-op multiplayer RPG built with Unity MLAPI -##### Fill in your project template's package information +>**IMPORTANT**: This project is currently experimental. - Update the following required fields in `Packages/com.unity.template.mytemplate/package.json`: - - `name`: Project template's package name, it should follow this naming convention: `com.unity.template.[your-template-name]` - (Example: `com.unity.template.3d`) - - `displayName`: Package user friendly display name. (Example: `"First person shooter"`).
    __Note:__ Use a display name that will help users understand what your project template is intended for. - - `version`: Package version `X.Y.Z`, your project **must** adhere to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - - `unity`: Minimum Unity Version your project template is compatible with. (Example: `2018.3`) - - `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. - - `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. +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. -##### Update **README.md** +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. - The README.md file should contain all pertinent information for template developers, such as: - * Prerequisites - * External tools or development libraries - * Required installed Software -The Readme file at the root of the project should be the same as the one found in the template package folder. +``` +Platforms : Windows, Mac +``` -##### Prepare your documentation +## Getting the project + - A release version can be downloaded from the [Releases](https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/releases) page. + - 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. - Rename and update **Packages/com.unity.template.mytemplate/Documentation~/your-package-name.md** documentation file. - 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. +## Opening the project for the first time - Your template's documentation will be made available online and in the editor during publishing to guide our users. +Once you have downloaded the project the steps below should get you up and running: + - Make sure you have installed the version of Unity that is listed above in the prerequisites section. + - Make sure to include standalone support for Windows/Mac in your installation. + - Add the project in _Unity Hub_ by clicking on **Add** button and pointing it to the root folder of the downloaded project. + - The first time you open the project Unity will import all assets, which will take longer than usual - it is normal. + - Once the editor is ready, navigate to the _Project_ window and open the _Project/Startup_ scene. +![](Documentation/Images/StartupScene.png) + - From there you can click the **Play** button. You can host a new game or join an existing game using the in-game UI. -##### Update the changelog - **Packages/com.unity.template.mytemplate/CHANGELOG.md**. +## Testing multiplayer - 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/). +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. - 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. +--------------- +**Local multiplayer setup** -#### Complete the rest of the steps in the link regarding Legal & Testing \ No newline at end of file +First we would need a built executable. + +To make a build in the menu bar press _File/Build Settings_ and then press **Build**. +![](Documentation/Images/BuildProject.png) + +After the build has completed you can launch several instances of the built executable to be able to both host and join a game. + +> Mac users: to run multiple instances of the same app, you need to use the command line. +> Run `open -n BossRoom.app` + +--------------- +**Multiplayer over internet** + +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. + +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. + +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. + +------------------------------------------ + +## Exploring the project +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. + +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. + +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. + +Code is organized into three separate assemblies: **Client**, **Shared** and **Server** which reference each other when appropriate. + +For an in-depth overview of the project's architecture please check out our [ARCHITECTURE.md](ARCHITECTURE.md). + + +## Contributing + +> __IMPORTANT__: +> This project uses Git Large Files Support (LFS). See the [link with Git LFS installation options](https://git-lfs.github.com/). + +The project uses the `git-flow` branching strategy, as such: + - `develop` branch contains all active development + - `master` branch contains release versions + +To get the project on your machine you need to clone the repository from GitHub using the following command-line command: +``` +git clone https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop.git +``` + +Please check out [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on submitting issues and PRs to BossRoom! diff --git a/Packages/com.unity.multiplayer.samples.coop/Third Party Notices.md b/Packages/com.unity.multiplayer.samples.coop/Third Party Notices.md deleted file mode 100644 index 92ea1995b..000000000 --- a/Packages/com.unity.multiplayer.samples.coop/Third Party Notices.md +++ /dev/null @@ -1,16 +0,0 @@ -This package contains third-party software components governed by the license(s) indicated below: ---------- - -Component Name: [provide component name] - -License Type: [Provide license type, i.e. "MIT", "Apache 2.0"] - -[Provide License Details] - ---------- -Component Name: [provide component name] - -License Type: [Provide license type, i.e. "MIT", "Apache 2.0"] - -[Provide License Details] - diff --git a/Packages/com.unity.multiplayer.samples.coop/Third Party Notices.md.meta b/Packages/com.unity.multiplayer.samples.coop/Third Party Notices.md.meta deleted file mode 100644 index e4c52438f..000000000 --- a/Packages/com.unity.multiplayer.samples.coop/Third Party Notices.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: ef2dc390be95d448f8486cc72b76d010 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Packages/com.unity.multiplayer.samples.coop/package.json b/Packages/com.unity.multiplayer.samples.coop/package.json index e67be1b02..dcb2b076b 100644 --- a/Packages/com.unity.multiplayer.samples.coop/package.json +++ b/Packages/com.unity.multiplayer.samples.coop/package.json @@ -1,11 +1,11 @@ { "name": "com.unity.multiplayer.samples.coop", - "displayName":"Co-op RPG", + "displayName":"Boss Room", "version": "0.1.0-experimental", "type": "template", "host": "hub", - "unity": "2019.4", - "description": "Replace this string with your own description of the package. This description appears in the Package Manager window when the user selects this package from the list. \n\nFor best results, use this text to summarize: \n\u25AA What the package does \n\u25AA How it can benefit the user \n\nNote: Special formatting characters are supported, including line breaks ('\\n') and bullets ('\\u25AA').", + "unity": "2020.3", + "description": "Boss Room is a small scale cooperative game sample project built on top of the new Unity Networking Core library, designed to help you explore the concepts and patterns behind a multiplayer game flow. \n\nBoss Room features character abilities, casting animations to hide latency, replicated objects, RPCs, and integration with a relay service.", "dependencies": { "com.unity.learn.iet-framework": "1.2.1", "com.unity.multiplayer.mlapi": "0.0.1-preview.1",