MichaelSinsbeck / platformer

A ninja platformer written in LÖVE
7 stars 0 forks source link

Walker: Add maximum life time? #178

Open Germanunkol opened 10 years ago

Germanunkol commented 10 years ago

In the level editor, users can add spawners which spawn an infinte amount of enemies. If there's no place where the enemies can fall off the map, then an infinite amount of enemies will be on the map. I think there should be some high (30 seconds?) timer on each walker after which it disapears.

michalove commented 10 years ago

Indeed, that is a problem. I will either implement a maximum life time or - just a random though - if two of the enemies touch each other, they merge into one. That would also keep the total number of enemies small.

Germanunkol commented 10 years ago

Another idea came to mind: If a user places a high number of spawners, then even if they disappear after 30 seconds there might still be too many of them. So we could have a fixed maximum number of walkers (maybe 200) and if the 201st appears, the first one disappears and so on (first in first out).

Or... we could just not worry about it and let the users do whatever - if their PC is fast enough, maybe we shouldn't limit them and just put up a notice "if you want to share the level, then make sure it runs even on slower pcs" and we then only authorize levels which work well.

michalove commented 10 years ago

I might just implement an upper limit for the total number of objects in the game. Then, whenever a new object is added to the spriteEngine, it could write some output on screen "maximum number of objects exceeded" and simply not create the object.

I will think about possible solutions for a while and then just pick one.