>>  vacuum sealed for your enjoyment
index : farming game idea
Farming Game

Acius and I spent a bit over an hour on the phone this evening, and have
come up with what we hope will be a happy fun way of implementing farming
in the game. Inspiration for this comes heavily from my addiction to the
Harvest Moon series of games)

An entire season in the game is 3 days of real time. Crops will take a
related amount of time to grow - that is, you can expect to wait for your
harvest, just like you wait for trees to grow now. The big difference is
that crops will require a great deal more involvement than simply planting
a room full of apples and waiting.

Each crop that is to be grown will occupy a 5x3 plot on the map. If you
want to plant more of a given crop, make more plots. Plots are a universal
building type, you will 'build farm plot' in the desired location to create
your field. Plots will require some wood, but not much - they should be
essentially free to create.

When you have your plot, you will then need to sow it with seeds of the
appropriate type. We might have to put a bit of seed vending on the
mountain at first, but ideally, I would like people to create their own
seeds directly from the result food items - ie, you turn several ears of
corn into one unit of corn seed, etc...

One unit of seed is enough to sow one plot of farmland. Once sown, fields
will ideally use our extant building code to transition through several
levels of growth (some crops requiring more time to grow than others, but
all individual phases taking roughly the same amount of time).

At every level of growth before the final stage, it will be possible to
interact with the field via a little mini-game (which will be described
later).

Upon achieving full growth, the field will become a set of diggable
squares, from which you will be able to retrieve the results of your hard
work. In an optimal field, you will get 15 squares to harvest from - but it
is more likely that some squares are empty if you didn't take perfect care
of things. Also, the better you took care of things, the more you will get
from each individual square. Thus, not all 15-square harvests are equal.

Most harvestable squares will disappear upon harvesting, but in the event
of some crops, the plot will continue to produce until the end of the
season - that is, upon digging the last of the harvestable squares, it will
revert back to a field object that is one growth phase away from harvest.
The resultant harvest may be better or worse than the previous one,
depending on the care you take of the field from then on, but it will
resume growth from the same position of strength it had reached before
harvest. Thus, if you take care of a crop that regrows, you will likely get
several good harvests out of it.

All crops will be seasonal. There will be spring, summer, and fall crops,
and they will only grow in their season. This means that if you plant
something out of season, it will not sprout. Likewise, if a field does not
reach harvest in time for the season's change, it will die. Thus, your only
real limit on the number of harvests you get from a regrowing crop will be
how early in the season you started.

While growing, fields will probably have only one natural predator - the
rabbit. Bunnies will be able to eat from fields, and should be adjusted
such that they prefer eating your crops to grass. Whenever a bunny eats
from a field, it weakens it slightly. The solution is likely simply to kill
any bunnies that get close to your farm. Eventually, fences will be
buildable as a deterrant, but that's probably going to happen after farming
is fully implemented.

By the time farming is implemented, npc's will be hireable. You need farm
hands in order to get any measureable harvest from any field. You will be
able to assign either one or two workers per field, thus the number of
fields you are able to actively maintain is directly proportional to the
number of workers you are able to keep employed (the primary requirement
for continued employment of an npc is the providing of them with lots of
food).

When investigating any field, you will be presented with a screen that
looks something like this:

   A   B   C   D   E                           A   B   C   D   E
 +---+---+---+---+---+   Crop: Tomatoes      +---+---+---+---+---+
1|   |   |  "|   |   |   Progress: 4/5 85%   |***|** |*  |***|** |1
 |   |   |"" |   |   |                       |~  |~~ |~  |~~ |~  |
 +---+---+---+---+---+         Timmy         +---+---+---+---+---+
2|   "   |   |"" |   |   Weed: C1, D2        |** |*  |***|*  |***|2
 |  "|"  |   |  "|   |   Water: C2, E1       |~~ |~~ |~~ |~~ |~~~|
 +---+"--+---+---+---+                       +---+---+---+---+---+
