Skip to content

Conversation

@isayOmnaya
Copy link

I really love the direction this project is heading and wanted to contribute!

Main changes in this PR:

  • Separated UI logic Extracted all UI-related responsibilities (coin counter updates, level complete panel display, etc.) from GameManager into a dedicated GameUI (or LevelUI) component. → This follows the Single Responsibility Principle more closely, simplifies GameManager, and makes UI changes much easier and safer.

  • Introduced object pooling for pickups Added a simple Destructible component that pickups now use. Instead of calling Destroy(gameObject), we return objects to an object pool for reuse. → Reduces garbage collection pressure, improves performance (especially with many coins/gems), and sets up a foundation for better object management later.

  • Other small clean-ups & improvements

    • Better naming & null checks in several places
    • Minor refactoring for readability and consistency
    • Adjusted pickup destruction logic to work with the pool

These changes should make the codebase cleaner, more performant, and easier to extend in the future.

Happy to discuss / adjust anything — looking forward to feedback!

I really love the direction this project is heading and wanted to contribute!

Main changes in this PR:

- **Separated UI logic**
  Extracted all UI-related responsibilities (coin counter updates, level complete panel display, etc.) from `GameManager` into a dedicated `GameUI` (or `LevelUI`) component.
  → This follows the **Single Responsibility Principle** more closely, simplifies `GameManager`, and makes UI changes much easier and safer.

- **Introduced object pooling for pickups**
  Added a simple `Destructible` component that pickups now use.
  Instead of calling `Destroy(gameObject)`, we return objects to an object pool for reuse.
  → Reduces garbage collection pressure, improves performance (especially with many coins/gems), and sets up a foundation for better object management later.

- **Other small clean-ups & improvements**
  - Better naming & null checks in several places
  - Minor refactoring for readability and consistency
  - Adjusted pickup destruction logic to work with the pool

These changes should make the codebase cleaner, more performant, and easier to extend in the future.

Happy to discuss / adjust anything — looking forward to feedback!
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.

2 participants