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

Inertia scaling in Democracy 4 (new feature)

I recently added some code to Democracy 4 which introduces a new configurable option for people who are really into the game. This is not ‘live’ yet but will be in the next update. I have not totally settled on a name for it yet, but I think I’ll call it something like ‘opinion inertia boost’, because that ties in with other uses of the term throughout the game. So what is it?

Inertia already exists in the game. Every effect that a policy, an event, a dilemma choice or anything else may have on anything can have some inertia applied to it. This means that instead of X affecting Y, and it being a simple equation, in fact its an equation that takes the average value of X over a certain number of turns, which is an integer called ‘inertia’. You can see the value of inertia at the far right of any of the indicators in the game that show an effect:

The inertia is a value set by me, or by a modder, and its fixed. Its basically part of the equation, and set in stone. There has not yet been any way to change this by the player or during the game.

Inertia plays a vital role in making the game both realistic and fun. In practice, if you introduce grants for business startups, it does not convert 500,000 citizens to become capitalists the next day. The impact is going to take years. people need to hear about the grants, apply for them, see their business do well, tell their friends, people have to read newspaper stories about this happening… and perhaps even more relevantly, people who were once socialists but get ‘converted’ to capitalism have to slowly get out of the habits of their previous views, and adopt new ones, even in opposition to their friends/family and peers.

I see this sort of thing happen quite a lot, and have witnessed it with both friends and relatives. When peoples circumstances change, they tend to continue to cling to their existing core beliefs and principles, but over a period of time, opinions will change. With weakly held opinions, its quick to change, but with deeply ingrained beliefs, especially those that come from family, change can take a very long time.

I’m an example of this myself. I grew up in a very working class circumstance. My mother was a trade union representative at work, where she worked as a filing clerk for a trade union HQ (different union!) so she was Trade Unionist to the power of two! My father was also a union rep. We went on exciting day trips to the labour party conference. I read the communist manifesto, and Das Kapital as a teenager.

Fast forward thirty five years and I am a director of two companies, who trades on the stock market, and has employed people and run a multinational company (albeit v small). I’ve even worked on stock market trading floors. I own a single book by Ayn Rand (which I thought was interesting, albeit pretty ranty and very repetitive). My views have definitely changed over time, and with changes in circumstances.

The point is… change of core beliefs takes time. We all think we would keep the same principles until death, but thats unlikely. Societal change is very real. You might think your views regarding being liberal/conservative or left/right are very deeply held sensible views you independently arrived at, but this is very unlikely. I thought I was right as a teenage communist.

So the big question is… how long does it take for politics and society to convert someone from being hard right to hard left, or liberal to conservative? I have no definitive answer, but its a long time. Democracy 4 limits all inertia to a maximum value of 32, for technical reasons, which is 8 years. probably not long enough…

Like all games, Democracy 4 has to balance fun with realism. Not many games have a core mechanic of it taking 32 turns for you to see the impact of your choices, especially not if you can lose the game in an election in maybe 16 turns. Thats pretty brutal. Not only does this make the game hard, it also makes it frustrating. If inertia is too high, many players will just think ‘the game is random’ and complain about the RNG. Ironically there are very very few random numbers in the game…

Plus many players will not bother reading the tutorial or looking at the tooltips. I bet a good 30% of the people who play the game don’t even know inertia is a thing, or where to find it. Most players don’t really know what they are doing, because people have 1,000 games and no time to devote to learning the intricacies. If I modelled inertia realistically, a lot of frustrated players would have no fun.

…and yet…

There are definitely players who feel that they would prefer realism over ‘simple fun’. These players are frustrated that real societal change feels so easy in the game. If they want to convert France to a Capitalist state, they WANT to have to really struggle to take its left leaning population slowly along for the ride. They WANT change to be slow, and take longer, which is why I am adding this cool little slider to the games option screen:

This slider defaults to zero, where it has no impact, and goes as high as to add a 3x modifier. At the far right it will triple the inertia values for all inputs to socialism and liberalism. This will make all policies and events and dilemma choices act more slowly on the membership of these voter groups. (One value affects membership for both socialism and capitalism, on a spectrum and the same for liberal/conservative).

I’ve written all the code, and tested it works on both new games and save games. Everything seems fine but I will do a bunch of playthroughs before I do a new update that includes this slider. I’m pretty sure that 95% of players will never experiment with it at all, but I have enough players that I think its worth adding it all the same. It definitely gives me an easy answer to anybody who comments at me telling me that this part of the game is unrealistic!

