Skip to content

Render air bubbles with sprites#135

Merged
Purdze merged 2 commits intomasterfrom
feat/air-bubbles-hud
Apr 6, 2026
Merged

Render air bubbles with sprites#135
Purdze merged 2 commits intomasterfrom
feat/air-bubbles-hud

Conversation

@Purdze
Copy link
Copy Markdown
Collaborator

@Purdze Purdze commented Apr 5, 2026

Summary

  • Register hud/air, hud/air_bursting, hud/air_empty sprites in the atlas
  • Replace the placeholder rect-based air bubbles with sprite rendering that matches vanilla's renderAirBubbles logic (full, bursting, empty states)
  • Show the bubble row whenever the player is submerged or air is below max (previously only shown when air was below max)
  • Pass eyes_in_water through to build_hud

Test plan

  • On land with full air, no bubble row shown
  • Submerge head in water, full 10 bubbles appear
  • Hold underwater, bubbles deplete right-to-left with leading bubble flashing the bursting sprite
  • Surface with partial air, bubbles refill (no bursting while above water), row disappears at full

Purdze added 2 commits April 5, 2026 12:18
Replace the placeholder rect-based bubbles with the vanilla hud/air
sprites (full, bursting, empty). The row now shows whenever the player
is submerged or air is not full, and the leading bubble uses the
bursting sprite as it depletes.
@Purdze Purdze merged commit 78816dc into master Apr 6, 2026
6 checks passed
@Purdze Purdze deleted the feat/air-bubbles-hud branch April 6, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant