Skip to content

Fix enemy rotation/HP-bar + smartphone playfield/UI (v1.1.3) - #3

Merged
Alex2pankrat merged 2 commits into
mainfrom
arena/3bc0469c-bulwark
Nov 23, 2026
Merged

Alex2pankrat merged 2 commits into
mainfrom
arena/3bc0469c-bulwark

Conversation

@Alex2pankrat

@Alex2pankrat Alex2pankrat commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

What

Fixes two player-visible problems and ships them in a new release.

1. Enemy rotation + health bar (single root cause)

Sprites are drawn facing right, but the old code rotated the whole enemy
node by dir.angle() + PI/2. Travelling right turned units 90 degrees clockwise,
and the health bar (drawn in local space at the top of the unit) landed on the
right side, vertical instead of on top.

Now only the sprite child is rotated to exactly dir.angle(), the enemy node
itself stays unrotated (so the HP bar stays horizontal on top), and the sprite
is centred on the unit so rotation spins around its own centre. Ground units
turn at every bend just like fliers.

2. Smartphone playfield / UI

  • New shared UIKit.is_compact() predicate (mobile feature, or window smaller
    than 900x560) plus a touch_min() sizing helper.
  • game_screen: full-screen board background in compact mode and a uniformly
    fitted playfield centred on the viewport.
  • hud: enlarged compact chip/button strip on the playfield, ability row in the
    top bar, larger cancel/call buttons, bigger status fonts.
  • Larger compact sizes/fonts across build_button, ability_button, tower_panel,
    overlay, settings_screen/panel, main_menu, level_select and credits_screen,
    so the UI reads well on phones while staying unchanged on PC.

Version

  • Bump to 1.1.3 (project.godot config/version, Android version/code=3).

Validation

  • Rotation diagnostic: all 4 enemy kinds - node rotation 0 at straight and
    bend, sprite rotation == dir.angle() and changes at a bend. PASSED.
  • tools/test.sh: unit tests, level smoke test, autoplay on 3 difficulties.
    all checks passed, no regressions.
  • gdlint: no parse/syntax errors (only pre-existing style warnings).

Alex2pankrat and others added 2 commits November 23, 2026 08:45
Enemy fix (single root cause):
- Sprites are drawn facing right; the old code rotated the whole enemy node by
  dir.angle() + PI/2, which turned units 90 deg clockwise when travelling right
  and placed the health bar (drawn in local space at the top) on the right side,
  vertical. Rotate only the sprite child to dir.angle() and keep the enemy node
  unrotated, so the HP bar stays horizontal on top. Centre the sprite on the unit
  (offset = -texture.size * 0.5) so rotation spins around its own centre.

Smartphone playfield/UI adaptation:
- Add UIKit.is_compact() predicate (mobile feature, or window smaller than
  900x560) and touch_min() sizing helper.
- game_screen: full-screen board background in compact mode and a uniformly fitted
  playfield centred on the viewport.
- HUD: enlarged compact chip/button strip on the playfield, ability row in the
  top bar, larger cancel/call buttons, bigger status fonts.
- Larger compact sizes/fonts across build_button, ability_button, tower_panel,
  overlay, settings_screen/panel, main_menu, level_select, credits_screen so the
  UI reads well on phones while staying unchanged on PC.

Validated: rotation diagnostic (all 4 enemy kinds) + tools/test.sh (unit, smoke,
autoplay x3 difficulties) pass.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@Alex2pankrat
Alex2pankrat merged commit 402c3f4 into main Nov 23, 2026
1 check passed
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