Thrive Game Development

Development of the evolution game Thrive.
 
HomeHome  PortalPortal  CalendarCalendar  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log inLog in  
Welcome new and returning members!
Sign up and introduce yourself. ADMIN knows your ASL.
If you're new, read around a bit before you post: the odds are we've already covered your suggestion.
We are working with a relatively new theme, so visual bugs are being addressed.
ADMIN reminds you that the Devblog is REQUIRED reading.
Currently: The Microbe stage environment is taking shape.
Log in
Username:
Password:
Log in automatically: 
:: I forgot my password
READ BEFORE POSTING
FAQs Wiki OE CC Thrive
Search
 
 

Display results as :
 
Rechercher Advanced Search
Statistics
We have 1555 registered users
The newest registered user is kryptoraptor

Our users have posted a total of 30179 messages in 1369 subjects
Who is online?
In total there are 5 users online :: 1 Registered, 0 Hidden and 4 Guests

HariboTer

Most users ever online was 443 on Sun Mar 17, 2013 4:41 pm
Application System
Fri Jan 31, 2014 2:33 am by NickTheNick
Just note that this devblog is meant to elaborate the point made by the previous devblog.

As you have probably noticed by now, there have been some revisions to the structure of the forum, and primarily, the team. Several developers have discussed and decided to implement these changes, because we feel they are an improvement over what we had before.

What Changed and Why?

All new users begin …

[ Full reading ]
Comments: 0
Keywords
progress prototype Thrive creature multiplayer planet date game releases concept release evolution stage cell space nickthenick music Devblog Gameplay Aware plant video editor organism tech tree
Latest topics
» Planetary Climate Maths
by tjwhale Yesterday at 4:07 pm

» Thrive GUI tutorial - CEGUI from image to script!
by tjwhale Yesterday at 3:35 pm

» Hello,guys
by Arbiteras Thu Oct 23, 2014 12:21 pm

» Miscellaneous Bugs And Questions That Don't Deserve Their Own Thread Thread
by moopli Wed Oct 22, 2014 5:47 pm

» A humble introduction.
by Madero Wed Oct 22, 2014 3:41 pm

» Revolutionary Games Website's Thread
by Oliveriver Wed Oct 22, 2014 12:25 pm

» Microbe GUI Finalisation
by Oliveriver Tue Oct 21, 2014 1:16 pm

» application
by {~} Tue Oct 21, 2014 10:27 am

» Application to THRIVE
by moopli Sun Oct 19, 2014 10:52 pm

» Population dynamics
by tjwhale Sun Oct 19, 2014 9:15 am

» Posting Stuff on Concept Pages
by Oliveriver Sat Oct 18, 2014 8:47 am

» Design clarification for programmers
by HariboTer Sat Oct 18, 2014 7:22 am

» Sound Effects Discussion
by moopli Thu Oct 16, 2014 6:18 pm

» Some Current Issues
by Oliveriver Thu Oct 16, 2014 2:23 pm

» Hey all, overly eager programmer here!
by Oliveriver Mon Oct 13, 2014 1:11 pm

» Hello guys
by crovea Sun Oct 12, 2014 7:45 am

» Music List Thread (Post New Themes Here)
by MitochondriaBox Sat Oct 11, 2014 6:18 pm

» Editor Advice
by NickTheNick Fri Oct 10, 2014 2:58 am

» Das Manifest
by crovea Wed Oct 08, 2014 4:38 am

» New App for Prack
by crovea Tue Oct 07, 2014 10:38 am

Share | 
 

 Supply and Demand Model

View previous topic View next topic Go down 
AuthorMessage
NickTheNick
Overall Team Co-Lead


Posts: 2300
Reputation: 165
Join date: 2012-07-22
Age: 18
Location: Canada

PostSubject: Supply and Demand Model   Wed Aug 08, 2012 11:42 am

So, in addition to my other post about an equation to calculate the construction time of any TO developed in the TE based off of production, construction values, and volume; I have also come up with a model for calculating the prices of resources based off of supply, demand, base price, transport cost, and tariffs. This is the simpler of the two, so here goes.

s = Supply of product

d = Demand of product

T = Transport cost

B = Base price (/ton)

f = Final price (/ton)

t = Tariffs (%)

d = Distance transported (km)

The equation would thus look like this:

f = t x (B x (d/s) + T)

Now let's plug in some numbers with an example. Say I want to purchase wood for some new housing I want to build. The base price of wood is 100 credits/ton. There is a demand for 10 tons of wood, and a supply of 20 tons of wood.

The cost of transporting wood is shown as:

T = (0.05 x B) x d

NOTE: The 0.05 in the equation is a representation of the cost of transport of the era. The initial value, once you first gain the ability to trade and purchase goods with other SC's, would be a high value, such as 0.50. This value would be decreased by technologies and policies over time, simulating the increase in trade, communication, and transportation that has occured from ancient history, to the industrial revolution, to the modern era. A technology such as railroads or sailing would decrease the value by small incraments. However, it would never abolish the value altogether, as it always costs something to transport goods. We could even distinguish between the transport cost of land routes, sea routes, aerial routes, and spacial routes. I will get to that in another post.

Let's say we're purchasing it from an SC 4km away, that would mean:

T = (0.05 x 100) x 4

T = 5 x 4

T = 20

Now that we know the tranport cost is 20 credits, we go back to the original equation. The country we are purchasing from has a tariff of 10% placed upon them. Finally, with all the variables, the equation would look like this:

f = t x (B x (d/s) + T)

f = 1.1 x (100 x (10/20) + 20)

f = 1.1 x (100 x 0.5 + 20)

f = 1.1 x (50 + 20)

f = 1.1 x 70

f = 77

Bam!

Now we have successfully calculated the price of the wood we want to purchase. The concept is quite simple; since there was twice as much wood as was needed, the price of wood was halved. Then you add the tranport cost, and finally, add the 10% tariff.

NOTE: I do not know if and how tariffs will be managed and implemented in the game. If not, we can just remove it from the equation.

So, that is my model. Comments? Revisions? Criticisms?

_________________
Look at how far we've come when people thought we'd get nowhere. Imagine how far we can go if we try to get somewhere.
Back to top Go down
View user profile
Holomanga
Newcomer


Posts: 83
Reputation: 3
Join date: 2012-04-01
Age: 16
Location: Earth

PostSubject: Re: Supply and Demand Model   Wed Aug 08, 2012 1:51 pm

This is amazing.

What I love the most is how this could easily be expanded to incorporate things like barter by swapping each variable for a more complex equation.

Also, I just had a thought that transport costs should be somehow based on the total power output of the civilisation and the power cost of transport.
Back to top Go down
View user profile
~sciocont
Overall Team Lead


Posts: 3428
Reputation: 138
Join date: 2010-07-06

PostSubject: Re: Supply and Demand Model   Wed Aug 08, 2012 2:36 pm

The supply/demand part is the only problem. We'll be dealing with much, much larger numbers (which I know you realize) and there will be demand from many different parties. This is why we need to introduce an arbitrary mechanic. It's well understood that stock prices have a fractal nature: they fluctuate to the same relative degree at every level of observation. We essentially need to include a random weighted number generator that gives a multiplier bonus to the price of a good between -.05 and .05.

So we need to figure out how exactly to price a good depending on supply first, then determine the effect that demand has on it.

If there is excess supply, price drops, if there is too little supply, price increases. This means we need to determine what an expected supply is. Let's keep it simple, and use your example of lumber.

If you get 10 tons of lumber per 100 terrain tiles of forest per year, and you have 250 terrain tiles being harvested, you'll be getting an expected 25 tons per year. If you produce 27 tons, that's surplus, so price goes down. This can be represented by a simple equation, I'll try to use as many of your variables as possible

V=B(E/A)

V=actual price (value) of product
B=Base price of product
E=Expected supply of product
A=actual supply of product

Again, the base price is 100 credits/ton.

V=100 credits/ton(25 tons expected/27 tons expected)
V=92.6 credits/ton

That should take care of supply. Demand is another thing. Let's assume that base demand is that every unit is sold (or used by the seller) every year of the actual supply, and that every year all of it is purchased at once from all of the potential buyers. If the demand of all of the potential buyers is greater than the total supply, price goes up. If demand is less, price goes down.

q=selling price of product
V=actual price of product
D=expected demand
G=actual demand
r=generated random number

q=rV(G2/D2)

This (G2/A2) means that price increases exponentially with more demand, which makes sense, because the seller wants to make as much money as possible, and only has a limited supply.

We've generated
r=.0134

The actual demand is your 10 tons, plus 5 tons from the producer, 7 tons from another country, 4 tons from another country, and 3 tons from another country. This is 29 tons total.

q=1.0134(92.6 credits/ton)(29 tons2/27 tons2)
q=1.0134(92.6)(841/729)
q=1.0134(92.6)(1.15)
q=108.3 credits/ton final price

If we replace "B x (d/s)" with "q" in your equation, we get

f = t x (q + T)

so in this version, the final price of wood for you would be 141.1 credits/ton, costing you 1411 credits for 10 tons

However, I have another problem with this now. Tariff shouldn't multiply the transport cost, since it taxes the fact that you are transporting it, not how far you're transporting it. So the equation should be, in my eyes
f = tq + T
Meaning that the cost would be 139.1 credits/ton instead.

_________________
Remember our goals: simplicity, science, and playability. Keep them in mind always.
[OE]|[FAQ]|[Wiki]|[My Blog]
Back to top Go down
View user profile
NickTheNick
Overall Team Co-Lead


Posts: 2300
Reputation: 165
Join date: 2012-07-22
Age: 18
Location: Canada

PostSubject: Re: Supply and Demand Model   Wed Aug 08, 2012 3:05 pm

Beautiful, I don't see any problems with it. I especially commend your rearrangement of the tariffs and transport cost, as I hadn't noticed that error. This really allows for a in depth and dynamic economic model.

However, how will tariffs be managed in the game? What would be the numerical or value benefits to the player for putting a tariff on a foreign country, because so far it only makes it more expensive to buy from that country. There should be mixed benefits and drawbacks to tariffs to make protectionism a desirable option for players. Also, When countries first begin trading and economics, I think tariffs should be quite low if not nonexistent. They only really show up later, with the development of civilization, and then recede again as the planet becomes globalized and adopts more and more free trade.

_________________
Look at how far we've come when people thought we'd get nowhere. Imagine how far we can go if we try to get somewhere.
Back to top Go down
View user profile
~sciocont
Overall Team Lead


Posts: 3428
Reputation: 138
Join date: 2010-07-06

PostSubject: Re: Supply and Demand Model   Wed Aug 08, 2012 3:42 pm

NickTheNick wrote:
Beautiful, I don't see any problems with it. I especially commend your rearrangement of the tariffs and transport cost, as I hadn't noticed that error. This really allows for a in depth and dynamic economic model.

However, how will tariffs be managed in the game? What would be the numerical or value benefits to the player for putting a tariff on a foreign country, because so far it only makes it more expensive to buy from that country. There should be mixed benefits and drawbacks to tariffs to make protectionism a desirable option for players. Also, When countries first begin trading and economics, I think tariffs should be quite low if not nonexistent. They only really show up later, with the development of civilization, and then recede again as the planet becomes globalized and adopts more and more free trade.
Tariffs are basically put on goods because you buy them from a country other than your own. Every country is going to have different resources, but they will all have values for the amount of each resource that they produce each year, even if it's zero. The biggest producers of any one resource will attract the most buyers. Since the countries in the game will all be relatively small and simple (due to the size of the planet) economics should be fairly simple as well. My guess is that there will be around 10 countries on a planet. I don't know how many resources we'll have, but I'd say there's a good chance of every country being the highest producer of something. The total yearly output of a resource is pooled from all of the countries to find the price, so all countries will be selling at the same rate. Who you buy from depends on your economic policy and the length of the trade routes.

_________________
Remember our goals: simplicity, science, and playability. Keep them in mind always.
[OE]|[FAQ]|[Wiki]|[My Blog]
Back to top Go down
View user profile
NickTheNick
Overall Team Co-Lead


Posts: 2300
Reputation: 165
Join date: 2012-07-22
Age: 18
Location: Canada

PostSubject: Re: Supply and Demand Model   Wed Aug 08, 2012 6:56 pm

Ahh ok, but the problem I see with tariffs is that they are partially intended to feed money from trade into the government's coffers. However, the rest of the money goes to the purchaser, be it a person or a corporation. The problem is that as far as I can tell in Thrive, the government purchases and sells the nation's resources, and putting a tariff on it is absolutely pointless, because you are just paying yourself an extra however many percent tariff you set. For example, if I wanted to purchase 1000 credits worth of iron ore from my neighbour Sciocontistan, and there was a 10% tariff on goods purchased from that country, that means I pay them the 1000 credits, and myself the 100 credit tariff. I am not making or losing anything on the tariff. The tariff does nothing. I was thinking that to solve this either we remodel the system of tariffs, or make the player's nation exchange its own goods outside of government interference and with their own money. I personally prefer the second option, and here is my idea for how it would work.

