Skip to content

Beamball sample

beamable-release.gif

This demo showcases how you can use the Beamable Unreal SDK in a full game project. Particularly it focuses on the Store, Leaderboard, Stats and Matchmaking services.

Introduction

Aside from the BeamableCore Plugin, here's what the sample contains:

  • BEAMPROJ_Beamball Unreal Plugin.: Contains the UE implementation for the sample client. Key locations in the project are:
    • Plugins/BEAMPROJ_Beamball/Source/BEAMPROJ_Beamball/Public: Public headers for gameplay/runtime systems.
    • Plugins/BEAMPROJ_Beamball/Source/BEAMPROJ_Beamball/Private: C++ implementations for gameplay/runtime systems.
    • Plugins/BEAMPROJ_Beamball/Source/BEAMPROJ_Beamball/Public/PlatformIntegrations and Private/PlatformIntegrations: Platform-specific integrations (Edgegap, EOS, Steam).
    • Plugins/BEAMPROJ_Beamball/Source/BEAMPROJ_BeamballBlueprintNodes: Blueprint node module (Public headers and Private implementations).
    • Plugins/BEAMPROJ_Beamball/Content/UI_BPs: Blueprint assets used by the sample UI flow.
  • Microservice/BeamballMs Microservice: Microservice containing code that's used by the sample for various matchmaking and stats stuff.

To set up this sample you'll need a a Beamable Account and a Realm. To configure the repo for the sample run dotnet beam unreal select-sample BEAMPROJ_Beamball.

Setting up the project

To set up an organization and realm to run this sample, follow the steps below.

  1. Go to the Beamable Portal and create a new Beamable realm called Beamball
  2. Compile and open the BeamableUnreal editor project.
  3. Sign into your Beamable account and go to the Beamball realm.
    1. Optionally you can hit Apply to Build after the realm change is done.
  4. Set up the content using snapshots.
    1. Open Beamable -> Content -> Snapshots.
    2. Select the Beamball snapshot.
    3. Click Apply Snapshot.
    4. Publish the applied snapshot content to your realm.

Applying the Beamball snapshot

Running the sample in editor

Leveraging the new Beamable PIE Settings, you can run the sample in editor through two entry points: The Main Menu or the Gameplay scene.

Running from the main menu

  1. Open the Unreal editor.
  2. Open the L_Beamball_MainScreen Level if it is not opened yet.
    1. You can find it inside the BEAMPROJ_Beamball Content folder.
    2. If you can't see plugin content in your content browser, you can change the settings of the UE Content Browser to display it.
  3. Go to the Beamable -> Microservice window.
    1. You should see the BeamballMS service there. Select it.
    2. Click Run and wait until you see the Service ready for traffic log line (and the running icon in the Microservice's card to change).
    3. After you're done with the sample, don't forget to come here and stop the service.
  4. You don't need to select any Play Preset, as the Beamball_MainScreen level is the common entry point for the sample. So leave the Play Preset selector to None.
  5. Play the L_Beamball_MainScreen in the Editor.

Running from the gameplay scene

  1. Open the Unreal editor.
  2. Open the L_Beamball_Gameplay Level if it is not opened yet.
    1. You can find it inside the BEAMPROJ_Beamball Content folder.
    2. If you can't see plugin content in your content browser, you can change the settings of the UE Content Browser to display it.
  3. Go to the Beamable -> PIE Settings -> Player Manager window.
  4. Create two players, one with the name Player1 and another with the name Player2.
  5. Go to the Beamable -> PIE Settings -> Play Presets window.
  6. Create a new Play Preset with the following settings:
    1. Name: Beamball Gameplay
    2. Available Maps: Add L_Beamball_Gameplay to the list.
    3. Enable PIE Lobby: Enabled
    4. Game Type: game_types.default
    5. Add both Player1 and Player2 to the preset.
  7. Select the Beamball Gameplay Play Preset in the main toolbar.
  8. Select Play as Client in the Net Mode settings and set the Number of players to 2.
  9. Play the L_Beamball_Gameplay in the Editor.

Can I use it as a template?

This sample is not meant to be used as a template directly, however, its components are free for you to copy and use in your own project. Here's what these are:

  • The BeamballMS Microservice : located inside Microservice/BeamballMS
  • Beamable code and blueprints inside BEAMPROJ_Beamball plugin