Add a shared seeded RNG as groundwork for the daily challenge

Aberta
#52 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
52/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
typescript
Domínio
game-dev

Direção de pesquisa

Start with the daily challenge roadmap in README.md, then read shared/storage.ts, games/stack/logic.ts, and games/runner/scenes/GameScene.ts to understand the existing menu, storage, and random call sites. Run npm install and npm run dev to explore the games. Done means one game offers Daily mode with the same sequence for every player on a given UTC date; use npm run typecheck and npm run build to check the change.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

enhancement severity: low

Summary

The README roadmap lists a daily challenge with a shared seed. There is no shared RNG: games call Math.random or Phaser's random helpers directly, and high scores use one key per game with no notion of a dated board.

Where

  • README.md:360
  • games/stack/logic.ts (piece bag), games/runner/scenes/GameScene.ts (pattern picker)
  • shared/storage.ts:21-30

Proposal

  • Add shared/rng.ts: a small seeded PRNG with between, pick and shuffle, and a dailySeed() derived from the UTC date
  • Convert one game first; Stack's bag or Runner's pattern picker is a single call site
  • Pass { seed } through the scene start data and store <slug>:daily:<yyyy-mm-dd>
  • Add a "Daily" mode to the menu builder

Trade-offs

Frame-rate dependent physics means runs will share a spawn sequence, not be identical.

Acceptance criteria

  • One game has a Daily mode where every player gets the same sequence on a given date

Getting started

  • Relevant files: shared/storage.ts, games/stack/logic.ts, games/runner/scenes/GameScene.ts, README.md
  • Run locally: npm install, then npm run dev
  • Checks: npm run typecheck and npm run build (there is no test suite yet)
  • Related docs: README.md

Filed by repo-audit/full-audit at b001f5d. Severity: low. Effort: L. audit-key: enhancement|shared/storage.ts|daily-seed

Linguagem predominante
TypeScript
Estrelas
3
Forks
3
Métricas de merge de PRs
Nenhum PR com merge em 30d

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de TMHSDigital/GH-Arcade

Todas as issues de TMHSDigital/GH-Arcade

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.