[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KRAXE8CRHB7DSF1B9MGAQ7":3,"skill-same:01M6KRAXE8CRHB7DSF1B9MGAQ7":73},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":27,"linkOnly":28,"markdownContent":29,"markdownBody":30,"frontMatter":31,"refName":32,"commitSha":33,"skillDirectory":34,"forksCount":35,"repositoryHtmlUrl":36,"repositoryHomepageUrl":6,"ownerHtmlUrl":37,"ownerBlogUrl":38,"ownerDescription":39,"updatedAt":40,"install":41,"resources":54},"01M6KRAXE8CRHB7DSF1B9MGAQ7","hud-system",null,"Use when building in-game HUDs — health bars, score displays, minimap, notifications, and damage numbers","jame581\u002FGodotPrompter","jame581","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F21112138?v=4","01M6KR3KEQ9Z30WVJRR2E2ZVXE","Jan Mesarč","01M6KR3KJVRMPDSMASQPBCBVK3",964,"MIT","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fhud-system\u002FSKILL.md",[],[19,20,21,22,23,24,25,26],"system","hud","hud system","notifications","health","game","use","when","2026-11-10 10:12:30",false,"---\nname: hud-system\ndescription: Use when building in-game HUDs — health bars, score displays, minimap, notifications, and damage numbers\n---\n\n# HUD Systems in Godot 4.3+\n\nAll examples target Godot 4.3+ with no deprecated APIs. GDScript is shown first, then C#.\n\n> **Related skills:** **godot-ui** for Control node layout and themes, **component-system** for HealthComponent integration, **event-bus** for score\u002Fnotification signals, **inventory-system** for inventory UI patterns, **2d-essentials** for CanvasLayer setup and draw order, **ability-system** for cooldown bar and resource bar binding patterns.\n\n---\n\n## 1. HUD Architecture\n\n### Why CanvasLayer\n\nA `CanvasLayer` renders its children with its own transform, independent of the `Camera2D` (unless `follow_viewport_enabled` is on); a `Camera3D` never moves 2D nodes. Without it, HUD nodes on the scene root's default canvas (layer 0) move with a `Camera2D` when you pan or zoom, because the camera sets that canvas's transform. Wrapping all HUD nodes in a `CanvasLayer` keeps the HUD in place; layer `≥ 1` (the default is 1) draws it above the world.\n\n### Scene Tree\n\n```\nWorld (Node2D \u002F Node3D)\n├── TileMapLayer          ← game world\n├── Player (CharacterBody2D)\n│   ├── Camera2D\n│   ├── HealthComponent\n│   └── HurtboxComponent\n├── Enemies\n└── HUD (CanvasLayer — layer: 1)\n    ├── MarginContainer (anchor: Full Rect — provides edge padding)\n    │   ├── TopBar (HBoxContainer)\n    │   │   ├── HealthBarPanel (PanelContainer)\n    │   │   │   └── HealthBar (TextureProgressBar or ProgressBar)\n    │   │   └── ScoreLabel (Label)\n    │   └── BottomBar (HBoxContainer)\n    │       └── InteractionPrompt (Label — hidden by default)\n    ├── DamageNumbersLayer (Node2D — world-space spawning point)\n    ├── MinimapContainer (SubViewportContainer)\n    │   └── MinimapViewport (SubViewport)\n    │       ├── MinimapCamera (Camera2D)\n    │       └── MinimapWorld (mirrors or references world nodes)\n    └── NotificationStack (VBoxContainer — anchored top-right)\n```\n\n**Key rules:**\n- Keep all HUD scenes under a single `CanvasLayer`. Do not mix HUD nodes into the game world tree.\n- Use `layer = 1` for the main HUD. Use higher values (e.g. `10`) for overlays or pause menus that must appear above the HUD.\n- Damage numbers are an exception — they can live in a `Node2D` child of the `CanvasLayer` and use `get_viewport().get_canvas_transform()` to convert world positions to screen positions.\n\n---\n\n## 2. Health Bar\n\n### ProgressBar vs TextureProgressBar\n\n| Node | When to use |\n|---|---|\n| `ProgressBar` | Prototyping, plain-colour bars |\n| `TextureProgressBar` | Pixel-art or stylised bars using sprite sheets |\n\nBoth expose `min_value`, `max_value`, and `value`. Set `step = 0` so tweening produces a smooth animation rather than snapping to steps (`TextureProgressBar` defaults `step` to 1, `ProgressBar` to 0.01).\n\n### GDScript\n\n```gdscript\n## health_bar.gd — attach to a ProgressBar or TextureProgressBar\nclass_name HealthBar\nextends ProgressBar\n\n## Reference to the HealthComponent this bar tracks.\n## Assign in the Inspector or connect programmatically from the HUD root.\n@export var health_component: HealthComponent\n\n## Duration (seconds) for the smooth tween on health change.\n@export var tween_duration: float = 0.25\n\nvar _tween: Tween\n\n\nfunc _ready() -> void:\n    step = 0.0  # allow fractional values for smooth animation\n    if health_component:\n        _connect_component(health_component)\n\n\n## Call this if the HealthComponent is not available at _ready time\n## (e.g. the player spawns after the HUD).\nfunc bind(component: HealthComponent) -> void:\n    if health_component:\n        health_component.health_changed.disconnect(_on_health_changed)\n    health_component = component\n    _connect_component(component)\n\n\nfunc _connect_component(component: HealthComponent) -> void:\n    max_value = component.max_health\n    value     = component.current_health\n    component.health_changed.connect(_on_health_changed)\n\n\nfunc _on_health_changed(current: int, maximum: int) -> void:\n    max_value = maximum\n    _animate_to(current)\n\n\nfunc _animate_to(target_value: float) -> void:\n    if _tween:\n        _tween.kill()\n    _tween = create_tween()\n    _tween.set_ease(Tween.EASE_OUT)\n    _tween.set_trans(Tween.TRANS_QUAD)\n    _tween.tween_property(self, \"value\", target_value, tween_duration)\n```\n\n### C#\n\n```csharp\n\u002F\u002F HealthBar.cs — attach to a ProgressBar or TextureProgressBar\nusing Godot;\n\npublic partial class HealthBar : ProgressBar\n{\n    [Export] public HealthComponent HealthComponent { get; set; }\n    [Export] public float TweenDuration { get; set; } = 0.25f;\n\n    private Tween _tween;\n\n    public override void _Ready()\n    {\n        Step = 0.0;\n        if (HealthComponent != null)\n            ConnectComponent(HealthComponent);\n    }\n\n    \u002F\u002F\u002F \u003Csummary>Call this when the HealthComponent is not available at _Ready time.\u003C\u002Fsummary>\n    public void Bind(HealthComponent component)\n    {\n        if (HealthComponent != null)\n            HealthComponent.HealthChanged -= OnHealthChanged;\n        HealthComponent = component;\n        ConnectComponent(component);\n    }\n\n    private void ConnectComponent(HealthComponent component)\n    {\n        MaxValue = component.MaxHealth;\n        Value    = component.CurrentHealth;\n        component.HealthChanged += OnHealthChanged;\n    }\n\n    private void OnHealthChanged(int current, int maximum)\n    {\n        MaxValue = maximum;\n        AnimateTo(current);\n    }\n\n    private void AnimateTo(float targetValue)\n    {\n        _tween?.Kill();\n        _tween = CreateTween();\n        _tween.SetEase(Tween.EaseType.Out);\n        _tween.SetTrans(Tween.TransitionType.Quad);\n        _tween.TweenProperty(this, \"value\", targetValue, TweenDuration);\n    }\n}\n```\n\n**Tip:** If you use `TextureProgressBar`, set `fill_mode` to `FILL_LEFT_TO_RIGHT` and assign your bar texture to `texture_progress`. The `value` \u002F `max_value` ratio drives how much of the texture is revealed.\n\n---\n\n## 3. Score \u002F Label Display\n\n### GDScript\n\n```gdscript\n## score_display.gd — attach to a Label\nclass_name ScoreDisplay\nextends Label\n\n## Duration (seconds) to count from old to new score value.\n@export var count_duration: float = 0.4\n\nvar _displayed_score: int = 0\nvar _tween: Tween\n\n\nfunc _ready() -> void:\n    EventBus.score_changed.connect(_on_score_changed)\n    text = \"0\"\n\n\nfunc _on_score_changed(new_score: int) -> void:\n    _animate_counter(_displayed_score, new_score)\n\n\nfunc _animate_counter(from: int, to: int) -> void:\n    if _tween:\n        _tween.kill()\n\n    _tween = create_tween()\n    _tween.set_ease(Tween.EASE_OUT)\n    _tween.set_trans(Tween.TRANS_QUAD)\n    # Tween an intermediate float; update the label text each step.\n    _tween.tween_method(_set_counter_value, float(from), float(to), count_duration)\n\n\nfunc _set_counter_value(value: float) -> void:\n    _displayed_score = int(value)\n    text = str(_displayed_score)\n```\n\n### C#\n\n```csharp\n\u002F\u002F ScoreDisplay.cs — attach to a Label\nusing Godot;\n\npublic partial class ScoreDisplay : Label\n{\n    [Export] public float CountDuration { get; set; } = 0.4f;\n\n    private int _displayedScore = 0;\n    private Tween _tween;\n\n    public override void _Ready()\n    {\n        GetNode\u003CEventBus>(\"\u002Froot\u002FEventBus\").ScoreChanged += OnScoreChanged;\n        Text = \"0\";\n    }\n\n    private void OnScoreChanged(int newScore)\n    {\n        AnimateCounter(_displayedScore, newScore);\n    }\n\n    private void AnimateCounter(int from, int to)\n    {\n        _tween?.Kill();\n        _tween = CreateTween();\n        _tween.SetEase(Tween.EaseType.Out);\n        _tween.SetTrans(Tween.TransitionType.Quad);\n        _tween.TweenMethod(\n            Callable.From\u003Cdouble>(SetCounterValue),\n            (double)from,\n            (double)to,\n            CountDuration\n        );\n    }\n\n    private void SetCounterValue(double value)\n    {\n        _displayedScore = (int)value;\n        Text = _displayedScore.ToString();\n    }\n}\n```\n\n**EventBus signals needed:**\n\n```gdscript\n# autoloads\u002Fevent_bus.gd\nsignal score_changed(new_score: int)\n```\n\n```csharp\n\u002F\u002F EventBus.cs (partial — score signal)\n[Signal] public delegate void ScoreChangedEventHandler(int newScore);\n```\n\nEmit from wherever points are awarded:\n\n```gdscript\n# Inside a collectible or enemy death handler\nEventBus.score_changed.emit(GameState.score)\n```\n\n```csharp\n\u002F\u002F Inside a collectible or enemy death handler\nGetNode\u003CEventBus>(\"\u002Froot\u002FEventBus\").EmitSignal(EventBus.SignalName.ScoreChanged, GameState.Score);\n```\n\n---\n\n## 4. Damage Numbers\n\nFloating \"−25\" labels that rise and fade above the hit point. Pooled in a HUD-side spawner; world position converted to screen via `get_viewport().get_canvas_transform()`. Optional crit colorization before spawn.\n\n> See [references\u002Fdamage-numbers.md](references\u002Fdamage-numbers.md) for the full GDScript and C# DamageNumber scene + pooled spawner.\n\n---\n\n## 5. Notification System\n\nToast \u002F notification stack — a `VBoxContainer` anchored top-right with `max_visible` clamping and queue-driven dismissal. New toasts wait for an old one to expire before showing.\n\n> See [references\u002Fnotifications.md](references\u002Fnotifications.md) for the full GDScript and C# stack with auto-dismiss timers.\n\n---\n\n## 6. Minimap Concept\n\nRender a top-down view via a dedicated `SubViewport` + `Camera2D` that follows the player. Display the SubViewport texture in a `TextureRect` inside the HUD. Optional circular mask via `ColorRect` shader. Set `render_target_update_mode = UPDATE_ALWAYS`.\n\n> See [references\u002Fminimap.md](references\u002Fminimap.md) for the SubViewport setup, MinimapCamera GDScript + C#, and circular-mask shader.\n\n---\n\n## 7. Interaction Prompts\n\nScreen-space \"Press [E] to interact\" prompt — a `Label` inside the HUD that follows an interactable's screen position each frame. Driven by `body_entered` \u002F `body_exited` on the interactable's `Area2D`. Use `InputMap.action_get_events(name)` to display the correct key for the player's current binding.\n\n> See [references\u002Finteraction-prompts.md](references\u002Finteraction-prompts.md) for the full GDScript and C# prompt + Interactable Area2D pair.\n\n---\n\n## 8. Checklist\n\n- [ ] All HUD nodes are children of a `CanvasLayer` (unaffected by `Camera2D`) with `layer >= 1` so they draw above the world\n- [ ] `step` is set to `0.0` for smooth tween animation (`TextureProgressBar` snaps to whole values by default)\n- [ ] Health bar binds to `HealthComponent.health_changed` signal — does not poll in `_process`\n- [ ] Tween is killed (`_tween.kill()`) before starting a new one so rapid damage does not stack animations\n- [ ] Score counter uses `tween_method` to interpolate the displayed integer — not a jump cut\n- [ ] Damage number positions are converted from world space to screen space using `get_viewport().get_canvas_transform()`\n- [ ] Damage number pool size is large enough that labels are not recycled before their tween completes\n- [ ] Notification stack enforces `max_visible` and re-checks the queue after each dismissal\n- [ ] Toast auto-dismiss uses a `Timer` node — not `await get_tree().create_timer()`\n- [ ] `SubViewport` for minimap has `render_target_update_mode = UPDATE_ALWAYS`\n- [ ] Minimap `Camera2D` zoom and the `SubViewport`'s `canvas_cull_mask` are configured so only the intended visibility layers are visible\n- [ ] Interaction prompt converts the interactable's world position each frame — not cached at spawn time\n- [ ] `InputMap.action_get_events()` is used to display the correct key for the player's current binding\n- [ ] HUD nodes that do not need input set `mouse_filter = MOUSE_FILTER_IGNORE` to avoid blocking game clicks\n","# HUD Systems in Godot 4.3+\n\nAll examples target Godot 4.3+ with no deprecated APIs. GDScript is shown first, then C#.\n\n> **Related skills:** **godot-ui** for Control node layout and themes, **component-system** for HealthComponent integration, **event-bus** for score\u002Fnotification signals, **inventory-system** for inventory UI patterns, **2d-essentials** for CanvasLayer setup and draw order, **ability-system** for cooldown bar and resource bar binding patterns.\n\n---\n\n## 1. HUD Architecture\n\n### Why CanvasLayer\n\nA `CanvasLayer` renders its children with its own transform, independent of the `Camera2D` (unless `follow_viewport_enabled` is on); a `Camera3D` never moves 2D nodes. Without it, HUD nodes on the scene root's default canvas (layer 0) move with a `Camera2D` when you pan or zoom, because the camera sets that canvas's transform. Wrapping all HUD nodes in a `CanvasLayer` keeps the HUD in place; layer `≥ 1` (the default is 1) draws it above the world.\n\n### Scene Tree\n\n```\nWorld (Node2D \u002F Node3D)\n├── TileMapLayer          ← game world\n├── Player (CharacterBody2D)\n│   ├── Camera2D\n│   ├── HealthComponent\n│   └── HurtboxComponent\n├── Enemies\n└── HUD (CanvasLayer — layer: 1)\n    ├── MarginContainer (anchor: Full Rect — provides edge padding)\n    │   ├── TopBar (HBoxContainer)\n    │   │   ├── HealthBarPanel (PanelContainer)\n    │   │   │   └── HealthBar (TextureProgressBar or ProgressBar)\n    │   │   └── ScoreLabel (Label)\n    │   └── BottomBar (HBoxContainer)\n    │       └── InteractionPrompt (Label — hidden by default)\n    ├── DamageNumbersLayer (Node2D — world-space spawning point)\n    ├── MinimapContainer (SubViewportContainer)\n    │   └── MinimapViewport (SubViewport)\n    │       ├── MinimapCamera (Camera2D)\n    │       └── MinimapWorld (mirrors or references world nodes)\n    └── NotificationStack (VBoxContainer — anchored top-right)\n```\n\n**Key rules:**\n- Keep all HUD scenes under a single `CanvasLayer`. Do not mix HUD nodes into the game world tree.\n- Use `layer = 1` for the main HUD. Use higher values (e.g. `10`) for overlays or pause menus that must appear above the HUD.\n- Damage numbers are an exception — they can live in a `Node2D` child of the `CanvasLayer` and use `get_viewport().get_canvas_transform()` to convert world positions to screen positions.\n\n---\n\n## 2. Health Bar\n\n### ProgressBar vs TextureProgressBar\n\n| Node | When to use |\n|---|---|\n| `ProgressBar` | Prototyping, plain-colour bars |\n| `TextureProgressBar` | Pixel-art or stylised bars using sprite sheets |\n\nBoth expose `min_value`, `max_value`, and `value`. Set `step = 0` so tweening produces a smooth animation rather than snapping to steps (`TextureProgressBar` defaults `step` to 1, `ProgressBar` to 0.01).\n\n### GDScript\n\n```gdscript\n## health_bar.gd — attach to a ProgressBar or TextureProgressBar\nclass_name HealthBar\nextends ProgressBar\n\n## Reference to the HealthComponent this bar tracks.\n## Assign in the Inspector or connect programmatically from the HUD root.\n@export var health_component: HealthComponent\n\n## Duration (seconds) for the smooth tween on health change.\n@export var tween_duration: float = 0.25\n\nvar _tween: Tween\n\n\nfunc _ready() -> void:\n    step = 0.0  # allow fractional values for smooth animation\n    if health_component:\n        _connect_component(health_component)\n\n\n## Call this if the HealthComponent is not available at _ready time\n## (e.g. the player spawns after the HUD).\nfunc bind(component: HealthComponent) -> void:\n    if health_component:\n        health_component.health_changed.disconnect(_on_health_changed)\n    health_component = component\n    _connect_component(component)\n\n\nfunc _connect_component(component: HealthComponent) -> void:\n    max_value = component.max_health\n    value     = component.current_health\n    component.health_changed.connect(_on_health_changed)\n\n\nfunc _on_health_changed(current: int, maximum: int) -> void:\n    max_value = maximum\n    _animate_to(current)\n\n\nfunc _animate_to(target_value: float) -> void:\n    if _tween:\n        _tween.kill()\n    _tween = create_tween()\n    _tween.set_ease(Tween.EASE_OUT)\n    _tween.set_trans(Tween.TRANS_QUAD)\n    _tween.tween_property(self, \"value\", target_value, tween_duration)\n```\n\n### C#\n\n```csharp\n\u002F\u002F HealthBar.cs — attach to a ProgressBar or TextureProgressBar\nusing Godot;\n\npublic partial class HealthBar : ProgressBar\n{\n    [Export] public HealthComponent HealthComponent { get; set; }\n    [Export] public float TweenDuration { get; set; } = 0.25f;\n\n    private Tween _tween;\n\n    public override void _Ready()\n    {\n        Step = 0.0;\n        if (HealthComponent != null)\n            ConnectComponent(HealthComponent);\n    }\n\n    \u002F\u002F\u002F \u003Csummary>Call this when the HealthComponent is not available at _Ready time.\u003C\u002Fsummary>\n    public void Bind(HealthComponent component)\n    {\n        if (HealthComponent != null)\n            HealthComponent.HealthChanged -= OnHealthChanged;\n        HealthComponent = component;\n        ConnectComponent(component);\n    }\n\n    private void ConnectComponent(HealthComponent component)\n    {\n        MaxValue = component.MaxHealth;\n        Value    = component.CurrentHealth;\n        component.HealthChanged += OnHealthChanged;\n    }\n\n    private void OnHealthChanged(int current, int maximum)\n    {\n        MaxValue = maximum;\n        AnimateTo(current);\n    }\n\n    private void AnimateTo(float targetValue)\n    {\n        _tween?.Kill();\n        _tween = CreateTween();\n        _tween.SetEase(Tween.EaseType.Out);\n        _tween.SetTrans(Tween.TransitionType.Quad);\n        _tween.TweenProperty(this, \"value\", targetValue, TweenDuration);\n    }\n}\n```\n\n**Tip:** If you use `TextureProgressBar`, set `fill_mode` to `FILL_LEFT_TO_RIGHT` and assign your bar texture to `texture_progress`. The `value` \u002F `max_value` ratio drives how much of the texture is revealed.\n\n---\n\n## 3. Score \u002F Label Display\n\n### GDScript\n\n```gdscript\n## score_display.gd — attach to a Label\nclass_name ScoreDisplay\nextends Label\n\n## Duration (seconds) to count from old to new score value.\n@export var count_duration: float = 0.4\n\nvar _displayed_score: int = 0\nvar _tween: Tween\n\n\nfunc _ready() -> void:\n    EventBus.score_changed.connect(_on_score_changed)\n    text = \"0\"\n\n\nfunc _on_score_changed(new_score: int) -> void:\n    _animate_counter(_displayed_score, new_score)\n\n\nfunc _animate_counter(from: int, to: int) -> void:\n    if _tween:\n        _tween.kill()\n\n    _tween = create_tween()\n    _tween.set_ease(Tween.EASE_OUT)\n    _tween.set_trans(Tween.TRANS_QUAD)\n    # Tween an intermediate float; update the label text each step.\n    _tween.tween_method(_set_counter_value, float(from), float(to), count_duration)\n\n\nfunc _set_counter_value(value: float) -> void:\n    _displayed_score = int(value)\n    text = str(_displayed_score)\n```\n\n### C#\n\n```csharp\n\u002F\u002F ScoreDisplay.cs — attach to a Label\nusing Godot;\n\npublic partial class ScoreDisplay : Label\n{\n    [Export] public float CountDuration { get; set; } = 0.4f;\n\n    private int _displayedScore = 0;\n    private Tween _tween;\n\n    public override void _Ready()\n    {\n        GetNode\u003CEventBus>(\"\u002Froot\u002FEventBus\").ScoreChanged += OnScoreChanged;\n        Text = \"0\";\n    }\n\n    private void OnScoreChanged(int newScore)\n    {\n        AnimateCounter(_displayedScore, newScore);\n    }\n\n    private void AnimateCounter(int from, int to)\n    {\n        _tween?.Kill();\n        _tween = CreateTween();\n        _tween.SetEase(Tween.EaseType.Out);\n        _tween.SetTrans(Tween.TransitionType.Quad);\n        _tween.TweenMethod(\n            Callable.From\u003Cdouble>(SetCounterValue),\n            (double)from,\n            (double)to,\n            CountDuration\n        );\n    }\n\n    private void SetCounterValue(double value)\n    {\n        _displayedScore = (int)value;\n        Text = _displayedScore.ToString();\n    }\n}\n```\n\n**EventBus signals needed:**\n\n```gdscript\n# autoloads\u002Fevent_bus.gd\nsignal score_changed(new_score: int)\n```\n\n```csharp\n\u002F\u002F EventBus.cs (partial — score signal)\n[Signal] public delegate void ScoreChangedEventHandler(int newScore);\n```\n\nEmit from wherever points are awarded:\n\n```gdscript\n# Inside a collectible or enemy death handler\nEventBus.score_changed.emit(GameState.score)\n```\n\n```csharp\n\u002F\u002F Inside a collectible or enemy death handler\nGetNode\u003CEventBus>(\"\u002Froot\u002FEventBus\").EmitSignal(EventBus.SignalName.ScoreChanged, GameState.Score);\n```\n\n---\n\n## 4. Damage Numbers\n\nFloating \"−25\" labels that rise and fade above the hit point. Pooled in a HUD-side spawner; world position converted to screen via `get_viewport().get_canvas_transform()`. Optional crit colorization before spawn.\n\n> See [references\u002Fdamage-numbers.md](references\u002Fdamage-numbers.md) for the full GDScript and C# DamageNumber scene + pooled spawner.\n\n---\n\n## 5. Notification System\n\nToast \u002F notification stack — a `VBoxContainer` anchored top-right with `max_visible` clamping and queue-driven dismissal. New toasts wait for an old one to expire before showing.\n\n> See [references\u002Fnotifications.md](references\u002Fnotifications.md) for the full GDScript and C# stack with auto-dismiss timers.\n\n---\n\n## 6. Minimap Concept\n\nRender a top-down view via a dedicated `SubViewport` + `Camera2D` that follows the player. Display the SubViewport texture in a `TextureRect` inside the HUD. Optional circular mask via `ColorRect` shader. Set `render_target_update_mode = UPDATE_ALWAYS`.\n\n> See [references\u002Fminimap.md](references\u002Fminimap.md) for the SubViewport setup, MinimapCamera GDScript + C#, and circular-mask shader.\n\n---\n\n## 7. Interaction Prompts\n\nScreen-space \"Press [E] to interact\" prompt — a `Label` inside the HUD that follows an interactable's screen position each frame. Driven by `body_entered` \u002F `body_exited` on the interactable's `Area2D`. Use `InputMap.action_get_events(name)` to display the correct key for the player's current binding.\n\n> See [references\u002Finteraction-prompts.md](references\u002Finteraction-prompts.md) for the full GDScript and C# prompt + Interactable Area2D pair.\n\n---\n\n## 8. Checklist\n\n- [ ] All HUD nodes are children of a `CanvasLayer` (unaffected by `Camera2D`) with `layer >= 1` so they draw above the world\n- [ ] `step` is set to `0.0` for smooth tween animation (`TextureProgressBar` snaps to whole values by default)\n- [ ] Health bar binds to `HealthComponent.health_changed` signal — does not poll in `_process`\n- [ ] Tween is killed (`_tween.kill()`) before starting a new one so rapid damage does not stack animations\n- [ ] Score counter uses `tween_method` to interpolate the displayed integer — not a jump cut\n- [ ] Damage number positions are converted from world space to screen space using `get_viewport().get_canvas_transform()`\n- [ ] Damage number pool size is large enough that labels are not recycled before their tween completes\n- [ ] Notification stack enforces `max_visible` and re-checks the queue after each dismissal\n- [ ] Toast auto-dismiss uses a `Timer` node — not `await get_tree().create_timer()`\n- [ ] `SubViewport` for minimap has `render_target_update_mode = UPDATE_ALWAYS`\n- [ ] Minimap `Camera2D` zoom and the `SubViewport`'s `canvas_cull_mask` are configured so only the intended visibility layers are visible\n- [ ] Interaction prompt converts the interactable's world position each frame — not cached at spawn time\n- [ ] `InputMap.action_get_events()` is used to display the correct key for the player's current binding\n- [ ] HUD nodes that do not need input set `mouse_filter = MOUSE_FILTER_IGNORE` to avoid blocking game clicks\n",{"name":5,"description":7},"master","d7b26cdb5fae14d4ef7b713c5bf259395e75c3c6","skills\u002Fhud-system",63,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter","https:\u002F\u002Fgithub.com\u002Fjame581","https:\u002F\u002Fjanmesarc.online\u002F","Software engineer. My biggest passion is game development.","2026-11-14 20:45:49",{"source":8,"skillName":5,"commands":42,"prompt":52,"zipAvailable":53},[43,46,49],{"tool":44,"command":45},"npx","npx skills add jame581\u002FGodotPrompter --skill hud-system",{"tool":47,"command":48},"bunx","bunx skills add jame581\u002FGodotPrompter --skill hud-system",{"tool":50,"command":51},"pnpm","pnpm dlx skills add jame581\u002FGodotPrompter --skill hud-system","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fhud-system\u002FSKILL.md",true,[55,61,65,69],{"path":56,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002Fdamage-numbers.md","REFERENCE","参考文档",6709,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fhud-system\u002Freferences\u002Fdamage-numbers.md",{"path":62,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Finteraction-prompts.md",5569,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fhud-system\u002Freferences\u002Finteraction-prompts.md",{"path":66,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fminimap.md",3882,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fhud-system\u002Freferences\u002Fminimap.md",{"path":70,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Fnotifications.md",4272,"https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fhud-system\u002Freferences\u002Fnotifications.md",[74,94,115,139,155,173],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":27},"01M6KRFE5BR2PSD08ZKDAS66R7","xr-development","Use when building VR\u002FAR\u002FXR applications — OpenXR setup, XROrigin3D, hand tracking, controllers, passthrough, and Meta Quest deployment in Godot 4.3+","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fxr-development\u002FSKILL.md",[],[81,82,26,83,84,85,86,87,88,89,90,25,91,92,93],"xr development","development","deployment","godot","vr","setup","tracking","godot 4","ar","hand","Meta","applications","quest",{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":27},"01M6KRF8GZTG1TAS506MFBSGFC","web-services","Use when a Godot game calls a web server — HTTPRequest, downloads, REST\u002FJSON APIs, auth headers, WebSocketPeer clients, TLS, retries, and keeping secrets out of the build. Not for game networking\u002FRPCs (multiplayer-basics) or browser export (web-export)","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fweb-services\u002FSKILL.md",[],[101,102,103,104,105,106,107,108,25,26,84,109,110,111,112,113,114],"web services","web","services","tls","retries","calling","auth","downloads","clients","headers","secrets","json","build","REST",{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":27},"01M6KRF38Q4WSKAYFS56PG87T0","web-export","Use when shipping a Godot game to the browser — Web export preset options, threads vs no-threads and COOP\u002FCOEP headers, hosting on itch.io or your own server, PWA, JavaScriptBridge, user:\u002F\u002F persistence, audio and input limits, and load size","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fweb-export\u002FSKILL.md",[],[102,122,123,124,125,126,127,128,110,129,130,26,131,132,133,24,134,135,25,136,137,138],"export","web export","threads","limits","shipping","size","options","hosting","input","Coop","preset","browser","io","load","pwa","Audio","server",{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":145,"publishedAt":27},"01M6KREYFETEBH62ZTN6EZH2X3","using-godot-prompter","Bootstrap skill — establishes how to find and use GodotPrompter skills, with platform-specific tool mapping","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fusing-godot-prompter\u002FSKILL.md",[],[84,146,147,148,149,25,150,151,152,153,154],"using godot prompter","find","with","bootstrap","tool","platform","mapping","how","how to",{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":27},"01M6KRER5G7EQWKGAFN8QJKQ69","tween-animation","Use when implementing tweens — property animation, method tweening, chaining, parallel sequences, easing, and common UI\u002Fgameplay motion recipes","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Ftween-animation\u002FSKILL.md",[],[162,163,25,164,165,166,167,168,169,170,171,26,172],"tween animation","Animation","motion","parallel","gameplay","chaining","ui","recipes","common","implementing","sequences",{"skillNo":174,"name":175,"nameZh":6,"description":176,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":177,"categories":178,"keywords":179,"publishedAt":27},"01M6KREKGCQMVDV8WX7HWX8BZG","state-machine","Use when building a state machine or refactoring logic into one — enum, node, and resource-based FSM patterns with trade-offs. Not for adding states to an existing one","https:\u002F\u002Fgithub.com\u002Fjame581\u002FGodotPrompter\u002Fblob\u002Fmaster\u002Fskills\u002Fstate-machine\u002FSKILL.md",[],[180,181,182,84,26,183,184,185,186,187,148,25,171,188],"state","state machine","machine","patterns","node","fsm","state machines","trade","trade-offs"]