Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

On the Distribution and Availability of Goods

Sign in to follow this  


I have been working through how I am going to handle the relative availability, and therefore the relative value, of different trade goods in different parts of the gaming world.

The largest factor in the availability of goods is transportation. In the time and area in which my game takes place, it is kind of out in the sticks, population-wise. One empire is approaching its end, and another is on the rise. Various marauding tribes keep the pot stirred, so the infrastructure we take for granted -- roads, for instance -- are few and far between, and at best a well-packed trail through the forests and swamps.

All of the trade goods I am using have the possibility of being available at all of the different towns and villages in the game. However, they will not all be _definitely_ available at any given town, and where they are available, they will not necessarily be available at the same price or in the same quantities. In the south, by the sea, fish will be more easily available but e.g. iron will be a little harder to come by. Deer hides are common near the mountains to the west, and cotton easier to find as one approaches the plains to the east. Specialty items like amber and glass will be more common near trade routes, although relatively rare in any case.

But how to turn this into something the game can understand?

All of the goods in a game must come from somewhere. They can be spontaneously generated; there can be a set amount in a set location; they can be created as a result of player actions, e.g. killing a rabbit produces one unit of rabbit meat and one rabbit pelt. The farther a player is from the point of origin of a specific trade good, the rarer that thing will be.

Therefore I am giving every trade good one or more points of origin in the game world, and a set amount by which the availability decreases over a certain distance. These points of origin may be within the area available to the player, or substantially outside it.

Example: Assuming a game world which is 40 miles square, set up as a grid covering from [-20,-20] to [20,20]. The data for deer hide might look like this:
name="deer hide"

This tells us that the point of origin of all deer hide in the game is near the western boundary of the "world", is fairly easy to aquire and is available even on the far side of the "world", although harder to find and more expensive.

The "lifespan" attribute allows the simulation of item perishability. Fish will have a lifespan of maybe a two weeks if packed in salt and ice. Caviar a little less, and various kinds of meat a little more. That means that they rapidly become more uncommon the farther one travels from the point of origin.

Here is another example:

Wheat is nearly ubiquitous -- available almost everywhere with only slight changes in price.

I think I can use this system for influencing the mix of tribal influences in the towns and hamlets of the game by giving the Romans, Turks, Franks and Bulgars origin points and dropoff values. Towns farther south will be more strongly Roman. Towns near the northeast will have more of a Bulgar flavor. This can also be used to modify random encounters in the travels between the towns.
Sign in to follow this  


Recommended Comments

why don't you simply make the origins tag nestable, so that you can have more than one within an item tag?

Share this comment

Link to comment
I will probably end up doing something like that; right now I am still working out exactly how much data I want associated with each item. For instance, once I put in the different tribes, each of which will fave a greater desire for some goods than others, and also have a larger supply of some goods than others.

As for the XML structure, I am trying to keep it as simple (flat) as possible. Actionscript 2.0 does not have native DOM.getElementsByTagName() or DOM.getElementById() methods, so having a single tag with multiple attributes makes for easier, less processor-intensive searching and what-not

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!