adventuring / adventuring/ChaosFight

Fix pfscorebars for four players

Open
#1,103 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Assembly
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

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)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.