Say you build a refinery in your SC. The refinery consumes 10 tons of iron ore to produce 7.5 tons of workable iron. Instead of you, the government, purchasing the iron and keeping it in some stockpile somewhere for the refinery to use whenever it needs to, the refinery purchases the iron ore itself and keeps it for itself. The refinery is automated to purchase the cheapest iron ore based off of the supply-demand model. The refinery purchases from any markets available to it. Once it receives the necessary materials, it refines them and produces its output of iron. This iron is now put on the market of whatever SC it is located in. The player, throughout the entire course of the process, did nothing, paid nothing, and received nothing. All the player does is build the refinery in the first place, make sure it has access to sufficient manpower to operate, and make sure it has access to trade routes that can bring in the necessary materials for production. Thus, the economy is independent of the player, which greatly relieves micromanagement and adds a whole new layer of depth to the economic model.

Therefore, the way tariffs would work in this model is that, when the refinery purchases the iron ore from a foreign country with a 10% duty, the player (government) collects a 10% tax on the price of the iron. Going all the way back to my initial example, the refinery pays the 1100 credits, 1000 to the corporation/person selling the iron, and 100 to you, the player (government).

NOTE: I don't think we need to track the income and spending of each and every automated building. I know that factories and stores and farms and such can go bankrupt, but to track the individual finances of each one of those refineries and other buildings is a LOT of work. I was thinking we just assume each building has an infinite pool of money to spend on the resources they need, but they only purchase at an automated pace (eg. 10 iron ore per minute).

_________________
Look at how far we've come when people thought we'd get nowhere. Imagine how far we can go if we try to get somewhere.
Back to top Go down
View user profile
~sciocont
Overall Team Lead


Posts: 3428
Reputation: 138
Join date: 2010-07-06

PostSubject: Re: Supply and Demand Model   Wed Aug 08, 2012 9:07 pm

I agree that there should be automation and autonomous companies. Tariff should apply to them. If the government builds something without contracting out, there will be no tarriff, so long as the government is shipping in the products.

Any factory (a building that produces a product) would probably be autonomous, since, again, countries will be quite small.

_________________
Remember our goals: simplicity, science, and playability. Keep them in mind always.
[OE]|[FAQ]|[Wiki]|[My Blog]
Back to top Go down
View user profile
Seregon
Regular


Posts: 261
Reputation: 37
Join date: 2011-08-10
Location: UK

PostSubject: Re: Supply and Demand Model   Thu Aug 09, 2012 10:09 am

This is looking good. Interestingly, in Nicks last post, factories and other buildings are acting in the same way in a country, as organs would act in a creature, or organelles in a cell.

What I mean is that each automatically uses the available supply of resources to produce products, which can be used by the rest of the system. The only real difference is that here there is money changing hands in order to transfer those products.

What this means is that we may be able to use the same resource management system across each stage of the game. Similairly, interspecies competition would act somewhat like market competition between factories/companies in a nation, possibly driving a similair evolutionary process.

I'm not sure exactly how well this would work out, but by building the resource system of each stage on a common backbone, we could save significantly on development time. We just need to be careful that each stage has sufficiently different methods of interacting with this system, so that the gameplay for each is distinct.

I'll be posting a thread on the current compound system (for the cell stage), and another on how we could develop this into a generic resource system for the rest of the game soon.
Back to top Go down
View user profile
NickTheNick
Overall Team Co-Lead


Posts: 2300
Reputation: 165
Join date: 2012-07-22
Age: 18
Location: Canada

PostSubject: Re: Supply and Demand Model   Thu Aug 09, 2012 12:08 pm

Seregon wrote:
This is looking good. Interestingly, in Nicks last post, factories and other buildings are acting in the same way in a country, as organs would act in a creature, or organelles in a cell.

What I mean is that each automatically uses the available supply of resources to produce products, which can be used by the rest of the system. The only real difference is that here there is money changing hands in order to transfer those products.

What this means is that we may be able to use the same resource management system across each stage of the game. Similairly, interspecies competition would act somewhat like market competition between factories/companies in a nation, possibly driving a similair evolutionary process.

I'm not sure exactly how well this would work out, but by building the resource system of each stage on a common backbone, we could save significantly on development time. We just need to be careful that each stage has sufficiently different methods of interacting with this system, so that the gameplay for each is distinct.

I'll be posting a thread on the current compound system (for the cell stage), and another on how we could develop this into a generic resource system for the rest of the game soon.

VERY good idea!

I had always known mitochondria are like microbial factories, and company evolution is like creature evolution, but I had never made the connection of linking them all together.

