How diegolrs/2048 works
Project type and purpose
• This is a Unity-based educational clone of the 2048 puzzle game.
• It uses Unity’s scene/prefab system for UI, game board, and blocks, driven by C# scripts and animations.
File structure
• Top-level Unity folders
• Assets/Runtime: game assets (Animations, Prefabs, Scenes, Scripts, Data)
• Assets/Plugins/Demigiant/DOTween: third-party tweening library
• Assets/TextMesh Pro: text rendering package
• ProjectSettings & Packages: Unity project and package configs
• Under Runtime/Scripts
• Core: BoardManager, GameEndValidator, GameMode, SwipeHandler
• Components: Block, BlockAnimationController, BlockSpace, BoardRenderer
• Shift: ShiftInputs, ShiftManager
• Under Runtime/Animations & Runtime/Prefabs
• Animators/animation clips for merges
• Prefabs for blocks, board renderer, HUDs
README for additional insights
• Unity 2021.1.27f targeting Android/iOS
• DOTween is used for animations