ShippedMedium

Vertical slice part 1: tunable config, day/dusk/night clock, noise subsystem, lootable containers, inventory and hub stockpile

Proposed by Jonathan Miller 1 month agoFunding opened 1 month agoFunded 1 month agoShipped 1 month ago
Acceptance · round 1
Shipped
CIPassed
Automated reviewPass with concerns

This is a thorough, well-structured implementation of all part-1 systems: settings, the GameState-owned clock with deterministic `Advance`, lighting, the noise subsystem, inventory, interaction, containers, stockpile, a Canvas HUD, automation tests and extensive docs including ADR 0009 and VALIDATION.md §7. The code follows existing project patterns, adds no binary assets or networking, and documents extension points for parts 2 and 3. The main caveat is that none of it has been compiled or run, and CI build was skipped, so acceptance hinges on the maintainer's local build and test pass. A few minor design points (legacy input mapping, absolute hub coordinates, test UCLASS in non-test builds) are worth a look.

Acceptance criteria · 10 of 12 met
  • YESConfig: a settings class exposes every A1 value; no gameplay code hard-codes them`USeminoleSettings` (`UDeveloperSettings`, `Config=Game`) has Day 480, Dusk 60, Bow 500, Rifle 3000, search 2 s and `ScavengingContainers` supply lists; the clock, container, test environment and interaction code all read `GetDefault<USeminoleSettings>()`.
  • YESDay clock: auto-advances Day→Dusk→Night from start, broadcasts phase delegate, time remaining queryable, ResetToDay restores full Day, starts in Day without console`USeminoleDayClockComponent` on `ASeminoleGameState` calls `ResetToDay` in `BeginPlay`, `Advance` carries leftover time across boundaries and stops at Night, and it exposes `OnPhaseChanged` and `GetPhaseTimeRemaining`.
  • YESLighting: directional (and sky) light interpolate day→dusk, reach night value at Night`USeminoleDayLightingComponent::ApplyLighting` lerps Day→Dusk values across Day and Dusk→Night values across Dusk, holds Night values at Night, and drives both the sun and the sky light.
  • YESHUD: phase + time remaining, visible dusk warning, carried supplies and stockpile totals`ASeminoleHUD::DrawClock` draws the phase, the countdown and a centred DUSK box; `DrawSupplies` draws the carried and stockpile totals, all via `AHUD` Canvas.
  • YESNoise: world subsystem EmitNoise(Location, Radius, Instigator); only registered listeners within 3D radius receive event with location and instigator`USeminoleNoiseSubsystem::EmitNoise` tests `DistSquared` against weak-pointer registered `ISeminoleNoiseListener`s and passes an `FSeminoleNoiseEvent` carrying location, radius and instigator.
  • YESInventory: UActorComponent on player pawn with per-type counts, add/remove/query`USeminoleInventoryComponent` provides `AddSupply`/`AddSupplies`/`RemoveSupply`/`GetSupplyCount`/`TakeAll` and is added in the `ASeminolePlaceholderCharacter` constructor.
  • YESContainers: ≥3 spawned at scavenging area, timed search of configured duration, grants supplies, cannot be re-searched, visual change`EnsureSlicePlaceholders` spawns one container per `ScavengingContainers` entry (3 by default) 30 m along +X; `ASeminoleSupplyContainer` handles `BeginSearch`/`AdvanceSearch`/`FinishSearch`, turns the crate grey and refuses a second search.
  • YESStockpile: spawned at hub, deposit empties inventory, totals authoritative, TrySpend returns false without change when short`ASeminoleStockpile` holds the totals; `DepositAll` uses `TakeAll`, and `TrySpend` checks `Get(Type) < Amount` and returns false before mutating.
  • YESTests: noise filtering, clock transitions with deterministic time + reset, loot flow (grant, second search nothing, deposit, TrySpend)`SeminoleNoiseTests`, `SeminoleDayClockTests` (Transitions, LargeStep) and `SeminoleLootTests` use `IMPLEMENT_SIMPLE_AUTOMATION_TEST` and cover every listed case through `Advance`/`AdvanceSearch`.
  • YESDocs: ARCHITECTURE/ADR describe systems and extension points; explain how to try the sliceARCHITECTURE.md gains an 'Implemented: vertical slice part 1' section with part 2/3 hooks, ADR 0009 is new, and README.md adds a walkthrough of the slice loop.
  • PARTIALManual verification list in PR description: compile, test run, input binding, lightingVALIDATION.md §7 covers compile, tests, input, lighting and HUD in detail, but the builder summary (PR description) is truncated, so its own list cannot be confirmed.
  • UNCLEARNo regressions: written to compile cleanly, existing tests not modifiedChanges to existing files are additive (GameMode classes, character components, TestEnvironment) and no existing tests are modified; compilation is unverified because CI build was skipped.
Concerns
  • Nothing has been compiled or run: CI 'build' was skipped and the sandbox had no compiler. Acceptance depends entirely on the maintainer's first build and test run. The riskier spots are already listed in VALIDATION.md 7.1: `FSeminoleTestWorld` world creation, the `AHUD` Canvas calls and `Cast<>` to native interfaces.
  • Interact is added as a legacy action mapping (DefaultInput.ini, E), not through Enhanced Input. This matches the #22 pattern, and the project has no Enhanced Input assets, so A5 is satisfied as documented. A later migration is still owed.
  • `USeminolePhaseRecorder` is a `UCLASS` test double in `Tests/` that is not guarded by `WITH_DEV_AUTOMATION_TESTS`, so it compiles into every build configuration, including shipping. This is minor.
  • The hub stockpile location (400,0,50) and the scavenging area are absolute world coordinates, not offsets from the PlayerStart. On a map whose PlayerStart is not at the origin, the stockpile will not be 4 m in front of the player.
  • A container search keeps running and still grants its supplies after the player walks away. This is documented as a known simplification. The PR description's manual-verification list could not be confirmed because the builder summary is truncated; VALIDATION.md §7 does cover it.

