How mav-666/snake works
Project Type and Purpose
• The project is a Unity-based 2D puzzle game (“Wire up”) where the player controls a snake-like entity (a “wiggling wire”) through various levels. The game involves connecting/disconnecting wires, physics-based interactions, and environmental puzzles.
• The README highlights that it is level-based (10 levels), with integrated controls for movement and connection/disconnection mechanics, clearly indicating gameplay mechanics tied to electricity and wiring.
Main Components
• Unity Engine & Core Systems:
– Unity’s component-based game objects, scenes, and project settings (ProjectSettings folder, URP render pipeline assets, etc.).
• Game Scenes & Levels:
– Levels/Scenes such as Level_0, Level_1, …, Menu, EndScreen, etc.
• Player Input & Control:
• Game Controllers & Managers:
– Components under Assets/Scripts/GameController (e.g., GameManager, Timer, CheckpointHandler, UI controllers) that govern game flow, state, and transitions.
• Gameplay Mechanics – Electricity & Wiring:
– Scripts under Assets/Scripts/Electricity including Battery, Connectable, Transmitter, Couplers, and various SignalHandlers.
– These components handle the core mechanics of connecting/disconnecting wires, electrical signals, and their effects on game objects.
• Specialized Systems:
– Parasite System: Managed through Assets/Scripts/Parasite – controlling special enemy or environmental obstacle behaviours.
– Snake Mechanics System: Found under Assets/Scripts/Snake – implementing the snake-like movement and interactions.
– Visual/Graphics & Animations: Under Assets/Scripts/Graphic and Animation subfolders, handling sprite animations, tween animations (via DOTween under Assets/Plugins/Demigiant), and effects.
• External Libraries / Plugins:
– Dreamteck Splines: A large portion of the Assets/Dreamteck directory indicates this is used for spline-based rendering/physics for wires, paths, or level elements.
– DOTween: For tweening animations and smoother transitions.
– TextMesh Pro: For UI text rendering.
• Assets & Resources Management:
– Art assets (Textures, Prefabs, Materials, Fonts), Audio files, and Resources that get integrated into scenes and control the visual/audio presentation.
Architectural Patterns and Design Principles
• The project follows a component-based design intrinsic to Unity. Each GameObject aggregates several MonoBehaviour scripts to provide specific features.
• Separation of concerns is visible – for example, input handling is separate from game logic (GameManager), and electrical behaviors are encapsulated in distinct assemblies (Assets/Scripts/Electricity).