Commit Graph

135 Commits

Author SHA1 Message Date
e8d1da8f89 feat: lives and death move to the new domain (commit C of the swap)
fixes the regression commit B introduced: coins and skills lived in the
Attempt ledger, but nothing discarded it, because LivesStateHandler still
called the old store and HandlePlayerDeath was never invoked. Dying kept
everything earned that level. Discard-on-death is the ledger's purpose,
so it could not be separated from it.

new AttemptFailed(remaining, runOver) event, raised after the life is
spent and the ledger discarded. DeathScreen and GameOverScreen react to
that instead of being wired to HealthComponent.Death by scene connections
which fired *before* the life was charged - on the last life game-over
saw one life left and showed nothing, then the death screen saw zero and
refused to reload. 18 scene connections deleted; the race is now
unrepresentable rather than fixed.

DeathScreen also had two read paths for lives - a signal and a direct
store read - because neither was reliable alone. Now one.

Hud reads both facts from signals; only health still polls, and that
belongs to the component rather than to progression. GameManager no
longer touches GameStateStore or SaveSystem at all.
2026-07-28 20:19:35 +02:00
360f73ba24 feat: coins and skills move to the new domain (commit B of the swap)
atomic pair - purchasing couples them, so neither moves alone.

SkillData.Level is gone. It was an [Export] on a cached Resource: one
instance per process, so the level never persisted, leaked between save
slots, and made "unowned" indistinguishable from "level 1". Level now
comes from the Playthrough and is passed to ISkill.Initialize.

SkillManager reconciles from SkillSetChanged instead of being told by
each caller. The old shape was "record it, then tell SkillManager" as two
calls at four sites; AddSkill's early return when no player is registered
left the skill owned but inert. Reconciliation also tracks the level each
component was built at, so an upgrade rebuilds it rather than being
patched in from outside.

SkillUnlockerComponent collapses to one TryBuy - unlock and upgrade were
two methods each doing affordability, debit, level mutation and manager
notification in order.

The guard three components copy-pasted around Upgrades[Level - 1] - and
which BrickArmor omitted - now lives once in SkillComponentBase.

Hud reads coins from CoinsChanged instead of rebuilding translated
strings every frame. Lives still polls; it moves with the death path.
2026-07-28 20:13:24 +02:00
f4411e05a3 fix: SpeedRunHud never detached from the autoload's signal
every level load left another handler attached to a freed HUD.
SpeedRunManager outlives the scene, so it kept calling them and each one
wrote to a disposed Label - thousands of ObjectDisposedException per
frame, growing with each load.

Latent all along: StartTimer was only ever called from StartNewGame, so
after a Continue the timer never ticked and the dead handlers never ran.
Calling StartTimer on Continue (needed for splits and best times) made
it visible.

Also stop the timer when leaving to the menu - StopTimer existed and had
no callers, so the run kept ticking in the main menu.
2026-07-28 20:00:55 +02:00
a1c9042652 feat: level progression moves to the new domain (slice 10b, step 1)
narrowest safe step: only level identity and progression move. Coins,
lives, skills and death stay entirely on GameStateStore and behave as
before, so nothing is tracked in two places.

GameManager addresses levels by stable LevelId via the catalogue;
LevelScenes is gone, so reordering levels no longer invalidates saves.
Every level entry goes through EnterLevel, which fixes LevelStarted never
firing on the first level or after Continue - ghost recording and splits
have been dead outside mid-campaign.

GoTo announces after a frame, once the incoming scene is actually
current. ChangeSceneToPacked is deferred, so the old code handed
GhostEventHandler the scene being torn down.

FinishLevel takes LevelTime? - GetCurrentLevelTime can legitimately be 0
and inventing a value is exactly the bad data LevelTime refuses.

Continue distinguishes absent from corrupt and refuses to overwrite a
corrupt save. Statistics move to the Profile. 69 tests.
2026-07-28 19:57:01 +02:00
f85c16c641 fix(levels): ScenePath must be a string, not a PackedScene
slice 7 regression. level_village_2..5.tscn each reference their own
LevelResource for the death screen label, so pointing the resource back
at the scene forms a cycle Godot cannot resolve - "Parse Error: Busy"
and the level fails to load entirely.

ScenePath was a string for exactly this reason. Reverted, and the rot it
allowed (forest_1 aimed at a nonexistent scene) is now caught by
LevelCatalogue.Validate checking every path resolves, plus a repo-level
structural check - fixed by validation rather than by typing.

project.godot: restores the C# feature flag and dialogue_manager
uses_dotnet, which `godot --headless --import` strips on every run.
2026-07-28 19:40:02 +02:00
7a69292066 feat(progression): json stores on a real filesystem (slice 8)
new progression.adapters project, no engine reference. Stores take a
directory path; Godot resolves user:// with GlobalizePath and passes it
in, which is what makes them testable at all - originally I'd written
this slice off as untestable.

version lives in a file envelope, not the snapshot, so the domain only
knows the current shape. A newer-build save reports Corrupt with a
reason instead of masquerading as "no save" and getting overwritten.

atomic write via temp + rename. One file per aggregate: saving a run
leaves the profile file byte-identical, asserted.

guard rail fixed - it was matching prose in doc comments, now anchored
to using-directives plus a project.assets.json check. 63 tests.
2026-07-28 19:35:43 +02:00
f991bb99fc feat(levels): level catalogue with stable ids (slice 7)
LevelResource gains a stable Id and swaps the string ScenePath for an
editor-tracked PackedScene. The old path field was never read and had
rotted - forest_1 pointed at level_forest_5.tscn, which doesn't exist,
and borrowed LEVEL_5_NAME so it would have displayed "VILLAGE - 5".

LevelCatalogue lists levels in campaign order and produces the domain's
Campaign; an authoring mistake fails at boot because Campaign.Of rejects
blank and duplicate ids. Not a domain port - nothing in the domain
resolves a level to a scene.

All 8 scenes now have a resource; campaign keeps the existing 6
(tutorial_1, village_1..5). village_6 and forest_1 are catalogued but
deliberately out of the campaign.

