SuperTux / supertux

SuperTux source code
https://supertux.org
GNU General Public License v3.0
2.47k stars 472 forks source link

Add badguy property to activate/deactivate badguys in groups #2964

Open mstoeckl opened 1 month ago

mstoeckl commented 1 month ago

Putting two jumpy badguys in the same group will ensure they are activated/deactivated at the same time; as a result they will maintain synchronization, no matter how quickly Tux approaches them.

Related level design issue: https://github.com/SuperTux/supertux/issues/2318 .

I'm not certain this is the best approach to solve the synchronization problem, but it is the simplest thing I could think of.

I've only edited one level ("Above the Arctic Skies") to use this feature, and can edit more if people wish. (Although where exactly to use this feature is a matter of taste.) I've only tested this with jumpy enemies and floating snowballs so far; while I don't expect other badguy types to break with this, I don't know the code well enough to be certain. Names are hard to change after the fact, so suggestions for improvements are welcome.