Skip to content
This repository was archived by the owner on Jul 23, 2025. It is now read-only.

Commit 8613b94

Browse files
authored
Mttdoc120 - Samples Co-op 0.1.0 early release - release notes (#124)
1 parent 94016ac commit 8613b94

File tree

21 files changed

+585
-598
lines changed

21 files changed

+585
-598
lines changed

babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
module.exports = {
22
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
plugins: [
4+
'@babel/plugin-transform-modules-commonjs'
5+
]
36
};

blog/2021-04-07-boss-room-live.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: Boss Room docs are live!
3+
author: Lori Krell
4+
author_title: Unity, Senior Tech Writer
5+
tags: [releases, bossroom]
6+
description: Welcome to the first release of the Unity Multiplayer Samples Co-op documentation content. Learn more about Unity MLAPI through the sample co-op Boss Room game and project.
7+
hide_table_of_contents: false
8+
---
9+
10+
You [saved the date](https://unity.com/demos/small-scale-coop-sample), and now Boss Room is public and live!
11+
12+
Boss Room leverages the new experimental netcode package to bring up to eight players together to defeat imps and a boss in this adorable vertical slice of a cooperative RPG dungeon. This small-scale cooperative game is built to teach you the underlying networking patterns and concepts behind a multiplayer game of its genre.
13+
14+
The Boss Room project equips you with all the project files and assets you need to explore the creation of a small-scale cooperative game packed with playable characters, enemies, and a boss. As Boss Room is being developed, tutorials on the different aspects of networking the sample will be written for developers right here on our live documentation site – so stay tuned!
15+
16+
![Boss Room](/img/blog/boss-room.png)
17+
18+
To support this release, we provide getting started, tutorials, release notes, and more!
19+
20+
* [Multiplayer Samples Co-op Release Notes](/docs/release-notes/samples/samples-0-1-0)
21+
* [Getting started with Boss Room](/docs/learn/bossroom)
22+
23+
Visit and ⭐️ the Unity Multiplayer Samples Co-op [GitHub repository](https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop) to watch for updates, provide feedback, and contribute to the project.
24+
25+
When downloading, always get the [latest from GitHub](https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/releases/latest).
26+
27+
If you have questions and want to connect, check out the Unity Multiplayer forum or join us on [Discord](https://discord.gg/buMxnnPvTb). We have channels for announcements, support, development, and co-op samples.
28+
29+
Game on!

docs/learn/faq.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,27 @@ We recommend the following:
5656

5757
The Steam transport should be quite straightforward to use. Just add it to your project and set the `ConnectToSteamID` in the transport on the client to connect to the host that's all you need.
5858

59+
### Why do I get path too long errors with Boss Room on Windows?
60+
61+
Using Windows' built-in extracting tool may generate an "Error 0x80010135: Path too long" error window which can invalidate the extraction process.
62+
63+
As a workaround, shorten the zip file to a single character (for example "c.zip") and move it to the shortest path on your computer (such as in root C:\) and retry. If that solution fails, another workaround is to extract the downloaded zip file using an application like 7zip.
64+
65+
### Why do I get unidentified developer errors with Boss Room?
66+
67+
If you attempt to run a build on OSX and receive a warning dialog mentioning an "unidentified developer", you may need to override your security settings for this application:
68+
69+
1. In the Finder on your Mac, locate the application you want to open.
70+
71+
:::note
72+
Do use Launchpad, it does not allow you to access the shortcut menu.
73+
:::
74+
75+
1. Control-click the app icon, then choose **Open** from the shortcut menu.
76+
1. Click **Open**.
77+
1. The app is saved as an exception to your security settings. You can open it in the future by double-clicking it just as you can any registered app.
78+
79+
80+
See [Apple Support](https://support.apple.com/guide/mac-help/open-a-mac-app-from-an-unidentified-developer-mh40616/mac) for details.
81+
5982
</div>

docs/learn/getting-started-boss-room.md

Lines changed: 37 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,65 +13,62 @@ Boss Room is a fully functional Multiplayer Co-op Sample game made with Unity an
1313

1414
The intention is that you can use everything in this project as a starting point or as bits and pieces in your own Unity games.
1515

16-
## To get the project
16+
## Get the project
1717

1818
### Install Git LFS
1919
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 for Windows and Mac instructions](https://github.com/git-lfs/git-lfs/wiki/Installation).
2020

21-
### Get the Project
21+
### Get the project files
2222

23-
- A release version can be downloaded from the [Releases](https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/releases) page.
24-
- Unzip the archive file.
23+
- A release version can be downloaded from the [Latest Releases](https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/releases/latest) at GitHub.
24+
- Unzip the archive file.
2525
:::note Windows users
26-
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.
26+
Using Windows' built-in extracting tool may generate an "Error 0x80010135: Path too long" error window which can invalidate the extraction process. As a workaround, shorten the zip file to a single character (for example "c.zip") and move it to the shortest path on your computer (such as in root C:\) and retry. If that solution fails, another workaround is to extract the downloaded zip file using an application like 7zip.
2727
:::
28-
- You are now ready to add the project to Unity Hub.
28+
- You are now ready to add the project to Unity Hub.
2929

3030
:::important Compatibility
3131
- Boss Room supports all major Unity platforms. To use the WebGL platform a custom WebGL transport based on web sockets is needed.
32-
- Boss Room is compatible with Unity 2020.3 LTS and later.
32+
- Boss Room is compatible with Unity 2020.3 and later.
3333
- Make sure to include standalone support for Windows/Mac in your installation.
3434
:::
3535

36-
## To add the project with Unity Hub
36+
## Add the project with Unity Hub
37+
3738
1. Open Unity Hub.
3839
1. Click **Add**.
3940
1. Select the root folder of the downloaded project.
4041

4142
![adding project to unity](/img/addbossroom.gif)
4243

4344
:::note
44-
The first time you open the project Unity will import all assets, which will take longer than usual - it is normal.
45-
The MLAPI v0.1.0 package will be installed with Boss Room.
45+
The first time you open the project, Unity will import all assets, which will take longer than usual - this is normal. The Unity MLAPI v0.1.0 package will also be installed with Boss Room.
4646

4747
**Issues with importing due to parental control software**: If you have issues with importing you may want to check your DNS settings as some ISP parental controls may block GitHub access. For example, see this information on [WebSafe](https://community.virginmedia.com/t5/Networking-and-WiFi/Web-Safe-Breaks-GitHub/td-p/4279652).
48-
4948
:::
5049

5150
## Open the project
5251

53-
### To open the project for the first time:
52+
To open the project for the first time:
5453

55-
1. In Unity Hub double click the project.
54+
1. In Unity Hub, double-click the project.
5655
1. Navigate to the Project window.
5756
1. Open the *Assets* folder.
5857
1. Open the *Scene* folder.
5958
1. Click the *Startup* scene.
60-
1. Click **Play**.
59+
1. Click **Play**.
6160

6261

6362
<iframe src="https://www.youtube.com/embed/OSSBWOJq6gI?playlist=OSSBWOJq6gI&loop=1&&autoplay=0&controls=1&showinfo=0&mute=1" width="854px"
6463
height="480px" className="video-container" frameborder="0" position="relative" allow="accelerometer; autoplay; loop; playlist; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe>
6564

66-
67-
68-
## Test multiplayer
65+
## Test multiplayer
6966

7067
In order to see the multiplayer functionality in action, you can either run multiple instances of the game locally on your computer or choose to connect through the internet.
7168

7269
### Local multiplayer setup
7370

74-
#### Build an Executable.
71+
#### Build an Executable
7572

7673
1. Click File.
7774
2. Click Build Settings.
@@ -82,11 +79,10 @@ In order to see the multiplayer functionality in action, you can either run mult
8279
After the build has completed you can launch several instances of the built executable to be able to both host and join a game.
8380

8481
:::important Mac Users
85-
To run multiple instances of the same app, you need to use the command line.
82+
To run multiple instances of the same app, you need to use the command line:
8683
`> Run open -n BossRoom.app`
8784
:::
8885

89-
9086
<iframe src="https://www.youtube.com/embed/27Ikr0t7vzg?playlist=27Ikr0t7vzg&loop=1&&autoplay=0&controls=1&showinfo=0&mute=1" width="854px"
9187
height="480px" className="video-container" frameborder="0" position="relative" allow="accelerometer; autoplay; loop; playlist; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe>
9288

@@ -96,22 +92,37 @@ To run multiple instances of the same app, you need to use the command line.
9692
In contrast to running a local setup, when playing over internet we do not necessarily need a built executable. You can run the game in editor.
9793
:::
9894

99-
100-
Running the game over internet currently requires either setting up a [Photon Transport for MLAPI](https://github.com/Unity-Technologies/mlapi-community-contributions/tree/master/Transports/com.mlapi.contrib.transport.photon-realtime) or using Port Forwarding
95+
Running the game over internet currently requires either setting up a [Photon Transport for MLAPI](#photon-transport) or using [Port Forwarding](#port-forwarding).
10196

10297
#### Photon Transport
10398

104-
Photon Transport uses Photon relay server to facilitate communication between clients and server living on different networks.
105-
99+
[Photon Transport for MLAPI](https://github.com/Unity-Technologies/mlapi-community-contributions/tree/master/Transports/com.mlapi.contrib.transport.photon-realtime) uses Photon relay server to facilitate communication between clients and server living on different networks.
106100

107101
:::unity Learn More
108-
See the [Boss Room Photon Setup Guide](https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/release/v0.1.0-experimental/Documentation/Photon-Realtime/Readme.md) for details.
102+
See the [Boss Room Photon Setup Guide](https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/master/Documentation/Photon-Realtime/Readme.md) for details.
109103
:::
110104

111105
#### Port Forwarding
112106

113107
The [Portforward Site](https://portforward.com/) 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.
114108

109+
import Iframe from 'react-iframe'
115110

111+
## Troubleshooting
116112

117-
import Iframe from 'react-iframe'
113+
**Run builds on Mac OSX:**
114+
115+
If you attempt to run a build on OSX and receive a warning dialog mentioning an "unidentified developer", you may need to override your security settings for this application:
116+
117+
1. In the Finder on your Mac, locate the application you want to open.
118+
119+
:::note
120+
Do use Launchpad, it does not allow you to access the shortcut menu.
121+
:::
122+
123+
1. Control-click the app icon, then choose **Open** from the shortcut menu.
124+
1. Click **Open**.
125+
1. The app is saved as an exception to your security settings. You can open it in the future by double-clicking it just as you can any registered app.
126+
127+
128+
See [Apple Support](https://support.apple.com/guide/mac-help/open-a-mac-app-from-an-unidentified-developer-mh40616/mac) for details.

docs/learn/rpcnetvarexamples.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ See the [RPC vs NetworkVariable](rpcvnetvar.md) tutorial for more information.
1111
Boss Room uses RPCs to send movement inputs.
1212

1313
```csharp reference
14-
https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/develop/Assets/BossRoom/Scripts/Client/Game/Character/ClientInputSender.cs
15-
14+
https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/master/Assets/BossRoom/Scripts/Client/Game/Character/ClientInputSender.cs
1615
```
1716

1817
We want the full history of inputs sent, not just the latest value. There is no need for `NetworkVariable`s, you just want to blast your inputs to the server. Since Boss Room is not a twitch shooter, we send inputs as reliable `RPC`s without worrying about the additional latency an input loss would add.
@@ -23,7 +22,7 @@ We want the full history of inputs sent, not just the latest value. There is no
2322
Sending from server to client `RecvPerformHitReactionClient`
2423

2524
```csharp reference
26-
https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/d09330434d864de384db0ce144aa30e5a20aeb3c/Assets/BossRoom/Scripts/Shared/Game/Entity/NetworkCharacterState.cs#L174
25+
https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/master/Assets/BossRoom/Scripts/Shared/Game/Entity/NetworkCharacterState.cs#L235-L239
2726
```
2827

2928
For example, the Boss Room project "ouch" action `RPC` mentioned for `NetworkCharacterState` is interesting for optimization purposes. You would normally want to have only one `RPC` for an action and let the client decide who should play the associated animation. Due to "ouch" being a long running action over multiple frames, you do not know yet when sending the initial `RPC` which characters will be affected by that action. You want this to be dynamic as the boss is hitting targets. As a result, multiple `RPC`s will be sent for each hit character.
@@ -33,30 +32,28 @@ For example, the Boss Room project "ouch" action `RPC` mentioned for `NetworkCha
3332
The archer's arrows uses a standalone `GameObject` that is replicated over time. Since this object's movements are slow moving, we made the choice to use state to replicate this ability's status, in case a client connected while the arrow was flying.
3433

3534
```csharp reference
36-
https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/develop/Assets/BossRoom/Scripts/Server/Game/Entity/ServerProjectileLogic.cs
35+
https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/master/Assets/BossRoom/Scripts/Server/Game/Entity/ServerProjectileLogic.cs
3736
```
37+
3838
We could have used an `RPC` instead, for example the Mage's projectile attack. Since it is expected for that projectile to be quick, we are not affected by the few milliseconds where a newly connected client could miss the projectile and we save on bandwidth having to manage a replicated object. Instead a single RPC is sent to trigger the FX client side.
3939

4040

4141
```csharp reference
42-
https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/develop/Assets/BossRoom/Scripts/Server/Game/Action/FXProjectileTargetedAction.cs
42+
https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/master/Assets/BossRoom/Scripts/Server/Game/Action/FXProjectileTargetedAction.cs
4343
```
4444

4545
## Character life state
4646

4747
We could have used a "kill" `RPC` to set a character as dead and play the appropriate animations. Applying our "should that information be replicated when a player joins the game mid-game" rule of thumb, we used `NetworkVariable`s instead. We used the `OnValueChanged` callback on those values to play our state changes animation.
4848

4949
```csharp reference
50-
https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/5832b697a790595bc7d9afd3d5cc418c7318ccb8/Assets/BossRoom/Scripts/Shared/Game/Entity/NetworkCharacterState.cs#L63
51-
50+
https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/master/Assets/BossRoom/Scripts/Shared/Game/Entity/NetworkCharacterState.cs#L93
5251
```
5352

5453
The animation change:
5554

5655
```csharp reference
57-
https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/5832b697a790595bc7d9afd3d5cc418c7318ccb8/Assets/BossRoom/Scripts/Client/Game/Character/ClientCharacterVisualization.cs#L49
58-
59-
56+
https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/master/Assets/BossRoom/Scripts/Client/Game/Character/ClientCharacterVisualization.cs#L78
6057
```
6158
6259
:::tip Lesson Learned
@@ -66,7 +63,7 @@ https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/58
6663
![imp not appearing dead](/img/01_imp_not_appearing_dead.png)
6764

6865
```csharp reference
69-
https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/develop/Assets/BossRoom/Scripts/Client/Game/Character/ClientCharacterVisualization.cs !
66+
https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/master/Assets/BossRoom/Scripts/Client/Game/Character/ClientCharacterVisualization.cs
7067
```
7168

7269
:::

docs/learn/rpcvnetvar.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ If we sent an `RPC` to all clients, then all players connecting mid game after t
3838
In that case, it is preferable to use `NetworkVariable`s like shown here.
3939

4040
```csharp reference
41-
https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/develop/Assets/BossRoom/Scripts/Shared/NetworkDoorState.cs
41+
https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/master/Assets/BossRoom/Scripts/Shared/NetworkDoorState.cs
4242
```
4343

4444
It uses a `BoolNetworkVariable` to represent the "IsOpen" state. If I open the door and a player connects after this, the host will replicate all the world's information to that new player, including the door's state.
@@ -57,27 +57,26 @@ Actions in Boss Room are a great example for this. The area of effect action (`A
5757
`AoeActionInput.cs` Shows the input being updated client side and not waiting for the server. It then calls an `RPC` when clicking on the area to affect.
5858

5959
```csharp reference
60-
https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/develop/Assets/BossRoom/Scripts/Client/Game/Action/AoeActionInput.cs
61-
60+
https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/master/Assets/BossRoom/Scripts/Client/Game/Action/AoeActionInput.cs
6261
```
6362

6463
`AOEAction.cs` Server side logic detecting enemies inside the area and applying damage. It then broadcasts an `RPC` to tell all clients to play the VFX at the appropriate position. Character's state will automatically update with their respective `NetworkVariable`s update (health and alive status for example).
6564

6665

6766
```csharp reference
68-
https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/develop/Assets/BossRoom/Scripts/Server/Game/Action/AOEAction.cs
67+
https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/master/Assets/BossRoom/Scripts/Server/Game/Action/AOEAction.cs
6968
```
7069

7170
`AoeActionFX.cs` is triggered by an `RPC` coming from the server
7271

7372
```csharp reference
74-
https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/develop/Assets/BossRoom/Scripts/Client/Game/Action/AoeActionFX.cs
73+
https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/master/Assets/BossRoom/Scripts/Client/Game/Action/AoeActionFX.cs
7574
```
7675

7776
:::tip
7877
If you want to make sure two variables are received at the same time, `RPC`s are great for that.
7978

80-
If you change `NetworkVariable` "a" and "b", there's no guarantee they'll both be received client side at the same time. Sending them as two parameters in the same `RPC` allows to make sure they'll be received at the same time client side.
79+
If you change `NetworkVariable` "a" and "b", there is no guarantee they will both be received client side at the same time. Sending them as two parameters in the same `RPC` allows to make sure they will be received at the same time client side.
8180
:::
8281

8382
`NetworkVariable`s are great when you only care about the latest value.
@@ -89,5 +88,3 @@ If you change `NetworkVariable` "a" and "b", there's no guarantee they'll both b
8988

9089
`RPC`s are great for sending transient events. Use them when transmiting short lived events.
9190

92-
93-

0 commit comments

Comments
 (0)