Skip to content

Global Configuration

The engine's behavior can be customized using platforms/PlatformDefaults.h and platforms/EngineConfig.h, or via compile-time build flags. This allows for fine-tuning performance and hardware support without modifying the core engine code.

Platform Macros (Build Flags)

Macro Description Default (ESP32)
PR32_DEFAULT_AUDIO_CORE CPU core assigned to audio tasks. 0
PR32_DEFAULT_MAIN_CORE CPU core assigned to the main game loop. 1
PIXELROOT32_NO_DAC_AUDIO Disable Internal DAC support on classic ESP32. Enabled
PIXELROOT32_NO_I2S_AUDIO Disable I2S audio support. Enabled
PIXELROOT32_USE_U8G2_DRIVER Enable U8G2 display driver support for monochromatic OLEDs. Disabled
PIXELROOT32_NO_TFT_ESPI Disable default TFT_eSPI driver support. Enabled

Constants

  • DISPLAY_WIDTH The width of the display in pixels. Default is 240.

  • DISPLAY_HEIGHT The height of the display in pixels. Default is 240.

  • int xOffset The horizontal offset for the display alignment. Default is 0.

  • int yOffset The vertical offset for the display alignment. Default is 0.

  • PHYSICS_MAX_PAIRS Maximum number of simultaneous collision pairs tracked by the solver. Lower values save static DRAM. Default is 128.

  • VELOCITY_ITERATIONS Number of impulse solver passes per frame. Higher values improve stacking stability but increase CPU load. Default is 2.

  • SPATIAL_GRID_CELL_SIZE Size of each cell in the broadphase grid (in pixels). Default is 32.

  • SPATIAL_GRID_MAX_ENTITIES_PER_CELL Maximum entities stored in a single grid cell. Default is 24.