Skip to content

Fix pfscorebars for four players #1103

@brpocock

Description

@brpocock

The playfield score bars need to be fixed to properly support four-player mode.

Current Issue:
The pfscorebars system currently only supports players 1 and 2. Players 3 and 4 health bars are not implemented.

Current Implementation:

  • UpdatePlayer1HealthBar - updates pfscore1 for player 1
  • UpdatePlayer2HealthBar - updates pfscore2 for player 2
  • HealthBarSystem.bas line 10: "P3/P4 health will be implemented separately"
  • FrameBudgeting.bas references UpdateHealthBarPlayer0-3 functions

Investigation Needed:

  • Review how pfscorebars are currently implemented in Source/Routines/HealthBarSystem.bas
  • Check FrameBudgeting.bas for existing UpdateHealthBarPlayer0 and UpdateHealthBarPlayer3 functions
  • Determine how to display players 3 and 4 health bars (may need different approach than pfscore1/pfscore2)
  • Verify all four players have proper score bar rendering in 4-player mode
  • Check if player 3 and player 4 score bars are correctly positioned and displayed
  • Ensure score bar colors match player colors in 4-player mode

Related Files:

  • Source/Routines/HealthBarSystem.bas - main health bar system
  • Source/Routines/FrameBudgeting.bas - frame-budgeted health bar updates
  • Source/Common/MultiSpriteKernel.s - kernel score rendering
  • Source/Routines/GameLoopMain.bas - game loop health bar updates

Technical Notes:

  • Multisprite kernel uses pfscore1 and pfscore2 registers
  • Players 3 and 4 may need alternative rendering method (playfield graphics, sprites, or different score registers)
  • Health bars use 8-pixel bit patterns (0-8 pixels filled from right to left)
  • Health thresholds: 12, 24, 36, 48, 60, 72, 84 (split on 12s)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions