I need help on how I should go about updating entities in my game with a chunk based approach. It's a 2D tile based side scroller. This is about updating the entity logic not drawing tiles.
My game is going to have different entities like monsters and projectiles. I don't wan't to update all the hundreds of entities in the map at the same time so I need some sort of chunk system, where I split the map up into chunks and only update the chunks that are visible.
With this in mind I thought about giving each chunk a list of entities that belong to it. Then I could update each visible chunk, which would cycle through the chunk's list and update each individual entity. If an entity like a monster moves from one chunk to another I could remove it from the previous chunk's list and add it two the new chunk's list.
However, say I shoot a projectile off my screen, then the entity would not get updated until the chunk is able to update which means making that chunk visible. I guess I would just have to force update the chunks the projectile is in then.
It seems like that could work, but there are probably more efficient ways to handle cutting down hundreds of entity updates to tens of entity updates, which is why I'm asking. This is a very fundamental concept to any large tile based game, so I want to here what your method is. How do you handle updating entities in a efficient matter?