Note that this difficulty in changing the country’s views is very much a real world modern problem. Even if Joe Biden was a communist, there is no way he can convert the majority of the US electorate over to his views in a single term. Arguably all Obama managed to do, in his entire tenure, is to get the affordable health care act in place, and it comes nowhere close to being a state health service like the NHS in the UK. Even a popular US president, with control of the house & senate, has to move extremely slowly in changing what the acceptable size of the state is, or changing social policy.

Trump found it almost impossible to actually build a wall, Obama found it impossible to close Guantanamo. Blair did very little in terms of raising taxes, Thatcher did very little in lowering them. Change takes real time.

One final thing: This slider only affects liberal/conservative and socialist/capitalist. I am unsure whether it should also affect membership of the religious group. Opinions very much welcome. I don’t think it should affect most groups, as peoples membership of these is a lot more fickle and easily swayed.

Democracy 4 DLC now available to add to wishlist!

All the cool kids these days are trying to get people to add their upcoming games to their wishlist. Its literally the coolest game in town. You wouldn’t want to not be cool right?

In all seriousness, the reason indie devs do all that is because its widely believed that steams algorithm internally keeps track of what new games are ‘hot’ by how many people are following them or adding them to their wishlists, and this helps to determine how much visibility those games get at launch. I suspect the effect is much reduced with DLC because it sells to a smaller audience anyway, and perhaps steam prioritizes new IP over expansions and DLC anyway. We have no way of knowing.

But you DO get notified by steam when a pre-release game you wishlist has been released, so if nothing else, its just a handy reminder to people that they were interested in X a while back, and its out now…

So here is the store page for the new expansion so you can do this right now:

This DLC has actually been really hard to make, and in many ways was tons harder than doing the voting systems expansion. I can imagine many people might think it is the other way around, given that the voting systems DLC added some new core functionality to the base game whereas this expansion ‘is just a few new countries’. There are two reasons why this was not the case…

Firstly its SIX new countries, which was a bit silly of me. It should have been 4 max. I had totally blanked out that part of my memory where we did all the research and balancing for all the countries in the base game, and also forgotten that many of the base game countries had been modelled before, so we already had a lot of the data. Secondly, I massively forgot how much research is needed to do a proper job of just ONE country. The game has all of its usual policies, plus a bunch of new ones, plus all the content that used to be in 3 expansion packs for D3, plus some new stuff that is specific to the previous expansion pack on voting systems.

Because no economic/political model can EVER really model the reality of a single country in all possible states, let alone model 10, and certainly not 16, there are bound to be a bunch of weird anomalies and inaccuracies in any new countries that get added to the game. Perhaps its REALLY easy if you play Poland as a super-religious libertarian who loves carbon taxes? Maybe Greece is unwinnable for people who want to play Environmentalist-Capitalists if you start with a global economic boom? The problem is…there are too many permutations to test.

I did actually code some AI that plays the game automatically, but the trouble is in extracting any useful data from it. The game does a lot of processing, and even if I get each turn down to under a second (I can get it below 2 seconds already, and thats without multithreading), that means a 5 year term with 5 terms is around 2 minutes of AI-modelling. This might sound quick, but if I can only do 30 playthroughs an hour (720 a day) then thats nowhere close to the number of playthroughs needed to accurately build up a statistical model of imbalance…

I’m not saying that I will not revisit that experiment later…just that the sheer number of combinations of decision in the game mean you really need several million games to be played and analyzed to detect any issues. In other words several years of dedicated processing…

Anyway… I do have a bunch of time set aside between now and release which is basically just me playing each country a LOT, and tweaking all the numbers so they are playable. Democracy 4 is more of a sandbox than a conventional game, so I’m not aiming to get every permutation perfectly balanced anyway. Thats an impossible dream. I do have to ensure nothing crashes or goes super weird in a normal playthrough on each of these six countries though…

That brings me to the price. I’ve set it at $9.99. I did a lot of agonizing about this, and talked to some fellow devs a lot about pricing. Both urged me to price it higher than this. One urged me to double that. Its a really difficult thing to get right, and a decision that I find really interesting.

We all know that the marginal cost of each copy is zero, so in a way, it doesn’t matter if I charge $0.01 or $100, its just a matter of picking the number that maximizes total revenue. This depends a lot on who I think the target market is, what they can afford, and how much value I think the DLC represents… All very difficult things to be exact on. Eventually I figured that given that the base game is $26.99 and has 10 countries….6 countries for $9.99 is a good deal. Its also worth considering that anybody even considering buying some DLC clearly already likes the base game, and has played it enough that they want some extra content. That implies that their play hours are high enough that their cost-per-hour for Democracy 4 is low, and thus are willing to consider any new content favorably with regards to expected play time.

