Fill Player Territory (Using Flood Fill)
Grid Ninja » Devlog
Filling is one of the important mechanisms used in this game.
So whenever the player acquires a new area, the acquired area should be filled with the player's given color, and at this particular place, the Flood fill algorithm helped me.
How?:
Every cell has its specific data, which includes its coordinates(X and Y) and the status(Filled/Unfilled/IsTrail), these helped to implement the flood fill algorithm.
You can check the implementation here Flood-fill implementation at line number 104.
You can check the video attached with this DevLog for a working demo, where "2" represents the filled cells.
Grid Ninja
Player expand territory and eliminate opponent. Player with big territory wins.
Status | In development |
Author | Goutamraj |
Genre | Strategy |
Tags | Indie, Multiplayer, Ninja, Pixel Art, Top-Down, Two Player, Unity |
Languages | English |
More posts
- AWS EC2 Dedicated Server deployment11 days ago
- Detection of a perfect point to start Flood fill: The Working SolutionOct 06, 2024
- Detection of a perfect point to start Flood fill: The Failed SolutionOct 06, 2024
- Player State Machine / State Pattern:Sep 30, 2024
- The Player Controller and Input SystemSep 28, 2024
- EnvironmentSep 25, 2024
Leave a comment
Log in with itch.io to leave a comment.