Noah2610 / deathfloor

Work-in-progress Mega Man inspired game.
MIT License
2 stars 0 forks source link

Enemies get stuck in each other offscreen (when slightly onscreen?) #33

Open hoichael opened 4 years ago

hoichael commented 4 years ago

Edit: Also happens onscreen and with solid objects in general (also tiles, not only enemies)

(doesn't happen too often, inconsistent, somewhat reproducable) (low priority)

Noah2610 commented 4 years ago

This is because of the loading system. All entities are unloaded when they go off-screen. Tiles stay loaded further off-screen than enemies, to try and prevent this problem (in other words: enemies become unloaded earlier than tiles). But if an enemy is moving fast enough, they can still move into an unloaded tile.

To prevent enemies from getting stuck in each other off-screen, if possible, I would just make enemies not solid with each other. If they need to be solid with each other, then I'll have to find another solution.