feat: tracer bullet — greybox arena, positioning piloting, auto-fire KINETIC weapon

One-screen 640x360 arena (walls, grid floor, fixed view), mech with
positioning-only movement (WASD/arrows, accel/decel, no aim), auto-fire
KINETIC hardpoint (nearest-target, visible range ring) firing slugs
that damage + knock back, untagged grunt trickle spawner with contact
damage, hull bar HUD, scene-reload on hull zero.

Headless smoke gate: tests/smoke.tscn asserts boot, piloting movement,
spawning, input-free auto-fire, grunt lethality, knockback displacement.
3/3 passes on nh3-dev headless 4.7.1.
This commit is contained in:
vh
2026-08-06 22:21:10 -07:00
parent df9236f403
commit 380088c694
20 changed files with 512 additions and 0 deletions
+68
View File
@@ -0,0 +1,68 @@
[gd_scene load_steps=6 format=3]
[ext_resource type="Script" path="res://scripts/arena.gd" id="1"]
[ext_resource type="PackedScene" path="res://scenes/mech.tscn" id="2"]
[ext_resource type="Script" path="res://scripts/spawner.gd" id="3"]
[sub_resource type="RectangleShape2D" id="wall_h"]
size = Vector2(640, 16)
[sub_resource type="RectangleShape2D" id="wall_v"]
size = Vector2(16, 360)
[node name="Arena" type="Node2D"]
script = ExtResource("1")
[node name="WallTop" type="StaticBody2D" parent="."]
position = Vector2(320, 8)
collision_layer = 1
collision_mask = 0
[node name="Collision" type="CollisionShape2D" parent="WallTop"]
shape = SubResource("wall_h")
[node name="WallBottom" type="StaticBody2D" parent="."]
position = Vector2(320, 352)
collision_layer = 1
collision_mask = 0
[node name="Collision" type="CollisionShape2D" parent="WallBottom"]
shape = SubResource("wall_h")
[node name="WallLeft" type="StaticBody2D" parent="."]
position = Vector2(8, 180)
collision_layer = 1
collision_mask = 0
[node name="Collision" type="CollisionShape2D" parent="WallLeft"]
shape = SubResource("wall_v")
[node name="WallRight" type="StaticBody2D" parent="."]
position = Vector2(632, 180)
collision_layer = 1
collision_mask = 0
[node name="Collision" type="CollisionShape2D" parent="WallRight"]
shape = SubResource("wall_v")
[node name="Mech" parent="." instance=ExtResource("2")]
position = Vector2(320, 180)
[node name="Spawner" type="Node2D" parent="."]
script = ExtResource("3")
[node name="HUD" type="CanvasLayer" parent="."]
[node name="HullBack" type="ColorRect" parent="HUD"]
offset_left = 8.0
offset_top = 8.0
offset_right = 128.0
offset_bottom = 14.0
color = Color(0.06, 0.07, 0.08, 1)
[node name="HullFill" type="ColorRect" parent="HUD"]
offset_left = 9.0
offset_top = 9.0
offset_right = 127.0
offset_bottom = 13.0
color = Color(0.55, 0.8, 0.55, 1)