GameManager.LevelScenes stays until slice 10 rewrites GameManager.
2026-07-28 19:28:56 +02:00
8769308c85 feat: add 'down' action to remappable actions and update unique IDs in input settings 2026-04-26 02:43:50 +02:00
cbf625d2ff fix: update scene files for unique IDs and adjust JumpForce in JumpPadComponent 2026-03-19 11:32:48 +01:00
057cf7b368 feat: add UID files for InputDeviceManager, SettingsManager, DisplaySettings, GameplaySettings, and InputSettings 2026-03-19 03:53:49 +01:00
829d081eab fix: unsubscribe VisibilityChanged in _ExitTree, use IsActionReleased for ui_cancel, expose ApplyGamepadDeadzone public 2026-03-19 03:51:01 +01:00
38c86f1a67 feat: gameplay settings screen (deadzone + sensitivity) 2026-03-19 03:47:15 +01:00
e647cd7b29 feat: marketplace keyboard/gamepad navigation 2026-03-19 03:44:35 +01:00
9043cfa63c fix: InputSettings PhysicalKeycode, visibility guard, dead code, delegate save 2026-03-19 03:42:47 +01:00
dc46769c11 feat: input remapping screen with conflict detection and config persistence 2026-03-19 03:39:19 +01:00
47600be867 fix: route resolution change through SettingsManager.ApplyDisplaySettings 2026-03-19 03:36:29 +01:00
3e74959bb9 fix: DisplaySettings focus mode, remove duplicate ApplyWindowMode 2026-03-19 03:35:28 +01:00
8cce1866b1 feat: display settings screen with window mode and resolution picker 2026-03-19 03:32:40 +01:00
0105698c33 fix: guard GrabFirstFocus on pointerless, unsub VisibilityChanged in _ExitTree 2026-03-19 03:29:36 +01:00
3b18e328b2 feat: gamepad/keyboard UI navigation on all menus 2026-03-19 03:26:50 +01:00
551dc09485 feat: add unique identifier for MovementPreset 2026-03-19 02:46:55 +01:00
814d9736d0 refactor: movement system - MovementPreset, decouple abilities, fix timing 2026-03-19 02:45:26 +01:00
eeefca4d4e refactor: enhance GameStateStore integration and improve skill management 2026-03-19 02:33:07 +01:00
3e36e48e97 refactor: update collision shape disabling method for improved performance 2026-03-19 02:11:28 +01:00
1e9814a9d8 refactor: replace direct manager instances with lazy accessors for improved performance 2026-03-19 02:10:36 +01:00
470b0c3a8c refactor: implement singleton pattern for key managers and improve resource access 2026-03-19 02:00:56 +01:00
cfef49fbc7 refactor: standardization round 2
- ConsoleManager: lazy GameManager/AchievementManager via Instance (fixes NullRef on console commands)
- AchievementManager, GhostManager: add static Instance property
- GhostEventHandler: use GhostManager.Instance, add _ExitTree unsubscription
- SpeedRunManager: remove unused IsVisible guard; TimeUpdated now emits when running
- SpeedRunHud: use SpeedRunManager.Instance, remove dead IsVisible binding
- SaveDataDto: moved to scripts/State/SaveDataDto.cs
- GameManager.AddCoins: XML doc clarifying permanent vs session coins
2026-03-19 01:50:20 +01:00
321905e68e refactor: fix bugs and improve architecture
- Fix double-execution bug in LevelStateHandler (coins/skills were committed twice per level)
- Fix DamageComponent to track multiple targets via HashSet instead of single node
- Fix HealthComponent: update health immediately, decouple from PlayerController via signal wiring in PlayerController
- Remove dead loop in SkillManager.RemoveSkill; simplify O(n²) throw skill loop
- Replace GetNode<T>(path) with .Instance across managers; add Instance to StatisticsManager/SpeedRunManager
- GameManager.GetPlayer() now uses EventBus.PlayerSpawned instead of scanning all scene nodes
- UIManager.UiStack: remove [Export], use private List<Control>
- PlayerState: extract DefaultLives constant, simplify CreateDefault()
2026-03-19 01:41:14 +01:00
3616f4ba79 Update collectable resources and improve FloatingTextManager integration 2026-02-02 12:45:48 +01:00
2bf903728b Add CollectableType.None and update project settings for Godot 4.6 2026-02-01 13:11:14 +01:00
bfe951939d refactor (#6)
Reviewed-on: #6
2026-02-01 11:47:40 +00:00
dde3eaa52e godot-4.5 (#5)
Reviewed-on: #5
2026-01-31 13:06:43 +00:00
bc3108ea37 Add MovingPlatformComponent and moving platform scene; implement movement along a path with customizable speed and loop modes 2025-09-13 14:43:58 +02:00
03abf91f59 Add RecoilComponent and SquashAndStretchComponent; implement recoil and animation effects on shooting 2025-09-13 14:18:43 +02:00
e6f8989d16 Add EnemyControllerComponent and PeriodicShootingComponent; implement enemy shooting behavior and bullet spawning 2025-09-13 13:53:40 +02:00
db2a090acc Add FootstepGfx and JumpGfxComponent; implement particle effects for footsteps and jumps 2025-09-13 05:19:37 +02:00
dfc9201f62 Add EventBus, SpeedRunManager, and GhostManager; implement ghost recording and playback features 2025-09-13 03:30:15 +02:00
a8ff492aed Pacxon (#12)
* Add GridMovementAbility and PacXonGridInteractor for grid-based movement; integrate with PlayerController and PacXonLevel

* Add GhostMovementComponent and PacXonTrailComponent; integrate ghost movement and trail features in PacXonLevel

* Update main menu button focus and add new movement abilities; adjust player and ghost initialization in PacXonLevel
2025-09-13 01:52:07 +02:00
aa73e54b3e Add KnockbackComponent and HazardComponent for enhanced enemy interactions; integrate knockback effects in DamageComponent 2025-09-11 05:09:24 +02:00
98b3202361 Update FloatingTextManager colors and integrate floating text display in LeverComponent; replace enemy sprite in basic_enemy scene 2025-09-11 04:42:59 +02:00
6e2bdcdf95 Add FloatingText and FloatingTextManager for UI message display; create basic_enemy scene and integrate components 2025-09-11 04:35:39 +02:00
f229ff5b7d Add FloatingTextManager and FloatingText for displaying UI messages; update CollectableComponent and HealthComponent to utilize new floating text features 2025-09-11 04:35:30 +02:00
ead52f6d51 Add new skills: Double Jump, Ground Pound, Brick Armor, and Brick Shield; implement skill removal signal in SkillManager (#11) 2025-08-31 15:17:11 +02:00
bd40c797d4 Add SkillManager class and integrate with PlayerController and SkillUnlockerComponent (#10) 2025-08-31 13:04:50 +02:00
fd10e566b3 Add ProgressiveDamageComponent for dynamic damage feedback 2025-08-31 02:56:33 +02:00
021e984877 Add DamageNumberManager and DamageNumber for displaying damage feedback 2025-08-31 02:30:42 +02:00
51aecf7da5 Refactor FlipComponent to use PlayerController and remove ProgressiveDamageComponent from scene 2025-08-31 02:11:05 +02:00
604520cad5 Wave enemies (#9)
* Add enemy wave management and path following components

* cleanup
2025-08-31 02:08:35 +02:00
36d1cac284 Add PlayerGraphicsComponent to manage player sprite visibility based on movement abilities 2025-08-31 01:14:00 +02:00
53b5f968fd Add achievement system with unlock and UI popup functionality (#8) 2025-08-31 00:50:53 +02:00