Skill tree, node-based building animation, bigger UI, and a 19x faster test suite
Gameplay and UI - Research tree at the mothership gates which structures can be built and grants permanent fleet-capacity upgrades (GameState.SKILL_TREE, SkillTreeView). Node depth is derived from prerequisites, so the layout cannot drift out of step with the dependencies. - Building info popup before committing to a build, with per-building cost and description. - Ship crafter redrawn as a space factory with an assembly animation; mothership redrawn as a radial flagship; command centre as a plotting hub. - Keyboard and mouse support (WASD, Q/E pivot, wheel zoom) for the web build. - UI and font scaled up for phone use, via a custom Theme resource - gui/theme/default_font_size does not reach the default theme. - Asteroids no longer spawn on top of the fleet's start position. - Fleet formation origin derived from the layout's own offsets rather than the centroid, fixing the lurch when a lopsided formation started moving. - Fleet.stop() brakes from the ship's TRUE motion (velocity + fleet_velocity). Ship zeroes its velocity when seated in its slot even while the anchor drags that slot forward, so braking from velocity alone stopped the fleet dead instead of coasting - and whether it did depended on the frame rate. Animation architecture (issue #10) - Buildings, projectiles and explosion VFX no longer animate by redrawing. Static geometry is rasterised once in _draw(); moving parts are NeonPiece children animated through node properties, which reuse the cached geometry. Every NeonDraw call expands into four antialiased polylines, so redrawing to move something re-tessellated all of it. Test suite (issue #8): 1075s -> ~55s - Runs from a copy on Termux's own filesystem. The project lives on Android's FUSE bridge, read through proot, where load("res://Main.tscn") alone cost 8.5s per test against ~2s natively - and nearly every test loads it. - Runs 6 tests at a time, in a single proot-distro login, with output buffered per test and printed only on failure. - --fixed-fps 60 pins delta instead of measuring the wall clock, so a test's result no longer depends on how busy the machine is. Without it, parallelism made two tests fail on 2 of 3 runs. - A test passes only if it both exits 0 and prints ": PASS". - 38 tests, green on three consecutive runs. Bundles Carrois Gothic SC (Apache 2.0) with its licence text. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
85814ce88c
commit
b641fa5891
48 changed files with 1985 additions and 303 deletions
|
|
@ -227,18 +227,31 @@ func _draw_crafter_icon(center: Vector2, pulse: float, s: float) -> void:
|
|||
|
||||
|
||||
func _draw_command_icon(center: Vector2, pulse: float, s: float) -> void:
|
||||
# Diamond with three formation pips - "arrangement".
|
||||
var d: float = 14.0 * s
|
||||
# Hex plotting rim with spokes to a diamond hub, echoing the placed
|
||||
# structure's silhouette: half the ports carry a formation token.
|
||||
var hex_r: float = 11.0 * s
|
||||
var hub_r: float = 4.0 * s
|
||||
var hex: PackedVector2Array = PackedVector2Array()
|
||||
for i in range(6):
|
||||
var a: float = (float(i) / 6.0) * TAU + PI / 6.0
|
||||
hex.append(center + Vector2(cos(a), sin(a)) * hex_r)
|
||||
NeonDraw.draw_glowing_polygon(self, hex, _active_color(), pulse, core_color)
|
||||
|
||||
for i in range(6):
|
||||
var a: float = (float(i) / 6.0) * TAU + PI / 6.0
|
||||
var dir: Vector2 = Vector2(cos(a), sin(a))
|
||||
NeonDraw.draw_glowing_line(self, center + dir * hub_r, center + dir * hex_r, _active_color(), pulse, 0.32 * s, core_color)
|
||||
if i % 2 == 0:
|
||||
var tip: Vector2 = center + dir * hex_r
|
||||
var t: float = 2.6 * s
|
||||
NeonDraw.draw_glowing_polygon(self, PackedVector2Array([
|
||||
tip + Vector2(0, -t), tip + Vector2(t, 0), tip + Vector2(0, t), tip + Vector2(-t, 0),
|
||||
]), _active_color(), pulse, core_color)
|
||||
|
||||
NeonDraw.draw_glowing_polygon(self, PackedVector2Array([
|
||||
center + Vector2(0, -d), center + Vector2(d, 0),
|
||||
center + Vector2(0, d), center + Vector2(-d, 0),
|
||||
center + Vector2(0, -hub_r), center + Vector2(hub_r, 0),
|
||||
center + Vector2(0, hub_r), center + Vector2(-hub_r, 0),
|
||||
]), _active_color(), pulse, core_color)
|
||||
for p in [Vector2(0, -5), Vector2(-5, 4), Vector2(5, 4)]:
|
||||
NeonDraw.draw_glowing_polygon(self, PackedVector2Array([
|
||||
center + (p + Vector2(0, -3)) * s,
|
||||
center + (p + Vector2(-2.6, 2.4)) * s,
|
||||
center + (p + Vector2(2.6, 2.4)) * s,
|
||||
]), _active_color(), pulse, core_color)
|
||||
|
||||
|
||||
func _draw_extractor_icon(center: Vector2, pulse: float, s: float) -> void:
|
||||
|
|
|
|||
Loading…
Reference in a new issue