Skip to content

How To Start a Sim

Connor Jakubik edited this page May 23, 2025 · 25 revisions
The Fundamentals → How To Start a Sim

Up to date for Platform 0.28.0

Written by Connor Jakubik


This guide will take you through the ways that you can start a Space Teams sim. Space Teams has many varied usage methods which vary in the amount of navigating menus or scripting command line arguments required.

1) In the Unreal UI (SpaceCRAFT/SpaceCRAFT.exe)

This is the typical way users will be interacting with the application when not doing automated sim-running of some sort.

a) Starting a Demo

  1. Demos page from the main menu
  2. Select a demo
  3. Start Demo

b) Starting from a custom sim config

  1. Sim page from the main menu
  2. Singleuser option on the top
  3. Select a sim config
  4. Confirm

c) Sim Config Editor

  1. Design page from the main menu
  2. Sim Config Editor option
  3. Start Tool

d) Creating a Multiuser Sim

Multiuser sims are currently inoperative due to work in progress changes to our backend servers

Differences for VR

Open the SpaceCRAFT app through SpaceCRAFT_VR.bat. From there, you are presented with the normal flat screen UI. Interact with this by pointing with your VR controller and clicking with the trigger.

You may want to log in once in flat-screen mode before starting in VR mode, in order to do the web browser login and have your credentials save.

2) Command line scripted start of Unreal UI

This skips the menus and starts the Unreal app directly into a simulation, with some options.

  1. From the /SpaceCRAFT directory
  2. SpaceCRAFT.exe --sim=packages/path/to/your/sim.json
    1. The directory can also start with Core/packages/...... to correspond to the Compute_Server/packages folder in the STPro install directory, or Local/...... to correspond to the AppData/Local/SimDynamX/STPro/Assets folder.

Optional arguments include:

  • -vr: Start in VR mode (can also be done by itself to open the menu in VR)
  • (temporarily removed in v0.25.0+) -raytracing: Run the sim with higher-fidelity raytraced shadows
  • -firstRole bypasses Role Picker, choosing the first option in the role selection.
  • -quitOnStop closes the application upon sim stopping externally, instead of presenting a pop-up message.

3) Starting the Compute_Server by itself

  1. From the /Compute_Server directory
  2. run_Server.exe --sim=packages/path/to/your/sim.json
    1. The directory can also start with Core/packages/...... to correspond to the Compute_Server/packages folder in the STPro install directory, or Local/...... to correspond to the AppData/Local/SimDynamX/STPro/Assets folder.
  3. OR (v0.20.0+) run_Server.exe -i for Interactive Mode, then follow instructions to find the sim config you want to start

Optional arguments include:

  • -noCatchSystemExceptions: Instead of wrapping C++ System load(), init(), update(), etc functions in try/catch blocks that will route exceptions to the logger, this option will leave the exceptions unhandled. If your debugger is attached to the run_Server process, you will be able to break-and-debug on the unhandled exceptions.
  • -det: Run your sim using Deterministic fast-as-possible scheduling. This means your sim, which would normally run on several async threads, will run with a deterministic order and timing of events on a single thread, as fast as possible while still hitting all of the update functions. Typically, no code changes are required. Python Systems (and other clients like the SpaceCRAFT UE client) are still on separate processes and may have nondeterministic effects on the sim; we don't yet have some sort of lock-step synchronization functionality.
  • -fpexcept: (v0.33.0+) Turn on Floating Point Exceptions. At the cost of some performance, all floating point calculations will be checked for bad behavior such as divide-by-zero and any operations involving NaN numbers. These exceptions show up like normal C++ exceptions.

Work in progress.

4) Running a sim through the Python API

  • Must be running python through the Space Teams python venv for the ST version you're using.
    • Can use Compute_Server/sc_python.bat to take care of this for you.
  • Use import spaceteams as st for importing the spaceteams python API
    • The spaceteams python module is only installed in that venv, and it installs per-version when you run FirstTimeSetup.bat.
  • Working directory must be /Compute_Server in the install directory.
  1. st.standalone_sim("packages/path/to/your/sim.json")
    1. The directory can also start with Core/packages/...... to correspond to the Compute_Server/packages folder in the STPro install directory, or Local/...... to correspond to the AppData/Local/SimDynamX/STPro/Assets folder.
  2. Use st.stop_sim() to end this sim, before starting another sim.
    1. (UNTESTED) Alternatively, you can wait for st.GetSimState() to return st.SimState.Stopping to wait for the sim to stop for another reason, then do st.stop_sim() to clean up the running sim.

Clone this wiki locally