Skip to content

Part 11 - jump-over-ball bonus score counting

Compare
Choose a tag to compare
@ped7g ped7g released this 11 Feb 16:13
· 9 commits to master since this release
26642da

When the player jumps, the game does note the coordinates of player's
sprite (advances them +-4px in direction of jump) and keeps invisible
collision detector in that place for the whole duration of jump.

When some ball collides with this detector, it's counted as
"jump-evasion bonus", added to the score - each jump resets the
jump-bonus to zero, then first ball adds 100 and every following one
doubles the bonus, so the total sum per jump is: 100, 300, 700, 1500,
3100, ...
(probably 3 balls with single jump are maximum any way).

Such collision will also emit new "star" sprite visually communicating
to player that some bonus is being added to the score, and animates the
star (going up slowly and changing mirror/rotate flags to flicker
"randomly").