Skip to main content
All CollectionsGeneral questions
Unity example -- bombers
Unity example -- bombers

explore bombers

Jason Liang avatar
Written by Jason Liang
Updated over 2 weeks ago

brainCloud Bombers RTT is a real-time multiplayer battles game example, written in Unity, the example demonstrates various features of brainCloud, including:

  • RTT global chat

  • Creating lobby matchmaking

  • Custom room server via relay server

  • Other general brainCloud gamification and leaderboards features

To get this game run in your local environment, you need to follow the steps shown below.

  • Download the latest version of the Bombers example from brainCloud public GitHub repositories here.

  • Open the downloaded example project via Unity editor. You may be asked to update several packages, such as brainCloud Bombers for Photon, just ignore it (we will not use Photon for real-time multiplayer server any more, we will use brainCloud Relay server instead)

  • Click Settings from the brainCloud dropdown menu and log into your brainCloud account. Once logged in, select your team from the team dropdown and choose --Create New App-- from the apps dropdown list, check the Create with template? checkbox and select Bombers-RTT from the template list, fill in a name for the new app, then click the Create App button. All the app config data of Bombers-RTT will be copied over from the selected template to your new app.

  • Log into your brainCloud account via brainCloud portal and check the newly created app there, you should be able to find some scripts, gamification configurations, user stats and lobbies configurations, etc.

  • If you want to play the custom real-time multiplayer feature, you will need to upgrade this test app to development plus plan at least, in order to spin up a relay server via brainCloud.

  • After your app is upgraded, go back to Unity editor, find and click the splashState scene under Assets, then click gameplay to start playing Bombers.

  • Note that the app has initialized and logged into brainCloud with an anonymous user, once you enter a username and password from the above pic and click the login button, the universal identity will be attached to the previously anonymous identity, and RTT is enabled and a global channel is connected. Check the script ConnectionSubState.cs for detail.

  • Click Custom Game if you want to set up a lobby for friends to join. Check the script MainMenuState.cs for detail.

  • Once players join the lobby, you can click Start Game to start playing. Check the script LobbySubState.cs for detail.

Did this answer your question?