I see this a lot in my daily multiplayer Battlefield V games with friends. I am a serious Battlefield V addict. I have over 1,200 hours in BFV and thousand more in the earlier games. My cost per hour for BFV is about £0.05. Thats insane for something I enjoy that much. Its like going to see a new Hollywood movie and paying £0.15 for it. Madness.

The irony is, that as your perceived playtime cost per hour falls, the value proposition of new content shoots up. If they added one new map to Battlefield V, thats maybe a 5% playtime bonus for me, or 60 hours of entertainment. Even if I will only pay £0.50 an hour, that map should be a good deal to me for £30. A 3-map pack should be £99.

Obviously not all Battlefield players are so obsessed, but with DLC *you are selling to the hardcore*, so the value proposition is way better than it seems to the casual player. This is why it makes sense in F2P games to have some really expensive stuff. There are definitely people who will not only buy a lot of it, but they will consider it a good deal. Thats assuming you aren’t tricking/exploiting people with dark patterns and other horrible business practices obviously…

So…Yup, this DLC will be $9.99 and I think its actually a pretty good deal for people who have played at least all of the maps in the base game once. Its also probably an attractive proposition for anybody who is actually living in one of those six new countries (Ireland, Poland, Switzerland, Turkey, Brazil and Greece). I guess I’ll find out if people agree with me on that in about a months time :D

Officially announcing the next Democracy 4 expansion

In the old days, I used to send press releases to news websites etc…and maybe I’ll still do that once I’m testing this and have some screenshots to show. Not that screenshots of Democracy 4 are exactly a visual feast that makes people’s jaws drop as they gasp at the photorealism…but there ya go.

There is to be another expansion pack for my latest game Democracy 4. It will be a straight data-only expansion, which will add six new countries to the game. Those countries are:

  • Greece
  • Ireland
  • Poland
  • Turkey
  • Switzerland
  • Brazil

I think this represents a pretty good mixture. Greece and Ireland are fairly similar to some of the other countries in the game, but we have a fair bunch of players in those countries and people like to play their home country. Plus Ireland is a bit interesting because it is basically an economic disaster due to geography, which is able to work mostly because it has ludicrously good rates for companies to base their HQ there for tax purposes. Its basically the largest respectable country that serves as a tax haven.

Brazil is obviously interesting because of its size, and its rainforest, and its status as a relatively poor country with relation to the existing game countries. Switzerland has its own unique properties, such as being super mountainous, fanatically neutral in diplomatic terms, and its hyper-democratized system of voting. Its also famous for nuclear shelters everywhere and a high level of gun ownership, but low gun crime.

Turkey is a fascinating country, as it sits between two continents and has influences from both. There are obviously some unusual positions regarding democracy and religion there, that are not really explored in the existing countries.

Poland is also interesting, sitting between western Europe and Russia, one of the last green countries in terms of energy use, and a country very nervous (with good reason) about its borders.

Its going to be hard to really capture the flavor of all these different countries, and I expect at least one major post-release revision as I collate feedback from players. It should be interesting though, and hopefully widen the appeal of the game a bit.

I don’t have a final release date yet, or pricing, but here is the status of the current todo list:

  • Initial statistics for each country 100% DONE
  • Country descriptions 100% DONE
  • Map icon and flag icons 100% DONE
  • Initial policy positions: 55% DONE
  • Extra dilemmas TODO
  • Extra Events TODO
  • Extra Situations TODO
  • Country specific simulation overrides TODO
  • Translation of all text into all languages TODO
  • Testing TODO

…so still lots to do…

In unrelated news, I got covid, and omg it was horrible. I basically suffered badly for a week, but am feeling much better. I have also been avoiding social media, which I increasingly view as a mistake, a dumpster fire which anybody who values their sanity should run screaming from. I might use it in future only as a way of linking to my blog.

In even less related news, I finally moved positech’s entire online presence away from a dedicated physical server (a hangover from days long gone when I had a lot of direct traffic, and hosted forums on the server, as well as a site dedicated to indiegames), and to a simple VPS. Like any hosting company, I was recommended a server package that was stupidly overspecced for my needs, but politely declined that. As a result I managed to cut my hosting bill by more than 50% which is very welcome.

There is still the ongoing saga of the solar farm BTW. Its not abandoned, we are still hoping to get it done, but its going to be at least another 3 months of bureaucracy (don’t get me started on this…) plus a likely extra year of waiting for a grid connection even if we get it. If there is ever anything to report, I’ll blog about it…

The impossible task of country simulation in a video game

