I am developing a game where agent tribes fight each other for land.The map is a 2D map.Each agent has an instance of group object that represents their family.And each group object contains information about the tribe.
Now the issue is how to store and represent the area each tribe owns.I was thinking of something along the lines of having the land split into own-able tiles of land and then having an ArrayList of Dimensions representing the region (width,height) and also storing positions alongside in order to know where the region starts from..Now the way tribes gather the land owned is as follows:
- If the current square that agent is on is free then take the land
- If not then if the current square is occupied try to fight it off from the other agent group
Now please note that actual agent movement is not based on tiles therefore I am not sure if my idea of representing the own able land as tiles is good for this.
So I am seeking on advice from anybody who has had a similar problem to deal with or have good ideas that they can share.
Also I am attaching an image to better explain my situation.
NOTE: The rectangles of different colours represent the areas owned by the agents whereas the circles in different colours are the agents themselves.