I’ve been trying to create a game similar to paper io for my coding class and am trying to use hexagonal tilemaps and grids to represent the territory however I don’t know how to call upon the draw tool and don’t know how to fill in the area once claimed. does anyone know how to do either of these? I’ve tried using polygons and sprites already however the logic I have tried wasn’t working so this is my backup idea.
You will make a draw tool that will modify your data storage for the grid. Modifying the data backing up the grid should then trigger some kind of visual refresh.
“Floodfill” is the term you want to google for.
Hexes are a lot trickier than a simple cartesian rectangular grid cell.
Here’s some more reading on how to do hex tilemaps:
Anytime something isn’t working, that means it is… time to start debugging!
By debugging you can find out exactly what your program is doing so you can fix it.
Use the above techniques to get the information you need in order to reason about what the problem is.
You can also use Debug.Log(...);
statements to find out if any of your code is even running. Don’t assume it is.
Once you understand what the problem is, you may begin to reason about a solution to the problem.