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.
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).
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.
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
- Open the Assets/bolt_samples/AdvancedTutorial/scenes folder;
- Go to File/Build Settings... menu;
- Drag and drop the MainMenu and Level1 scenes, in that order. Be sure that MainMenu has index 0 as shown on the figure below.
Build Bolt Asset Database
- Go to Assets/Bolt/Compile Assembly menu;
- 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.
Build And Run
- Go to File/Build & Run menu then click on Build button, this will build a standalone version of the game.
- Select a folder into your computer to put the binary files.
- Click Save.
- Open the folder were the game was saved and run two instances of the game. You will be presented with the window below.
- On the first window, select Server, then Level1. This will start our Server player and enter the game, ready to play.
- 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.
If you want to hide the console inside the game, just press the Tab key.