How d1zzyxx/full-lune works
1. Project type and runtime
- This is a Unity game project for smartphones.
- The architecture is scene-driven and built around Unity components, prefabs, ScriptableObjects, and manager-style MonoBehaviours.
- The repo is content-heavy: most logic is in Assets/Scripts, while art, audio, UI prefabs, and scenes carry the gameplay structure.
2. Main play areas / scene boundaries
- The game is split into distinct scene groups:
- Assets/Scenes/Menu for startup and education screens.
- Assets/Scenes/Free zone for exploration areas like Village, HolyOFLune, and TempleOfSky.
- Assets/Scenes/Puzzle for minigames: 3Match and Mirrors.
- This suggests a hub-and-spoke flow where the player moves from menu/tutorial into free exploration and then into minigame scenes.
3. Core game state managers
- Assets/Scripts/ManagersGame contains the main orchestration layer:
- SceneManager/SceneTransitionManager, SceneInitializer, and LevelSettings handle scene loading/setup.
- AudioManager centralizes music and likely SFX playback.
- UIManager handles global UI visibility/state.
- MoonPhaseManager and MenuStatue indicate a world progression or puzzle-state system tied to lunar phases.
- EducationManager likely drives tutorial/onboarding.
- These managers form the cross-scene backbone and reduce direct coupling between gameplay systems.
4. Player control and mobile input
- Mobile movement is handled using the included Joystick Pack asset.
- The joystick package provides reusable control prefabs (Fixed, Floating, Dynamic, Variable) and input scripts.
- Animation assets in Assets/Animations/Player show four-direction movement states (WalkFront/Back/Left/Right, IdleFront), so the player is a top-down character controlled by touch input and animated based on direction/movement.
5. Exploration and interaction system
- Assets/Scripts/Interaction defines the interaction framework:
- InteractionManager coordinates nearby interactable targets.
- InteractionObject is the base contract for world interactables.
- Concrete objects include Altar, RoadSing, Statue, and Store.
- This creates a boundary between free-roam movement and context actions like opening dialogue, entering puzzles, buying items, or triggering story events.
6. Inventory and item data
- Assets/Scripts/ItemScripts/Inventory implements inventory UI/state with Inventory, InventorySlot, and ItemInfo.
- Assets/Scripts/ItemScripts/ItemCollection contains item definitions and registration logic via Item and ItemRegistry.
- Item assets live in Assets/Resources/ItemCollection, which means items are loaded as Unity Resources and can be resolved dynamically at runtime.
- Architecture-wise, items are data-driven and decoupled from the scene via ScriptableObject-like assets.
7. Store / trading subsystem
- Assets/Scripts/ItemScripts/Store contains StoreManager and StoreSlot, which likely power a shop or trade interface.
- The interaction layer references the store object in the world, while the store subsystem handles inventory exchange and UI slot updates.
- This is a separate gameplay boundary from the core inventory, but clearly connected to it.
8. Minigame subsystem
- Minigames are isolated under Assets/Scripts/Minigames and have dedicated scenes and prefabs.
- Two minigame families are present:
- 3-match puzzle: MatchManager, GridChecker, SpawnController, RefillGrid, MoveGem, GemData.
- Mirror / ray puzzle: Mirror, RaySystem, RayPointReceptionAnim.
- EndMiniGame and MenuExit suggest a shared completion/exit flow back to the main game or menu.
- This is a clean separation: minigame logic is scene-local, while completion likely reports back through shared managers or scene transition logic.
9. UI and menu flow
- UI is implemented with prefabs under Assets/Prefabs/UI, including buttons, hints, menu panels, inventory slots, and win/exit dialogs.
- Animations under Assets/Animations/Menu and Assets/Animations/Hint indicate dynamic UI presentation, not static screens only.
- Text rendering uses TextMesh Pro, which is standard for crisp mobile UI and in-game text.
- The menu scene structure suggests a front-end flow from StartScene to tutorial/education and then into gameplay.
10. World content and environment composition
- The game world is assembled from many prefabs:
- Village buildings, props, plants, stones, gates, altars, and decorative elements.
- SpawnPoints and LevelManagerStatic imply scripted placement and area configuration.
- Tile palette assets and environment prefabs indicate the world is built from reusable modular art rather than procedural generation.
- This points to handcrafted, scene-authored environments with strong prefab reuse.
11. Audio and presentation
- Audio is structured into music and SFX folders with distinct tracks for menu, village, temple, holy area, and stone interaction sounds.
- AudioManager likely switches music based on scene or zone and routes SFX for interaction feedback.
- Custom shaders/materials and sprite shadow assets indicate visual styling is part of the content pipeline, especially for pixel-art presentation.
12. Save and persistence
- Assets/Scripts/ManagersGame/SaveScripts contains GameSaveData and SaveManager.
- This subsystem likely persists player progression, item collection, puzzle completion, or world state across sessions.
- It is a key architectural boundary because it ties together scene state, inventory, and progression systems without embedding persistence logic inside gameplay objects.
13. Content and third-party dependencies
- The repo includes imported assets that materially shape the architecture:
- Joystick Pack for touch input.
- Cainos Pixel Art Top Down - Basic for environment/prop systems and helper scripts.
- TextMesh Pro for text UI.
- These packages reduce custom code in input and visual content layers while the custom logic focuses on progression, interactions, and minigames.
14. Likely end-to-end data flow
- The player starts in a menu scene, enters an exploration scene, moves via joystick input, interacts with world objects, and opens UI or minigames.
- Item and puzzle outcomes update shared state through managers and are saved by the save system.
- Audio, UI, and scene transitions are coordinated centrally rather than by individual gameplay objects.
Main entry points: SceneTransitionManager.cs Scene Transition · SceneIntializer.cs Scene Init · InteractionObject.cs Interactable Base · AudioManager.cs Audio Manager
Components 27
Core runtime
Cross-scene managers, persistence, and scene orchestration.
- Scene Transition · Loads and swaps scenes across menu, exploration, and puzzles.
Assets/Scripts/ManagersGame/SceneManager/SceneTransitionManager.cs - Scene Init · Bootstraps per-scene configuration and level settings.
Assets/Scripts/ManagersGame/SceneManager/SceneIntializer.cs - Level Settings · Per-level configuration data used during initialization.
Assets/Scripts/ManagersGame/SceneManager/LevelSettings.cs - Save Manager · Stores and restores game progression data.
Assets/Scripts/ManagersGame/SaveScripts/SaveManager.cs - Save Data · Serializable progression state for persistence.
Assets/Scripts/ManagersGame/SaveScripts/GameSaveData.cs - Education Manager · Drives onboarding and tutorial progression.
Assets/Scripts/ManagersGame/EducationManager.cs - Moon Phase · Tracks lunar progression and related gameplay state.
Assets/Scripts/ManagersGame/MoonPhaseManager.cs
Exploration world
Menu, free-zone scenes, and world interaction systems.
- Start Scene · Entry point for the game flow.
Assets/Scenes/Menu/StartScene.unity - Education Scene · Tutorial and onboarding scene.
Assets/Scenes/Menu/EducationScene.unity - Village · Main exploration area built from prefab content.
Assets/Scenes/Free zone/Village.unity - Holy Area · Exploration scene tied to lunar or ritual progression.
Assets/Scenes/Free zone/HolyOFLune.unity - Temple · Exploration scene with temple-themed progression.
Assets/Scenes/Free zone/TempleOfSky.unity - Interaction Manager · Finds and coordinates nearby interactable objects.
Assets/Scripts/Interaction/InteractionManager.cs - Interactable Base · Base contract for world interaction targets.
Assets/Scripts/Interaction/InteractionObject.cs - Inventory · Player item storage and inventory UI state.
Assets/Scripts/ItemScripts/Inventory/Inventory.cs - Item Registry · Registers item definitions loaded from resources.
Assets/Scripts/ItemScripts/ItemCollection/ItemRegistry.cs - Store Manager · Handles shop and exchange UI/state.
Assets/Scripts/ItemScripts/Store/StoreManager.cs
Minigames
Scene-local puzzle systems and their shared exit flow.
- 3-Match · Match-3 puzzle logic and grid lifecycle.
Assets/Scripts/Minigames/3Match/MatchManager.cs - Mirror Puzzle · Ray and mirror puzzle logic.
Assets/Scripts/Minigames/Mirrors/RaySystem.cs - Minigame Exit · Shared completion and return path from minigames.
Assets/Scripts/Minigames/EndMiniGame.cs
Presentation
UI, animations, audio, and mobile input layers.
- Audio Manager · Central music and SFX playback across scenes.
Assets/Scripts/ManagersGame/AudioManager.cs - UI Manager · Controls global UI visibility and screen state.
Assets/Scripts/ManagersGame/UIManager.cs - Joystick Pack · Imported mobile joystick controls used for player movement.
Assets/Joystick Pack/Scripts/Joysticks/VariableJoystick.cs - Player Animations · Directional walk and idle animations for the mobile player.
Assets/Animations/Player/PlayerController.controller
Content pipeline
Prefabs, resources, tiles, and imported assets that compose the game.
- UI Prefabs · Buttons, menus, slots, hints, and dialogs reused across scenes.
Assets/Prefabs/UI - World Prefabs · Handcrafted village, props, and spawn content for scenes.
Assets/Prefabs - Item Assets · Runtime-loadable item definitions stored under Resources.
Assets/Resources/ItemCollection
Connections 31
- Start Scene → Scene Transition: starts flow · Launches into the shared scene-loading pipeline.
- Education Scene → Education Manager: tutorials · Onboarding scene uses tutorial progression logic.
- Scene Transition → Scene Init: loads · Transitions trigger scene setup after loading.
- Scene Init → Level Settings: applies · Per-scene settings are applied during initialization.
- Scene Init → Audio Manager: configures · Scene setup selects or resets audio context.
- Scene Init → UI Manager: configures · Scene setup restores or adjusts UI state.
- Scene Init → Moon Phase: restores · World progression state is rehydrated on load.
- Save Manager → Save Data: serializes · Persistence uses a dedicated save data model.
- Save Manager → Scene Transition: restores flow · Saved state influences what scene or state loads next.
- Village → Interaction Manager: uses · Exploration scene enables world interactions.
- Holy Area → Interaction Manager: uses · Exploration scene enables world interactions.
- Temple → Interaction Manager: uses · Exploration scene enables world interactions.
- Interaction Manager → Interactable Base: targets · Nearby objects implement a common interaction contract.
- Interactable Base → Inventory: gives items · Some interactions award or consume items.
- Interactable Base → Store Manager: opens shop · Store interactions hand off to the trading subsystem.
- Interactable Base → Scene Transition: enters scenes · Certain objects likely trigger puzzle or area transitions.
- Inventory → Item Registry: resolves · Inventory entries map to registered item definitions.
- Item Registry → Item Assets: loads from · Item definitions are pulled from Resources at runtime.
- UI Prefabs → UI Manager: driven by · UI manager controls reusable menu and dialog prefabs.
- Joystick Pack → Village: moves player · Touch controls drive exploration movement in free zones.
- Player Animations → Joystick Pack: reflects · Animation state follows joystick-driven movement.
- 3-Match → Minigame Exit: returns via · Puzzle completion exits back to the main flow.
- Mirror Puzzle → Minigame Exit: returns via · Puzzle completion exits back to the main flow.
- 3-Match → Scene Transition: switches scene · Minigame completion likely reports through scene flow.
- Mirror Puzzle → Scene Transition: switches scene · Minigame completion likely reports through scene flow.
- World Prefabs → Village: builds · Scene content is assembled from environment prefabs.
- World Prefabs → Holy Area: builds · Scene content is assembled from environment prefabs.
- World Prefabs → Temple: builds · Scene content is assembled from environment prefabs.
- Audio Manager → Village: plays theme · Music changes with the active area.
- Audio Manager → Holy Area: plays theme · Music changes with the active area.
- Audio Manager → Temple: plays theme · Music changes with the active area.