Changelog¶
All notable changes to this project will be documented in this file.
1.0.0 (Stable)¶
First stable release. Complete performance overhaul and API stabilization.
🚀 Rendering Performance¶
- TFT DMA Pipelining: Double-buffered pipeline for
TFT_eSPI_Drawer— CPU processes next block while DMA transmits current one. ~43 FPS stable on 240×240 displays @ 40MHz (up from ~14 FPS). - Fast-Path Kernels: OLED 2x bit-expansion LUT (U8G2); TFT row duplication with 32-bit native access and
memcpyfor vertical scaling. - I2C 1MHz: Official support in
DisplayConfigfor sustained 60 FPS on OLED (SSD1306/SH1106).
🎮 Physics (Flat Solver 1.0)¶
- Broadphase: Uniform grid (32px cells) with static shared buffers to reduce DRAM usage.
- KinematicActor: Rewrote
moveAndSlideandmoveAndCollidewith binary search, wall sliding, and accurate collision normal detection. - Stable stacking: Baumgarte correction, iterative position relaxation, fixed timestep 1/60s.
- Godot-style API:
KinematicCollision, actor typesStatic/Kinematic/Rigid. RenamedPHYSICS_RELAXATION_ITERATIONS→VELOCITY_ITERATIONS.
🔢 Math System (Scalar / Fixed-Point)¶
- Numeric abstraction layer:
Scalar=floaton ESP32-S3 (FPU) orFixed16(Q16.16) on C3/S2/C6. Vector2,Rect, and physics unified underScalar. ~30% FPS gain on C3/S2 by eliminating software float emulation.MathUtil:fixed_sqrt,fixed_sin,fixed_cos,toScalar().
🛠️ Other¶
- Memory: Explicit
MALLOC_CAP_DMAsupport in drivers; broadphase buffer reuse across frames. - C++17: Migrated from C++11.
Migration Guide from v0.8.1-dev → v1.0.0 Stable: MIGRATION_v1.0.0
0.8.1-dev¶
- Engine Optimization & Fixes:
- Critical Fix: Resolved a double-buffer send issue in the ESP32 render loop where
drawer->present()was being called redundantly afterrenderer.endFrame(), saving ~23ms per frame. - Performance: Disabled periodic Serial logs (Heartbeat, DMA Profiling) to eliminate stuttering during gameplay.
0.8.0-dev¶
- Display Pipeline Optimization & Scaling:
- TFT_eSPI Driver:
- Implemented Parallel DMA Pipeline: Decoupled SPI transmission from CPU rendering, allowing the next block to be processed while the previous one is sending. This significantly improves FPS.
- 1:1 Fast Path: Added a dedicated, optimized rendering path for scenarios where logical resolution matches physical resolution (or uses only offsets), bypassing scaling LUTs and using 32-bit memory writes for speed.
- Optimized
scaleLine: Rewrote the scaling logic with aggressive loop unrolling (8x) and forced Lookup Tables (LUTs) into internal RAM (MALLOC_CAP_INTERNAL) to eliminate flash latency. - Reduced Latency: Removed artificial
vTaskDelayin the main loop, replacing it withyield(), unlocking potential FPS. - Configurable DMA Buffer: Added
LINES_PER_BLOCKconstant (tuned to 20 lines) to balance RAM usage vs. interrupt overhead.
- U8G2 Driver (OLED):
- Native XBM Support: Refactored the internal buffer to be row-aligned and compatible with XBM format.
- Zero-Copy Rendering: Replaced per-pixel drawing with direct
drawXBMcalls, massively reducing CPU overhead for monochrome displays. - Optimized Scaling: Implemented a fast scaling algorithm that writes directly to a temporary physical buffer in XBM format, enabling single-call updates to the display.
v0.7.0-dev¶
- Unified Platform Configuration & Hardware Decoupling:
- Consolidated global configuration files into
include/platforms/(PlatformCapabilities.h,PlatformDefaults.h,EngineConfig.h). - Implemented bridge headers with
#pragma messagewarnings for backward compatibility. - Added
PlatformDefaults.hto manage target-dependent feature defaults (e.g., DAC support). - Fixed build failures on ESP32-S3 and other modern variants by conditionally compiling the DAC audio backend only for classic ESP32 PR #49.
- Removed hardcoded CPU core IDs, replacing them with
PR32_DEFAULT_AUDIO_COREandPR32_DEFAULT_MAIN_COREmacros for configurable task affinity. - Added explicit feature guards for audio backends (
PIXELROOT32_USE_I2S_AUDIO,PIXELROOT32_NO_DAC_AUDIO) to support modern ESP32 variants (e.g., ESP32-S3). - Graphics Extensibility & Ownership Management:
- Introduced
BaseDrawSurfaceclass with default primitive implementations to simplify custom driver development. - Added
U8G2_Drawerimplementation for monochromatic OLED display support via the U8G2 library. - Added
PIXELROOT32_CUSTOM_DISPLAYmacro and factory methods for safe custom driver initialization. - Implemented
unique_ptrownership transfer forDrawSurfaceinstances betweenDisplayConfig,Renderer, andEngine. - Refactored existing drivers to inherit from
BaseDrawSurfaceand removed deprecated text rendering methods. - Decoupled Multi-Core Audio Architecture:
- Moved audio generation and sequencing to Core 0 (ESP32) and dedicated system threads (Native/PC).
- Implemented sample-accurate timing, replacing frame-based
deltaTimeupdates for perfect music and SFX synchronization. - Introduced
AudioScheduler(Native, ESP32, Default) to own audio state, timing, and sequencing logic. - Added a lock-free Single Producer / Single Consumer (SPSC)
AudioCommandQueuefor thread-safe communication between the game loop and the audio core. - Hardware-Specific Mixer Optimizations:
- Added a non-linear mixer with soft clipping to prevent digital distortion.
- Implemented a high-performance Look-Up Table (LUT) mixer for no-FPU architectures (e.g., ESP32-C3).
- Added automatic hardware detection (via
SOC_CPU_HAS_FPU) to select the optimal mixing strategy.
- ESP32 DAC Backend Improvements:
- Optimized internal DAC driver with a software-based delivery system for maximum stability.
- Added 0.7x output scaling specifically for the PAM8302A amplifier to prevent analog saturation.
- Updated documentation with clear wiring diagrams and hardware limitations.
- Refactored
AudioEngineandMusicPlayerinto "thin clients" that act as command producers. - Removed obsolete
update(deltaTime)methods from audio classes, simplifying the game loop. - Achieved full SDL2 parity with ESP32 multi-core behavior through background thread isolation.
- Documentation & QA:
- Updated technical references in
API_REFERENCE.mdandREADME.mdfor the new directory structure. - Added documentation for custom display drivers and new build flags.
- Verified engine integrity with 260+ test cases across Native and ESP32 environments.
v0.6.0-dev¶
- Independent Resolution Scaling: Introduced logical/physical resolution decoupling to reduce memory usage and improve performance.
- New
DisplayConfigwith separate logical and physical dimensions. - Added
ResolutionPresetshelper andEngineConfig.hfor centralized configuration. - Optimized scaling using LUTs and IRAM-cached functions for ESP32.
- Updated SDL2 and TFT_eSPI drivers to support scaling.
- Updated Scene, UI, and Physics systems to operate on logical resolution.
- Comprehensive documentation added in
README.mdanddocs/RESOLUTION_SCALING.md. - Comprehensive Debug Overlay: Replaced the basic FPS overlay with a new debug display showing FPS, RAM usage, and estimated CPU load.
- Metrics update every 16 frames to minimize performance impact.
- Enabled via the new
PIXELROOT32_ENABLE_DEBUG_OVERLAYflag (supersedesPIXELROOT32_ENABLE_FPS_DISPLAY). - Standardized Display Rotation: Standardized rotation handling and initialization order across all drivers.
- Standardized rotation input (0-3 index or 90-270 degrees) in
TFT_eSPI_DrawerandSDL2_Drawer. - Fixed initialization order in
Rendererto apply rotation before driver init. - Updated
main.cppandmain_native.cppto use newPHYSICAL_DISPLAY_*macros. - Removed obsolete
Config.hdependency frommain.cpp. - ESP32 & Rendering Performance:
- Implemented DMA double buffering for block transfers (10-line blocks) to reduce overhead.
- Added pre-calculated palette LUT to avoid runtime 8bpp to 16bpp conversion.
- Updated SDL2 driver with proper scaling and VSYNC support.
- Fixed Position UI Support: Added support for UI elements that ignore camera scrolling.
- New
setOffsetBypass()andisOffsetBypassEnabled()methods inRenderer. - Added
fixedPositionflag and accessors toUILayoutbase class. UIVerticalLayoutnow bypasses offsets when thefixedPositionflag is enabled.
v0.5.0-dev¶
- Generic Tilemap Support (2bpp & 4bpp): Refactored
TileMapinto a templateTileMapGenericto support different sprite types. Added conditional type aliases (TileMap2bpp,TileMap4bpp) and correspondingdrawTileMapoverloads. Tilemap rendering now automatically uses the Background palette context. API documentation updated to describe the new generic structure and aliases. - Rendering & Scene Performance:
- Replaced
ArduinoQueuewith a fixed array for O(1) entity access and sorting. - Added viewport culling for entities and tilemaps to skip off-screen elements.
- Implemented palette caching in tilemap rendering to avoid repeated color resolution.
- Optimized sprite bit access patterns and added internal sprite drawing methods to reduce code duplication.
- ESP32 Optimizations: Applied
IRAM_ATTRto critical rendering functions (drawPixel,drawSpriteInternal,resolveColor,drawTileMap) so they execute from internal RAM on ESP32, bypassing slower flash access for improved performance. Documentation updated to reflect these optimizations. - Optional FPS Overlay: Introduced build flag
PIXELROOT32_ENABLE_FPS_DISPLAYto enable an on-screen FPS counter in the top-right corner. FPS is calculated by averaging frame times over a defined interval and updates every 8 frames to reduce CPU load. Refined FPS calculation and initialization for more stable readings. - Documentation: Documented how to override
MAX_LAYERSandMAX_ENTITIESdefaults via compiler flags in README.md and docs/API_REFERENCE.md.Scene.hnow provides default definitions only when not already defined, andScene.cppuses theMAX_LAYERSconstant so user overrides are respected.
v0.4.1-dev¶
- Palette Readability & Alignment: Reorganized all predefined palettes (
NES,GB,GBC,PICO8,PR32) to align with theColor.henum sequence. - Descriptive Color Names: Added descriptive color names (e.g., "Black", "White", "Navy") as comments next to each hex value in all palette arrays. This improves code readability and helps developers quickly identify colors when working with these predefined palettes.
v0.4.0-dev¶
- UI CheckBox Support: Introduced the
UICheckBoxelement for toggleable states. - Added new
UICheckBoxclass with checked state management and callback support (onCheckChanged). - Extended
UIElementTypeenum to include theCHECKBOXtype. - Updated all layout containers (
UIGridLayout,UIVerticalLayout,UIHorizontalLayout) to support checkbox elements. - Improved UI Text Precision: Refactored
UILabelandUIButtonto useFontManagerfor pixel-perfect text dimensions. - Replaced manual width calculations with
FontManager::textWidth. - Optimized
UILabelby removing the dirty flag and implementing immediate dimension recalculation insetTextandcenterX. - Added a safety fallback to default calculations when no custom font is loaded.
- Input & Stability: Fixed button
stateChangedreset logic inInputManagerto prevent stale input states from affecting UI interactions. - Documentation: Updated API reference and user manuals to include
UICheckBoxusage and reflect the latest UI behavior.
v0.3.0-dev¶
- Renderer Fix: Fixed 2bpp/4bpp sprite clipping when camera offset is applied. Clipping now uses finalX/finalY with xOffset/yOffset, preventing the player from disappearing past the viewport width.
- Dual Palette Mode: Introduced dual palette mode allowing separate palettes for backgrounds and sprites. Added new methods:
enableDualPaletteMode,setBackgroundPalette,setSpritePalette,setBackgroundCustomPalette,setSpriteCustomPalette,setDualPalette, andsetDualCustomPalette. UpdatedresolveColorto support context-based color resolution for dual palette mode. - Native Bitmap Font System: Implemented a native bitmap font system using 1bpp sprites for consistent text rendering across platforms. Introduced
FontandFontManagerclasses to manage bitmap fonts and their usage. UpdatedRendererto support new text rendering methods, allowing for custom fonts and sizes. Added built-in 5x7 font for immediate use. - UI Layout System: Introduced comprehensive UI layout management system:
UIVerticalLayoutfor automatic vertical organization with scrolling support (NES-style instant scroll and smooth scrolling options).UIHorizontalLayoutwith scrolling support.UIGridLayoutwith navigation and automatic selection management.UIAnchorLayoutfor fixed-position HUD elements with optimized performance (no reflow).UIPaddingContainerandUIPanelfor enhanced UI organization.- Viewport culling and optimized rendering for embedded systems.
- Core UI System: Introduced base UI system with
UIElement,UIButton,UIElementType, focusability, and layout components. - License: Transitioned project license from GPL-3.0 to MIT for broader compatibility and ease of use.
v0.2.0-dev¶
- Documentation Overhaul: Added comprehensive Table of Contents, step-by-step SDL2 installation guide for Windows (MSYS2), and critical PlatformIO installation notes.
- Architecture: Moved
DrawSurfaceimplementation handling to the engine core. This removes the need for manual developer implementation and facilitates the integration of future display drivers. - Driver Support: Clarified driver support status (TFT_eSPI & SDL2) and roadmap.
v0.1.0-dev¶
- Initial Public Preview.
- Core Architecture: Scene, Entity, Actor, and PhysicsActor system.
- Rendering: 1bpp Sprites, MultiSprite (layered colors), and Tilemap support.
- Audio: NES-style sound engine (Pulse, Triangle, Noise channels).
- Physics: AABB Collision detection and basic kinematics.
- Platform Support: ESP32 (SPI/DMA) and PC (SDL2) targets.
- Tools: Added Sprite Compiler python tool.
- Experimental Build Flags:
PIXELROOT32_ENABLE_2BPP_SPRITES: Enables support for 2bpp (4-color) packed sprites.PIXELROOT32_ENABLE_4BPP_SPRITES: Enables support for 4bpp (up to 16-color) packed sprites, intended for high-fidelity UI elements or special effects where more colors per sprite are needed.PIXELROOT32_ENABLE_SCENE_ARENA: Enables dedicated memory arena for scene management.