|
| 1 | +--- |
| 2 | +id: bossroom |
| 3 | +title: Getting Started with Boss Room |
| 4 | +--- |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | +:::important |
| 9 | +This project is currently in early-access. |
| 10 | +::: |
| 11 | + |
| 12 | +Boss Room is a fully functional Multiplayer Co-op Sample game made with Unity and MLAPI. We are building the sample to serve as an educational showcase of specific typical gameplay patterns frequently featured in similar games. |
| 13 | + |
| 14 | +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. |
| 15 | + |
| 16 | +## To get the project |
| 17 | + |
| 18 | +### Install Git LFS |
| 19 | +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). |
| 20 | + |
| 21 | +### Get the Project |
| 22 | + |
| 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. |
| 25 | +:::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. |
| 27 | +::: |
| 28 | + - You are now ready to add the project to Unity Hub. |
| 29 | + |
| 30 | +:::important Compatibility |
| 31 | +- 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.0f1. |
| 33 | +- Make sure to include standalone support for Windows/Mac in your installation. |
| 34 | +::: |
| 35 | + |
| 36 | +## To add the project with Unity Hub |
| 37 | +1. Open Unity Hub. |
| 38 | +1. Click **Add**. |
| 39 | +1. Select the root folder of the downloaded project. |
| 40 | + |
| 41 | +  |
| 42 | + |
| 43 | +:::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. |
| 46 | + |
| 47 | +**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 | + |
| 49 | +::: |
| 50 | + |
| 51 | +## Open the project |
| 52 | + |
| 53 | +### To open the project for the first time: |
| 54 | + |
| 55 | +1. In Unity Hub double click the project. |
| 56 | +1. Navigate to the Project window. |
| 57 | +1. Open the *Assets* folder. |
| 58 | +1. Open the *Scene* folder. |
| 59 | +1. Click the *Startup* scene. |
| 60 | +1. Click **Play**. |
| 61 | + |
| 62 | + |
| 63 | +<iframe src="https://www.youtube.com/embed/OSSBWOJq6gI?playlist=OSSBWOJq6gI&loop=1&&autoplay=0&controls=1&showinfo=0&mute=1" width="854px" |
| 64 | + height="480px" className="video-container" frameborder="0" position="relative" allow="accelerometer; autoplay; loop; playlist; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe> |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | +## Test multiplayer |
| 69 | + |
| 70 | +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. |
| 71 | + |
| 72 | +### Local multiplayer setup |
| 73 | + |
| 74 | +#### Build an Executable. |
| 75 | + |
| 76 | +1. Click File. |
| 77 | +2. Click Build Settings. |
| 78 | +2. Click **Build**. |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | +After the build has completed you can launch several instances of the built executable to be able to both host and join a game. |
| 83 | + |
| 84 | +:::important Mac Users |
| 85 | +To run multiple instances of the same app, you need to use the command line. |
| 86 | +`> Run open -n BossRoom.app` |
| 87 | +::: |
| 88 | + |
| 89 | + |
| 90 | +<iframe src="https://www.youtube.com/embed/27Ikr0t7vzg?playlist=27Ikr0t7vzg&loop=1&&autoplay=0&controls=1&showinfo=0&mute=1" width="854px" |
| 91 | + height="480px" className="video-container" frameborder="0" position="relative" allow="accelerometer; autoplay; loop; playlist; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe> |
| 92 | + |
| 93 | +### Multiplayer over internet |
| 94 | + |
| 95 | +:::tip |
| 96 | +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. |
| 97 | +::: |
| 98 | + |
| 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 |
| 101 | + |
| 102 | +#### Photon Transport |
| 103 | + |
| 104 | +Photon Transport uses Photon relay server to facilitate communication between clients and server living on different networks. |
| 105 | + |
| 106 | + |
| 107 | +:::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. |
| 109 | +::: |
| 110 | + |
| 111 | +#### Port Forwarding |
| 112 | + |
| 113 | +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. |
| 114 | + |
| 115 | + |
| 116 | + |
| 117 | +import Iframe from 'react-iframe' |
0 commit comments