May 7, 2018

Trade I

I've mostly copied Alexis's trade system so I won't say much about it beyond that it's a fantastic conception at its core. Credit where credit is due.

My own take on it uses a network to model each market city as a node. By using a multi-directional graph, I can put all the different possible trade routes into the network, and let some simple algorithms figure out the shortest distance between two points. Should we go around the mountain, or through the desert? Paddle up the river or just take the road? All of that work is off-loaded to the algorithm. I still have to do some work inputing the raw distances between each city, but I hope to automatically calculate that as well from my mapping code.

Right now every industry is technically available in every place, given that the settlement meets the minimum population requirement for that industry. Ultimately, I don't quite like this, but I need to think of a way to determine which industries are available where. For example, for boatbuilding to be available, wood must be available, and presumably, access to the coast or a large river.

Ultimately, then, the best trade system is dependent on a robust resource description table. Each resource (including industries) must have prerequisites for its appearance on the world map. More complicated resources (such as worked metal) are calculated from a series of recipes, similar to the system found here.

No comments:

Post a Comment