Game Design, Programming and running a one-man games business…

Modelling the limits to growth in Democracy 4

Game design hates virtuous circles. If the player does well, throw a bigger monster with a +5 sword of game-balancing at them. If the player has too much gold, make the cost of health potions rise. Thats the way our forefathers designed games. Sadly, the game I am making (Democracy 4) is based on real life, and not J R R Tolkien, so I cant cheat like that. Plus, Democracy 4 is more of a sandbox than a traditional ‘beat level 6!’ style game. How can I solve this?

ITS ALL ABOUT GDP, STUPID.

Bill Clinton had this phrase, ‘its all about the economy, stupid’, to remind him what mattered. Bill was a big player of Democracy 4. If GDP is high, tax income is high, so you can cut taxes (happy people) or ramp up public services and welfare (happy people). Get the economy (GDP) higher, and re-election is trivial. This is all modeled with some accuracy in the game.

William J. Clinton quote: It's the economy, stupid.

However… its not balanced right yet in the game (hurrah for Early Access), because far too many hardcore players of the game shout at me that their GDP is 100% and will not go any higher. This is because there are not enough effects that reduce GDP, to balance the game, and the boosts to GDP are likely too linear…

There are a LOT (79 distinct things) of inputs to GDP in the game, but to list some of the biggest ones:

  • Worker Productivity
  • Corruption
  • Oil Price
  • Global Economy
  • Foreign Investment
  • Corporation/Carbon Taxes
  • Business Confidence
  • Income & other taxes…

There are also some good, and bad situations that can have huge effects, such as a debt crisis, hyperinflation, corporate exodus and strikes, or technological backwater… GDP also has a LOT of outputs (80) the largest of which are:

  • Currency Strength
  • Foreign Aid Inflows
  • Air Travel
  • The Environment
  • Costs and income from many different policies/taxes etc
  • Unemployment
  • CO2 Emissions
  • Obesity

There are basically three ways to fix the problem I have where GDP gets too high. I can change some of the inputs to GDP so they follow more of a curve, declining towards the top. I can boost some of the negative impacts of high GDP, maybe accelerating at the top, and I can imagine new links/situations/impacts that are negative, yet associated with high GDP.

For example, if we look at one of the strongest impacts that boosts GDP (Worker Productivity), its equation in the game is as follows: GDP,0+(x*0.44). This is, to put it bluntly, pretty simplistic, and maps onto a curve like this:

I know how simple this looks, but don’t forget there are THOUSANDS of equations in the game. They are not all works of art :D. The obvious solution to avoid the kind of game-design problem I have is to make that curve less linear. Maybe adjusting it to GDP,0.4*&x^0.76) which looks like this in comparison:

This feels a bit better, because it implies that the earlier productivity gains have a stronger effect (which sounds true… worker uses horse instead of ploughing by hand!) and the impacts taper off as productivity rises (horse replaced by tractor).

The big SCARY thing about doing stuff like this, is not working out how to do it, or having the idea to do it (both fairly easy), but the balancing. You can see from that graph that a change to this equation has boosted the GDP of all those countries with lower productivity, and reduced the GDP of all those with higher productivity. Have I gone too far? Does this make Italy too easy? France too hard? The USA? UK? South Korea… and so on. Even changing this single equation is possibly going to affect dozens, maybe hundreds of other policies, situations and so on. If GDP falls, tax takes fall, immigration falls, maybe racial tension then falls…and so on and so on!

Because I’m only one person, and time-bound, there are always going to be negative impacts of GDP growth that I have no thought of, and I welcome suggestions. Frankly, the game is so complex that its hard to keep track. Only this morning I had the sudden realization that yes, all things being equal, it does seem like high GDP will raise inequality, and I should model that…only to discover its already in the game :D.

Oh and I recently made changes that allow me to use 5 variables instead of 3 in each equation and to automatically calculate and use values like (1.0-GDP) as a single variable, which means I have more flexibility now to introduce complex links between values…

Over the next day or two I’m going to be going through the GDP effects, inputs and outputs to make them less linear and more sensible. Then I have some other tweaks to make to the game, and a lot of testing to do, and eventually we get around to doing another update. The current changelist already shows a LONG LIST of updates for the next version before I even look at GDP… so hopefully the next build of Democracy 4 will be noticeably better balanced :D.

Six months in Early Access (Democracy 4)

So yup! Today is the day, according to my calendar. Six months into Early Access on my political strategy game; Democracy 4! Thats quite a milestone, and a good time to reflect on how things are going so far.

The big thing to note is that this is the first of the ‘Democracy’ games that has been in Early Access. In the past, I did listen a lot of user feedback, and released patches and updates to the game, but that was all post-release. Of course, these days the change between being in early access and post-release support is very blurred, and to be honest totally arbitrary. I doubt I will stop improving and tweaking the game just because we declare it to be out of Early Access at some point. I guess the only real difference is the point at which you want to signal to potential buyers that the game is fully playable and content complete enough to enjoy.

Frankly, that point is now. We have committed publicly to adding Italy as a playable country, and that brings the total countries in the game to 9, which I think is pretty reasonable. This is an indie game, with mod support and I don’t think 9 countries is too small a number.

I’ll almost certainly add more anyway…

The thing is, I don’t actually mind being in Early Access. I guess there is a bunch of ‘deferred sales’ from people waiting for me to flip that switch, but I am in no immediate hurry to do so. Having the game in EA encourages feedback and lets players know you will read it, and thats definitely a good thing.

Something else that suggests that we may be complete enough to declare the game done, is our language support. We entered early access with just English but we now support a total of 8 different languages. I am tempted to add Chinese or Japanese at some point, but TBH there isn’t a particularly strong business case there, and translating from English to these languages i quite expensive…

One thing we have not done yet is an OSX port. TBH apple have done absolutely everything possible to put me off ever considering this, even though the game uses opengl and is not tied to windows. Frankly, apple change what they are doing, pull support for things, and redesign their entire business model and dev platform so often I don’t even *know* if they even support opengl any more, and whatever API they support now will change next year, so whats the point? Maybe at some future point when apple have settled down, stopped charging devs for having the honor of making OSX games, and stopped changing the min specs, maybe it will make sense, but until then my advice to mac gamers is to buy a PC.

Anyway, people like stats on anniversaries of game releases, so lets look at some. Here are some juicy steam stats.

  • 1,177 reviews
  • Roughly 58,000 sales
  • Roughly 88,000 wishlists right now.
  • Current review score: 86% positive

Now a bunch of more fun gameplay style stats:

  • Games per day: Roughly 4,000
  • Most popular screen res: 1920px
  • Average framerate: 58.4 FPS
  • Most common event: ‘Share IPO success’
  • Most triggered situation: ‘Technological Advantage’
  • Most triggered achievement: ‘ShuffleMeister’
  • Average Socialism: 39.1%
  • Average Liberalism: 80.9%
  • Average Voter Cynicism: 1.55%

I suspect real world voters are more cynical :D

I know lots of indies would have done a super-complex analysis of that units sold chart with arrows and breakdowns of what each spike was, but frankly I’m too busy and don’t care. My experience is that a HUGE chunk of getting more sales is just improving the game, and that the spikes tend to be steam sales or discount weekends etc. I’m more interested in growing that lower line (regular daily sales) than the spikes. YMMV.

Ongoing language support for Democracy 4

I have been doing a bunch of work on language support for Democracy 4. The game is still in Early Access, and I’ve been adding new content (mostly new countries, and some associated policies and situations for them) as well as play balancing and tweaking stuff, and fixing bugs. Out of all of these, the language support one is probably the most invisible to the majority of players.

Initially, like most games, Democracy 4 was just in English. We had gone to VAST expense and trouble to make it natively support Unicode text and rendering any text imaginable, which meant that we really did need to leverage that investment by supporting multiple languages. Right now, the completes supported language list for the game is as follows:

  • English
  • French
  • German
  • Italian
  • Spanish
  • Polish
  • Russian
  • Brazillian Portuguese

Generally speaking, in the old days of shipping stuff to retail, people used the term EFIGS, for English, French, Italian, German and Spanish. That was considered the ‘sensible’ list of languages to support. I think in 2021 its worth expanding into Polish (they love strategy games) and Brazilian Portuguese. There is a strong argument also for Japanese and Chinese, although the sales chances for a game called Democracy in China may be lower than normal.

I know a lot of devs use crowd sourced translation services like localizor, and I *started* doing that,m but basically its hellish because the work is hard to verify, can get stuck at 95% complete, and you cannot easily be sure that everyone is using the same terms. This really matters, because using president in one sentence and prime minister in another and chancellor in a third…all as translations from the same English source can be a confusing nightmare.

So we ended up getting paid translations, either from individuals, or from a professional translation service (which is more expensive, but I guess easier to manage and ultimately sue if they were to just send you a badly done mess.

As with every translation ever, done by anyone, at any point in human history… people always complain that some phrases or words are badly translated. As someone who only speaks a single language (C++) I really have no idea. I have to just read every comment and in extreme cases do a reverse google translate to see if everything looks legit.

Of course, getting text translated is just part of the battle. In most cases, the other 99% of this blog post would be about Unicode, and rendering languages that have so many characters you cant fit them in texture memory (joy!) but actually I’ve handled that before, and Jeff managed all this for me using things called pango and cairo and other magic, so actually this is a ‘solved problem’ in many cases.

So now I am down to the final part of the puzzle, which is making sure it all ‘looks’ ok. As expected, there are lots of places where things go wrong. For example here:

And also here:

I’ve already those, and a bunch of others, but its by no means exhaustive. I guess the lesson learned here is to assume that ALL text may be 100x as long as expected (or 10x as small), and code defensively at all times to accommodate this. It feels like 99% of devs currently use unity and unreal, so you are relying on the 3rd party vendors to have automatically fixed all this for you I guess. And if it isn’t fixed…well good luck?

The only problem with going through and doing this is that its hard to persuade players that this is valuable work. Someone who speaks English and bought the game in Early Access is not going to care that certain screens (that look fine to them anyway) now look better in Polish or Russian. Because EA players can be VERY DEMANDING in terms of expecting the developer to work 24/7 throughout Early Access, my only worry is that people think development slows down as I fix all this.

Thats probably unlikely as I already have a bunch of stuff listed as going into the next update:

[1.26 (in development)]
1) Removed duplicate effect from firearms laws to armed religious communities.
2) Removed duplicate impacts on luddite riots.
3) Fixed some harmless debug warnings about missing neurons.
4) Intel readouts are now inverted for situations where a policy reduces security effectiveness, such as Press Freedom.
5) Fixed error where a total ban on handguns actually reduced security, instead of boosting it. Ooops.
6) Fixed support for names for each slider setting in modded policies.
7) EU situation now renamed to EU membership, also now boosts stability and foreign investment.
8) EU countries now benefit from the Erasmus programme, which boosts youth income & happiness and also education.
9) Import tariffs can now not be implemented by EU members.
10) Made some impacts of banning low mpg cars scaled by EV transition, and introduced support for inverse variables and 6-variable equations.
11) Cyberbullying Awareness Policy now slightly reduces Internet Crime.
12) Universal Basic Income (UBI) cost now quadrupled so it reflects the correct figure.
13) The Polarization situation now explains its effects better.

I think ultimately tweaking the UI for multiple languages is very worth doing, because its a BIG world out there, and frankly the majority of humans do not speak English. At some point, (maybe we have already crossed it?) the majority of strategy gamers will not speak English either. If you want a game to be around a while (I hope to still be selling this game in 2028) then you need to plan ahead and look at who will be playing it.

Updated Democracy 4 to build 1.24

Here are all the exciting changes!

[1.24]
1) Improved new game debt slider so it always defaults to the middle and allows zero or doubling the debt.
2) Added Tobacco Awareness Campaign to the Canada, Australia and Spain missions.
3) Cynicism has a stronger effect now.
4) Added a link between inequality (low equality) and violent crime.
5) Added a link between average temperature and violent crime.
6) Edits to South Korea Mission: President not Prime Minister, Removed Royal Family, Added State Broadcaster.
7) Fixed bug where the North Korea threat could we warned about to any country!
8) New Australia-specific dilemma: Mining on aboriginal lands.
9) Australia gets a default energy industry boost, and some other values have been tweaked.
10) Australia now has stronger impacts on CO2 from renewable energy due to good solar power potential.
11) Fixed bug where the financial cost of situations never seemed to change.
12) France and Germany now have an EU Contribution situation that costs money, Spain has EU Subsidy situation as income.
13) Added EU Monetary policy to France, Germany and Spain. Effectively uncancellable Quantitative Easing.
14) Members of the EU can no longer impose capital controls.
15) Optimizations to startup, and general UI.
16) EU countries now have a 4x multiplier to the political capital required to change immigration / tariff rules, due to needing EU agreement.
17) The US now has custom names for ministers (like sec of state etc…)
18) The US now has reduced anger at handgun laws from parents, reduced anger at armed police from liberals, and higher default racial tension due to it’s history.
19) UK now has a monarchy situation.
20) Added Nuclear Weapons policy.
21) Fixed tooltips on customise mission screen, and we now hide 3rd party details if not enabled.
22) Fixed bug where start of new game added one turn’s deficit to the debt.
23) Increased Canadian government debt to the correct (much higher) figure.
24) Private Prisons now also reduce the severity of prison overcrowding.

BTW the game is currently 30% off on steam. OH MY GOD Grab it now etc.