- Home /
How to go through all road tiles in a transport network on a strategy game map?
Hello,
I am making a strategy game with a grid of square tiles. Some of the tiles can have roads, which will form a transport network between resources and cities (a bit like Civilization games).
The resources act as sources of commodities and the cities are drains that consume them. The roads form a network that connects the sources to the drains, and determine which resources and cities are included in the supply zone.
Whenever the player adds or removes a road, I will need to recalculate which roads are connected in the network, and if the number of resources and cities in the network has changed.
I would like to ask for advice on the best way to do this recalculation. Specifically, as the road network can contain many branches, what is the best method to go through the road tiles in the network to find out which tiles are in the network? At the moment the tiles with roads on for each country are in a C# list.
Thank you for your advice.
Answer by ifonlyme1000 · Sep 22, 2020 at 07:50 PM
https://www.udemy.com/course/turn-based-strategy-game-development/ Turn based game dev tutorial like heroes of might and magic
Your answer
Follow this Question
Related Questions
Instantiating Too Many Objects 1 Answer
Stop animation after playing once 1 Answer
iTween: uneven looping with PutOnPath 1 Answer