As you may know, I make the ‘Democracy’ series of video games. They are pretty serious, pretty complex, fairly in-depth simulation games where you run a real world country. At one point I experimented with fictional countries, but it turns out everyone hates that, they want to be the president of their own country, and show they can do a better job than the current leader. Fair enough.

The only problem with this is it means that I need to simulate real world countries accurately enough that people living in them think I have made a proper effort to do so. This is staggeringly difficult to do with a single (albeit flexible and complex) model of politics and economics. What makes it way more difficult, is that it has to be politically, economically and temporally flexible as well.

Allow me to explain.

Imagine you spend months reading statistics and articles and set all of the values of all of the policies for a single country in Democracy 4, for example the UK, and you get all the various values in the model as close as possible to reality. Unemployment looks about right, GDP looks about right, Wages look about right…and on through literally hundreds of different measures. This is VERY hard to do, and a lot of values need to be flexible in interpretation. For example what level is income tax in the UK? Obviously it depends on how much you earn and many other factors…

…but then the very same model has to work if you change some of those variables. Maybe a player decides to abolish the national health service. Or double the minimum wage. Or scrap nuclear weapons, or introduce a new tax on luxury goods. The same model has to cope in all these circumstances, and it has to be credible over time. The national debt is a certain level NOW, and we know roughly what impact it has, but how do we possibly model what will happen in the future? How do we model the impact of increased automation on unemployment, productivity, wages, and international trade? Ideally a video game is made to be playable for many years. Will Democracy 4 make sense in 2025? in 2030? When we all have self driving cars and teslabots, what do the economics look like?

This is all hellishly hard, but one of the particular aspects of what makes it hard is a thing I’m encountering today. I am taking the first gentle steps into looking at an expansion pack that would add some extra countries to the game, and trying to be more organized, and sensible about adding them so that the model is consistent and makes sense. Its way harder than it sounds.

Take for example: BRAZIL. An exciting country to add to the game, as its so different to the others. I am looking forward to adding a special situation for the amazon rainforest, with all its potential economic boom, tourism value and also massive environmental controversy regarding deforestation. Lots of cool stuff here for a potential Democracy 4 player! But lets zoom in on a single statistic:

What is the correct value for the military spending slider for Brazil?

This is not as simple as it sounds. Its pretty easy to google the military budget of Brazil, in USD terms. Thats 25.1 billion USD with a source here: https://worldpopulationreview.com/country-rankings/defense-spending-by-country. It would be easy thus to look at the UK spending (55Bn USD) and do a relative comparison to where we position the UK slider (42%), and use that calculation to set the Brazil military spending at 19%. However, doing a straight USD comparison is fraught with inaccuracies. I cant even find out if that USD number is actual real USD (ie: the value of the Brazilian reals converted at the current exchange rate to USD) or ‘purchase-power-parity‘, which is a different (and generally better) measure altogether. To put it simple: You can probably pay a Brazilian soldier less in USD equivalent than you would pay a US marine. If a Brazilian soldier can buy a house and clothes and food way cheaper than the USD-equivalent spent in a US town, then in effect your military budget is going further…

One way to adjust for this is to take a second measure, using totally different comparisons. So for example, you can also look at the percentage of GDP that is spent on the military, and use that as a baseline. In this case Brazil spends 1.4% of GDP on defense, compared to 2.2% in the UK. Making that adjustment means that the Brazil military slider turns out to be 28% instead of 19%.

To start with, before I go back and play balance and adjust everything (which will take weeks) I’m setting the initial value for those military sliders to be the average of these two measures, so comparing military spending as % of GDP, then absolute value in USD and then averaging the two slider positions. This gives me the following values:

Greece 29%

Ireland 3%

Poland 26%

Switzerland 9%

Turkey 35%

Brazil 23%

At first look, these seem reasonable. Switzerland is famous for its neutrality. Poland is naturally (given its history) more jittery. Ireland… well I cant remember having ever heard of the Irish military at all. Turkey, given its location, probably thinks it can justify quite a strong military.

You might think this is a paper-thin approximation. You are right. I’m sure multiple people have phds in studying the relative military spending of countries around the world. Sadly, I’m just a video game designer and do not have that time, but I do what I can to get sensible numbers where possible, and have to keep in mind that the first priority of any game is to be fun, not accurate.

Still a lot of stats juggling to go!

VOTING SYSTEMS DLC out now!

So.. at last I finally did it, and managed to get the voting systems DLC released yesterday for Democracy 4. If you want to watch a long video with me rambling about voting systems, boy do I have the video for you:

Also if you fancy grabbing the DLC, you can get it here, or just use the fancy humble widget to buy it direct from me. bwahaha!