Skip to content

Engine configuration

MCUmbrella edited this page Nov 27, 2023 · 1 revision

Configuration file overview

{
  "engine": {
    "engineDataPath": "the_engine",
    "userDataPath": "(user project folder name)",
    "targetTps": 60,
    "enableProfiler": false
  },
  "renderManager": {
    "softwareRender": false,
    "accelerated": true,
    "vsync": true
  }
}

When the engine initializes, it reads the configuration from "the_engine_config.json" in the same directory as it. You can make the engine not read the configuration from the default location by appending a parameter to another file after the executable command like:

  • ./TheEngine myConfig.json
  • ./TheEngine /home/user/cfg.json

NOTE: Replace "(user project folder name)" in "userDataPath" with the actual name of your project folder!

Engine configuration

The "engine" section in the file contains:

  • "engineDataPath": The path to the engine data folder. Default value: "the_engine".
  • "userDataPath": The path to the user project folder. Must be present.
  • "targetTps": The target ticks per second (TPS) for the engine. Default is 60.
  • "enableProfiler": Enables or disables the profiler. When set to true, the average execution time of all ticks in the last second is printed to the standard output every second. Default value: false.

Render manager configuration

The "renderManager" section in the file contains:

  • "softwareRender": Determines whether software rendering is enabled. Default value: false.
  • "accelerated": Enables or disables hardware acceleration for rendering. Default value: true.
  • "vsync": Enables or disables vertical synchronization (V-Sync) for rendering. Default value: true.