However, on a separate point, another thing I think would be important to implement is tax rates and tax efficiency, and tariff rates and tariff efficiency. Let me explain what I mean.

Say you, as the government, set a 20% tax on your nation. Tax efficiency is represented as a percent, and displays your actual efficiency of collecting taxes. Tax efficiency basically determines how much taxes you are actually receiving, not how much you are supposed to be receiving. For example, if I have a tax rate set at 20%, but my tax efficiency is at 50%, that means I only collect half of the taxes. The other half is disappearing to corruption, is not being paid, or some other dilemma. There would not be a slider to determine tax efficiency, because then the player would always just set it to max, and that's not how real life works anyways. Your tax efficiency can only be indirectly affected by your actions and policies. For example, once record keeping or writing is discovered, your tax efficiency would increase by some 10%, because it is now easier to keep track of the numbers. If your stability is low or your people are unhappy, then tax efficiency drops due to people hiding their true income, avoiding payment, or some other method. Having a powerful government with a strong bureaucracy would increase it likewise. Tax efficiency never drops below 0, and never rises above 100.

The equation would look like:

i = Taxable Income (Credits)
r = Tax Rate (%)
e = Tax Efficiency (%)
I = Tax Income (Credits)

i x (r x e) = I

To use the above example; say I have an SC with a Taxable Income of 1000. I set a 20% tax, but since the SC is unhappy and I don't focus any policies on Tax Efficiency only half of my taxes get through. So I only collect a 10% tax, but the negative effects of a 20% tax rate are still delivered to the economy and my people's happiness. 10% of 1000 is 100, so that is what I collect as the Tax Income.

For tariffs, it would look and act the exact same, except apply to tariffs you have set, not taxes. Suggestions?

_________________
Look at how far we've come when people thought we'd get nowhere. Imagine how far we can go if we try to get somewhere.
Back to top Go down
View user profile
~sciocont
Overall Team Lead


Posts: 3428
Reputation: 138
Join date: 2010-07-06

PostSubject: Re: Supply and Demand Model   Thu Aug 09, 2012 12:46 pm

@Seregon: Belgiuming BRILLIANT

@Nick: The equation is sound, now we need to set up an equation for tax efficiency, which means we must first confirm how exactly happiness works,

_________________
Remember our goals: simplicity, science, and playability. Keep them in mind always.
[OE]|[FAQ]|[Wiki]|[My Blog]
Back to top Go down
View user profile
Seregon
Regular


Posts: 261
Reputation: 37
Join date: 2011-08-10
Location: UK

PostSubject: Re: Supply and Demand Model   Thu Aug 09, 2012 1:06 pm

EDIT - Sorry, I've just realised I almost derailed an otherwise very good thread, so I've moved the bulk of this post to a new thread here.

Regarding autonomous buildings, I think we should be able to (in terms of computation) track the credits in each individual business, and possibly individual buildings too, the only thing we might need to worry about is whether, as you say, they'd be stable if we did. Individual buildings, and businesses, going bankrupt, would be equivelant to death and extinction respectively, so potentially very useful for powering the evolution of businesses.
Back to top Go down
View user profile
NickTheNick
Overall Team Co-Lead


Posts: 2300
Reputation: 165
Join date: 2012-07-22
Age: 18
Location: Canada

PostSubject: Re: Supply and Demand Model   Thu Aug 09, 2012 4:26 pm

Tax efficiency should be mostly dependent on a variety of variables, but not one in particular. Stability, happiness, technology, policies, and events all serve to permanently or temporarily raise or lower the efficiency. There should be a base value that every nation begins with once taxing is unlocked by the appropriate research.

However, it is also important how we determine the taxable income of SC's. I think that taxes should come in not just from citizens, but also from factories. Your government makes money off of the taxes on the income of your factories. As Seregon said, we track the credits of each business/factory, and then you collect a tax on that. This way, contrary to what I mentioned earlier, the player gains money from a factory's day to day transactions. There would be two reasons for factories now. One, to consume a certain resource and feed another resource into the economy, and two, to provide the player a steady stream of income. However, also as Seregon said, factories and business can run deficits and even go bankrupt, and in these situations the government would actually have to pay to keep the factories running (aka subsidization).

I will begin a new thread on different societal structures, how to determine the taxable income of each one, and the different roles they play in your society.

_________________
Look at how far we've come when people thought we'd get nowhere. Imagine how far we can go if we try to get somewhere.
Back to top Go down
View user profile
 

Supply and Demand Model

View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Thrive Game Development ::  ::  ::  :: -