Hacker News new | ask | show | jobs
by mannimow 3957 days ago
Good examples and loads of tutorials. I just started playing with it and circular dependencies make me cringe. Game object initiates subsystems that in turn get their dependencies through game object, which is a requirement for initialising aforementioned subsystems. What is this pattern? It's really tough to compose things with it.
1 comments

Working with it professionally, I agree. You pass the game object everywhere, no matter what. The variation if factory methods is also frustrating. It's ridiculous trying to reference how to create things when all the examples use game.add.<whatever> and sometimes you want to construct them separate and use .add.existing. But the standalone constructors will take different sets of arguments (including the game object).