Skip to content

bug: Two parallel scoring systems (ECS ScoreComponent + ScoringServiceImpl) are unconnected #99

@TheMeinerLP

Description

@TheMeinerLP

Description

The server has two separate scoring mechanisms: (1) `ScoreComponent` per player entity, updated by `RingCollisionSystem`; and (2) `ScoringServiceImpl`, which is never instantiated or called. This creates ambiguity about which is the source of truth, risks data loss at map transitions, and blocks the leaderboard/database persistence layer.

Acceptance Criteria

  • A single scoring source of truth is established and documented (decision: ECS component as runtime store, service as persistence/query layer)
  • `ScoringServiceImpl` is instantiated and registered in the DI/service layer
  • Ring collision events flow: `RingCollisionSystem` updates `ScoreComponent` AND calls `ScoringService.recordRingPass()`
  • `ScoringService` accumulates scores across maps within a cup session
  • End-of-cup totals are retrievable from `ScoringService` for the results screen

Technical Details

  • `ScoringServiceImpl` is in `server/src/main/java/.../service/`
  • Instantiate it in `VoyagerServer` or a DI container and inject into `RingCollisionSystem`
  • `ScoreComponent` remains the fast per-tick ECS store; `ScoringService` is the durable session-scoped store
  • Database persistence (separate ticket) can hook into `ScoringService.onCupEnd()` later

Dependencies

  • Ring pass feedback issue (RingCollisionSystem must be the single call site)

Estimate

S

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions