MysticFlow is an ** Unity game** created using design patterns and taking SOLID rules under consideration.
The application introduces key algorithms used in computer science by integrating them into a game environment where players can explore, discover, and complete tasks related to algorithm execution.
The project is implemented in C# using the Unity game engine, leveraging strong typing and modular architecture to maintain code reliability, maintainability, and separation of responsibilities.
- Overview
- Game Features
- Technologies Used
- Project Structure
- Core Systems
- How the Game Works
- Running the Project
MysticFlow focuses on making algorithm learning visual, interactive, and engaging, while having a clean code architecture.
The game currently implements visualizations of the following algorithms:
- Breadth-First Search (BFS)
- Depth-First Search (DFS)
- Merge Sort
- Insertion Sort
- Bubble Sort
Once a challenge is completed, the algorithm becomes marked as discovered in the task list.
The system allows players to:
- Observe algorithm execution visually
- Track their progress through a task list
- Discover algorithms through gameplay
- Modular architecture using interfaces and desing patterns ( Singletons, State and Command design patterns)
- Interactive algorithm visualization
- Gamified learning experience
- Scene-based state management
- Persistent UI task tracking system
- Algorithm discovery mechanics
- Unity Game Engine
- C#
- Object-Oriented Design Patterns
- State Pattern
- Command Pattern
- Interface-based architecture
interfaces/
│
├── IGameState.cs
├── ICommand.cs
└── IInventoryState.cs
state_machine/
│
├── SceneController.cs
├── GameManager.cs
├── GameState.cs
├── MenuState.cs
├── DuringGameState.cs
├── BFS.cs
├── DFS.cs
├── Merge.cs
├── Insertion.cs
├── Bubble.cs
└── FinishState.cs
movement/
│
├── DirectionManager.cs
├── GeraltMovement.cs
├── GeraltMovementMap.cs
├── TransformFlipper.cs
└── FlipController.cs
commands/
│
├── MoveCommand.cs
└── JumpCommand.cs
algorithms/
│
├── SortingManagerBubble.cs
├── SortingManagerInsertion.cs
├── SortingManagerMerge.cs
├── BFSCode.cs
└── DFSCode.cs
ui/
│
├── PersistentUI.cs
└── TextMoverTMP.cs
The game uses a state machine architecture to control transitions between gameplay states.
Main states include:
MenuState– main menuDuringGameState– active gameplayFinishState– end of gameplay- algorithm-specific states (BFS, DFS, sorting)
The GameManager and SceneController coordinate state transitions and manage scene loading.
Player actions are implemented using the Command Pattern, improving modularity and scalability.
Commands implemented:
MoveCommandJumpCommand
Each command encapsulates a specific player action, making the system easier to extend and maintain.
Dedicated scripts manage algorithm visualization and execution logic.
Implemented algorithms:
- BFS (
BFSCode.cs) - DFS (
DFSCode.cs)
- Bubble Sort (
SortingManagerBubble.cs) - Insertion Sort (
SortingManagerInsertion.cs) - Merge Sort (
SortingManagerMerge.cs)
Each algorithm script handles its own visualization and execution behavior within the game environment.
The PersistentUI component manages a user interface that remains available across multiple scenes.
Key responsibilities:
- Display the Task List showing discovered algorithms
- Track player progress
- Update task completion status dynamically
Interface behavior:
- Visible only in the TaskList scene
- Hidden in gameplay scenes to avoid interference
- Completed tasks change text color to indicate progress
The system provides methods to:
- Update task progress
- Reset UI state when the game restarts
This ensures a clear separation between UI state management and gameplay logic.
- The player explores the game environment.
- Algorithm-related challenges are discovered.
- Completing a challenge marks the algorithm as solved.
- The Task List UI updates automatically.
- Players can review discovered and undiscovered algorithms.
or
1. Link to download the build: https://coffee-deve.itch.io/mystic-flow
MysticFlow was created as an educational tool to demonstrate computer science algorithms through interactive visualization and gameplay. The project combines game development techniques with algorithm education to create a more engaging learning experience.
Created as part of a final enginering project: software design and game development focused on using computer science knowledge.