Commit Graph

5 Commits

Author SHA1 Message Date
7264ec6fc0 feat: complete Style 32 overhaul & Tiled integration fix
- Enforced 'Style 32 - Dark Chibi Vector' for all ground assets.
- Fixed critical Prologue-to-Game crash (function renaming).
- Implemented Tiled JSON/TMX auto-conversion.
- Updated Asset Manager to visualize 1800+ assets.
- Cleaned up project structure (new assets/grounds folder).
- Auto-Ground logic added to GameScene.js.
2026-01-11 20:08:56 +01:00
723e124498 🎥 STREAMER-READY FEATURES - ACCESSIBILITY + PRO TOUCH
 ACCESSIBILITYMANAGER.JS (NEW!) - 420 LINES:

 ONE-HANDED MODE (Xbox):
- enableOneHandedMode('left' | 'right')
- Left hand: LB (interact), LT (attack), D-Pad Up (whistle), L3 (menu)
- Right hand: RB, RT, R3, D-Pad Down
- getButtonMapping() - returns current controls
- Perfect for streamer demos!

🎨 HIGH CONTRAST MODE:
- enableHighContrast() / disableHighContrast()
- Applies post-processing overlay
- Boosts visual clarity
- Toggle on-the-fly

🌈 COLOR BLIND MODES:
- setColorBlindMode('protanopia' | 'deuteranopia' | 'tritanopia')
- Color filters for accessibility
- Visual tints: red-blind (pink), green-blind (green), blue-blind (blue)
- Instant switching

📏 FONT SCALING:
- setFontScale(0.8 - 2.0)
- setSubtitleSize('small' | 'medium' | 'large' | 'xlarge')
- getFontSize(baseFontSize) - scales any text
- Streamers love large subtitles for mobile viewers!

🎬 REDUCE MOTION:
- enableReduceMotion()
- Disables screen shake, particles
- Slower transitions
- Better for motion-sensitive viewers

💾 PERSISTENCE:
- All settings save to LocalStorage
- Auto-loads on game start
- Reset to defaults option

 LOCALIZATIONSYSTEM.JS UPDATED:

🌍 AUTO-DETECT OS LANGUAGE:
- detectOSLanguage() - NEW METHOD!
- Reads navigator.language
- Maps browser locale to game language
- First launch auto-selects language
- Mac in German → Game opens in Deutsch!
- Console: '🖥️ System language detected'

🗺️ LANGUAGE MAPPING:
- sl → slo (Slovenian)
- en → en (English)
- de → de (Deutsch)
- it → it (Italiano)
- zh/cn → cn (中文)

 STORYSCENE.JS UPDATED:

🎥 STREAMER BUILD LABEL:
- Top-right corner
- "Early Access Streamer Build"
- Background: #2d1b00 (dark brown)
- Padding: 8x4px
- Subtle pulse animation (alpha 0.7-1.0)
- Professional 'Pro' touch!

📊 STREAMER-READY FEATURES SUMMARY:

 ACCESSIBILITY:
-  One-handed Xbox control
-  High contrast mode
-  Color blind filters (3 types)
-  Font scaling (0.8x - 2.0x)
-  Large subtitles
-  Reduce motion

🌍 LOCALIZATION:
-  Auto-detect OS language
-  5 languages supported
-  Hybrid mode (EN voice + CN subs)
-  SL 100% sync ready

🎬 PRO TOUCH:
-  Streamer build label
-  Save/load bulletproof
-  Professional presentation

🎯 KICKSTARTER-READY:
-  Invalid mode support
-  Mobile-friendly subtitles
-  International reach
-  Streamer-friendly features

📝 USAGE:

// Initialize accessibility
this.accessibility = new AccessibilityManager(this);

// Enable one-handed mode (left hand)
this.accessibility.enableOneHandedMode('left');

// Enable high contrast
this.accessibility.enableHighContrast();

// Set subtitle size for stream
this.accessibility.setSubtitleSize('xlarge'); // 2.0x

// Get scaled font size
const fontSize = this.accessibility.getFontSize(16); // Returns 32 (if scale=2.0)

