Divide a City Map Into Regions for Strategy/Resource Game

So I’ve been working on a resource management/strategy game. I love these types of grand strategy games and they don’t need a lot of art assets. Outside of classes and tutorials, this is the first game that I have built myself from scratch. I’ve learned a lot and have been able to google and find most things that I need but I am unsure of the terms to look for or how to describe precisely what I am trying to do here. Any help on a starting point or how to do this would be great. The base game involves buying and selling product within a city, managing your team and leader, money management, and the point that I am at now - territory. Up until now, the game is mostly text based with UI elements. You keep track of your cash, purchase goods, hire new employees, take part in schemes against CPU players, etc. Your sales are based on number of potential customer, what product you are selling, etc.

But from here, I want to apply all of that to a map and the number of potential customers to be based on the area you control. The amount of territory you control, then directly increases your sales through increased customer base. Additionally, I’d like controlling that territory possibly trigger unique random events. I want to take a map of the city - say New York, and be able to start from some particular starting point, say a couple blocks or a neighborhood and then expand from there. The player and CPUs would each begin in a different area on a single image of the map.

Okay, so now that you know the basic idea of the game, here is what I need help figuring out how to do: I need to represent the area that the player and computer opponents control by some sort of color, highlighting or outline overlay on the map. When you mouseover on a part of the map (controlled or empty), I need information on that neigbhorhood and who controls it. Secondly, let’s say that you begin with a 4 block by 4 block area represented by a purple overlay on the map. I then want that overlay and the region you control to expand automatically to include surrounding blocks based on your leader/advisers expansion score. I understand that there may be a lot of setup in advance with the map but Im not sure how to divide up the map in this way for the expansion and whole map overlay system to work or how to then apply the overlap/highlighting/outlining to the map after its divided. I’m not sure if I need to divide the map into a bunch of smaller pieces or use some sort coordinate system where player controls from x to y, especially considering the area can expand and shrink.

It’s possible I may have to simplify it to larger regions/neighborhoods to start instead of doing it block by block but I assume code wise it would be similar. I really just need to figure out how to divide a map up into regions by blocks and provide different data based on where you are on the map and how to represent that on some sort of overlay image of the map. I would really like to take the base that I have currently and apply it to this map system. Any help would be greatly appreciated. I am really not sure where to start. Forwarding me to the correct information on how to do this map overlay system and how to break an image down into smaller components/coordinates is just as useful.

1 Like

hi, mbrannon, I am too making a grand strategy game, i’m brand new to Unity and I have the same problems as you describe. A while passed since you posted so I wanted to ask if you solved anything. Thank you in advance

When you click on the user name it shows that op has not been seen for 3 years so it’s unlikely you will get a response. I suggest to create your own thread with specific details of what you want to achieve.

Note: Op says he made some tutorials. You say you are “brand new”. If thats the case common advise will be to do some tutorials before starting with your “dream” project.