This is my first time building a game engine, albeit a 2D one for Android.
I've decided to build a simple ECS engine. The game I'm trying to *almost* duplicate at the moment is Doodle Jump.
I currently have the following systems running in my update loop, in the given order:
1) Physics (applies gravity)
2) Collision (works by predicting next position based on current position and velocity, and updates the current position on collision)
3) Transform Update (updates all entities based on their current velocities)
4) Render System (Draws to canvas)
I have the following questions:
I want to write a manager that generates obstacles at, say, fixed gaps and when the player reaches the middle of the screen.
This manager will need the current position and velocity of the player. (It finds the player by quering the ComponentManager for all entities having a PlayerComponent)
1) Where should this manager be placed in the game loop?
2) Should it even be a manager? Can such logic lie in systems?
3) Extending upon 2, what really are Systems supposed to handle?
Any help is appreciated!