hi I'm looking to do a turn-based game like Risk...selecting territories needing to know bordering and adjacent "tiles" and possibly a map generator.
just wondering if anyone has done it or worked a similar process. I searched forums and didn't find much.
I was thinking of setting up a grid system of numbers and number all the tiles, then flag all the ones that makeup a specific territory. Then I would need to give each territory a number. But then it would have to be setup so I knew which territories were adjacent.
Like:
0 10 20 30 40
1 11 21 31 41
2 12 22 32 42
3 13 23 33 43
When territory 11 attacks you could check the territory they are attacking to see if it adjacent.
if (atk_terr > (att_terr - 11) AND < (att_terr + 11))
*although I would have to compensate for being in the first or the last column which is fine.
I could maybe fill a giant tilemap with squares and make the shapes of the territories but it probably wouldn't look the best.
Anyone else have ideas? Thanks!