Skip to content

Implement collision handling and enhance GameObject initialization#47

Merged
amasiye merged 1 commit into
mainfrom
develop
Mar 13, 2026
Merged

Implement collision handling and enhance GameObject initialization#47
amasiye merged 1 commit into
mainfrom
develop

Conversation

@amasiye

@amasiye amasiye commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces significant improvements to the engine's scene and rendering systems, focusing on enhanced support for environment collision maps, improved runtime component initialization, and more robust background rendering for game objects. It also includes a new project configuration example and refactors component metadata application for better editor and runtime compatibility.

Scene and Environment System Enhancements:

  • Added support for specifying and loading environmentCollisionMapPath in scene schemas and metadata, allowing scenes to define collision maps alongside tile maps. Scene loading, initialization, and static collision environment setup now handle collision map data similarly to tile maps. (assets/schema/scene.schema.json [1] src/Core/Scenes/AbstractScene.php [2] [3] [4] [5] [6] src/Core/Scenes/SceneManager.php [7]

GameObject Lifecycle and Physics Integration:

  • Improved GameObject lifecycle management: Components (especially physics colliders) are now started and registered with the physics system only when appropriate, both at startup and when added at runtime. Added checks to ensure components are initialized only if the object belongs to the active scene. (src/Core/GameObject.php [1] [2] [3] [4] [5] [6] [7]

Rendering and Background Handling Improvements:

  • Enhanced the Renderer class to capture and restore the background underneath sprites, reducing visual artifacts when sprites move or are erased. This includes tracking the last rendered bounds and background, and composing background segments from the current console buffer and static world tiles. (src/Core/Rendering/Renderer.php [1] [2] [3]

Scene Metadata and Component Configuration:

  • Refactored how scene component metadata is applied, supporting both legacy and current metadata formats, and using reflection to set properties safely. This improves compatibility with editor-authored scenes and supports advanced component configuration. (src/Core/Scenes/SceneManager.php [1] [2] [3] [4]

Project Configuration Example:

Other Improvements:

  • Fixed environment variable loading to respect the working directory, improving project portability. (src/Game.php src/Game.phpL375-R378)

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@amasiye amasiye merged commit c55c001 into main Mar 13, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant