Unity Chess Full Game Sample#

The Xsolla UnityChessGame full game sample repo contains a 2-player turn-based game, utilizing multiple XBE feature sets.

Components#

Getting Started#

XBE Unity SDK (Package) Installation#

While you may access the Xsolla Backend API directly, the wrapper provides all the bootstrapping for you.

See the guided Unity SDK installation tutorial, complete with screenshots.

ParrelSync Installation#

While not required, downloading ParrelSync will greatly help rapid test iterations: it’s a tool used to test multiplayer functionality locally by creating and opening a clone of your Unity Project.

Once downloaded, it can be installed through the Package Manager (top menu Windows -> Package Manager) in a similar way you installed the SDK:

../../../../../_images/package_manager_selection.png

Select the [+] icon in the top left corner:

../../../../../_images/package_manager_add_package_button.png

Select Add package from disk:

../../../../../_images/package_manager_select_disk.png

Using ParrelSync#

Once installed, a new ParrelSync menu option will appear.

From the menu, select ParrelSync -> Clones Manager -> Create new clone:

../../../../../_images/clone_manger_empty.png

This will begin to clone a copy of your project. Once cloned, it will appear in the Clones Manager pane.

Select Open in New Editor:

../../../../../_images/clone_manager.png

This will open a separate Unity Editor to test multiplayer functionality.

Run Chess#

A unique id is required for local clones, represented by a GUID.

Generate a GUID and enter it into the Device ID field of the Main Menu object of the clone.

The Main Menu Object can be found in the Inspector Pane: Canvas -> MainMenu:

../../../../../_images/main_menu_location.png

Press the Play Button on both the clone and original editors -> then in-game:

Select Play -> Online -> New Game

This will initiate matchmaking. Once a match has been found, one of the players will be prompted with a color selection. Once player color is selected, the match will begin.