Skip to content

How To Start a Sim

Connor Jakubik edited this page Oct 14, 2024 · 17 revisions
The Fundamentals → How To Start a Sim

Up to date for Platform 0.26.2

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.

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)
  • -raytracing: Run the sim with higher-fidelity raytraced shadows (as opposed to Cascaded Shadowmaps)

Work in progress.

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.

Work in progress.

4) Running a sim through the Python API

  1. sc.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.

Work in progress.