How aiyayayah/metroidvania-inspired-game works
Project type and purpose
• This is a standalone Unity 2D Metroidvania‐inspired game.
• It uses Unity’s core engine, custom C# MonoBehaviour scripts, third‐party tweening (DOTween), Spine animation exports, and a set of Scenes/Prefabs/Resources.
Top‐level components/subsystems
A. Unity Engine Core
• Scene Management
• Rendering Pipeline (2D Sprite Renderer + Shaders)
• Physics2D
• Input System
• Audio System
• Asset Pipeline & Resources
B. Game Logic (Custom Scripts under Assets/Scripts)
• Game Manager / Scene Controllers (GameStartButton, ExitGameButton)
• Player Controller (Player.cs, PlayerSkill1.cs, PlayerSkill2.cs, PlayerGetHit.cs, PlayerHPBar.cs)
• Enemy Controller (EnemyController.cs, EnemyAttack.cs, EnemyGetHit.cs, EnemyHPBar.cs)
• UI Controllers (Health bars, Skill effects, SoundButtonDown, SoundVolume)
• Attack/Skill Handlers (AttackBoxDestroy.cs, Skill1Destroy.cs)
C. Asset Modules
• Characters – Player & Wizard prefabs + animations (Spine & Unity‐baked)
• Enemies – Zombie & generic Enemy prefabs + animations
• Free Assets & VFX Libraries (2D Handcrafted Art, Lana Studio VFX)
• Audio Assets (SFX, BGM)
• Shaders (Spine‐Skeleton.shader, custom water & tile shaders)
• Plugins (DOTween)
D. Scenes
• StartScene: UI menu, GameStartButton → loads DemoScene or SampleScene
• SampleScene / DemoScene: main gameplay levels
E. ProjectSettings & Packages
• InputManager, AudioManager, Physics2DSettings → configures engine subsystems
• Packages/manifest.json → includes DOTween & other package dependencies
Relationships & interactions
• Input System → PlayerController & UI Controllers
• PlayerController / EnemyController ↔ Physics2D (colliders, rigidbodies)
• Game Manager → SceneManager (loads/unloads Scenes)
• MonoBehaviours (Player, Enemy, UI) → Asset Modules (Prefabs + Animations + Audio)
• DOTween plugin → tweening & animation sequences invoked by scripts
• Audio System → audio assets called by script events (attacks, hits, BGM loop)
• Resources (DOTweenSettings, Spine skeleton data) → loaded at runtime
Architectural patterns & principles
• Component‐based design: everything is a MonoBehaviour attached to a GameObject.
• Separation of concerns: Input → Controller → View/Prefab → Physics/Audio.
• Asset‐driven design: Scenes reference Prefabs, which bundle Meshes/Sprites, Animators, Scripts.
• Event‐driven interactions: UI button clicks fire events to GameStartButton, ExitGameButton, SoundButtonDown.