Skip to content

Pest speed does not scale with stage difficulty causing late stages to feel identical to stage 1 #25

Description

@woydarko

Bug Description

When transitioning from Stage 1 to Stage 2 and Stage 3, the pest movement speed remains unchanged. The speed property in spawnPest() uses the same random range 0.2 + Math.random() * 0.2 across all stages, making later stages feel no harder than the first.

Steps to Reproduce

  1. Start the game and observe pest movement speed in Stage 1
  2. Accumulate 250 points to advance to Stage 2
  3. Accumulate 500 points to advance to Stage 3
  4. Compare pest speed across all three stages

Expected Behavior

Pest speed should increase with each stage to reflect increasing difficulty. Stage 2 pests should move noticeably faster than Stage 1, and Stage 3 pests faster still.

Actual Behavior

The spawnPest() function always uses the same speed range regardless of currentStage. The only difference between stages is the spawn interval (3000ms → 2000ms), but individual pest speed stays identical.

Root Cause

In script.js, spawnPest() hardcodes the speed:

speed: 0.2 + Math.random() * 0.2,

It does not reference currentStage at all. A fix would be:

speed: (0.2 + currentStage * 0.1) + Math.random() * 0.2,

Environment

  • Chrome 122 / Firefox 124
  • All platforms

Wallet: 0x2350c7fb06933b09f882081ba629e795952356cf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions