This is an overview tutorial using a more advanced code base that you can run and learn from. Here, we are building a simple third person shooter game that will allow us to go through most of what Photon Bolt can do.


All of the art we are using in this tutorial has either been produced with, provided by or run through the excellent PolyWorld: Woodland Toolkit.

PolyWorld: Woodland Toolkit
PolyWorld: Woodland Toolkit.

Getting Bolt

To download the latest version of Bolt for this tutorial, go to the download page or get it directly from the Unity Asset Store.

Getting The Installation Ready

Create a new unity project and import the package, this will leave you with a directory structure like the image below. Besides that, it will be shown to you the new Welcome window, with links to install the core package, demo projects and plugin extensions (if the window not show up, please go to Windows/Bolt/Welcome menu).

Bolt package content after first import
Bolt package content after first import.

Bolt Welcome window
Bolt Welcome window.

Using the Welcome window, please click to install the Core package and the Samples package. This will setup all dependencies and our advanced demo project in place, that can be found in bolt_samples/AdvancedTutorial folder.

Bolt samples folder
Bolt samples folder.

From here, you can take a look at the contents of this folder:

  • art: with all models and materials used in the demo.
  • audio: sound effects used by the player.
  • prefabs: contains all prefabs of our player, weapon and others.
  • scenes: has the two main scenes for this demo. We will discuss they better later on.
  • scripts: where we put all code used to make the game happen, including Bolt behaviors and other controllers.
  • shaders: simple shaders for visual effects.
  • thirdparty: extra content used by the game.

Running The Game

At this stage, you already have all assets to run the game, now we just need to configure our Bolt installation to get knowledge about these.

Add All Scenes To The Build Settings

  1. Open the Assets/bolt_samples/AdvancedTutorial/scenes folder;
  2. Go to File/Build Settings... menu;
  3. Drag and drop the MainMenu and Level1 scenes, in that order. Be sure that MainMenu has index 0 as shown on the figure below.

Bolt scenes loading
Bolt scenes loading.

Build Bolt Asset Database

  1. Go to Assets/Bolt/Compile Assembly menu;
  2. This step will build the internal structure utilized by Bolt to find, instantiate and maintain the objects in the scenes. You should be able to see into the console the output logs like shown below.

Bolt Compile Assembly console output
Bolt Compile Assembly console output.

Build And Run

  1. Go to File/Build & Run menu then click on Build button, this will build a standalone version of the game.
  2. Select a folder into your computer to put the binary files.
  3. Click Save.
  4. Open the folder were the game was saved and run two instances of the game. You will be presented with the window below.

Bolt Compile Assembly console output
Bolt Compile Assembly console output.

  1. On the first window, select Server, then Level1. This will start our Server player and enter the game, ready to play.
  2. On the second window, select Client, then Connect without changing the Server IP. The client will try to connect to the server and enter the game. Now you can walk around and have some fun.

Playing Bolt demonstration game
Playing Bolt demonstration game.

If you want to hide the console inside the game, just press the Tab key.

Next Chapter >>

 To Document Top