Abbey Games has a new community and forums! Come on over to https://community.abbeygames.com and don't forget to mention your old username! The old forums will remain available, but read-only.

Game mechanics: growth of Food/Wealth/Tech use

Anything Reus-related that doesn't fit the other forums.
Post Reply
yatima2975
Posts: 32
Joined: Mon May 20, 2013 11:18 pm

Game mechanics: growth of Food/Wealth/Tech use

Post by yatima2975 » Mon Jun 03, 2013 12:41 am

I've been looking at the inner workings of the game (see here for my previous post on border growth), and I'm going to look at how quickly a village grows its resource usage in this post. What I've written is valid for v1.1.0.0. [Mods, if this belongs more properly in Strategy&Balance, feel free to move this!]

The summary is:
  • Resources (Food/Tech/Wealth) are all treated the same.
  • The maximum speed at which resource use can grow is 1 unit per second, but you need at least 122.5 units more than you're currently using to get that growth rate. (This will get you massive amounts of greed, of course!)
  • The theoretical minimum speed at which resource use can grow - if it is growing at all - is 0.02 units per second.
  • The speed of resource growth behaves linearly between those two extremes.
  • Overshooting the target slightly can save a lot of time: getting from 14 Food to 15 Food takes about 70 seconds if your total Food is 15, but if your total Food is 18 it takes only 35 seconds. [Precise numbers to follow]
I've not finished writing this post yet, because I discovered an error in my approach, but it's time to go to bed for me... Stay tuned until tomorrow night!

yatima2975
Posts: 32
Joined: Mon May 20, 2013 11:18 pm

Re: Game mechanics: growth of Food/Wealth/Tech use

Post by yatima2975 » Thu Jun 06, 2013 6:46 pm

Right, that took a bit longer than expected. The formula for growth in resource is pretty simple:

Code: Select all

growth on next tick = 5 if excess > 122.5
growth on next tick = 0.1 + excess/25 if excess between 0 and 122.5
'growth' on next tick = excess/25 if excess is negative
(excess = total resource - resource in use)
but the consequences are more complicated to understand fully.

Here's a "fancy" graph:
graphic.png
*Edit : Image size too large

The raw data is on this Google Docs spreadsheet if you want to look at it in more detail!

I gave a simulated village with 100 Food in use a total Food supply of 300 and let it run for a bit in my simulation.
As you can see, the growth is linear in the beginning, growing with one unit per second until the food in use reaches about 180 (to be precise 122.5 before maximum), and then it starts slowing down.

You can use this chart for determining how long it takes to grow to a specified target use. Let's do an example: suppose your village is stable at 10 food in use, and all of a sudden you get 50 food extra (so max food is 60). How long does it take to grow to 30 food? Since the growth does not depend on the actual food in use, only the excess, we can shift all the numbers by 240, so the question becomes if your village uses 250 food, the max food is 300, how long does it take to grow to 270 food. That question we can answer: we look up in the chart when the food is 250 (that's about somewhere between 180 and 185 seconds) and when it is 270 (close to 245 seconds), so it takes about 60 seconds. I say "About" because it's unfortunately not an exact science yet :-)

Man, this is difficult to explain in a nice way without getting too mathy!

That's all for now, except that the Google Docs thingy has a second sheet (at the bottom, it's called "Time to grow") where you can see how long it takes to grow from 100 to a given size (given the initial setup). As you can see, the last 5 units or so can really take a long time, so it's worth it to overshoot (as I said before).

If you have any questions, please let me know! This is tricky stuff, and I'm not sure I did the best job possible explaining and interpreting it...

User avatar
Adriaan
Posts: 739
Joined: Wed Nov 28, 2012 5:18 pm

Re: Game mechanics: growth of Food/Wealth/Tech use

Post by Adriaan » Thu Jun 06, 2013 8:10 pm

hehe, I know that chart... >:)

yatima2975
Posts: 32
Joined: Mon May 20, 2013 11:18 pm

Re: Game mechanics: growth of Food/Wealth/Tech use

Post by yatima2975 » Fri Jun 07, 2013 3:56 am

Adriaan wrote:hehe, I know that chart... >:)
That's good news, everyone! I can adequately model bits of Reus without starting up the interface... I'll go poke into how greed builds up and when Giants Attackthe giants are attacked.

But Adriaan, thanks for the confirmation! :-)) I double checked with a three line implementation in Haskell and that agreed quite nicely. Your software can be unit-tested pretty well so far (Minecraft couldn't, but I managed to raise the roof anyway: http://www.minecraftforum.net/topic/165 ... it-to-512/) </brag>

Before I'm going to do any kind of sensitivity analysis (I work at KNMI at the moment, on atmospheric models), is there anything you'd like to tell us? Did you pretend it was a differential equation?

(On a technical note, how difficult would it be to swap out the Xna ContentProvider code just for the ModelSettings, and classes hanging off of it, for something using the standard C# XmlSerializer classes? This would improve moddabilty by a factor of OVER 9000 and I have the next two fridays off anyway - I'd do it for free!)

coanda
Posts: 54
Joined: Wed May 22, 2013 3:46 am

Re: Game mechanics: growth of Food/Wealth/Tech use

Post by coanda » Fri Jun 07, 2013 12:34 pm

And now we know that if anyone ever claims to have scored over 108k prosperity in one village in a 2-hour game, they're lying.

Then again, we probably knew that anyways...

yatima2975
Posts: 32
Joined: Mon May 20, 2013 11:18 pm

Re: Game mechanics: growth of Food/Wealth/Tech use

Post by yatima2975 » Fri Jun 07, 2013 12:52 pm

coanda wrote:And now we know that if anyone ever claims to have scored over 108k prosperity in one village in a 2-hour game, they're lying.

Then again, we probably knew that anyways...
If you have all three resources growing at the maximum speed of 1 unit per second, you can get to 3 * 121 * 60 = 21780 within 2 hours (per village). As the maximum size of a village excluding the center and the project spaces is 21, you'd need a total of 1038 resources per plot...

Post Reply