Skip to content

Beamball Sample

beamable-release.gif

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

Introduction

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

  • BEAMPROJ_Beamball Unreal Plugin.: Contains the UE implementation for the sample's client. The core code is inside LiveOpsDemoMainMenu.h and part of the implementation is done through BPs inside the folder UI_BPs folder of the BEAMPROJ_Beamball project.
  • 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. Let's Setup the Content
    1. First you will need to run the command dotnet beam content replace-local --from DE_1885450253346843 --to YOUR_REALM_ID to bring all the content from the sample to your current realm.
    2. Open the Content window.
    3. Ensure there's an game_types content with the name default
    4. Ensure there's an currency content with the name coins
    5. Ensure there are 4 itemskin content with the names skin1, skin2, skin3, skin4
    6. Ensure there's an leaderboard content with the name global
    7. Ensure there are 3 listings content with the names skin1, skin2, skin3
    8. Click Publish to publish those new contents to the realm.
    9. You can read more about the content system Here

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's 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 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's 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 Fake 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