diff --git a/Assets/BossRoom/Scripts/Client/UI/PopupPanel.cs b/Assets/BossRoom/Scripts/Client/UI/PopupPanel.cs index fa990cd44..b8db863e1 100644 --- a/Assets/BossRoom/Scripts/Client/UI/PopupPanel.cs +++ b/Assets/BossRoom/Scripts/Client/UI/PopupPanel.cs @@ -147,8 +147,20 @@ private void OnOnlineModeDropdownChanged(int value) { if (string.IsNullOrEmpty(PhotonAppSettings.Instance.AppSettings.AppIdRealtime)) { - // If there is no photon app id set tell the user they need to install - SetupNotifierDisplay("Photon Realtime not Setup!", "Follow the instructions in the readme to setup Photon Realtime and use relay mode.", false, true); + if (Application.isEditor) + { + // If there is no photon app id set tell the user they need to install + SetupNotifierDisplay( + "Photon Realtime not Setup!", "Follow the instructions in the readme (/Documents/Photon-Realtime/Readme.md) " + + "to setup Photon Realtime and use relay mode.", false, true); + } + else + { + // If there is no photon app id set tell the user they need to install + SetupNotifierDisplay( + "Photon Realtime not Setup!", "It needs to be setup in the Unity Editor for this project " + + "by following the Photon-Realtime guide, then rebuild the project and distribute it.", false, true); + } return; } diff --git a/Documentation/Photon-Realtime/Images/Boss-Room-Host-Confirm.png b/Documentation/Photon-Realtime/Images/Boss-Room-Host-Confirm.png new file mode 100644 index 000000000..4edb986c4 --- /dev/null +++ b/Documentation/Photon-Realtime/Images/Boss-Room-Host-Confirm.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:edae396114f77bf62295f83cf2a513fcfc9596f67b37fecf3ee0b79378ba50fb +size 204109 diff --git a/Documentation/Photon-Realtime/Images/Boss-Room-Host-Dropdown.png b/Documentation/Photon-Realtime/Images/Boss-Room-Host-Dropdown.png new file mode 100644 index 000000000..a7e97ea49 --- /dev/null +++ b/Documentation/Photon-Realtime/Images/Boss-Room-Host-Dropdown.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9c18f020e23d826b0316fae5ff3880873efdbfdcb47505f0a0762995bda6eab1 +size 762042 diff --git a/Documentation/Photon-Realtime/Images/Boss-Room-Join-Dropdown.png b/Documentation/Photon-Realtime/Images/Boss-Room-Join-Dropdown.png new file mode 100644 index 000000000..602033212 --- /dev/null +++ b/Documentation/Photon-Realtime/Images/Boss-Room-Join-Dropdown.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7bd55f6408858ca649d80f5bf79a2a106e4b0c1a53452a6e1cebaeb3a28dc120 +size 375009 diff --git a/Documentation/Photon-Realtime/Images/Boss-Room-Join.png b/Documentation/Photon-Realtime/Images/Boss-Room-Join.png new file mode 100644 index 000000000..e78f2715b --- /dev/null +++ b/Documentation/Photon-Realtime/Images/Boss-Room-Join.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad821bab2e1e6d654774d5e75142f96169ce4b7a7e58129451d7c1546219b944 +size 371873 diff --git a/Documentation/Photon-Realtime/Images/Boss-Room-Lobby-Extra.png b/Documentation/Photon-Realtime/Images/Boss-Room-Lobby-Extra.png new file mode 100644 index 000000000..ee09d0538 --- /dev/null +++ b/Documentation/Photon-Realtime/Images/Boss-Room-Lobby-Extra.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7aab09621b8e591fd2ecf5305b8a71689821a7832aa2520c7944dd24e8770955 +size 4539880 diff --git a/Documentation/Photon-Realtime/Images/Boss-Room-Lobby.png b/Documentation/Photon-Realtime/Images/Boss-Room-Lobby.png new file mode 100644 index 000000000..481edff13 --- /dev/null +++ b/Documentation/Photon-Realtime/Images/Boss-Room-Lobby.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be7821de85a202196a933682c0a06fec6bf55f99de145a0cbe7e1266921b9ea4 +size 4331599 diff --git a/Documentation/Photon-Realtime/Images/Photon-App.png b/Documentation/Photon-Realtime/Images/Photon-App.png new file mode 100644 index 000000000..8b22a7b89 --- /dev/null +++ b/Documentation/Photon-Realtime/Images/Photon-App.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec7cac4bb30e9970d2c1832766d1b9c3fc1cf69adb2c263af7ba579442fb33c4 +size 200878 diff --git a/Documentation/Photon-Realtime/Images/Photon-Dashboard.png b/Documentation/Photon-Realtime/Images/Photon-Dashboard.png new file mode 100644 index 000000000..470a783a5 --- /dev/null +++ b/Documentation/Photon-Realtime/Images/Photon-Dashboard.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c36d4422f98f537eb6330e1378631498258f02c748b120fc9212568a9425e8fa +size 181469 diff --git a/Documentation/Photon-Realtime/Readme.md b/Documentation/Photon-Realtime/Readme.md new file mode 100644 index 000000000..f12d2ff00 --- /dev/null +++ b/Documentation/Photon-Realtime/Readme.md @@ -0,0 +1,71 @@ +# Photon Setup Guide for Boss Room + +## Setup Photon + +1. Access the Wizard from Window → Photon Realtime → Wizard. +2. Click next through the wizard until you get to the Photon Cloud Setup. +3. If you do not already have an account or an App Id, click the Visit Dashboard button to create one. If you created a new account, create a New Application from Photon's Dashboard. + **Note:** The Photon Type for Boss Room is `Photon Realtime`. + + ![Images/Photon-App.png](Images/Photon-App.png) + +4. After the Application is setup, you can get its App ID from Photon's Dashboard. Copy the App ID to your clipboard. + + **Note:** This App Id **must** be shared with other people in order to be able to connect to your Photon Room. + + ![Images/Photon-App.png](Images/Photon-Dashboard.png) + +5. In the Photon Wizard Window of your Unity Project, paste the App Id. +6. Click on Setup. You should receive a completion message, for example "Your AppId is now applied to this Project **Done**". +7. Click Next then Done. Setup is complete and you can safely quit the Photon Wizard. + +## Playing Boss Room with friends + +Once the setup is done, there are two ways you can actually test out is working: + +* Launch the Boss Room project using a packaged build. +* Use the Unity Editor, but do that with caution! + +With that being said, both ways are almost the same in terms of how you host or join a session. + + +> **IMPORTANT!** There is a bug in MLAPI at the moment that could prevent users from connecting to each other through the editor. + +> **Note:** To reiterate, it is important that all Unity Editor users have the exact same version of the project with no changes locally and their PhotonAppSettings should match with the Host's settings. + + +### Hosting a Room + +--- +If you want to host a session then: + + +1. Click the Start button. +2. Select `Relay Host` from the dropdown on the left. + ![Images/Boss-Room-Host-Dropdown.png](Images/Boss-Room-Host-Dropdown.png) + +3. A random generated room name will be assigned. + ![Images/Boss-Room-Host-Confirm.png](Images/Boss-Room-Host-Confirm.png) + +4. Share the generated room name with your users, and click confirm! + +5. Done! You are now in the Lobby - also known as the Character Selection Screen. Your friends/users should be able to join now. + +> **Note:** You can see the Room Name in the top-left corner. + ![Images/Boss-Room-Lobby.png](Images/Boss-Room-Lobby.png) + +### Joining a Room + +--- + +If you want to Join a session then: +1. Click the Join Button and select `Relay Host` from the dropdown on the left. + ![Images/Boss-Room-Join-Dropdown.png](Images/Boss-Room-Join-Dropdown.png) +2. You should be asked to input the room name below. + ![Images/Boss-Room-Join.png](Images/Boss-Room-Join.png) + +3. In this example, the room name is: `YQWOWS` + +4. Click Join. Once successfully connected, you should be in the Lobby with the rest of your friends. + ![Images/Boss-Room-Lobby-Extra.png](Images/Boss-Room-Lobby-Extra.png) + diff --git a/README.md b/README.md index dc697aac3..38e53482b 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,10 @@ After the build has completed you can launch several instances of the built exec 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. +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. + +> Checkout our Photon-Realtime setup guide, here: +> [Boss Room Photon Setup Guide](Documentation/Photon-Realtime/Readme.md) 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.