bafto/Platformer

Manage multiple levels

Closed this issue · 2 comments

the currently loaded level should unload and the next level file should load once the player reaches an event trigger

bafto commented

Easy to do. We could keep the last level loaded (maybe if we don't want enemys to respawn each time you reenter the level), by just using stack of Levels and just the top one gets updated and drawn. We could cap the stack size to just keep the last 5/3/X level loaded and unload if you get too far away. However we do it, shouldn't be hard. Tho we just need this when we have Enemys, more Events and in generell more stuff that happens then just a tilemap that is drawn.

bafto commented

Done.