hud_gauge, hud_attitude_indicator, and hud_heading_tape now skip queue_redraw() when the newly-lerped value hasn't moved past a small epsilon, instead of redrawing every frame forever. Angle-wrapping values (heading, attitude roll) use a new shared angle_delta_deg helper on HudInstrument so the wrap boundary doesn't read as a false jump. HUD.tscn's Instruments node now sets process_mode = 1 (PAUSABLE), overriding the inherited ALWAYS mode from the HUD root so instruments stop processing during the post-match pause freeze, while sibling ResultOverlay keeps running its win-screen tween.
8.7 KiB
TODO
Deferred work, in rough priority order. The current architecture (ShipAction/ShipController seam, Arena/GameMode split, code-driven spawning, group-tagged ball/goals) was chosen specifically so these bolt on without rework.
AI opponent (reinforcement learning)
The training pipeline is built — see TRAINING.md (self-play PPO via the vendored godot_rl_agents bridge, JSON policy export, in-game GDScript inference, eval ladder). Remaining:
- Long training runs on the Linux/3090 box to produce actually-good bots; promote further checkpoints into
Game/bots/promoted/asmedium/hardtiers once they cleareasy.jsoninevaluate.py. - Frozen-opponent league: train the live policy against a pool of past exported checkpoints, sampled per-episode (today's
--opponent-mode=frozenonly supports one fixed model per run) to prevent self-play strategy collapse on long runs. - Richer state setter / curriculum: aerial states, wall plays, rebound scenarios as skill grows (beyond the score/defend/draw staging already in place).
Correctness
Bugs found in an adversarial review. None are gameplay- or physics-affecting, so all are safe to land against the current Game/bots/ checkpoints.
VideoSettings.apply_to_environment()(scripts/video_settings.gd) compounds on every arena load:env.glow_intensity *= glow_scalemutates anEnvironmentthat is a[sub_resource]of the arena scene, and Godot shares sub-resources across instantiations of a cachedPackedScene. Glow at 50% becomes 25% then 12.5% across repeat entries. Fix by duplicating the Environment inArena._ready()(scripts/arena.gd). Regression test: set glow to 50%, enter/leave Free Play three times, confirm it's still 50%.- Collapse the four disagreeing team palettes into one source of truth —
ship.gd,HUDController.gdandgoal.gdeach declareTEAM_COLORS,arena_boundary.gdexportsteam0_tint/team1_tint, andarena_deck.gdshaderdefaults to a fifth pair. Three of them disagree, so nose, goal rim, end zone and scoreboard are all different blues. - Goal scoring volume (3.5 x 1.5,
objects/goal.tscn) is smaller than the drawn mouth (3.7 x 1.65,ArenaBoundary.GOAL_APERTURE_*) — a ball crossing the visible edge doesn't score. Derive the aperture constants from the goal's collision shape, the waygoal.gd:53already measures its own visuals. match_mode.gd: full time can fire mid-kickoff-countdown, and the stalled coroutine resumes into the dying scene (can re-emitkickoff_countdown/ unfreeze bodies for a frame). Guard_run_kickoff_countdownwith a match-over flag.match_mode.gdemitstimer_updatedevery frame for a value that changes once a second; the HUD re-formats and re-shapes the label each time. Emit only on change, matchingship.gd's threshold-gated telemetry discipline.HUDControllerbinds toget_first_node_in_group("ship")in a group that always has 2+ members — works only because the player ship happens to spawn first. Have the game mode hand the HUD its target ship.- Reuse a member
ShipActioninship.gd(controllerless path) andplayer_ship_controller.gdinstead of allocating one per physics tick;ai_ship_controller.gdalready does this correctly. - Delete the duplicate 1 MB texture —
assets/textures/planet_surface.pngandassets/models/nebula_planet_planet_surface.pngare byte-identical.
Performance
- Shared per-team materials instead of
Ship._apply_team_color()allocating a freshStandardMaterial3Dand assigning it asmaterial_override(and running at least twice per ship — once from_ready, once from theteamsetter). Removes the allocation and lets same-team ships batch. - Merge each goal's visuals into one
ArrayMeshwith a hull surface and a net surface — currently 11MeshInstance3Ds and 4 materials per goal, ~22 draw calls for a static prop.arena_boundary.gd:333already demonstrates theSurfaceTooltechnique in this codebase. - Merge the four non-tinted ship meshes (Hull/Canopy/EngineGlowL/R) into one — 6 draw calls per ship down to 3. Irrelevant at 1v1; 36 calls before VFX at 3v3.
- Cache the camera in
ArenaBoundary._processinstead of aget_viewport().get_camera_3d()tree lookup every frame (ship_camera.gdalready caches the ball this way). - Name collision layers in
project.godotand assign them — nothing configurescollision_layer/collision_masktoday, so every body tests against every other. - Measure
nebula_dust.gdshader's per-fragment depth-texture sample across 500 large soft billboards before adding more particle work. - Bake
ArenaBoundary's ~160 runtime-generatedCollisionShape3Dnodes into the scene. Costs a load hitch on every arena entry and repeats in every parallel headless training env. Blocked on the trained-bot decision below —arena_boundary.gd:235notes this geometry is what the shipped policies were fitted against, so the bake must be verified byte-identical.
Presentation / AAA polish
The largest gap between this and a AAA-feeling product is presentation, not code. Sequenced after the above for pragmatic reasons, but this is the highest impact per hour.
- Audio — there is none. Zero sound files, zero
AudioStreamPlayernodes, no bus layout. Needs: engine hum pitched to throttle, turbo whoosh, ball impacts scaled by collision impulse, wall scrapes, goal explosion, crowd bed, UI clicks, countdown beeps, music. Can be driven offShip's existing telemetry signals. - SSAO/SSIL in the arena Environments — cheapest single perceived-quality win available; grounds the ships against the deck and gives the fillets and goal recesses real depth.
- VFX on anything that moves:
EngineGlowL/Rare static meshes that don't respond to throttle. No thruster plume, turbo flame, ball trail, impact sparks or goal burst.arena_02is the only scene with any particles at all. - Impact feedback — screen shake, hit-stop, flash, controller rumble on ball contact.
- Camera feel in
ship_camera.gd— fixed distance/height/FOV today. Speed-based FOV widening, turbo kick, impact shake. - Goal celebration sequence: today it's a
print()and a label scale-pop. Wants an explosion, team-tinted screen flash, camera cut, slow-mo, title card.HUDController'sResultOverlayanimation is a reasonable template. - Local lighting / LightmapGI bake — two directional lights and low ambient, no local lights anywhere.
arena_deck.gdshader'shull_filluniform is explicitly a "stand-in for bounce light", i.e. the shader is compensating for lighting that isn't there. The arena is fully static, so a bake is viable; retirehull_fillafterwards. - Dress
arena_03— itsDecorationnode is empty, whilearena_02has stations, debris, a planet and volumetric dust. - Custom font + a real
Themeresource for the HUD. The procedural instruments are well-engineered, butThemeDB.fallback_fontat 10-13 px reads as a debug overlay. - Post-processing beyond glow: DoF, motion blur, vignette, chromatic aberration on turbo.
Open decision — trained-bot compatibility
Four items collide with the checkpoints in Game/bots/. Decide the policy before scheduling any of them; everything in Correctness and DRY above is safe either way.
- Per-tick drag (
ship.gd):state.linear_velocity *= drag_coefficientandangular_velocity *= 0.9aren't delta-scaled, andproject.godotnever pinsphysics/common/physics_ticks_per_second. Correct at 60 Hz, silently different at any other rate. Zero-risk option: pin the tick rate to 60 and document the dependency. Correct-but-breaking option: delta-scale it and retrain. - Goal aperture — cutting a real opening in the end walls so the ball visibly enters the net changes collision geometry the policies were fitted against. Today the walls are solid and the pocket/net are unreachable decoration.
- Collider bake (see Performance above) — safe only if byte-identical to the current generated output.
- Beyond 1v1 —
ai_ship_controller.gdtakes the first non-self ship as "the opponent" andship_observations.gdhas room for exactly one. The observation space is the hardest thing to change later, so decide whether 2v2/3v3 is in scope before more training time is spent.
Multiplayer (long term)
RemoteShipController extends ShipController— feeds replicatedShipActions from a network peer into the local ship simulation.- Networked
GameModesubclass: per-peer ship spawning (MultiplayerSpawner or custom), authoritative server for ball/score. - C# backend / online servers per README roadmap (not started).
- Possible v0.2 split-screen: spawn one
ship_camera_rig+ viewport per local player (camera is already outside the ship scene to allow this).