Developers using Phaser JS often struggle with organizing game logic in a maintainable and modular fashion. Phatty offers a lightweight, TypeScript-based entity component system inspired by Unity's GameObjects, providing a structured way to organize game logic using entities and components.

What is Phatty?

  • Unity-Style Component System: Phatty introduces a component system for Phaser that mirrors Unity's approach, enhancing familiarity for developers with Unity experience.
  • Lifecycle Management: It manages the lifecycle of entities and components, including creation, updating, and destruction, streamlining game development processes.
  • Type-Safe Component References: Phatty ensures type safety in component references, reducing runtime errors and improving code reliability.
  • Component Dependency Management: The system handles dependencies between components, facilitating complex interactions within game entities.
  • Event System Integration: Phatty integrates with Phaser's event system, allowing for responsive and interactive game elements.
  • Priority-Based Execution Order: It supports priority-based execution, enabling developers to control the order in which components are processed.

Check out the full documentation and example on StackBlitz to start building more organized Phaser games today.

More on Phatty