Offer an alternating-turns two-player mode in the solo games

Open
#113 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
game-dev

Research direction

Start in shared/scenes.ts at endRun, showMatchResult and GameOverData, then read buildMenu to see how menu options are passed into a game's restart data. Pick one game (Stack or Runner) and read its MenuScene and GameScene to see how a run ends. Done means that game shows a TURNS option, plays two runs back to back with a match result, and leaves high scores, dailies and trophies unchanged. Confirm the behaviour with npm test.

Written by the indexing model from the issue text.

Description

enhancement severity: low

Summary

Offer an alternating-turns two-player mode (pass the controller) in the solo games.

Where

  • README.md:371 (roadmap: "More two-player modes")
  • shared/scenes.ts:127-136 (endRun), shared/scenes.ts:163-195 (showMatchResult), shared/scenes.ts:197-206 (GameOverData)

Details

Only Snake, Pong and Siege have a two-player mode. Every solo game already ends through the shared endRun with a score, and a shared two-player result screen exists, but nothing connects them.

Proposal

Add an opt-in turns: true menu mode in buildMenu. When it is set, endRun stores player 1's score and restarts the game with { ...restartData, turn: 2 } behind a "PLAYER 2 READY" banner; after turn 2 it calls showMatchResult with both scores. Turn runs record a play but skip high scores and trophies, as two-player matches already do. Start with one game (Stack or Runner) to prove it.

Who benefits

Two people sharing one device in the seven games with no two-player option (Breakout, Stack, Astro, Runner, Hop, Maze, Pinball).

Acceptance criteria

  • One game offers TURNS, plays two runs back to back and shows a match result.
  • Turn runs do not change high scores, dailies or trophies.

Getting started

  • Relevant files: shared/scenes.ts, one game's MenuScene and GameScene
  • How to run tests: npm test

Filed by repo-audit/full-audit at de2b25b. Severity: low. Effort: L. audit-key: enhancement|shared/scenes.ts|alternating-turns

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.