diff --git a/UNITY_MIGRATION_PLAN.md b/UNITY_MIGRATION_PLAN.md deleted file mode 100644 index 6f248d6..0000000 --- a/UNITY_MIGRATION_PLAN.md +++ /dev/null @@ -1,194 +0,0 @@ -# Unity Migration Plan - Gooner Training Academy - -## ๐ŸŽฏ **Migration Priority: HIGH** -**Performance bottlenecks identified in multi-video system justify Unity migration** - ---- - -## ๐Ÿ“Š **Current Web Architecture Analysis** - -### **Media System Complexity (Primary Migration Driver):** -- **QuadVideoPlayer**: 4 simultaneous video streams with individual controls -- **OverlayVideoPlayer**: Popup video system with full controls -- **FocusVideoPlayer**: Minimal focus session player -- **BaseVideoPlayer**: 400+ line shared video foundation -- **VideoPlayerManager**: Centralized video orchestration -- **Real-time video management**: Live switching, volume mixing, progress tracking - -### **Web Performance Limitations:** -- โœ… **HTML5 Video Limitations**: Browser video element limitations with 4+ simultaneous streams -- โœ… **CSS Animation Overhead**: Synthwave effects causing repainting issues -- โœ… **DOM Complexity**: Heavy video DOM manipulation and control overlays -- โœ… **Memory Management**: No fine-grained video memory control in web -- โœ… **GPU Utilization**: Limited GPU optimization in browser context - ---- - -## ๐ŸŽฎ **Unity Architecture Design** - -### **Phase 1: Core Video Engine (Month 1)** -```csharp -// Unity Video Architecture -VideoManager { - - QuadVideoDisplay (4 RenderTextures) - - OverlayVideoSystem (UI Canvas overlay) - - FocusVideoPlayer (minimal UI) - - VideoLibraryManager (asset streaming) - - PerformanceProfiler (frame rate monitoring) -} - -// Video Performance Optimization -- Native video decoding (AVPro or Unity VideoPlayer) -- GPU texture streaming for multiple videos -- Memory pooling for video assets -- Async video loading with progress tracking -- Hardware-accelerated video compositing -``` - -### **Phase 2: Game Logic Port (Month 2)** -```csharp -// Core Game Systems -TaskChallengeGame { - - GameStateManager (JSON persistence) - - GameModeManager (scenario handling) - - ProgressionSystem (statistics & achievements) - - EventSystem (task completion, timers) -} - -// Data Architecture -- ScriptableObject-based game data -- JSON import/export for web compatibility -- Event-driven architecture for loose coupling -- Modular game mode system -``` - -### **Phase 3: Advanced Features (Month 3)** -```csharp -// Unity-Specific Enhancements -- 3D UI elements (rotating panels, depth-based layouts) -- Particle effects for rewards/achievements -- Advanced audio mixing (Unity AudioMixer) -- VR/AR readiness (future expansion) -- Console platform support -- Advanced input handling (gamepads, touch) -``` - ---- - -## ๐Ÿš€ **Migration Strategy: Modular Approach** - -### **Week 1-2: Video System Proof of Concept** -1. **Unity Project Setup**: 2022.3 LTS with Video packages -2. **Basic Video Player**: Single video with controls in Unity UI -3. **Quad Layout Test**: 4 videos rendering to RenderTextures -4. **Performance Baseline**: Frame rate testing vs web version - -### **Week 3-4: Core Video Features** -1. **Video Library Integration**: File system scanning in Unity -2. **Control Systems**: Play/pause, volume, progress for each video -3. **Video Switching**: Smooth transitions between videos -4. **Memory Management**: Proper video asset loading/unloading - -### **Week 5-6: Game Logic Foundation** -1. **Data Layer**: Game state, progression, statistics -2. **Event System**: Task completion, mode switching -3. **UI Framework**: Menus, modals, notifications -4. **Settings System**: User preferences and configuration - -### **Week 7-8: Feature Parity** -1. **Game Modes**: Port all game scenarios and rules -2. **Audio Integration**: Background music and TTS -3. **Image Systems**: Task images and consequences -4. **Save/Load**: Complete persistence system - ---- - -## ๐Ÿ”ง **Technical Architecture** - -### **Unity Package Requirements:** -``` -- Video Player (built-in) -- AVPro Video (optional, for advanced codec support) -- TextMeshPro (UI text rendering) -- JSON.NET (for data serialization) -- Modern UI Pack (optional, for polished UI) -``` - -### **Performance Targets:** -- **60+ FPS** with 4 simultaneous videos -- **<2GB RAM** usage for video streaming -- **<100ms** video switching latency -- **<5 second** cold startup time - -### **Cross-Platform Strategy:** -``` -Primary: Windows (PC) -Secondary: macOS, Linux (desktop expansion) -Future: Android/iOS (mobile adaptation) -Long-term: VR platforms (Quest, PCVR) -``` - ---- - -## ๐Ÿ“‹ **Migration Phases** - -### **Phase 1: Video Engine (Priority 1)** -**Goal**: Solve performance bottlenecks with native video processing -- Multi-video rendering system -- GPU-optimized video playback -- Advanced video controls and overlays -- **Success Metric**: 4 videos @ 60fps consistently - -### **Phase 2: Game Logic (Priority 2)** -**Goal**: Feature parity with web version -- Complete game mechanics port -- Data persistence and statistics -- All game modes and scenarios -- **Success Metric**: 100% feature parity - -### **Phase 3: Unity Enhancements (Priority 3)** -**Goal**: Leverage Unity-specific features -- 3D UI elements and effects -- Advanced audio systems -- Platform-specific optimizations -- **Success Metric**: Enhanced user experience beyond web - ---- - -## ๐ŸŽฏ **Decision Matrix** - -### **Migrate Now If:** -- โœ… Video performance continues to degrade -- โœ… Need for mobile/console platforms -- โœ… Want advanced 3D UI effects -- โœ… Development team ready to learn Unity/C# - -### **Stay Web If:** -- โŒ Performance issues can be web-optimized -- โŒ Rapid iteration is more important -- โŒ Team lacks Unity expertise -- โŒ Web-first distribution is critical - ---- - -## ๐Ÿ’ก **Immediate Actions** - -### **This Week:** -1. **Performance Test Current Fixes**: Validate if CSS optimizations resolve issues -2. **Unity Learning**: Install Unity 2022.3 LTS and test basic video playback -3. **Architecture Planning**: Design Unity class structure based on current system -4. **Team Preparation**: Begin Unity/C# learning if needed - -### **Next Week:** -1. **Unity Prototype**: Build minimal 4-video system in Unity -2. **Performance Comparison**: Direct fps comparison web vs Unity -3. **Migration Timeline**: Finalize timeline based on prototype results -4. **Resource Planning**: Assess development time and learning curve - ---- - -## ๐Ÿ **Recommendation: START UNITY MIGRATION** - -**The media system complexity and performance requirements justify Unity migration now rather than later. The modular web architecture will translate well to Unity, and the advanced video processing capabilities will solve current bottlenecks.** - -**Timeline: 2-3 months for full migration with enhanced features** \ No newline at end of file diff --git a/UNITY_SETUP_GUIDE.md b/UNITY_SETUP_GUIDE.md deleted file mode 100644 index 619e015..0000000 --- a/UNITY_SETUP_GUIDE.md +++ /dev/null @@ -1,306 +0,0 @@ -# Unity Setup & Prototype Guide - Phase 1 - -## ๐ŸŽฏ **Goal: Validate Unity Video Performance vs Web** - ---- - -## ๐Ÿ“‹ **Step 1: Unity Project Setup** - -### **Create New Project:** -1. **Open Unity Hub** -2. **New Project** โ†’ **3D Core** template -3. **Project Name**: `Gooner-Training-Academy-Unity` -4. **Unity Version**: 2022.3 LTS (recommended) -5. **Location**: Choose appropriate folder - -### **Essential Packages to Install:** -1. **Window** โ†’ **Package Manager** -2. **Install these packages:** - - **TextMeshPro** (for UI text) - - **Video Player** (should be built-in) - - **UI Toolkit** (modern UI system) - - **Newtonsoft Json** (for data serialization) - ---- - -## ๐ŸŽฌ **Step 2: Basic Video Player Test** - -### **Create Basic Scene:** -1. **Create Empty GameObject** โ†’ Name: `VideoManager` -2. **Add Component** โ†’ **Video Player** -3. **Create UI Canvas** โ†’ **Screen Space - Overlay** -4. **Add Button** to Canvas โ†’ Name: `PlayButton` - -### **Test Single Video:** -```csharp -// Create: Assets/Scripts/BasicVideoTest.cs -using UnityEngine; -using UnityEngine.Video; -using UnityEngine.UI; - -public class BasicVideoTest : MonoBehaviour -{ - [Header("Video Settings")] - public VideoPlayer videoPlayer; - public Button playButton; - public RenderTexture renderTexture; - - void Start() - { - // Setup render texture for video output - renderTexture = new RenderTexture(1920, 1080, 24); - videoPlayer.targetTexture = renderTexture; - - // Setup button - playButton.onClick.AddListener(ToggleVideo); - - // Load test video (you'll need to provide a video file) - videoPlayer.url = System.IO.Path.Combine(Application.streamingAssetsPath, "test-video.mp4"); - videoPlayer.Prepare(); - } - - void ToggleVideo() - { - if (videoPlayer.isPlaying) - { - videoPlayer.Pause(); - playButton.GetComponentInChildren().text = "Play"; - } - else - { - videoPlayer.Play(); - playButton.GetComponentInChildren().text = "Pause"; - } - } -} -``` - ---- - -## ๐ŸŽฎ **Step 3: Quad Video Prototype** - -### **Create Quad Layout:** -1. **Create 4 UI Panels** in Canvas (2x2 grid layout) -2. **Add RawImage** to each panel -3. **Create 4 VideoPlayer GameObjects** - -### **Quad Video Manager:** -```csharp -// Create: Assets/Scripts/QuadVideoManager.cs -using UnityEngine; -using UnityEngine.Video; -using UnityEngine.UI; -using System.Collections.Generic; - -public class QuadVideoManager : MonoBehaviour -{ - [Header("Video Players")] - public VideoPlayer[] videoPlayers = new VideoPlayer[4]; - - [Header("UI Elements")] - public RawImage[] videoDisplays = new RawImage[4]; - public Button[] playButtons = new Button[4]; - public Slider[] volumeSliders = new Slider[4]; - - [Header("Video Settings")] - public RenderTexture[] renderTextures = new RenderTexture[4]; - public string[] testVideoUrls = new string[4]; - - void Start() - { - SetupQuadVideos(); - } - - void SetupQuadVideos() - { - for (int i = 0; i < 4; i++) - { - // Create render texture for each video - renderTextures[i] = new RenderTexture(1920, 1080, 24); - - // Setup video player - videoPlayers[i].targetTexture = renderTextures[i]; - videoPlayers[i].isLooping = true; - videoPlayers[i].audioOutputMode = VideoAudioOutputMode.Direct; - - // Assign render texture to UI - videoDisplays[i].texture = renderTextures[i]; - - // Setup controls - int index = i; // Capture for closure - playButtons[i].onClick.AddListener(() => ToggleVideo(index)); - volumeSliders[i].onValueChanged.AddListener((value) => SetVolume(index, value)); - - // Load test video - if (i < testVideoUrls.Length && !string.IsNullOrEmpty(testVideoUrls[i])) - { - videoPlayers[i].url = testVideoUrls[i]; - videoPlayers[i].Prepare(); - } - } - } - - void ToggleVideo(int index) - { - if (videoPlayers[index].isPlaying) - { - videoPlayers[index].Pause(); - } - else - { - videoPlayers[index].Play(); - } - } - - void SetVolume(int index, float volume) - { - videoPlayers[index].SetDirectAudioVolume(0, volume); - } - - void Update() - { - // Monitor performance - if (Input.GetKeyDown(KeyCode.P)) - { - Debug.Log($"FPS: {1f / Time.deltaTime:F1}"); - Debug.Log($"Videos playing: {GetPlayingVideoCount()}"); - } - } - - int GetPlayingVideoCount() - { - int count = 0; - for (int i = 0; i < videoPlayers.Length; i++) - { - if (videoPlayers[i].isPlaying) count++; - } - return count; - } -} -``` - ---- - -## ๐Ÿ“ **Step 4: Setup Test Videos** - -### **Create StreamingAssets Folder:** -1. **Assets** โ†’ **Create** โ†’ **Folder** โ†’ Name: `StreamingAssets` -2. **Copy 4 test videos** into this folder (MP4 format recommended) -3. **Name them**: `test-video-1.mp4`, `test-video-2.mp4`, etc. - -### **Update Video URLs:** -```csharp -// In QuadVideoManager, set testVideoUrls in inspector: -testVideoUrls[0] = Application.streamingAssetsPath + "/test-video-1.mp4"; -testVideoUrls[1] = Application.streamingAssetsPath + "/test-video-2.mp4"; -testVideoUrls[2] = Application.streamingAssetsPath + "/test-video-3.mp4"; -testVideoUrls[3] = Application.streamingAssetsPath + "/test-video-4.mp4"; -``` - ---- - -## ๐Ÿงช **Step 5: Performance Testing** - -### **Performance Monitor Script:** -```csharp -// Create: Assets/Scripts/PerformanceMonitor.cs -using UnityEngine; -using UnityEngine.UI; - -public class PerformanceMonitor : MonoBehaviour -{ - [Header("UI")] - public Text fpsText; - public Text memoryText; - public Text videoCountText; - - private float deltaTime = 0.0f; - private QuadVideoManager quadManager; - - void Start() - { - quadManager = FindObjectOfType(); - } - - void Update() - { - deltaTime += (Time.unscaledDeltaTime - deltaTime) * 0.1f; - - if (fpsText != null) - { - float fps = 1.0f / deltaTime; - fpsText.text = $"FPS: {fps:0.}"; - - // Color code based on performance - if (fps >= 60) fpsText.color = Color.green; - else if (fps >= 30) fpsText.color = Color.yellow; - else fpsText.color = Color.red; - } - - if (memoryText != null) - { - long memory = System.GC.GetTotalMemory(false); - memoryText.text = $"Memory: {memory / 1024 / 1024}MB"; - } - - if (videoCountText != null && quadManager != null) - { - videoCountText.text = $"Playing: {quadManager.GetPlayingVideoCount()}/4"; - } - } -} -``` - ---- - -## ๐ŸŽฏ **Step 6: Test Plan** - -### **Performance Benchmarks:** -1. **Baseline Test**: Single video @ 1080p -2. **Dual Test**: 2 videos simultaneously -3. **Quad Test**: 4 videos simultaneously -4. **Stress Test**: 4 videos + UI interactions - -### **Metrics to Track:** -- **FPS**: Target 60+ with 4 videos -- **Memory Usage**: Target <2GB -- **CPU Usage**: Monitor in Task Manager -- **Video Switching Speed**: Target <100ms - -### **Comparison to Web:** -- **Run your web QuadVideoPlayer** alongside Unity -- **Monitor both performance profiles** -- **Document frame rate differences** - ---- - -## ๐Ÿ“‹ **Your Immediate Tasks:** - -### **Today:** -1. โœ… Create Unity project with packages -2. โœ… Implement BasicVideoTest script -3. โœ… Test single video playback - -### **This Week:** -1. โœ… Build QuadVideoManager system -2. โœ… Add performance monitoring -3. โœ… Compare web vs Unity performance -4. โœ… Document results for migration decision - ---- - -## ๐Ÿš€ **Expected Results:** - -**If Unity performs significantly better:** -- **Proceed with full migration** -- **Start porting game logic systems** -- **Plan Unity-specific enhancements** - -**If performance is similar:** -- **Re-evaluate web optimizations** -- **Consider hybrid approach** -- **Focus on Unity for future features** - ---- - -**Ready to start? Begin with the Unity project setup and let me know when you have the basic project created!** ๐ŸŽฎ \ No newline at end of file diff --git a/cyberpunk-hero-option1.html b/cyberpunk-hero-option1.html deleted file mode 100644 index 94935e5..0000000 --- a/cyberpunk-hero-option1.html +++ /dev/null @@ -1,345 +0,0 @@ - - - - - - Cyberpunk Hero Option 1 - Neon Matrix - - - - -
-
-
-
-

- GOONER TRAINING
- // academy_v3.0 -

-
- MASTER YOUR DEDICATION - > ADVANCED_NEURAL_TRAINING < -
- -
-
- ๐ŸŽฌ - Multi-Stream Interface -
-
- ๐Ÿ“Š - Neural Analytics -
-
- ๐Ÿ† - Achievement Protocol -
-
- ๐ŸŽต - Audio Matrix -
-
-
- -
-
-
TOTAL_XP
-
1,337
-
-
-
-
- -
-
SESSION_TIME
-
42:13
-
- -
-
NEURAL_SYNC
-
98%
-
-
-
-
-
-
-
- - \ No newline at end of file diff --git a/cyberpunk-hero-option2.html b/cyberpunk-hero-option2.html deleted file mode 100644 index 953745a..0000000 --- a/cyberpunk-hero-option2.html +++ /dev/null @@ -1,354 +0,0 @@ - - - - - - Cyberpunk Hero Option 2 - Purple Synthwave - - - - -
-
-
-
-
-

- GOONER
TRAINING
- academy.exe -

-
- MASTER YOUR DEDICATION - โ—ค SYNTHWAVE PROTOCOL โ—ข -
- -
-
- ๐ŸŽฌ - Quad Stream Tech -
-
- ๐Ÿ“Š - Data Analytics -
-
- ๐Ÿ† - Achievement Grid -
-
- ๐ŸŽต - Synth Audio -
-
-
- -
-
-
TOTAL XP
-
1337
-
-
-
-
- -
-
SESSION TIME
-
42:13
-
- -
-
SYNC LEVEL
-
98%
-
-
-
-
-
-
-
- - \ No newline at end of file diff --git a/cyberpunk-hero-option3.html b/cyberpunk-hero-option3.html deleted file mode 100644 index a1ba017..0000000 --- a/cyberpunk-hero-option3.html +++ /dev/null @@ -1,392 +0,0 @@ - - - - - - Cyberpunk Hero Option 3 - Terminal Hacker - - - - -
-
-
-
-
-
user@system:~$ sudo ./initiate_training.sh
- -

- GOONER_TRAINING
- //academy_v3.0.exe -

- -
- MASTER_YOUR_DEDICATION - NEURAL_ENHANCEMENT_PROTOCOL_ACTIVE -
- -
- ./execute --mode=advanced --protocol=cybernetic
- [INFO] Multi-stream interface: ONLINE
- [INFO] Neural analytics: ACTIVE
- [SUCCESS] System ready for training sequence -
- -
-
- ๐ŸŽฌ - Multi_Stream_Array -
-
- ๐Ÿ“Š - Data_Mining_Core -
-
- ๐Ÿ† - Achievement_Parser -
-
- ๐ŸŽต - Audio_Subprocess -
-
-
- -
-
-
total_experience
-
1337
-
-
-
-
- -
-
session_duration
-
42:13
-
- -
-
neural_sync_rate
-
98%
-
-
-
-
-
-
-
- - \ No newline at end of file diff --git a/index.html b/index.html index dc47a21..7365816 100644 --- a/index.html +++ b/index.html @@ -1948,9 +1948,8 @@