BackersAccepted
1 accept · 0 rebuild · 0 not voted · quorum 1 of 1
MaintainerMerge

Accepted by the backers and merged by the maintainer.

Ballots · 1
AcceptJonathan Miller

Automated review cost $0.40, counted as builder cost.

Motivation

This is part 1 of 3 of the Seminole playable vertical slice. It delivers the non-combat core systems that later parts build on: tunable config, the day/dusk/night clock, the noise system, looting into an inventory, and depositing into a hub stockpile. Parts 2 (canoe, weapons, infected) and 3 (night defense, barricades, full game flow and result) are separate proposals.

Constraints (confirmed by proposer)

  • No compiler or CI in the sandbox. The maintainer compiles and runs the tests locally. Code must:
    • follow existing project patterns and UE 5.8 APIs exactly;
    • avoid uncommon or speculative engine APIs;
    • keep each change small and compile-safe.
  • Placeholder content only. All content is C++ runtime-spawned placeholder primitives that extend the #22 test environment. No new .uasset maps, meshes, animations, audio or widget blueprints.
  • Solo only.
    • No networking code or networking tests.
    • Where cheap, put authoritative state (clock phase, stockpile totals) in GameMode/GameState or world subsystems so later replication is not blocked.

Assumptions

  • A1 Config: One UDeveloperSettings subclass (C++ defaults, editable in Project Settings) holds all tunables:
    • Day 480 s, Dusk 60 s.
    • Bow noise radius 500 uu, rifle noise radius 3000 uu. These are read by part 2.
    • Container search duration 2 s.
    • Supply amounts per container.
  • A2 Clock end state: The clock runs Day → Dusk → Night and stops at Night. It broadcasts a phase-changed delegate and exposes ResetToDay(). Part 3 consumes this delegate for night defense and the Result state.
  • A3 Noise listeners: Noise listeners implement a C++ interface (e.g. INoiseListener). Part 2's infected will implement it. In part 1, a simple placeholder listener actor or a test double verifies delivery.
  • A4 HUD: The HUD is drawn with an AHUD Canvas in C++ to avoid widget assets.
  • A5 Input: Interact uses the project's existing Enhanced Input setup.
    • If an Interact action exists, reuse it.
    • If not, add one following the #22 pattern.
    • If no asset-free path exists, document the manual step needed.
  • A6 Supplies: Supply types are an enum {Food, Ammo, Materials} stored as integer counts.

Scope / Acceptance criteria

  1. Config: A settings class exposes every value in A1. No gameplay code hard-codes these values.
  2. Day clock:
    • A subsystem or GameState-owned clock advances automatically from game start: Day, then Dusk, then Night.
    • Each transition broadcasts a delegate with the new phase.
    • Time remaining in the current phase is queryable.
    • ResetToDay() restores Day with full duration.
    • The game starts in Day without console commands.
  3. Lighting:
    • The test environment's directional light (and sky light, if present) intensity interpolates from day to dusk values.
    • Lighting reaches the night value at Night.
  4. HUD:
    • Shows the current phase and time remaining.
    • Shows a visible dusk warning when Dusk begins.
    • Shows the player's carried supplies and the stockpile totals.
  5. Noise system:
    • A world subsystem offers EmitNoise(Location, Radius, Instigator).
    • Only registered listeners within Radius (3D distance) receive the event, which includes location and instigator.
    • Listeners outside the radius do not receive it.
  6. Inventory: A UActorComponent on the player pawn stores per-type supply counts, with add, remove and query functions.
  7. Searchable containers:
    • At least 3 containers are spawned at a designated scavenging area in the test environment.
    • Interacting starts a timed search of the configured duration.
    • On completion the container grants its configured supplies to the interactor's inventory.
    • A searched container cannot be searched again and shows a visual change (e.g. a material or colour swap on the primitive).
  8. Stockpile:
    • A stockpile actor is spawned at the hub.
    • Interacting transfers all carried supplies into the stockpile, leaving inventory at zero.
    • Stockpile totals live in authoritative state (GameState or the stockpile actor).
    • A spend function (e.g. TrySpend(Materials, N)) returns false without changing totals if the stockpile is insufficient. This is for part 3.
  9. Tests: IMPLEMENT_SIMPLE_AUTOMATION_TEST (or the project's existing test pattern) covers:
    • Noise filtering: a listener inside the radius receives the event; one outside does not.
    • Clock transitions: Day → Dusk → Night fire in order with correct durations (time advanced deterministically, not in real time); reset returns to Day.
    • Loot flow:
      • container search grants supplies;
      • a second search grants nothing;
      • stockpile deposit moves totals and empties inventory;
      • TrySpend succeeds and fails correctly.
  10. Docs:
    • ARCHITECTURE.md and/or a new ADR describe the config, clock, noise, inventory, container and stockpile systems and their extension points for parts 2 and 3.
    • Docs explain how to try the slice in the editor.
  11. Manual verification list: The PR description lists everything the maintainer must verify manually: compile, test run, input binding, lighting.
  12. No regressions: Code is written to compile cleanly, and existing tests are not modified except where required.

Out of scope

  • Canoe, weapons, infected AI (part 2).
  • Night defense waves, barricades, repair, win/lose, Result state and restart (part 3).
  • Co-op/networking.
  • Save/load.
  • New binary assets.
  • Art, audio and polish.

No comments yet.