Shared base classes and context for Scene layers [v26.08.00].
Overview
This module defines the common SceneLayer contract and SceneLayerContext used by every Scene layer. Scene owns the frame order; each concrete layer supplies its own update and rendering behavior.
Class Hierarchy
-
SceneLayer (Base): Abstract base class providing common properties and virtual hooks for custom logic:
-
Position, Velocity, and Parallax factors.
-
Visibility and Alpha modulation.
-
Feature flags (Render, Update, Loop, SmoothScroll).
-
Event callbacks.
-
Unified SceneLayerContext for synchronized update and render logic.
-
SceneLayerTile: Manages a 2D array of tile indices.
-
Handles tileset mapping and cell rendering.
-
Optimized for large static grids.
-
SceneLayerObject: Implements the HEGA system.
-
SpatialGrid: A sparse hash-map for O(1) average spatial lookups.
-
SceneObject: Represents game entities with position, bounds (AABB), and optional visual representation (Tile/Shape).
-
Supports efficient region queries and dynamic object management.
-
SceneLayerImage: Manages a single large image.
-
Efficiently handles repeating textures for infinite backgrounds.
-
Supports internal optimization for display hardware.