Balancing game economies

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
pedrosgali
Party member
Posts: 107
Joined: Wed Oct 15, 2014 5:00 pm
Location: Yorkshire, England

Re: Balancing game economies

Post by pedrosgali »

In fairness that's pretty much the system I have now, prices are set by the manufacturer and each colony sends ships out to buy the cheapest available goods that they don't already make enough of. Maybe adding pure traders not tied to colonies who trade just for profit will help, I'll add a few merchant ais and see how they do.
Thanks for the input folks, I'll let you know how I get on.
Any other ideas are also welcome should anyone spot something we've missed.

Code: Select all

if not wearTheseGlasses() then
  chewing_on_trashcan = true
end
User avatar
airstruck
Party member
Posts: 650
Joined: Thu Jun 04, 2015 7:11 pm
Location: Not being time thief.

Re: Balancing game economies

Post by airstruck »

pedrosgali wrote:I tried the finite resource idea at first but that yields the opposite result and everywhere ends up empty and prices skyrocket.
That could be a good sign; you might be able to get it to float somewhere in the middle if you add a replenish rate and an expiration rate for each resource. Organic/food-type resources could replenish quickly and expire quickly, fuel-type resources can expire slowly and replenish slowly, and materials-type resources could have a replenish rate tied to expiration rate, where expiration rate is controlled by ai (recycling). Maybe also add some randomized accidental loss from theft or disasters.

I think what you have is really a resource management problem, not necessarily an economy problem, since your economy is essentially just a valuation on resources. For example, even if it you had a barter economy with no currency, you'd still have the problem.

I'm still not sure if autonomous ai thing would help with this problem. You still need to have ai at some level, of course (like your current economy valuation model), and you could build in goals and individual transactions and stuff, but it's not really autonomous because every actor makes decisions based on the same set of rules at any particular moment.

For autonomy to be interesting, I think your actors would need to have a memory; they'd have to explore for other actors to trade with instead of already knowing they're there, they'd decide whether to go to war or trade with new actors based on pre-seeded memory, they'd hold grudges, make embargoes and tax hikes, etc. That would all be really interesting, but I'm not sure how this would affect your storage problem; I really think more a slightly more detailed resource availability model would do it.
Last edited by airstruck on Wed Sep 28, 2016 8:53 pm, edited 1 time in total.
pedrosgali
Party member
Posts: 107
Joined: Wed Oct 15, 2014 5:00 pm
Location: Yorkshire, England

Re: Balancing game economies

Post by pedrosgali »

That is a good idea, I was thinking originally about having ships and weapons cost a butt load of different resources and have actors have to buy their ships and weapon loadouts to sink cash and churn through resources. Much more work to do Lol but I've got a lot to think about now.
One thing I do like about the current system is that a shortage of some resources has a knock on effect on the rest of the economy, I do like the AI memory idea though so they would refine their trading habits over time. I'll have to see if I can find my old behaviour tree library and whip something up.

Code: Select all

if not wearTheseGlasses() then
  chewing_on_trashcan = true
end
User avatar
sherpal
Prole
Posts: 17
Joined: Wed Sep 14, 2016 9:29 am
Location: Belgium

Re: Balancing game economies

Post by sherpal »

Have you thought of/considered using a system similar to what happens in Eve online? I.e., groups of people are manufacturers, groups of people are specialized in transport of goods, other people try to attack these transport system, therefore transports need to pay people to protect them. In Eve, all these groups are actual people, but creating AI's having that behaviours *should* not be too difficult.
The good thing with this system is that ressources disappear for nothing (pirates take them and you can imagine that they use them in a black market that has not interaction with your market. Also, money disappears in the payment of the people in charge of protection.

Another thing could be to try put the rules of goods production into equations. That is, if (x_1(t),..., x_n(t)) are the quantity of each type of good at time t, you should write the law that describe the evolution of this system in the form
d/dt (x_1(t), ..., x_n(t)) = f(x_1, ..., x_n)
for a function f that can be anything as long at it is differentiable, then you can find points where the system is stationnary, or at least stable. This solution should work well if there is not too much of randomness in your system...
pedrosgali
Party member
Posts: 107
Joined: Wed Oct 15, 2014 5:00 pm
Location: Yorkshire, England

Re: Balancing game economies

Post by pedrosgali »

Hey Sherpal, thanks for your input.

I really like that idea for artificial life, each ship captain would be looking for jobs they could complete with their current vessel and all actors could post jobs that need completing. You could handle all kinds of things with that, trade, manufacturing, protection and even have captains turn rogue if they can't get work which would slowly spawn pirates. Not only that but successful actors would be paying less successful ones and the money keeps cycling through the system.

Combine that with raidho's and airstruck's ideas and I think I'm starting to understand how I can implement them properly, the only real problem is the amount of AI actors that would be needed but I think if I update them all sequentially then I might not tank the framerate.

Thank you for that, you have given me a great deal to think about. :)

Code: Select all

if not wearTheseGlasses() then
  chewing_on_trashcan = true
end
User avatar
Plu
Inner party member
Posts: 722
Joined: Fri Mar 15, 2013 9:36 pm

Re: Balancing game economies

Post by Plu »

I get the feeling that what's missing in your economy is need. All the planets seem to want a lot of stuff, but they do they do anything with it?

If all the planets want all the same stuff and all they do is stockpile it, you won't be having much of an economy. It's already been mentioned that items should have decay, that'll fix the core of the problem, but to have a functioning economy I think you should add in proper needs. Differing planets would have differing needs (cold planets would need more fuel and clothes; hot planets would want more solar panels; desert planets would need more food; etc) and they consume more of the things they need a lot of. This will more actual trade routes and more predictable prices, as these planets constantly struggle to bring in enough stuff.

In addition, you can tie the total needs to the total population of the planet; while all the needs are met, the population goes up (increasing the needs further, causing them to need to import more stuff) and while the needs are not met, the population goes down, reducing the total needs. Prices can be based on which need is most urgent to stock up on.

If you hook the planet's production up to the same population, and make each planet produce a few specific things, it will cause interactions like "there are not enough clothes, so the Icy Folk freeze to death, but they are the main source of solar panels, so now the Desert planet is having a shortage, which will start killing them off soon, too."

The result will be a changing solar system. This gives the player opportunities to get involved by trying to improve conditions. Or by trying to create artificial shortages, because there's good money in those, too.
pedrosgali
Party member
Posts: 107
Joined: Wed Oct 15, 2014 5:00 pm
Location: Yorkshire, England

Re: Balancing game economies

Post by pedrosgali »

Need was the exact problem I was having, the issue being too much need and a planet would just use all it's resources and too little and it's just a big stockpile waiting to fill up.
I like the idea of different planet types having higher needs for certain goods types, that will spread the needs around differently for different planet types leading to more trade required. Population was always on the agenda but I haven't gotten round to that yet, I think it too will help as I plan on having three tiers of population. Workers, Engineers and Wealthy all would require different goods to stay happy and on the planet.
I'm still chugging away at the new version, trying desperately to implement all these new ideas. :)
Thanks again guys, all input is appreciated.

Code: Select all

if not wearTheseGlasses() then
  chewing_on_trashcan = true
end
User avatar
pgimeno
Party member
Posts: 3673
Joined: Sun Oct 18, 2015 2:58 pm

Re: Balancing game economies

Post by pgimeno »

Maybe I'm saying something obvious, but isn't production essentially proportional to demand, which is in turn dependant on need? i.e. when there is a lot of some product in the market, you don't produce more, and if the product disappears from the market, you produce much more
User avatar
ArchAngel075
Party member
Posts: 319
Joined: Mon Jun 24, 2013 5:16 am

Re: Balancing game economies

Post by ArchAngel075 »

I remember playing 'X3 : Reunion' awhile back.
My primary goal every time in that game was to be an amazing merchant. I would start by plotting where each station is and what they produce and what prices i can expect. I slowly discovered certain stations prefer certain goods. So i started making many runs between them to profit. Later id buy a second ship and have it do other runs for me.

BUT

Slowly the economy in trade was worth nothing. or the time it takes for any trade to be worth was enormous. I was constantly hitting a wall where what i wanted to trade was not desired anywhere because AI traders constantly beat me to it.

I gained that this was because never was there any easier way of tracking where what station is and its prices (id have to send a ship and have it be a proxy i can use to view the market)

What Ive gained from all this :
For players, make some method of being able to get information on goods, perhaps use some small ship agents that are very very high speed capable to relay prices. Or provide information lookup on nearby stations (just gists, like what goods they prefer, distance etc)

Also as a side - ive not seen any instance of this economy having a point of start for goods. that is - Where do the raw materials come from?
To make more goods, why not have unlimited mining or resource gathering sites? This way the raw materials come from somewhere, economy is dependant on these in its entirety. If not enough raw X is incoming then not enough refined X is outgoing.
Thus non raw goods are not magically refreshed, but instead rely on the chain of production. Maybe some goods when present on these mining sites (think mining machinery etc) can actually speed them up some more - to a limit ofcourse.

any how that's my input for this interesting concept. Id love to see the code and workings underneath when its done. Systems and designs like this in code make me enjoy the fun of coding.
pedrosgali
Party member
Posts: 107
Joined: Wed Oct 15, 2014 5:00 pm
Location: Yorkshire, England

Re: Balancing game economies

Post by pedrosgali »

I totally loved X3 reunion, one of the main inspirations for this project was to make that kind of game with a more Open TTD feel to it. It really bugged me in X3 that you could only ever have one window open at a time which is what lead to your problem with it IMO, you could never get to see enough trade data to make a killing on the market.

One thing they did well which avoids the problems I'm currently having is that stations only really sold one product so they buy goods they need and sell the output (I'm not counting shipyards and equipment docks there but you get what I mean.) I considered this approach very hard and decided in the end to try something more like Patrician 3 where each port was like a planet in the demo.

As for the resources, they are made at planets. Each planet gets a modifier 0.1 to 2 for how abundant each resource is at that planet. I am still unsure about asteroid mining at the minute, I want to add it in to have secondary off world resource production but I'm not quite sure about the fine details yet.

Thanks for joining the discussion and if you haven't tried patrician 3 you should. :)

Code: Select all

if not wearTheseGlasses() then
  chewing_on_trashcan = true
end
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 9 guests