Neon Maze: a catch on the tick the last dot is eaten clears the level without losing a life

Open Beginner friendly
#104 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
game-dev

Research direction

Start in games/maze/scenes/GameScene.ts, in tick() around lines 419-427, where checkCatches() runs before clearLevel(). Then read die() and clearLevel() near lines 460-482 to see how the phase is overwritten, and update() near line 196 to see where afterDeath() runs. Done means a catch on the frame the last dot is eaten costs a life and does not advance the level; run npm test and add a check for that case if the suite has a harness for it.

Written by the indexing model from the issue text.

Description

bug good first issue severity: low

Summary

In Neon Maze, if a chaser catches the runner on the same tick that the last dot is eaten, the level clears and the life is never lost.

Where

  • games/maze/scenes/GameScene.ts:419-427 (tick: checkCatches() then if (this.dots.size === 0) this.clearLevel())
  • games/maze/scenes/GameScene.ts:460-462, :480-482 (die() sets phase 'dying', clearLevel() overwrites it with 'clearing')
  • games/maze/scenes/GameScene.ts:196-204 (update only calls afterDeath(), which takes the life, from 'dying')

Details

tick() moves the runner (eating the dot), moves the chasers, then calls checkCatches(), which can call die(). It then goes on to clearLevel() with no phase check, so the 'dying' phase is replaced by 'clearing' and afterDeath() never runs.

Impact

Rare and in the player's favour: the death effects play over a level clear, no life is lost, and the run can be credited with a clear (and the maze.clear trophy) it should not have.

Steps to reproduce

  1. Leave one dot next to a chaser's path.
  2. Eat it just as an unscared chaser reaches the runner.
  3. The death burst plays, then the next level starts with the same lives.

Suggested fix

In tick(), return after checkCatches() if the phase is no longer 'play', or check this.phase === 'play' before calling clearLevel().

Acceptance criteria

  • A catch on the frame of the last dot costs a life and does not advance the level.

Getting started

  • Relevant files: games/maze/scenes/GameScene.ts
  • How to run tests: npm test

Filed by repo-audit/full-audit at de2b25b. Severity: low. Effort: S. audit-key: bug|games/maze/scenes/GameScene.ts|tick

Dominant language
TypeScript
Stars
3
Forks
3
Avg merge
8h 13m
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TMHSDigital/GH-Arcade

All issues in TMHSDigital/GH-Arcade

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.