Flag Collector

In Flag Collector, the player creates a path for the flag collector to follow and gather flags. At any time, the player can change how the flag collector approaches the flags—choosing to target the closest flag, collect them in a specific order, or pause the game to plan and place flags strategically. This mechanic adds flexibility and strategy, making the gameplay engaging and dynamic.

Created In: 2021
Collaboration: Made it Myself – Solo
Link to Play the Game: m4tin – itch.io
Game Engine: Unity- C#

The State Controller manages the flag collector’s behavior through three distinct states: In Order, Nearest, and Paused. This is achieved by storing the flags’ locations in an array, allowing the system to dynamically adapt based on the selected state.

  • In the In Order state, the flag collector follows the flags sequentially.
  • In the Nearest state, it targets the closest flag.
  • In the Paused state, the player can stop the flag collector, providing time to strategically place additional flags.

This system adds flexibility and ensures smooth transitions between behaviors, enhancing player control and engagement.

Pure CSS3 Tabs
  • Game Manager

  • Player Movement

I implemented basic vector math for the flag collector to navigate toward the flags. The dot product is used to calculate the rotation angle, while the cross product determines whether the flag collector should rotate clockwise or anticlockwise. This approach ensures smooth and precise movement as the collector follows its path.

Pure CSS3 Tabs
  • Player Movement

Pure CSS3 Tabs
  • Flag Planting