Skip to content

Rename Texture2D to Texture class#44

Merged
amasiye merged 9 commits into
mainfrom
develop
Feb 7, 2026
Merged

Rename Texture2D to Texture class#44
amasiye merged 9 commits into
mainfrom
develop

Conversation

@amasiye

@amasiye amasiye commented Feb 7, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces significant improvements and clarifications to the Sendama engine's scene system, focusing on scene file structure, object instantiation, and better support for UI elements. The most notable changes include the addition of comprehensive documentation for scene files, a migration from Texture2D to a more general Texture class, and enhanced scene hierarchy parsing to support both game objects and UI elements.

Key changes:

Documentation and Authoring

  • Added a detailed guide (docs/Serialization/Scenes.md) explaining the structure, conventions, and lifecycle of Sendama scene files, including examples for game objects, components, sprites, and UI elements.

Texture Handling

  • Replaced all usages of Texture2D with the more general Texture class across core interfaces, implementations, and documentation, simplifying texture management for sprites. [1] [2] [3] [4] [5] [6] [7]

Scene Hierarchy and Object Instantiation

  • Refactored scene hierarchy parsing in SceneManager to:
    • Support both GameObject and UI elements (Label, Text) as top-level scene objects.
    • Correctly instantiate objects based on the type field in scene metadata.
    • Assign properties, including dynamic component property assignment, and handle sprite and text fields as appropriate. [1] [2]

Core Logic and Lifecycle

  • Ensured that cloned game objects are added to the active scene upon instantiation, improving runtime object management.
  • Fixed environment tile map loading to correctly use the specified path from scene metadata.
  • Added a dedicated updatePhysics method to the SceneManager for explicit physics updates.

UI and Scene Presentation

  • Improved logic for positioning and centering UI elements (like menu and title text) in the TitleScene, making UI layout more robust and maintainable. [1] [2] [3]

These changes make scene authoring more declarative and flexible, improve documentation and onboarding, and lay the groundwork for richer UI integration in scenes.

@amasiye amasiye merged commit 264d505 into main Feb 7, 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