I'm creating a simple 2D game and need some feedback on my collision detection approach. Here is the gist of what I'm going for:
1. Have a collide-able component to signify that an entity can be collided with.
2. Have a mover component that moves an entity (just going with simple pixel movement in my game, no force vector stuff).
3. Have a collision handler class that has access to all entities. It will look at entities that have both a collide-able component and a mover component and see if they collide with anything that has a collide-able component or screen edges (only if they have moved recently).
4. After detecting collisions, the collision handler class will call the mover component to move the entities appropriately (out of walls and that stuff).
I'm very new to this stuff. I'm guessing I would need some spatial partitioning scheme to speed things up? Should all entities be stored in the same data structure? Or should they be separated based on some kind of criteria? Example: stationary objects in one list, movable objects in another, decorations in another, etc...? Thanks in advance.