This document is about: QUANTUM 1
SWITCH TO

Sample

Download and explore this sample project if you want to first analyze how Bot SDK works before deciding if it will be used on your own projects.

Download the Little Guys Sample v1.0.1F1 here.

Little Guys Sample
One character is controlled by a HFSM and the other is controlled by a GOAP. Their objective is to place jewels into the box

The sample contains:

  • A set of Decisions, Actions and two sample AI (a HFSM and a GOAP);
  • Quantum code that you can use to better understand how to use the Bot SDK;

The quantum solution also comes with some samples on how to handle:

  • Player Replacement: how to replace a player by a Bot if the player got disconnected during the gameplay;
  • Filling Room: how to fill the room with Bots if there are not enough players to connected to the match;
  • Bot Entities: creating entities which are not related to Players at all.

All of these configurable using the RuntimeConfig.User.cs file.

Once you have downloaded the sample, these are the most important parts that you should take a look at:

  • When running the demo from the Game scene, select the QuantumRunner game object and define how many/which HFSMs, GOAPs and Players entities will be created for the offline test;
  • When running it from the Menu scene, go to the UIRoom.CheckForGameStart() method to define by code what are the HFSM/GOAP Bots (not related to players at all), and fill some booleans, such as the ReplaceOnDisconnect to inform if players should be replaced by Bots if they get disconnected, the FillRoom boolean to inform if the room should be populated with Bots if the game doesn't have enough players, and the FillRoomCooldown FP in order to define how many seconds it takes for the room to be filled by the bots;
  • On Quantum solution:
    • At quantum_code\quantum.state\LittleGuysSample you will find a sample .qtn and two files with Decisions and Actions samples;
    • At quantum_code\quantum.systems\LittleGuysSample you will find a system that deals with both HFSM and GOAP code, and the LittleGuysSystem which handles players connectivity/filling the room/replacement by Bots and so on.
  • On Unity
    • At Assets\BotDocuments you will find the HFSM and GOAP files used on the Visual Editor;
    • At Assets\Resources\DB\CircuitExport you will find the HFSM, GOAP and Blackboard files for the deterministic AI generated from the compile process;
    • At Assets\Quantum\Lobby\UIRoom.cs you will find the place where the RuntimeConfig fields should be defined before starting the online match.

The sample HFSM provided:

Sample HFSM

The sample GOAP provided:

Sample GOAP
Back to top