Skip to content

Feat/objectives and rewards - #99

Merged
Shaileshukla529 merged 3 commits into
mainfrom
feat/objectives-and-rewards
Aug 24, 2026
Merged

Shaileshukla529 merged 3 commits into
mainfrom
feat/objectives-and-rewards

Conversation

@Shaileshukla529

Copy link
Copy Markdown
Collaborator

Summary

Wires the objective system into the live game: the game loop drives it, power-ups are now only obtainable through it, the cheerleader calls out tasks, and the map screens show the active task and its markers.

Changes

  • Game loop wiring (game-loop.js, match.js): the loop now calls objectives.tick() every frame and feeds it damage/death/kill/heart events (onDamage, onPlayerDied, onPlayerKilled, onHeart) so tasks like "no damage" and "bounty" can track them. Broadcasts an objective state patch each tick. The director is created on match start (delayed for zombie mode until enemies warm up, immediate for PvP) and stopped/cleared on match end or when the last player leaves.
  • Power-ups gated behind objectives (socket-handlers.js): removes free-tap activation and cooldowns for loadout items — ACTIVATE_POWERUP now only works during an open reward window via objectives.pickReward(). Drops the now-unused powerupCooldowns field.
  • Cheerleader callouts (cheerleader/index.js): adds voice lines for objective_started and objective_won.
  • Client rendering (game_logic.js, overlays.js, leaderboard.js): adds drawObjective() to render the pulsing gold marker/crate circle and target rings under the runaway enemy and the bounty leader, and a task/countdown line on the leaderboard wall (falls back to reward-pick announcements, then the usual status line).

@Shaileshukla529
Shaileshukla529 merged commit c358c3d into main Aug 24, 2026
1 check passed
@Shaileshukla529
Shaileshukla529 deleted the feat/objectives-and-rewards branch August 24, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant