So I'm making a game engine for a game I'm making - the game is a 2D tile-based game
I've implemented a gameobject-component style for the engine, for decoupling reasons
However, every frame, the engine iterates through every gameobject, and calls the update method of every component on that gameobject - as it's a tile-based game, every tile is a gameobject, which means that that update loop could go through several thousand gameobjects every frame. Add into that the fact that each gameobject could have multiple components (transform component containing location/rotation info, renderer component, collider component etc), and a hell of a lot of time is spent in that loop. This is only magnified by the fact that the game is a mobile game, and as such the processing power isn't as great as on a desktop
Any ideas on algorithms/programming styles/design styles that would help to minimise this performance sinkhole please?