Jan 2010
A lot of people helped me before my AP Exam a few weeks ago and I forgot to thank them... I sincerely apologize and thank you all for the help you gave.

Now, onto my project. I am doing this while my Jimmy Eat World album downloads so forgive me for my grammar and stuff. Its very warm in my house (Headbang).

I play a game called "Age of Mythology" and I wanted to test using calculus to maximize efficiency. Here is a quick breakdown of the game.

Game Breakdown (skip ahead if you want):

1. Worship god. Using the standard noun form as opposed to proper noun form to denote a non-omnipotent figure or figures. In this case, you choose between 12 gods, my favorite is Hades who is great but not the best god. It lets me get cheap kills without looking cheap.
2. Start Civilization, Grow Civilization, Barbarically Crush Other Civilization. Start with a few gatherers and a town and slowly build an army and destroy things (Punch).
3. Advance, Build, Outdo & Humiliate. Self-Explainatory.

The real meat of the project:

To build an army, you must "advance" through the ages first. There are technically 5 ages, one of which you start in and one of which is generally disregarded. The first is the archaic, when only gatherers can be created. The second is the Classical which first allows armies. At lower levels this would not matter but as the game gets more competitive, optimization becomes far more important. Honestly, EVERY SECOND COUNTS.

There are 4 main resources: Food, Wood, Gold, and Favor. Of these, Favor is entirely irrelevant for this portion of the game. Advancing costs 400 food and requires a temple, which costs 100 Wood and 100 Gold. Here are some things to throw you off now. Gatherers gather resources and must "drop" the at drops-sites. Optimization of gathering requires drop-sites, each of which cost 50 Wood. You only start with 3 villagers, and 3 is a disgustingly low number in this game. Each villager costs 50 Food, and there are generally 20~ish by advancing time. Villagers typically gather Food from animals or "hunt". To speed the gathering process, "Hunting Dogs", an upgrade, is purchased for a value of 100 Wood and 100 Gold.

EDIT: To my knowledge you begin with 250 Food, 225 Wood, and 100 Gold.

I have some stats that I will post if necessary, but I want to know how to place villagers to get the proper amount of resources at the proper time.

Here are some slope intercept equations which are probably pretty useless but show some relations.


\(\displaystyle n=Rounded Down(\frac{t}{T})\)
To say, the (n)umber of villagers = the time elapsed over the time it takes to make a villager rounded down (can't have partial villagers now can we?)

\(\displaystyle R=tnx-r\)
To say, total resources gathered for a certain number of villagers (R) = the time elapsed while the villagers were active (again for a specific n), times the number of villagers (n), times a specific rate (which is dependent on the resource, irrelevant variable for the most part, can be plugged into) minus whatever costs arose during the process (drop-sites etc). In other words, it does not account for an increasing number of villagers.

Now you should be able to see my issue... I need to make an equation that uses a specific time to show the amount of resources (R) but that accounts for a varying number of villagers over that span of time. I was thinking about doing a summation equation but then I figured a Definite integral would be far easier... any ideas?

Worst case scenario I make a piece y's equation... or possibly a piece x's? I can plug in to the variables for time (t), dependent rate (x), and costs (r) but I was hoping that I could get equations to figure out the other two (ideally just total resources gathered). This way I can form an optimization equation.

I will condense tomorrow... its too freaking hot and Bleed American is done... THANKS ALL (Happy).
Last edited:
Mar 2010
I need to make an equation that uses a specific time to show the amount of resources (R) but that accounts for a varying number of villagers over that span of time.
Um I'm not comprehending that sentence. Isn't the equation your looking for given? R = tnx - r?
Jan 2010
Yeah sorry, my wording is crap, I will edit later.

I don't think it is. However.

A villager is made every so often, lets say 15 seconds for this equation's sakes. Lets assume that I have three villagers and they gather 1 Food per second. The equation works fine for an interval of 15 seconds.

\(\displaystyle R=tnx-r\)


\(\displaystyle 45Food=15s\times3v\times1-0\)

If we do it for 30 seconds though...

\(\displaystyle 90Food=30s\times3v\times1-0\)

When in reality it will be higher because an extra villager was added. Wait... I just got an idea.