Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mstoeckl
Copy link
Contributor

@mstoeckl mstoeckl commented Jun 2, 2024

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: #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.

@mstoeckl mstoeckl changed the title Add badguy feature to activate/deactivate badguys in groups Add badguy property to activate/deactivate badguys in groups Jun 3, 2024
src/badguy/badguy.hpp Outdated Show resolved Hide resolved
src/badguy/badguy.hpp Outdated Show resolved Hide resolved
This adds a 'load-group' property to badguys, which ensures that
multiple badguys tagged with the same load-group string will be loaded
and unloaded together.

In particular, this makes it possible to synchronize flying snowballs
and jumpies -- and keep that synchronization, even when the player
leaves the area and comes back. Doing so makes the level appear more
real and prevents players from making parts of a level easier by
carefully walking toward them and desynchronizing the badguys (or
harder if they have bad luck.)
@mstoeckl
Copy link
Contributor Author

mstoeckl commented Aug 14, 2024

  1. I've rebased this to fix a merge conflict. This PR is not very important and is somewhat experimental, so I may forget about future conflicts; please reply if you ever want me to rebase it.

  2. Looking at most of the existing levels, I only see a few places where load-group would be helpful, probably because existing levels have been designed to avoid sections whose difficulty depends on loading patterns. (Also, features that might need load-group (dense groups of enemies, bundles of flames, steep flying snowball step ascents, and neighboring jumpies) generally reduce the number of safe spots and force the player to keep moving, which would make levels unusually hard for world1/world2.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:code status:needs-review Work needs to be reviewed by other people type:feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants