Economy system for interstellar trade.

I am building a spaceship / planetary exploration game and need an economic system in the back.

Economy and trading will be quite important. I would like to have multiple types of currency and trade goods floating around and basically a simulation of buyer/seller trading and am looking for a head start. ideally some kind of stock exchange with speculation possibilities: Buying and selling shares in certain corporations, including the players own base corporation.

This is kind of a microgame within the game: essentially the players fly huge dreadnoughts and need a corporation behind them to provide a basic income for fuel/repairs etc. At the bare minimum, their corporation will generate a default amount of revenue - and then as they gain influence it will grow. At any time trading and market speculation could give short term boosts. The system needs to be resistant to abuse so most of the major trading movement will be script-driven and based on game events, with players able to affect it incrementally.

Easy right?

Are there any assets out there that can help provide a framework or backbone for this sort of economic system? Anyone with some experience can throw a few pointers?

I’ve been looking at Econsim - which is a GitHub project based on this:
https://pdfs.semanticscholar.org/e933/0d06ec6a830aa1dd2cd9e6bc38daa95db6dd.pdf

Sadly it hasn’t been updated in over 3 years and breaks my unity. I’m not a programmer so I kind of need assets to work out of the box. GitHub - omikun/EconSim: Agent based economic simulator in unity

Did anyone get any ideas?

That Econsim project looks like a good start. It’s probably the graphs that aren’t working in your version of Unity; the actual economic simulation appears to be just three plain C# scripts, and I bet those work fine.

Um. If you don’t mind me asking… how are you doing this? Unity is not some sort of game-kit that enables you to make games without coding. I’m genuinely curious. But feel free to PM me if you don’t want to discuss it publicly (or if it seems off-topic for this forum, which is probably the case).

2 Likes

Well I think its a fair question and yeah - I am basically treating Unity like a giant game kit :slight_smile:

Years back a close late friend and I started writing a sci-fi story and… if I say so myself it was brilliant. It was the space opera we always wanted to watch. But its better as a game than a novel or movie and we figured “how hard can that be?” Yeah. We started from totally the wrong end :smile:

My friend got ill and passed away a few years ago (he was the programmer nerd type) and the project just stopped of course. Then about a month ago the PC holding all the old ideas and projects was lost in a flood so … total loss. That kicked me in the ass and I basically started again.

Basically we already had a few decent assets and they have evolved now to be very powerful and very cool. I’m buying a few assets a month and gradually building static scenes that represent my idea of what the game would be.
Recently I’ve kind of accelerated the plan as I see more and more assets getting close to what we originally envisioned. But I’m basically relying entirely on the work of others.

When we first started there weren’t really any decent options for landing on planets for example. Now there are loads of decent examples, as well as frameworks for physics and spaceship flight.

Examples of static scenes would be male and female character sets with 3rd person controller and building assets for ground scenes on planets. Riding round a giant spaceship graveyard is fun all on its own:

Then I have a few of the spaceship controller and toolkits along with lots of spaceship assets. CGBulldog and the like. Together with planetary assets and general space assets: Space graphics toolkit amongst others. These can give me a very good approximation of what I would like my universe to look like.

Over time I have a few thousand dollars in assets and I’m getting the hang of the very basics about how to manipulate objects and define basic values in scripts etc. I also experiment with Atavism, ummorpg and ummo2 as well as various tools like Playmaker.

I begin to get to the point where I start thinking about the backend systems. Gravity, economy etc as well as shipbuilding and building an actual adventure… Basically starting to plug the pieces toigether.

eventualøly I hope someone else will find this interesting and join up… but for now its just to noob around until I’m not so noob any more.

I hope that makes sense.

tl;dr: Its a hobby that took over :slight_smile:

2 Likes

More than one type of trade good, excellent.

More than one type of money, and your players will hate you. I have done this more than once in tabletop RPGs, and the players get bogged down into, “How much X is Y?”, type issues. Sooner or later, they all want it in the same dollars, credits, or gold pieces so that it’s simple.

I love solid trading games. I love math and spreadsheets. Even I find I would no longer want to worry about stuff like, “How much Toldarian currency do I need to exchange before going to Nepth IV since they won’t take my money there?”

The exception, of course, is if you are doing microtransactions and plan on having the bought currency vs. what is earned in game. That’s gotten to be standard in the industry and players accept it as normal now.

Good luck with the game.

Thanks! Yeah I love a decent in depth system. And yeah I think it’s not so much to facilitate microtransactions or anything (my mate would turn in his Doctor Who lunchbox) but more to give the impression of different cultures having different systems. Hopefully, it’s all automated: Walk into the bank and you’ll get an automatic conversion rate. For example, I think it would be interesting to rob a pirate and capture 20 Billion in Lysak Yarrs… and then find out actually its worth about twelve quid. Could have some good NPC interactions about that ^^

I’m thinking really there are 3 trading systems or markets that need to interact with each other:

  1. Trade goods: Raw materials, Construction goods, Luxury items etc. Bulk weight and freight of Gold Platinum, Silver Copper, Lead etc would be pretty consistent and then it’s the currencies that are prone to speculation more than goods themselves which should be pretty constant.

  2. Currencies. Many different worlds and systems using their own systems that can be tied to a galactic standard and then suffer volatility depending on such things as war and famine etc. Most currency trading will happen in banks - which will be set up like shops really.

  3. Shares in companies themselves and the ability to build reputation and take ownership of storefronts on planets. Requires licenses and a decent credit rating / license to operate
    .

I don’t imagine this ever going MMO so… ultimately the “galactic standard” for the various markets never changes because it’s considered like the metric meter.

If you want to plan out or design an economic model, start with excel.
I am not going to make you read economics books because they are pretty much all full of crud.
All you have to understand is:

  • finite economy vs infinite economy (infinite selling means inflation)
  • inflation and deflation (since games do not run debt, you can deflate your game)
  • foreign exchange and relative money values (a simple ratio)
  • dynamic buy/sell

Stocks, shares and debt have no place in video games at all. If you understood what they are or mean, you’d understand how it is inapplicable in games or simply cannot make sense. Worse case, it is considered heavy gambling.

Try it out in excel, make 100 random trades with ~5 currencies and inflation sales and see how it works out 10 times. Then adjust.

I personally managed to create a booming economy MMO system based around X currencies and deflation models with dynamic trading and auctioning. You should be able to also.

1 Like

Thanks for the input: Yeah Its all worked out in Excel more or less a long time ago :slight_smile: I’m a beginner in the game sense - but there’s several years of backend here.

I disagree totally about games with stocks and shares and debt features not being game-worthy. Respectfully I think you confused the game aspect from the monetary gaming aspect - As I said above I have no interest in microtransactions or P2W mechanics. This is a simulator only.
Evidence:
https://www.youtube.com/watch?v=qWzJ6qOa5yY

What is Monopoly after all? The best part of it is the metagame between players and the deal-or-debt aspects. There also plenty of mobile apps and stock market sims. I strongly believe it would be a solid backend to any game to have an economy that offers speculation and market trading - and we’re not talking real money here. Its a game man ^^

Awesome that you got an economy working for your game. I hope I have the patience and skill to get there someday.
For now I’m looking at Udemy courses to polish my skills in this regard:

https://www.udemy.com/course/build-a-tycoon-business-sim-in-unity3d-c-game-development/

It’s near the mark and I don’t want to sit on my hands while I try to find something better - but obviously I’d prefer to find something someone else has already battle-tested.

1 Like

Interesting for you or interesting for the player? As a young Game Master, I occasionally did stuff like this in games. Over time, I realized that the players hate it and feel betrayed. You can have the occasional employer betray them like this, but it has to be very occasional. Even in a game like Shadowrun, where one expects the employers to hose the characters sometimes, you cannot do it often without ruining people’s enjoyment of the game.

Don’t do something you think is interesting that will make the game worse for your players.

2 Likes

Punishing players is a no no. I remember someone telling me that they were going to force players to use bridges by making them drown if they tried to swim across a river. Not a good idea.

So I don’t think this is the place for a discussion on how to make a game fun - or not. The example given was to explain how the context of that specific currency mechanism might be introduced into NPC interaction.
On a wider note adding gameplay elements such as betrayal (I lie to you about the value), ineptitude ( I don’t understand numbers and tell you its a fortune), misunderstanding (I think its a different currency) or downright mystery (I heard there’s a money shipment in the billions. Good luck) are all legitimate game plot devices that can add intrigue and variation to otherwise pretty predictable “shoot X for Y loot” quests.

So respectfully I think anything goes in quest design and the devices chosen really are down to the skill of the storyteller.

Your point is valid to the extent that anything overused can destroy fun: Most games fall back to grinding to make up for lack of content or ambition.

1 Like

This is a mechanism used in the PvP area of Elder Scrolls for example. It’s totally legitimate in the context of PvP. Every game mechanic has a place and will fit somewhere. But this is really a discussion for an entirely different thread I think.

As this is the Game Design forum where we discuss game design, I think it is the perfect place to discuss adding mechanics that punish rather than provide fun to players. I cannot think of a better place. :slight_smile: A least the vast majority of discussions are mature here. :slight_smile:

You can do whatever you want as a game developer. However, when you open the door, we will respond.

Absolutely. Part of it is just growing as a game developer/GM. I have played many pen and paper games like this, where the players felt punished. I remember one who was so mad that we did not follow his plan, that he he killed us all off one by one. LOL It was quite a shock. The entire campaign of several years ended.

I think though that sometimes game devs and GMs have to learn the hard way. PvP is fun…so not punishing. The real difference is…is it totally out of control of the players? Can they make it not happen?

Can they swim across the rivers holding their breath with a chance of drowning if they run out of air…or will they drown when they enter the water because the GM wants them to use bridges? As for the currency, is there anyway players can change that? Are they in control or is the Developer in control?

That will tell you how the player will feel when it happens to him.

2 Likes

OK but. swimming? GM’ing in our younger days? This thread was specifically about economic systems in Unity as a backend to games. I’m not discounting your opinion or the point you’re making - just.I’m wondering why it is relevant here? I can’t stop anyone posting about how awesome Teletubbies are either… Its a free forum. Just I hope everyone considers context and relevance before going in to comment and a potential derail. I’m just hoping for a bit of forum courtesy I guess.

Please don’t misinterpret my comments as a criticism: It’s an interesting topic and I’d love to do it in PMs but maybe it deserves its own thread? “What makes a decent game mechanic” deserves 100 books. “Swimming rivers good/bad” is surely an exciting poll for another thread.
I’m just here to talk about economic systems. I hope that is OK?


To update on the topic:

I found a nice looking little asset which gives me a simple foundation to build from:
https://assetstore.unity.com/packages/templates/packs/trading-simulator-140914

Basically its an emulator for a single company trading. I will spend the next bit of time trying to multiply this across a few hundred corporations and then introduce agents to manipulate price fluctuations.

Here is an early version describing the start conditions for the Megacorps.

4972469--484424--upload_2019-9-17_17-11-22.png

Establishing values in 6 core commerce types allows introducing affecting agents that will manipulate the rates. “War in the SOL system” for example will have a negative impact on any corporation there doing mercantile or banking business, whilst Military suppliers should see increased margins. Each corporation will have its strengths and weaknesses spread out across several regions.

To prevent player manipulations becoming too severe there are variables for “privately held” and “Frozen” stock - basically shares that will not be offered up on the market. Also, these corporations are the size of planets (and own a few) so its unlikely a player will ever really make a dent in the system at this level.

Now I have established 100 or so mega corporations I will start making lists of holdings. Each mega corp will have a dozen or so subsidiaries under its umbrella. Volatility here will be more extreme as this is where the NPC questlines start to come in. Nexus will never start a war with Babylon - but already their subsidiaries duke it out in a dozen regional squabble already.

Comments / opinions welcome. I will be very happy to share this stuff out with you all when it’s in some stage of readibility.

Punishing players…I know you get it. No need to insult. :wink: This is a great forum full of mature people. Please keep it that way.

I would say more…but moments ago found out my mom passed away, so would appreciate no more mentions. Thanks.

I’m truly sorry for your loss Teila.


Having done a little research I think the most interesting and player-friendly trade model to emulate would be 18th-century shipping trade: There are two aspects to it that are interesting.

Firstly the slow speed, delay and uncertainty of shipping cargoes to their destinations.
Secondly the nature of limited communications and information about regional events being localised.

For example: In the time that it takes to ship Opium from Beijing to Paris, a war might have broken out in Europe, or the coast of Africa might have become unstable with piracy. A player armed with foreknowledge of these events could essentially game the system and short stocks in the Beijing shipping company, or at least sell off their shares to avoid a total loss.

In my own interstellar game, therefore, I consider having 4 planetary systems, each with 6 habitable planets that serve as markets for several dozen corporations.

I stagger the trading windows as follows:

Obviously modern global trade works a little differently: Markets trading windows overlap - but I think this device is reasonable and offers opportunities for emergent gameplay when combined with how information flows between systems.

for example, planet to planet communication in a local system - say between Earth and Saturn, is going to be more or less real-time. However, between Earth and the many-light-years-away Shrike, the information will be delayed or in some cases not even arrive. The star-faring player might hold the knowledge of events in that system (a plague for example) that will affect a trading contract back on Earth that will drop shares. They have a headstart on the market.

Thus information becomes itself an asset. Stock tips, ticker announcements, quarterly reports and newsfeeds in regional systems start giving clues that players can pick up on and then use in other systems - but this requires a latency opportunity: The information needs to move faster than the markets.

1 Like

IMO, I dont think you will get a framework to implement this, without a coder, im afraid.
It’s better you write this like you are doing, test it on paper somehow and finally
get a coder to implement it.

Funny you should say that - yeah that is kind of what is happening right now. I’m hopeful to get at least some of this off the ground.

1 Like

Keep it up!

1 Like

I don’t think punishing players is a strict no no, just it needs to be handled with care. As an example, the economy of Eve Online is largely driven by the permanent destruction of player owned ships. You make a mistake, get caught without backup, and very quickly your ship and all items on board are lost while your opponents scoop up the scraps left behind. This creates a vibrant market for new ships and fittings, since even the best of players will lose ships on a fairly regular basis (caring more about their "isk ratio, value of ships lost vs value of ships destroyed than anything).

Long story short, this is quite punishing, especially for newer players. But by the losses being so devastating it encourages team work, mutual defense, wolf pack tactics, and a wide range of player created political intrigue you won’t find in any other game.

I’m sorry to hear that.

2 Likes