Commit Graph

61 Commits

Author SHA1 Message Date
Michal Pikulski
a02b70e1f7 Fix method signatures for apple machines 2025-11-25 15:48:18 +01:00
86c1df55f2 First pass over MPV for the cement-statue-sticker minigame (#63)
Co-authored-by: Michal Pikulski <michal.a.pikulski@gmail.com>
Co-authored-by: Michal Pikulski <michal@foolhardyhorizons.com>
Reviewed-on: #63
2025-11-24 14:55:45 +00:00
Michal Pikulski
e9320c6d03 Poop obstacle pipeline working 2025-11-21 11:33:49 +01:00
Michal Pikulski
b4b17c18ed Some b ase obstacle and poop spawning 2025-11-21 09:22:06 +01:00
058af331e0 pooper_minigame (#62)
Co-authored-by: Michal Pikulski <michal.a.pikulski@gmail.com>
Reviewed-on: #62
2025-11-20 15:16:57 +00:00
Michal Pikulski
43fc6c327a Fix initialization bug 2025-11-19 23:57:44 +01:00
Michal Pikulski
6b8420c8c7 Update card sorting MVP 2025-11-19 23:48:41 +01:00
fee5515bbd First MVP of sorting minigame (#60)
Co-authored-by: Michal Pikulski <michal.a.pikulski@gmail.com>
Co-authored-by: Michal Pikulski <michal@foolhardyhorizons.com>
Reviewed-on: #60
2025-11-19 13:56:10 +00:00
2c4e90b698 Finished changing score to amount of photos 2025-11-18 12:45:36 +01:00
219f2239a1 Added number of photos scoring 2025-11-18 11:33:16 +01:00
acf46c701e Last life cycle refactor updates + add comprehensive documentation (#57)
Co-authored-by: Michal Pikulski <michal.a.pikulski@gmail.com>
Reviewed-on: #57
2025-11-11 12:32:36 +00:00
fe2eb0a280 Merge remote-tracking branch 'origin/kill-json-player' 2025-11-11 10:06:23 +01:00
0aa2270e1a Lifecycle System Refactor & Logging Centralization (#56)
## ManagedBehaviour System Refactor

- **Sealed `Awake()`** to prevent override mistakes that break singleton registration
- **Added `OnManagedAwake()`** for early initialization (fires during registration)
- **Renamed lifecycle hook:** `OnManagedAwake()` → `OnManagedStart()` (fires after boot, mirrors Unity's Awake→Start)
- **40 files migrated** to new pattern (2 core, 38 components)
- Eliminated all fragile `private new void Awake()` patterns
- Zero breaking changes - backward compatible

## Centralized Logging System

- **Automatic tagging** via `CallerMemberName` and `CallerFilePath` - logs auto-tagged as `[ClassName][MethodName] message`
- **Unified API:** Single `Logging.Debug/Info/Warning/Error()` replaces custom `LogDebugMessage()` implementations
- **~90 logging call sites** migrated across 10 files
- **10 redundant helper methods** removed
- All logs broadcast via `Logging.OnLogEntryAdded` event for real-time monitoring

## Custom Log Console (Editor Window)

- **Persistent filter popups** for multi-selection (classes, methods, log levels) - windows stay open during selection
- **Search** across class names, methods, and message content
- **Time range filter** with MinMaxSlider
- **Export** filtered logs to timestamped `.txt` files
- **Right-click context menu** for quick filtering and copy actions
- **Visual improvements:** White text, alternating row backgrounds, color-coded log levels
- **Multiple instances** supported for simultaneous system monitoring
- Open via `AppleHills > Custom Log Console`

Co-authored-by: Michal Pikulski <michal@foolhardyhorizons.com>
Co-authored-by: Michal Pikulski <michal.a.pikulski@gmail.com>
Reviewed-on: #56
2025-11-11 08:48:29 +00:00
MacBuilder
d647bb5707 Target eliminated, good job 47 2025-11-10 15:55:28 +01:00
Michal Pikulski
2127bf37b2 Add boosters to minigame again 2025-11-07 17:26:29 +01:00
d2e79f058b Merge branch 'ui-overhaul' 2025-11-07 16:56:51 +01:00
de2966fb1e Cinematics and UI overhaul 2025-11-07 16:47:10 +01:00
e27bb7bfb6 Refactor interactions, introduce template-method lifecycle management, work on save-load system (#51)
# Lifecycle Management & Save System Revamp

## Overview
Complete overhaul of game lifecycle management, interactable system, and save/load architecture. Introduces centralized `ManagedBehaviour` base class for consistent initialization ordering and lifecycle hooks across all systems.

## Core Architecture

### New Lifecycle System
- **`LifecycleManager`**: Centralized coordinator for all managed objects
- **`ManagedBehaviour`**: Base class replacing ad-hoc initialization patterns
  - `OnManagedAwake()`: Priority-based initialization (0-100, lower = earlier)
  - `OnSceneReady()`: Scene-specific setup after managers ready
  - Replaces `BootCompletionService` (deleted)
- **Priority groups**: Infrastructure (0-20) → Game Systems (30-50) → Data (60-80) → UI/Gameplay (90-100)
- **Editor support**: `EditorLifecycleBootstrap` ensures lifecycle works in editor mode

### Unified SaveID System
- Consistent format: `{ParentName}_{ComponentType}`
- Auto-registration via `AutoRegisterForSave = true`
- New `DebugSaveIds` editor tool for inspection

## Save/Load Improvements

### Enhanced State Management
- **Extended SaveLoadData**: Unlocked minigames, card collection states, combination items, slot occupancy
- **Async loading**: `ApplyCardCollectionState()` waits for card definitions before restoring
- **New `SaveablePlayableDirector`**: Timeline sequences save/restore playback state
- **Fixed race conditions**: Proper initialization ordering prevents data corruption

## Interactable & Pickup System

- Migrated to `OnManagedAwake()` for consistent initialization
- Template method pattern for state restoration (`RestoreInteractionState()`)
- Fixed combination item save/load bugs (items in slots vs. follower hand)
- Dynamic spawning support for combined items on load
- **Breaking**: `Interactable.Awake()` now sealed, use `OnManagedAwake()` instead

##  UI System Changes

- **AlbumViewPage** and **BoosterNotificationDot**: Migrated to `ManagedBehaviour`
- **Fixed menu persistence bug**: Menus no longer reappear after scene transitions
- **Pause Menu**: Now reacts to all scene loads (not just first scene)
- **Orientation Enforcer**: Enforces per-scene via `SceneManagementService`
- **Loading Screen**: Integrated with new lifecycle

## ⚠️ Breaking Changes

1. **`BootCompletionService` removed** → Use `ManagedBehaviour.OnManagedAwake()` with priority
2. **`Interactable.Awake()` sealed** → Override `OnManagedAwake()` instead
3. **SaveID format changed** → Now `{ParentName}_{ComponentType}` consistently
4. **MonoBehaviours needing init ordering** → Must inherit from `ManagedBehaviour`

Co-authored-by: Michal Pikulski <michal.a.pikulski@gmail.com>
Co-authored-by: Michal Pikulski <michal@foolhardyhorizons.com>
Reviewed-on: #51
2025-11-07 15:38:31 +00:00
Michal Pikulski
43779c560e Cleanup compile warnings, cleanup logs, spruce up level selection menu 2025-10-28 14:31:17 +01:00
Michal Pikulski
cc797f09ef Update the rotation enforcement to automatically lock device into
desired orientation.
2025-10-24 16:48:45 +02:00
5a85a602bd Revamp game pausing and input handling. Fix minigame tutorial and end sequence. (#39)
- Revamp pausing and centralize management in GameManager
- Switch Pause implementation to be counter-based to solve corner case of multiple pause requests
- Remove duplicated Pause logic from other components
- Add pausing when browsing the card album
- Fully deliver the exclusive UI implementation
- Spruce up the MiniGame tutorial with correct pausing, hiding other UI
- Correctly unpause after showing tutorial
- Fix minigame ending sequence. The cinematic correctly plays only once now
- Replaying the minigame works

Co-authored-by: Michal Adam Pikulski <michal@foolhardyhorizons.com>
Co-authored-by: Michal Pikulski <michal@foolhardyhorizons.com>
Reviewed-on: #39
2025-10-24 11:09:32 +00:00
Michal Adam Pikulski
35acaddca5 FIx the issue of end game screen appearing twice 2025-10-22 11:50:24 +02:00
Michal Adam Pikulski
00f6d2c6c6 Add a dirty booster pack opening sequence 2025-10-21 15:40:47 +02:00
Michal Adam Pikulski
af77e07f99 Update the cards to pull in from addressables to wokr in build, remove erronous code preventing building 2025-10-21 10:29:06 +02:00
journaliciouz
d1792014db Added feedback on photography in diving game 2025-10-20 23:18:31 +02:00
journaliciouz
84dd8004d5 Monster Approach and react audio 2025-10-20 22:33:39 +02:00
9df43b8f53 Implemented Flash Feedback to the Diving Minigame 2025-10-20 16:19:08 +02:00
6e5a6c049f Underwater rushed audio job 2025-10-17 16:31:23 +02:00
Michal Pikulski
74339d7c47 Fix pausing etc. issues in the minigame 2025-10-17 13:18:49 +02:00
Michal Pikulski
b2384269e5 Update the Pause menu flow to be slightly less scoffed 2025-10-16 23:19:33 +02:00
journaliciouz
09ae4b5ba7 WIP 2 2025-10-16 22:45:13 +02:00
journaliciouz
4fc005b082 WIP 2025-10-16 22:35:23 +02:00
eab8899720 WIP game over diving 2025-10-16 16:23:48 +02:00
8c4f821865 Merge branch 'main' into diving-outrocinematic 2025-10-16 15:40:08 +02:00
Michal Pikulski
cc6e89c003 Fix issue with event triggering multiple times at the end of the minigame 2025-10-15 23:20:38 +02:00
b425d2b4f4 Stuck cinematics 2025-10-15 17:35:34 +02:00
5f46c963b5 Implemented Diving tutorial 2025-10-15 15:58:19 +02:00
DamianCorazza
782e068575 Monster Animations and monster flipping according to which wall it's coming from 2025-10-14 21:00:03 +02:00
Michal Pikulski
e8180b21bf Strip debug logging from the game, fix screen weirdness 2025-10-14 15:54:11 +02:00
Michal Pikulski
21bec076a9 [Bug] Fix the issue with input being blocked after missed camera sequence 2025-10-14 11:48:19 +02:00
9c44a0c91f photo_input_switch (#27)
Co-authored-by: Michal Pikulski <michal.a.pikulski@gmail.com>
Reviewed-on: #27
2025-10-14 07:09:16 +00:00
2573e7f80e Add a system for setting up "real" camera framing to work between devices (#26)
- In-level authoring utility to designate level bounds
- Camera Adapter component to be placed on a level's camera to perform the adjustments
- EdgeAnchor tool, which allows anchoring of game objects to the screen bounds

Co-authored-by: Michal Pikulski <michal@foolhardyhorizons.com>
Reviewed-on: #26
2025-10-14 04:56:00 +00:00
57652b87f6 Merge branch 'main' into DamianBranch 2025-10-10 16:49:25 +02:00
Michal Pikulski
0c5546efd2 Add backbone for card creation and implement Camera minigame mechanics 2025-10-10 14:49:42 +02:00
1fe48c995b Commmit minigame and tile logic 2025-10-10 14:45:23 +02:00
Michal Pikulski
0e17516df7 Add a pausable interface and make minigameobjecs pausable 2025-10-08 12:36:08 +02:00
Michal Pikulski
328e8dea0a Finalize normalized movement settings 2025-10-07 09:42:59 +02:00
Michal Pikulski
348e982930 Use normalized movement settings 2025-10-07 09:28:41 +02:00
Michal Pikulski
f1f4234c2a Wait for correct screen orientation 2025-09-30 13:13:37 +02:00
e878a32263 Introduce input modes and Pause Menu (#8)
- Add input mode switching to the Input Manager
- Automatically set input mode on scene load - UI for MainMenu and GameAndUI for other scenes
- Add PauseMenu prefab, auto-loaded via the boostrap system
- Automatically control PauseMenu visibility based on current scene

Co-authored-by: AlexanderT <alexander@foolhardyhorizons.com>
Co-authored-by: Michal Pikulski <michal.a.pikulski@gmail.com>
Reviewed-on: #8
2025-09-25 10:06:51 +00:00