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_WIDTHThe width of the display in pixels. Default is240. -
DISPLAY_HEIGHTThe height of the display in pixels. Default is240. -
int xOffsetThe horizontal offset for the display alignment. Default is0. -
int yOffsetThe vertical offset for the display alignment. Default is0. -
PHYSICS_MAX_PAIRSMaximum number of simultaneous collision pairs tracked by the solver. Lower values save static DRAM. Default is128. -
VELOCITY_ITERATIONSNumber of impulse solver passes per frame. Higher values improve stacking stability but increase CPU load. Default is2. -
SPATIAL_GRID_CELL_SIZESize of each cell in the broadphase grid (in pixels). Default is32. -
SPATIAL_GRID_MAX_ENTITIES_PER_CELLMaximum entities stored in a single grid cell. Default is24.