All notable changes to the Pyramid Game Engine will be documented in this file.
- Scene Management Core Architecture - Production-ready scene management system
- SceneManager Class: Comprehensive scene lifecycle management and organization
- Scene creation, loading, and switching capabilities
- Active scene management with automatic resource cleanup
- Event system with callback-based scene notifications
- Performance monitoring with real-time statistics
- Octree Spatial Partitioning: Hierarchical spatial optimization system
- Configurable depth (default 8 levels) and objects per node
- O(log n) object insertion and query complexity
- Automatic subdivision and node management
- Memory-efficient smart pointer-based resource management
- Advanced Spatial Query System: Multiple query types for game logic
- Point queries: Find objects at specific locations
- Sphere queries: Radius-based object discovery (explosions, AI awareness)
- Box queries: Rectangular region object detection (triggers, areas)
- Ray queries: Line-based intersection testing (line of sight, projectiles)
- Frustum queries: Camera-based visibility culling for rendering
- AABB Implementation: Axis-aligned bounding box system
- Complete intersection testing (point, sphere, ray, AABB)
- Expansion operations for dynamic bounds
- Volume and geometric utility calculations
- Performance Monitoring: Real-time statistics and profiling
- Query execution time tracking
- Object count and visibility statistics
- Octree node count and depth monitoring
- Memory usage tracking and optimization hints
- Integration Features: Seamless integration with existing systems
- Camera system integration for frustum culling
- Scene class compatibility and extension
- Smart pointer-based memory management with RAII
- Thread-safe design considerations
- Utility Functions: Helper classes and factory methods
- SceneUtils namespace with factory functions
- SpatialUtils namespace with geometric operations
- Scene validation and optimization utilities
- Test scene generation for development
- SceneManager Class: Comprehensive scene lifecycle management and organization
- Namespace:
Pyramid::SceneManagementto avoid conflicts with existing Scene class - Files Added:
Engine/Graphics/include/Pyramid/Graphics/Scene/SceneManager.hppEngine/Graphics/include/Pyramid/Graphics/Scene/Octree.hppEngine/Graphics/source/Scene/SceneManager.cppEngine/Graphics/source/Scene/Octree.cpp
- Performance: 10-100x speedup for spatial queries in large scenes (O(log n) vs O(n))
- Memory: ~64 bytes per octree node, ~100KB for 1000 objects
- Build Integration: Full CMake integration with Graphics module
- API Documentation: Complete API reference with usage examples
- Architecture Documentation: Updated with Scene Management system details
- Usage Examples: Comprehensive examples for game development scenarios
- Performance Guidelines: Optimization recommendations and best practices
- Complete Custom Image Processing Library - Zero external dependencies
- TGA Support: Full implementation for uncompressed RGB/RGBA formats
- Proper orientation handling (top-left vs bottom-left)
- BGR to RGB conversion
- Alpha channel support
- BMP Support: Windows Bitmap format implementation
- Row padding handling
- BGR to RGB conversion
- Multiple bit depths (24/32-bit)
- PNG Support: Complete PNG implementation with custom DEFLATE decompression
- All PNG filter types: None, Sub, Up, Average, Paeth
- Multiple color types: RGB, RGBA, Grayscale, Indexed
- Custom DEFLATE implementation (RFC 1951 compliant)
- Custom ZLIB wrapper with Adler-32 checksums
- Custom Huffman decoder for dynamic and fixed trees
- Comprehensive chunk parsing and validation
- JPEG Support: Complete baseline DCT implementation
- JPEG marker parsing (SOI, SOF0, DQT, DHT, SOS, EOI, APP0)
- Custom Huffman decoder for DC/AC coefficients
- DC prediction with component-specific predictors
- Dequantization with quantization table support
- Inverse DCT (IDCT) implementation with proper mathematical precision
- YCbCr to RGB color space conversion (both fast and high-quality modes)
- Support for grayscale, interleaved, and planar formats
- Production Ready Features:
- Comprehensive error handling and validation
- Extensive test coverage for all components
- Memory management with proper cleanup
- Performance optimizations
- Real-world integration with BasicGame example
- TGA Support: Full implementation for uncompressed RGB/RGBA formats
- BasicGame Example: Updated to showcase multi-format image loading
- Texture cycling between TGA, BMP, PNG, and JPEG formats
- Real-time demonstration of image loader capabilities
- Automatic format detection and loading
- 15+ Custom Components: Built from scratch without external dependencies
- 5000+ Lines of Code: High-quality, well-tested image processing code
- Zero Dependencies: Completely self-contained implementation
- RFC Compliance: DEFLATE implementation follows RFC 1951 specification
- Mathematical Precision: IDCT implementation with proper DCT mathematics
- Enhanced Logging System - Complete rewrite and migration from Core to Utils module
- Thread-safe logging with mutex protection and deadlock prevention
- Multiple log levels: Trace, Debug, Info, Warn, Error, Critical
- File output with automatic rotation and configurable size limits (default 10MB, 5 files)
- Configurable console and file logging levels (runtime adjustable)
- Source location tracking with file, function, and line number information
- Structured logging support with key-value pairs for analytics
- Multiple logging interfaces:
- C-style variadic logging:
PYRAMID_LOG_INFO("Message: ", value) - Stream-style logging:
PYRAMID_INFO_STREAM() << "Message: " << value - Structured logging:
PYRAMID_LOG_STRUCTURED(level, message, fields)
- C-style variadic logging:
- Enhanced assertion macros with automatic logging integration
- Performance optimizations with early exit filtering and local buffers
- Configurable timestamp formats with millisecond precision
- Color-coded console output for different log levels
- Debug-only logging macros for development builds
- BREAKING: Logging system moved from
Engine/Core/toEngine/Utils/- Old include:
#include <Pyramid/Core/Log.hpp>(no longer exists) - New include:
#include <Pyramid/Util/Log.hpp> - All logging functionality now in
Pyramid::Utilnamespace
- Old include:
- All engine components updated to use new Utils-based logging system
- Logging macros maintain same interface but now provide enhanced functionality
- BasicGame example updated to demonstrate new logging configuration options
- Old Core-based logging system completely removed
- Backward compatibility layer removed after successful migration
- Legacy
Pyramid::Lognamespace no longer available
- Thread safety issues in logging system resolved
- Deadlock prevention in multi-threaded logging scenarios
- Race conditions in log level checking eliminated
- Memory management improved with local buffer usage
For users upgrading from previous versions:
- Update include statements:
#include <Pyramid/Core/Log.hpp>→#include <Pyramid/Util/Log.hpp> - Existing logging calls continue to work without changes
- Optionally configure enhanced features:
Pyramid::Util::LoggerConfig config; config.enableFile = true; config.logFilePath = "your_game.log"; PYRAMID_CONFIGURE_LOGGER(config);
- Consider using new structured logging for analytics and debugging
IGraphicsDevice::CreateShader()method andOpenGLDeviceimplementation for shader program creation.BufferLayoutsystem (BufferLayout.hpp,BufferElement,ShaderDataType) for defining vertex attribute layouts.IVertexArray::AddVertexBuffernow accepts aBufferLayoutto configure vertex attributes.- Protected
Game::GetGraphicsDevice()accessor for derived game classes. - Implemented uniform setting methods (
SetUniformInt,SetUniformFloat*,SetUniformMat*) inIShaderandOpenGLShader. OpenGLShadernow caches uniform locations.- Added basic Texture System:
ITexture,ITexture2Dinterfaces (Texture.hpp).OpenGLTexture2Dimplementation usingstb_imagefor loading (OpenGLTexture.hpp,OpenGLTexture.cpp).TextureSpecificationstruct and related enums.- Static
ITexture2D::Createfactory methods (Texture.cpp). IGraphicsDevice::CreateTexture2Dmethods added and implemented for OpenGL.
- Added basic Logging system (
Log.hppwithPYRAMID_LOG_*macros). - Added basic Assertion system (
Log.hppwithPYRAMID_ASSERT/PYRAMID_CORE_ASSERTmacros). BasicGameexample updated to load and render a textured triangle, modulated by the dynamic uniform tint.
- Integrated logging macros into
Game.cpp,OpenGLShader.cpp,OpenGLTexture.cpp,BasicGame.cpp. - Integrated assertion macros into
Game.cpp. - Refactored
OpenGLDeviceto accept aWindow*dependency via constructor, decoupling it from directWin32OpenGLWindowinstantiation. Gameclass now owns theWindowinstance (std::unique_ptr<Window> m_window).Gameconstructor now creates theWindowand passes it toIGraphicsDevice::Create.OpenGLVertexArray.cppupdated to useBufferLayoutforglVertexAttribPointersetup.
Game::run()loop now correctly processes window messages (m_window->ProcessMessages()), resolving issues with window not appearing or becoming unresponsive.Game::onCreate()now explicitly initializes the graphics device (m_graphicsDevice->Initialize()) and checks for success before starting the game loop.Win32OpenGLWindow::Initializenow correctly uses the providedtitleparameter instead of a hardcoded one.- Removed unnecessary
#include <windows.h>fromEngine/Core/source/Game.cpp. - Made graphics device creation in
Game::Game()constructor consistently use theIGraphicsDevice::Create()factory.
- Vertex Array Objects (VAO) support
- Index buffer support
- Updated BasicGame example to use VAOs
- Vertex attribute management
- DrawIndexed and SetViewport methods
- Refactored rendering pipeline to use VAOs
- Enhanced OpenGL buffer management
- Updated example to demonstrate vertex arrays and indexed drawing
- Fixed window creation and OpenGL initialization issues
- Added proper window message processing in the game loop
- Fixed window title encoding for Unicode support
- Added GLAD initialization in OpenGLDevice
- Enabled depth testing by default
- Fixed window closing behavior
- Moved graphics device initialization to Game constructor
- Improved window message handling in Win32OpenGLWindow
- Updated BasicGame example to use base class functionality
- Initial project setup
- Core engine architecture
- Graphics abstraction layer
- Window management system
- Basic game loop
- OpenGL 3.3+ support
- GLAD integration
- CMake build system
- Basic game example
- Documentation
- Reorganized project structure into modular components:
- Core: Core engine functionality
- Graphics: Graphics abstraction layer
- Platform: Platform-specific code
- Math: Math library
- Utils: Utility functions
- Renderer: Rendering system
- Input: Input handling
- Scene: Scene management
- Audio: Audio system
- Physics: Physics system
- Renamed OglGame to Game for better abstraction
- Renamed OglWindow to Window for better abstraction
- Updated documentation to reflect new structure
- Direct OpenGL dependencies from public headers
- Platform-specific code from core components
- Major reorganization of engine structure:
- Moved all core functionality to
Engine/directory - Separated graphics, platform, and core components
- Created proper module hierarchy
- Improved code organization and maintainability
- Moved all core functionality to
- Renamed files for better clarity and consistency:
- OglGame -> Game
- OglWindow -> Window
- Added proper namespacing under Pyramid::
- Enhanced graphics abstraction:
- Improved shader system
- Better vertex buffer management
- Cleaner graphics device interface
- New directory structure:
- Engine/Core: Core engine functionality
- Engine/Graphics: Graphics abstraction layer
- Engine/Platform: Platform-specific code
- Examples/BasicGame: Example game implementation
- vendor/glad: OpenGL loader
- Comprehensive documentation for new structure
- Better separation of concerns between modules
- Old OpenGL3D directory structure
- Redundant graphics engine implementation
- Deprecated file naming conventions
- Proper window message processing
- Window state management (minimize, maximize, close)
- OpenGL context management improvements
- Window closing immediately after opening
- OpenGL context initialization issues
- Window procedure message handling
- Memory leaks in OpenGL context management
- Proper vsync support
- Unicode support for window creation
- Fixed window management system
- Better error handling in graphics initialization
- Unicode string handling in window creation
- Proper cleanup of OpenGL resources
- Vsync implementation
- Window class registration
- Basic geometry rendering support
- Vertex buffer abstraction
- Shader system abstraction
- Test rectangle rendering with colored vertices
- Improved file organization for graphics components
- Reorganized graphics-related files into more logical structure
- Enhanced OpenGL device implementation with proper resource management
- Improved version detection for OpenGL
- Graphics API abstraction layer (IGraphicsDevice interface)
- OpenGL implementation of graphics device
- Support for multiple OpenGL versions (3.3 to 4.6)
- Core engine types and platform detection in Prerequisites.h
- Graphics API selection in game initialization
- Refactored OglGame to use new graphics abstraction
- Improved error handling and initialization
- Better organization of graphics-related code
- Updated window management to work with graphics abstraction
- Framework for future DirectX 9/10/11/12 support
- Version detection and fallback system
- Graphics API feature management
- Comprehensive Doxygen-style documentation for all major classes
- New
docs/directory with detailed documentation:- Architecture.md: Engine architecture documentation
- GettingStarted.md: User guide and tutorials
- Better code comments and explanations
- Window title changed to "Pyramid Game Engine"
- Window class name updated to "PyramidGameEngine"
- Improved code formatting and style
- Enhanced error handling documentation
- Float truncation warnings in OglGame
- Unused variable warning in Win32OpenGLWindow
- Code style consistency
- Source file grouping for better IDE organization
- Proper folder organization in Visual Studio
- More comprehensive .gitignore rules
- Improved CMake configuration
- Better organization of source and header files in CMake
- Enhanced build type configuration
- Optimized installation rules using GNUInstallDirs
- Cleaned up project structure
- Unused CMake utility files
- Redundant CMake configurations
- Comprehensive README.md with build instructions and project information
- Detailed project structure documentation
- Build verification and testing
- Unicode string handling in Windows API calls
- Window creation and management in Win32 implementation
- Build system configuration for proper library linking
- Improved code documentation and comments
- Enhanced error handling in window creation
- Proper OpenGL and Windows system library linking
- Dependencies management through CMake/Dependencies.cmake
- Installation rules for headers and binaries
- Multi-processor compilation support for MSVC
- Better source organization in IDEs using source_group
- Support for both Debug and Release configurations
- Updated to modern CMake practices with better target management
- Improved Windows API integration with proper Unicode support
- Better organized output directories for binaries and libraries
- Enhanced compiler options and warning levels
- Separated OpenGL3D and Game components into distinct targets
- Unicode/ANSI string conversion issues in Windows API calls
- OpenGL context creation and management
- CMake configuration issues with library linking
- Window creation in Win32 implementation
- Initial project structure
- Basic CMake build system
- Comprehensive .gitignore file
- OpenGL3D library foundation
- Basic window management system
- Game executable target
- Modernized C++ standard to C++17
- Improved project organization
- Better handling of platform-specific settings
- Initial build system configuration
- Project structure organization
- Basic dependency management