The Maze Game is a 2D-effect game using orthographic camera settings. Players navigate through a 3D maze model, starting from the maze's entrance and aiming to reach the illuminated exit. The game incorporates various design patterns and systems to enhance functionality and user experience.

Features and Systems

  • Orthographic Camera for 2D Effect:
    • The game employs an orthographic camera to give a 2D perspective while navigating a 3D maze.
  • Player Element:
    • The player element, designed to navigate the maze, starts at the maze's beginning point. It has an applied material and consistent physics mechanisms to simulate real-world interactions.
  • Player Movement Script:
    • A custom script enables the player to move using WASD and arrow keys, ensuring flexible control options.
  • Maze Exit and Victory Trigger:
    • An illuminated cylinder at the maze exit acts as the victory trigger. Upon collision with the player, a script displays a "You won!" menu.
  • Timer:
    • A timer positioned at the maze's center tracks the player's progress and adds a competitive element to the game.
  • Particle Systems:
    • Particle systems highlight the entrance and exit points. A third particle system creates a dust effect within the maze for added realism.
  • Physics System:
    • The game's physics system handles collisions, player movements, and interactions with the maze environment, ensuring realistic responses to player actions.
  • Collectible Elements:
    • Collectible items scattered throughout the maze increase the player's score when collected, adding challenge.
  • Game Save System:
    • A game save system allows players to save their progress and continue from where they left off, providing a persistent gaming experience.

Design Patterns

  1. Singleton Pattern:
    • The singleton pattern is used for the game manager to ensure there is only one instance managing game states, settings, and transitions.
  2. Command Pattern:
    • The command pattern is applied to handle player inputs (WASD and arrow keys) for movement. This encapsulates the requests as objects, allowing for more flexible command execution and undo functionality if needed.
  3. Observer Pattern:
    • The observer pattern is used to manage the game timer and score system. Observers (e.g., UI elements) are notified of changes in time or score, updating the display in real-time.
  4. Event-Based System:
    • An event-based system triggers actions like displaying the victory menu or playing sound effects upon certain conditions, such as reaching the maze exit or collecting items.
  5. Service Locator Pattern:
    • The service locator pattern provides global access to game services like audio, input handling, and particle effects. This decouples service consumers from their implementations, promoting modularity.

Conclusion

The Maze Game combines creative design with robust programming patterns and systems to deliver an engaging and immersive experience. Players navigate through a challenging maze, collect items, and aim to reach the exit while enjoying intuitive controls, real-time feedback, and a seamless audio-visual environment.