Commit Graph

29 Commits

Author SHA1 Message Date
bf4b85f727 feat: choice conditions with variables, demo updates, roadmap update 2026-06-09 16:46:06 +08:00
f044ed0b60 refactor: switch to key-based i18n for choices, revert inline textEn approach 2026-06-09 15:54:55 +08:00
8e7f77bc38 feat: inline bilingual choice text (textEn), lang-aware choice rendering 2026-06-09 15:51:37 +08:00
daec24d69b fix: App.vue updates 2026-06-09 15:45:58 +08:00
59aed77199 feat: i18n system, lang switch component, english subtitles, UI improvements, roadmap update 2026-06-09 15:40:51 +08:00
6b4114af43 feat: press Esc to open menu during gameplay, close with Esc 2026-06-09 15:40:01 +08:00
72e442f2c3 feat: UI polish, chapter select improvements, save system enhancements, roadmap update 2026-06-09 15:19:53 +08:00
2748b2c16f fix: remove absolute positioning from PlaybackBar to prevent overlap with top-bar buttons 2026-06-09 15:03:18 +08:00
0a6d26ecb0 fix: suppress videoEnd during QTE, clear QTE UI on game end and chapter restart 2026-06-09 14:55:13 +08:00
660fa9347c feat: playback bar component, save system improvements, demo and roadmap updates 2026-06-09 14:21:41 +08:00
9e339c7c16 refactor: inline event registration at setup level, remove registerEvents duplication across entry points 2026-06-09 12:06:40 +08:00
ace5ed1fb3 feat: chapter select system, multi-chapter support, scene manager refactor, and docs update 2026-06-09 11:35:11 +08:00
655b9a23d0 feat: fullscreen composable, roadmap update, and future plans doc 2026-06-09 10:47:14 +08:00
fa7c333214 fix: use v-show instead of v-if for GamePlayer to prevent video element detach during image scenes 2026-06-08 14:26:21 +08:00
6b67989007 feat: engine improvements, new scenes, videos, subtitles, hotspot component and docs update 2026-06-08 14:01:58 +08:00
65c26e0972 fix: clear old subtitle cues when switching to scene without subtitles
Previously when subtitleUrl became null, the old cues array was retained
and would replay from the beginning on the next scene.
2026-06-07 21:22:45 +08:00
bb657b3547 fix: capture save thumbnail on videoEnd instead of sceneChange
Previously thumbnail was captured during sceneChange (before video starts
playing), so readyState was low and capture was skipped. Now capture on
videoEnd when frame is guaranteed visible, store in lastThumbnail, and
reuse for both auto-save (slot 0) and manual save.
2026-06-07 21:11:18 +08:00
b6eb3c3959 fix: QTE false race condition + restore auto-save slot in menu
- QTESystem: add if (!this.active) return guard in setInterval/setTimeout
  callbacks to prevent false result from firing after successful key press
- SaveLoadMenu: restore auto-save slot 0 row with blue styling, thumbnail,
  scene label, and read-only load button
2026-06-07 21:07:21 +08:00
e2670c50d4 refactor: rename Subtitles prop videoUrl to subtitleUrl 2026-06-07 20:48:39 +08:00
ef00babdb7 feat: add dump() method to GameStore for debugging 2026-06-07 20:30:39 +08:00
64a474a741 feat: expose store as window.__store for debugging 2026-06-07 20:29:14 +08:00
319a379921 feat: P2 - QTE system, subtitles, save thumbnails
- QTESystem: trigger detection via timeupdate, multi-key matching, timeout handling
- QTEOverlay: SVG countdown ring + key prompts + success/fail animation
- Engine: integrate QTE (timeupdate check, conditional branching, effect application)
- Subtitles: WebVTT parsing + synchronized subtitle rendering
- GamePlayer: overlay QTE and subtitle components
- SaveSystem: DB v2 with thumbnail field, canvas snapshot at 320x180 JPEG
- SaveLoadMenu: thumbnail preview for save slots
- VideoManager: getActiveVideoElement() for canvas capture
- App.vue: QTE/subtitle integration, thumbnail capture on save
- stores: QTE state management, save list with thumbnails
- demo.json: QTE scene (right_door), subtitles, new event types
- ROADMAP: mark P2 as completed
2026-06-07 19:35:14 +08:00
c61826e87c feat: auto-save on scene change + resume from auto-save
- useGameEngine: auto-save to slot 0 on every sceneChange event
- useGameEngine: add resumeAutoSave() for continuing from auto-save
- useGameEngine: extract registerEvents() to share between start and resume
- SaveLoadMenu: show slot 0 as '自动存档' with distinct styling and read-only button
- App.vue: check auto-save on load, show '继续上次进度' button if available
2026-06-07 18:42:34 +08:00
2de9f99a81 feat: add StateManager.dump() and expose window.__sm for debugging
- StateManager.dump(): console.table formatted dump of variables, flags, history
- window.__sm: exposes engine.stateManager in dev mode for console inspection
2026-06-07 17:27:52 +08:00
937e45c203 feat: P1 core - seamless video switching, conditional branches, save/load
- VideoManager: A/B dual-buffered video with crossfade transitions and candidate preloading
- Engine: condition-based choice filtering, ChoiceSystem timer, resumeScene for save/load
- SceneManager: getCandidateUrls for preloading next scenes
- SaveSystem: Dexie.js IndexedDB multi-slot save/load
- ChoiceSystem: timed choices with countdown and auto-default on timeout
- GamePlayer: dual video elements with crossfade CSS
- ChoicePanel: timer progress bar and countdown text
- SaveLoadMenu: save/load UI component
- App.vue: menu trigger, dual video refs, save/load integration
- gameStore: timer state, saves list
- demo.json: conditional choice example (secret ending, requires trust >= 80)
- ROADMAP: mark P1 as completed
2026-06-07 16:48:52 +08:00
42181fe185 chore: remove unused imports in useGameEngine 2026-06-07 16:18:05 +08:00
7aed2b46ca fix: add start button to satisfy browser autoplay policy
Replace auto-start after loading with a '开始游戏' button overlay.
The user click provides the required user gesture for autoplay with sound,
fixing the issue where play() was silently rejected and choices never appeared.
2026-06-07 15:44:31 +08:00
fb93782331 fix: wait for DOM update before attaching video element 2026-06-07 14:16:20 +08:00
aeb6dc46a4 init 2026-06-07 13:50:05 +08:00