- If you have already set up for Subtle Game, please go to the instructions for running a game.
- If you have not yet set up your environment, please go the instructions for setting up.
-
Run the server & puppeteering client using a pre-prepared script:
- You can do this via a powershell terminal or your favourite IDE:
- Activate your
subtle-game
conda environment. - Navigate to the Server directory.
- Start the game with the dedicated script, e.g.:
python run_game_with_processes.py
- Activate your
- You can do this via a powershell terminal or your favourite IDE:
-
Run the VR client:
- If using the Unity Editor, open Oculus Link or Air Link from inside your Oculus headset, then open Unity and click play to start the game.
- If using the apk, install the apk on your Quest headset and open the Subtle Game app (note that this will be under "Unknown Sources" in the app directory).
IMPORTANT NOTE: both the VR client and python client are hardcoded to connect to a locally-running server called "SubtleGame".
This will cause issues if you are on the same network as another person who is also running the game.
If you want to change the server name, you need to change this in the VR client and the puppeteering client,
and then type modify the --name
field in the server command.
- Open a Windows Powershell terminal or Anaconda Powershell Prompt.
- Ensure that you have git installed.
- Navigate to the local directory where you want the SubtleGame git repo.
- Clone the repo with
git clone paste-repo-URL-here
. - Navigate into the repo with
cd .\SubtleGame\
and run the following commands to update the NanoverUnityPlugin submodule:
git submodule sync
git submodule update --init --recursive --remote
The game is handled by a python script that is referred to as the 'puppeteering client' and can be found here: Client/puppeteering_client.py. To run this script you will first need to follow these instructions:
- Install Conda through whichever program you prefer, e.g., Miniforge.
- Open a Windows Powershell terminal (or whichever terminal you have conda installed in) and run the following commands to create a Conda environment called
subtle-game
& install thenanover-server
package, then activate that environment:conda create -n subtle-game -c irl -c conda-forge nanover-server conda activate subtle-game
- Navigate to the Subtle Game repo directory and install the required packages using pip:
This will install the following packages in your conda environment: Numpy, Random-Username, Knot-Pull, and pytz.
pip install -r .\requirements.txt
- Open the
SubtleGame
directory in your favourite Python IDE, select thesubtle-game
conda environment as your python interpreter and set theSubtleGame
directory to be the root.
- Install and open Unity Hub.
- Click the
Add
button and select the Client/vr-client directory. - If not already installed, you should get a prompt to install the required version of Unity (2022.3.32f1). Install this along with the Android Build Support with OpenJDK and Android SDK & NDK Tools.
- Open the game using this version of Unity and open the
Main
scene, which is found in Client/vr-client/Assets/Scenes.
The game can be played on a Quest 2 or 3 headset using Quest Link or AirLink. You must configure the Oculus PC App settings:
- Install the Oculus PC app for Meta Quest Link.
- Open the app and ensure that OpenXR Runtime is active by going to
Settings
->General
and selectingSet Oculus as active
for the OpenXR Runtime option. If this option is not selected then you will receive the warningunable to start Oculus XR plugin
in the Unity console when you click play. - Enable passthrough by going to
Settings
->Beta
. Toggle the button to enableDeveloper runtime features
and then toggle the option forPass-through over oculus link
. This allows the game to use passthrough, where you can see your physical surroundings through the cameras on the VR headset.
You must also configure the Oculus settings inside the headset to enable hand tracking:
- Navigate to Settings from inside your headset and select
Movement tracking
. - Toggle on the
Hand and body tracking
option and clickEnable
.
- Build the game for Android in the Unity Editor, which will output the game as an apk file.
- Install this apk on your headset, e.g. using Meta Quest Developer Hub or SideQuest.
A NanoVer server is used to run the molecular simulations and stream data between clients. Each instance of a game needs its own server. To run a server, you can use either the command line or the GUI. You will need to load a minimum of four simulations:
- The nanotube + methane:
nanotube-methane.xml
- The 17-alanine polypeptide:
17-alanine.xml
- The sandbox simulation:
sandbox_2_C10_alkanes.xml
- Two buckyball simulations: e.g.,
buckyballs_angle_A_0.3.xml
andbuckyballs_angle_A_1.7.xml
. IMPORTANT NOTE: you can load as many buckyball simulations as you want, but you must have a minimum of two: one with a multiplier of <1 and one with >1.
There is a script for running the server and puppeteering client together, so you do not need to set up the server manually.
You are ready to play! Please head to the instructions for running a game.