Spielerando

Decide what happens when a second power-up is grabbed while one is active

A platformer player runs through a fire flower while an ice charm is still glowing. Does the new one replace the old, add to it, or merge into something new? Without a rule, the answer depends on which line of code ran last. This entry gives one clear answer for every pairing.

Why this works

Surprise feels bad when it comes from a missing rule. Deciding on purpose what happens for same, matching and unrelated pairs makes the outcome the same whichever was grabbed first, so players can plan around it and even look for combinations.

When not to use it

Skip combinations when pickups are meant to be a simple swap, as in a fast arcade game where reading a merged effect costs more attention than it gives. Plain replacement is easier to see and to teach.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 19 lines of example code with 4 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "Decide what happens when a second power-up is grabbed while one is active" (read_entry power-up-pickups-combine-or-replace) in my game. Build it step by step, and show me how you checked that it works.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP