Requirements: The collisions system should be able to at least handle 100x100 tilemaps with at least 5 dynamic entities and preferably 50 dynamic entities that interact with the tilemap efficiently. There will also be certain tiles that can interact with the player that will have to have their own separate colliders. The levels will also be scrolling, so it should be able to deal with dynamically loaded in tiles and be able to work with pooling of colliders.
Are there any colliders or addons that can deal with this using matter.js and if there aren't, what's the preferred or standard algorithm for dealing with tilemap collisions like these within matter.js?
I'm thinking of storing a 2d dictionary for the x and y coordinates containing tiles in the path of the each body's velocity's direction based on bresenham's line algorithm and a "radius" (they'll be square colliders, but I'll be using a radius to make them easier to deal with) which will allow just the minimum number of tiles to be used. Bodies getting reused or disabled in order to be able to pool them instead of having to allocate more colliders each time and so that large amounts of dynamic entities interacting with the tilemap in the same location will just use the same bodies. Still, I am a bit concerned about the dynamic entities getting stuck on the edge of the tiles despite being on a flat surface and are there any other methods for handling collisions with tilemaps, especially in matter.js that are typically preferred?