Ownersheep
This sample is provided with full source code and demonstrates how Quantum can be used to create a game with a swarm of several hundred simulated entities.
- Built with
Quantum 1.2.4.1 F1
- Requires
Unity 2019.3.3f1
or higher. - Runs on
Windows
Download the newest sample sources here: Ownersheep
Disclaimer: The sample game was developed by Mi'pu'mi Games for Exit Games.
Highlights
- 2 player sheep-herding game
- 3D graphics and 2D game simulation
- Uses Quantum's deterministic math to simulate a swarm of several hundred sheep
Video
Screenshots




How-To Run The Sample
- Open the
quantum_unity
folder with your Unity Editor - Open the
Game
scene - Press play
How-To Run The Sample Online
- Create a Quantum App Id on your Photon Dashboard
- Click
CREATE A NEW APP
- Set
Photon Type
toPhoton Quantum
- Fill out the
name
field and pressCREATE
- Find the new Quantum app and click
MANAGE
- Scroll down and press
CREATE A NEW PLUGIN
- Press
SAVE
- Click
- Copy the Quantum App Id
- Open the "PUN Wizard". It can be found inside Unity via 'Window > Photon Unity Networking > PUN Wizard' (or by pressing Alt+P) and then clicking on "Setup Project" on the window that opens.
- In the "PUN Wizard" window, paste your AppId and click on "Setup Project"
- Open the
Menu
scene - Press play
- In the game UI press
Connect
- Press
Create New Room
and setMax Players
to the 2-4 - Press
Create
and wait until another player connects to the room - Press
Start Game
to run the game with the connected player
Documentation
quantum_code folder
The folder contains the code for the game simulation. The simulation is deterministic, view agnostic and completely independent from the rendering engine.
The sub folder quantum.state contains the state data the simulation will run on. Here you can find asset definitions which are available in Unity to provide the simulation with read-only data used to configure entities in your simulations.
The simulation entities themselves are describe in .qtn files. These description files are parsed by Quantum to generate the per frame data to be consumed by your game systems.
The assets and entites relating to this example can be found in the folder quantum_code/quantum.state/Ownersheep.
The sub folder quantum.systems contains the deterministic simulation logic. Systems in quantum are state less and function on mutable frame data which they receive via their Update method. This mutable frame data contains the entities described in quantum.state.
The systems specific to this sample can be found inside quantum_code/quantum.systems/Ownersheep. With additional system setup, determining the update order, located in quantum_code/quantum.systems/SystemSetup.cs
quantum_unity folder
The folder contains the Unity project, tasked with rendering the game and implementing third-party libraries not related to gameplay or multiplayer. This includes things like:
- Multiplayer room creation and matchmaking, done with Photon Unity Networking.
- Communication with persistence servers, done either integrating PlayerIO or with a local only "backend"
Quantum provides a framework with a basic lobby setup and profiling UI that is used by this example. The framework can be found inside Assets/Quantum and has been slightly modified to accomodate this example. Modifications include key bindings to toggle the profiling UI and default name selection for players and rooms.
Scripts related to this example are located in Assets/Scripts and Assets/Sheep. The scripts located in those folders are relatively simple and handle interaction and display related tasks.
Assets used by this example are located in the folders Assets/Fonts, Assets/Models, Assets/Prefabs, Assets/Resources, Assets/Scenes, Assets/StreamingAssets, Assets/UI and Assets/World.
The remaining folders inside Assets relate to plugins used by this example.
Release History
Apr 4, 2020
- Initial release of Ownersheep
Back to top