🎥 FOR STREAMERS:
- Demo accessibility features live
- Show language switching
- Test one-handed controls
- Large visible subtitles
- Professional presentation

Files:
- src/systems/AccessibilityManager.js (NEW!)
- src/systems/LocalizationSystem.js (UPDATED!)
- src/scenes/StoryScene.js (UPDATED!)

STREAMER DEMO READY! 🎬
2026-01-10 23:27:57 +01:00
d241f69f3b 🌍🔥 LOCALIZATION SYSTEM - INTRO SYNC + VOICE SWITCHING
 LOCALIZATION.JSON CREATED (5 LANGUAGES):

📂 assets/localization.json (NEW!):
- 🇸🇮 Slovenščina (slo)
- 🇬🇧 English (en)
- 🇩🇪 Deutsch (de)
- 🇮🇹 Italiano (it)
- 🇨🇳 中文 (cn)

📝 COMPLETE TRANSLATIONS:
- All 20 Polaroid texts
- Menu buttons (New Game, Load, Settings, Exit)
- Game title + subtitle

 LOCALIZATIONSYSTEM.JS UPDATED:

🔧 NEW METHODS ADDED:

1. loadIntroTexts() - Load JSON
   - Fetches assets/localization.json
   - Merges intro_polaroids into translations
   - Merges menu texts
   - Adds title/subtitle
   - Console: ' Intro texts loaded from JSON'

2. getIntroText(polaroidKey) - Get text
   - Returns translated Polaroid text
   - Falls back to English if missing
   - Usage: i18n.getIntroText('kai_dad_longboard')

3. getVoicePath(character, index) - Voice switching!
   - 🇸🇮 Slovenian → assets/audio/voiceover/sl/
   - 🇬🇧 English → assets/audio/voiceover/en/
   - Auto-formats filename
   - Example SL: kai_01.mp3
   - Example EN: kai_en_01.mp3

4. hasVoiceForLanguage(character, index)
   - Checks if voice exists for language
   - SL + EN have full voiceovers
   - DE/IT/CN fall back to EN

🎯 LANGUAGE TO VOICE PATH MAPPING:
- slo → /voiceover/sl/kai_01.mp3
- en → /voiceover/en/kai_en_01.mp3
- de → /voiceover/en/kai_en_01.mp3 (fallback)
- it → /voiceover/en/kai_en_01.mp3 (fallback)
- cn → /voiceover/en/kai_en_01.mp3 (fallback)

📋 20 POLAROID KEYS:
1. kai_dad_longboard
2. barbershop
3. birthday_cake
4. family_portrait
5. twins_holding_hands
6. kai_bedroom
7. virus_microscope
8. chaos_streets
9. zombies
10. parents_ghosts
11. ana_taken
12. black_screen
13. kai_alone
14. ana_memory_1
15. ana_memory_2
16. ana_memory_3
17. ana_memory_4
18. ana_memory_5
19. gronk_arrival
20. determination
21. lifetime

🎮 USAGE EXAMPLE:
// In IntroScene preload()
await window.i18n.loadIntroTexts();

// Get text for current language
const text = window.i18n.getIntroText('birthday_cake');
// SL: 'Tukaj smo bili še vedno srečni...'
// EN: 'Here we were still happy...'

// Get voice path
const path = window.i18n.getVoicePath('kai', 1);
// SL: 'assets/audio/voiceover/sl/kai_01.mp3'
// EN: 'assets/audio/voiceover/en/kai_en_01.mp3'

🌍 LANGUAGE FLOW:
1. Player selects language on launcher
2. window.i18n.setLanguage('slo')
3. Saved to LocalStorage
4. IntroScene loads JSON texts
5. Displays translated Polaroid captions
6. Plays SL voice files from /sl/ folder
7. Full sync!

NEXT: Hook up IntroScene to use these methods!

Files:
- assets/localization.json (NEW!)
- src/systems/LocalizationSystem.js (UPDATED!)

READY FOR INTRO TEXT SYNC! 🌍🔥
2026-01-10 23:23:19 +01:00
6c583a6576 posodobitve 2025-12-12 13:40:51 +01:00
097d35da1b popravki 2025-12-08 17:31:18 +01:00