An Inversion of Control (IOC) framework for building games with the Starling framework, featuring dependency injection and view mediation.
StarlingMVC is an Inversion of Control (IOC) framework for games built with the Starling framework. It provides dependency injection, view mediation, and event handling to help developers structure their game code cleanly and maintainably. The framework simplifies managing game state, UI components, and interactions without intruding on core game logic.
Game developers using the Starling framework in ActionScript who need a structured architecture for managing dependencies, events, and view logic in their projects.
Developers choose StarlingMVC because it brings established IOC patterns from frameworks like Swiz and RobotLegs to Starling-based games, offering a lightweight yet powerful way to decouple code and improve scalability without heavy overhead.
IOC Framework for Starling based games
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports injection by type or ID with recursive property injection, as shown in examples injecting gameModel or userModel.currentUser, making dependency management flexible and clean.
Uses [ViewAdded] and [ViewRemoved] metadata tags to link Starling display objects with mediators, separating view logic from controllers for better code organization and lifecycle management.
Centralized event system with typed events and property mapping in handlers, reducing errors through type checking and simplifying event-driven architecture in games.
Includes ViewManager for view stacking, EventMap for listener cleanup, and Juggler integration, streamlining common tasks like screen management and animation.
The binding mechanism checks for changes on every Juggler pass, which the README admits should be used sparingly due to overhead and isn't as instantaneous as Flex binding.
Requires additional compiler arguments in Flash Builder to prevent metadata stripping, adding complexity for developers unfamiliar with ActionScript compiler settings.
Tightly coupled to Starling 1.1 and Flex SDK 4.6, limiting use to ActionScript projects and potentially facing compatibility issues with newer versions or frameworks.