3|   |   "   |   ""  |         Fabio         |** |*  |** |** |*  |3
 |   | """   |   ""  |   Weed: E3, A2, B2    |~  |~~~|~  |~~ |~~ |
 +---+---+---+---+---+   Water: A1           +---+---+---+---+---+

Nice and confusing, ne? Well, putting it in color should make things a bit
nicer. Anyhow, the three parts to the image show you three different
aspects of your farm plot. The left graph shows the location of any weeds,
and the right graph shows the strength and water levels of the actual crop
in each of the squares (stars being strength and tildes being water).

The text in the middle shows you how far along the field is (the progress
number showing which phase out of how many, and the percentage completion
of the current phase). Your workers' instructions are also given here, but
you already guessed that.

Allowed instructions are to either water or weed from a particular section
of the field. Elimination of weeds helps plants to grow, as does watering.
Watering is more helpful than weeding alone, and plants cannot improve
above 2 stars in strength if they do not receive sufficient water. However,
watering also helps weeds grow, thus a balance must be struck.

Weeds will use a tweaked (in favor of growth) game of life algorithm to
determine where they grow. Weed growth damages plant strength (as opposed
to merely hampering it). Thus, a field left unweeded has the potential to
kill off all plants and will not produce anything. Weeds will not increase
in a square that has only one tilde worth of water, but they will not die
(without weeding) unless the square drops to zero tildes.

During each growth phase, you will be allowed to give new instructions to
your workers. The results of their work will be manifest when the new phase
begins. Workers will be allowed to receive 4 different instructions at a
time. Perhaps we will eventually implement levels of worker skill and
change this into a range from 3-6. If you do not issue new instructions,
workers will continue with their previous instructions.

One instruction's worth of watering increases the level of the square
watered by two tildes, and the water level of any adjacent squares by one
as well. One instruction's worth of weeding kills off three weeds (inside
the square first, then along the border).

In a square without weeds, crops improve in strength by one star every
phase. If there is water in the square, the plants improve by one
additional star every phase. If there are weeds in the square, plants lose
one star per three weeds. Weeds along the border to not count against plant
growth, but are in a position to threaten it next phase. Thus, in the image
above, C1 and D2 would each lose one star were it not for the valiant
efforts of Timmy to eliminate the weeds before they cause problems.

If a square is ever killed off (different than zero stars or 6 weeds), it
will become X'ed out and will not produce anything. Dead squares will still
harbor weeds, however, so if you allow one such to become completely
overrun, expect incursions into adjacent squares every phase.

Other considerations for farming. Unless there is a source of potable water
in the room with the field (river or well), workers will be unable to use
the water command, and will only be allowed to weed. If there is sufficient
rain during a growth phase, every square will receive one tilde. Thus, if
you plant in a rainy area, it is possible to get by w/o actually watering
the plants yourself, but you will have to double up on weeding duty.

Also, regrowing plants won't continue producing until harvested. Thus, we
might want some sort of NPC harvesting going on as well for the benefit of
corn farmers and such who are praying for a 3rd harvest in the season ;)

Crop yields upon harvest depend on the actual number stored in the field
object when all is said and done. Stars are actually estimates of plant
strength. The real number is on a range of 0-100. Rabbits decrease strength
of a random square by 5 or 10 points per nibble. Stars represent 30 points
of strength. A brand new field will have zero weeds and no water, with all
squares at 25 strength.

Your average crop will probably yield one item of food per 10 points of
strength per square. Each growth phase will last 2 weeks of game time -
thus in a single season, there are potentially 12 growth phases. Thus, in
the case of the tomatoes above (which require 5 phases of growth before the
first harvest), the maximum theoretical yield of a single field over the
course of an incredibly rainy summer where two workers are weeding their
little hearts out is 7x10x15 = 1050 tomatoes.

Of course, this is highly improbable (a square with only 99 points of
strength will produce 9 veggies per harvest, and 12 phases is actually
probably an over-estimate). The real maximum yield is likely closer to
6x9x15 = 810, and given issues with weeds, I expect one to get closer to
100 units of food from a good harvest.

That said, one unit of seed will probably cost 20 units of food to produce
in the case of non-renewing crops and 40 in the case of renewing crops.
This disparity in numbers is not very realistic, but I don't really care,
it helps balance the economics here, I hope. Thus, the most efficient
potato farmer is likely going to only make a profit of 80 per harvest and
the tomato farmer is will profit by only 60 from his first harvest.

Crops
-----
As an initial list, I am proposing a grand total of five crops per season.
Here is a list of their growth times and whether they are renewable.
Obviously this list is open for amendment, esp as I am writing it at 4:30
in the morning.

Spring - turnip       2
         potato       3
         cucumber     6 r
         cabbage      4
         strawberry   3
Summer - onion        2
         tomato       5 r
         corn         7 r (probably make corn take 2 phases to regrow)
         melon        6
         pumpkin      5
Fall   - carrot       2
         yam          3 r?
         bell pepper  4 r
         spinach      5
         celery       5
©2008 ammon lauritzen