The game I wanted to build for the Four Elements competition went nowhere, due mostly to me being a bum and not working on it; either due to no time, or no interest in staring at a computer.
So now I have a little time, and a little more energy, so I am going to pick up where I left off before (at the very beginning) and try to build something.
I am starting with what I am calling, for lack of a better term, an "economy engine". This will populate the different towns in the world with a variety of trade goods, set the relative availability and values of those goods, and then control the availability and price based on world events. Right now I am starting with having availability fluctuate based on the month of the year. For instance, grains are more readily available (and therefore less expensive) around harvest time. Wolf pelts will be more common in the winter, when hunger drives the wolves to hunt closer to human habitation.
The data structure of an individual trade good looks like this:
- name="deer hide"
Here is what the attributes mean:
name : The name of a particular trade good
weight : weight of one unit of an item
volume : volume of one unit of an item
base_value : unmodified value of one unit
base_availability : unmodified likelihood of an item being available for trade
availability_dropoff : how quickly availability of an item drops off at increased distance from the point of origin. If this value is "0", then the product is equally available everywhere.
price_increase : how much the price of an item increases as a function of rarity
lifespan : how long an item will last once purchased. Think of food spoiling
origin : the location of the "generator" of an item. This provides for localization of products, thus making them more trade-able.
peak_month : At what time of year is the item most easily available? The corollary to this is that, at the opposite end of the year the item will be at its rarest.
category : What "type" of item is this? Food, metal, clothing, luxury, and the like.
The first step in this project is to get the towns populated with trade goods. Once I have that sorted out and balanced, then I will add the cyclic ebb-and-flow of availabilities and prices.
My chosen medium is Macromedia Flash, so as I solve problems I will post examples and code. I hope to have a game engine completed in time to use it for a game in the next Four Elements competition.