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

Updated Democracy 4 to build 1.28. Lots of super cool balance tweaks.

Soooo… I just uploaded the latest build of Democracy 4 everywhere, after 2 days of non stop testing. Lucky I did that because I found a few little visual anomalies that I could fix straight away, like some missing text in one dialog, and some occasionally ‘leaky’ underlined buttons in other places. Anyway…apart from some (minor) bug fixes, this was mostly a big run through all the stats in the game balancing things. First here is the complete list of changes:

1) Removed duplicate impact on security from mandatory microchip implants (2 appearances on security screen)
2) Reduced Technology impact of driverless car laws by 50%.
3) Doubled the cost of Stem Cell policy.
4) Reduced Technology impact of Technology Colleges by 25%
5) Boosted Technology impact of Rare Earth Refinement by 100%.
6) Reduced Technology impact of Technology Grants by 25%.
7) Illegal immigration situation is now slightly harder to trigger, easier to solve.
8) The Private Space Program,Armed Religious Communities and Doctors Strike situations are now harder to trigger.
9) Egalitarian society situation no longer influenced by Education, but needs Gender Equality and low Generational Wealth Gap.
10) Reduced link between Rare Earth Refinement and Productivity.
11) Reduced impact of Alcohol Consumption on Productivity.
12) Reduced default level of Productivity.
13) Slowed most inputs to the Corporate Exodus situation by 50%.
14) Slightly easier now to trigger the Teachers Strike.
15) Plastics Tax and Packaging Tax are now also inputs to the Black Market situation.
16) Homelessness,Antibiotics-ResitantBacteria,Class War and Food Banks situations now trigger more easily.
17) Dilemmas rebalanced so some are more frequent, others less frequent.
18) Bug fix for theoretically fixed situations like EU monetary policy stopping or starting.
19) Media Monopoly situation now reduces Democracy.
20) Fixed bug where some values on the ‘disposable income’ screen were inaccurate, or garbled (esp for South Korea).
21) Car Emissions limit’s impact on motorists income is now scaled by inverse of EV transition.
22) Cost of body cameras now scaled to numbers of police,community police & armed police.
23) Fake news now increases chance/effect of Contagious disease situation and boosts racial tension.
24) Fixed links for minister icons on main screen to correctly show inputs and outputs from them and their sympathy groups.
25) Education now takes time (2 years) to feed through into a change in Productivity.
26) Air travel now slower to respond to GDP, but boosts pollution more.
27) Worker productivity impact on GDP now a gentler curve.
28) GDP impact on unemployment now a gentler curve.
29) GDP has a steeper impact on pollution, homelessness and car usage now.
30) Corruption and average minister effectiveness now shown at the bottom of finance screen. Corruption affects policy costs/income now.
31) Corruption and minister effectiveness now shown at bottom of finance history for each policy, mouseover shows cost impact of each.
32) Corruption slightly boosts tax evasion now.
33) Rebalanced many inputs from state services to state employee membership and unemployment to make them more accurate.
34) Voter turnout is now generally higher in all situations.

Quite a list this time… but that’s because a lot of it was small statistical nudges here and there. Actually this is one of the most time consuming things about developing a game like this. I don’t have any fancy new particle effects to show you, or any new horse-armor options or new fireball spells or laser upgrades. All I can offer you is “After careful consideration and spreadsheet analysis, Corruption is X% more likely when Press Freedom is below Y”. This is actually stupidly important because its getting all those numbers right that makes the game playable and fun and not a mess.

The only big noticeable changes that players will see rather than *experience* are that bureaucracy is now a thing (triggered by having a LOT of policies, or not so many if you are the weirdly bureaucracy-obsessed Italians), and I added some extra data at the bottom of the finance charts to show you that corruption also affects policy effectiveness along with ministerial effectiveness.

In theory Democracy 4 gets easier to balance over time, because we are slowly homing in on the ‘perfect’ game balance, by pruning obvious dumb edge cases as they are reported or spotted by me, and also I get more and more data from players on what happens too often, what happens too rarely. For example each update should have you experiencing a larger and larger percentage of the dilemmas and events in the game. They may *feel* random, but they are actually being triggered by various in-game parameters. Balancing those so that they show up at appropriate times, but you also get to experience most of them is really tricky…

As always, don’t forget to voter on priorities from the games main menu screen, and like I always say, leaving a positive steam review is a really big help, as is telling your friends about the game if you are enjoying it. Its also really great to get helpful feedback. The best possible feedback is stuff like “When playing country Y as a conservative, it feels too easy to keep voter group X happy by doing Z, even though it doesn’t upset anybody else” or whatever…

Improving accuracy of state employee & unemployment effects in Democracy 4

One of the problems with making a vidoe game with one person doing the development, where you try to model the entire world in inter-connecting detail…is that its impossible, so you end up doing a lot og guessing and thinking ‘yeah that looks ok to me’. Then eventually you find the free time (ha! its the weekend, who am I kidding?) to go back and check that the wild ass guesses you made were just wrong, and not OMG emebarrasingly badly wrong. Its a low bar, but i’m determiend to hit it.

My game Democracy 4 has a lot of policies that affect two important variables in the game – The membership of the ‘State Employees’ group, and the level of unemployment. For hopefully obvious reasons, these numbers are important in a government/ politics sim. They have to make some vague sense. Until now, the numbers in the game have kind of been guesswork, and result in equations like this:

StateEmployees_freq,0.02+(0.05*x)

That means that the effect of that policy will vary between a 2 percent and 7 percent boost to the number of voters who identify as state employees, depending how the policy slider is set. In other words, this policy assumes that at max capacity, this policy represents a seven percent higher chance of any voter joining that voting group, although in practice its much more complex than this, due to internal algebra that I wont bore everyone with…

The problem for me is that although I do not mind that seven percent figure being possibly inaccurate, I DO want the games model of this stuff to be internally consistent. To put this another way, if in the real world, a state health service employs 10x the people of a state postal service, the game should attempt to get that ratio correct, at the very least. With this in mind I have done some research, using the USA as my base case for the policies most impacting state employees:

These figures are NOT 100% accurate. This is mostly because the US does not have a state health service in the same way the UK does, so I had to take NHS figures and then adjust for population. I also had trouble getting energy figures, so I extrapolated from the top 10 companies employees and adjusted on a per-household basis. The point is that although the figures (like all figures) are a bit wrong (probably) they are massively less wrong than my guesses!

So now to make the game values make sense, I need to work out how to adjust those values in the second and third columns, which are my current effects (at max slider) on state employees and unemployment. Given that I do not want top massively unbalance the game, I thought it was prudent to keep the total combined effects of all of these policies the same (93% and 126% respectively) and just adjust the figures internally to fix the relative impact,

The way I’ve done this is to use the employment percentage (the actual percentage as a portion of total employment of all these policies) and multiply that by the total current in-game effect (93 or 126) to give me the new adjusted effects. That looks like this:

In some cases its not too big a change but in others its hilariously different. Currently the game is giving a HUGE (18%!) boost to state employees from armed police when it reality it should be about 3%. On the other hand state schools were set to have a 10% boost to employees, and should be having a 29% boost instead! So many teachers! Its also evident that in the grand scheme of things, prisons and a state broadcaster employ virtually nobody. (I scaled up the BBC employment figures to USA size to get that data too).

I have just done the data so far, but later today I’ll go through all the policies and adjust the values in each equation. I guess the takeaway from all this as a player is that if you really want to cut unemployment when you spend money on public services, you want to splurge cash on the health service and schools/universities. Everything else is trivial.

Keen-eyed economists might note that the REAL employment impact would be different. For example, the direct employment from the US military may be 1.3 million, but defense contractors etc will employ many more, and the knock-on effects from the contractors CEOs buying new ferraris is even higher. I agree, but that is best dealt with through a GDP boost I think.

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.

Positech Energy. OH YES INDEED

So yeah… I have literally been wanting to type this for years, and I’m finally doing it. There is not THAT much concrete I can announce, but there are plans..real plans..and actual actions…

I’m a big renewable energy fan. If you follow this blog a lot you might know that I have solar panels in my garden (2.1kwp) and also have put some solar panels on a local school (as a charitable thing). I’m a big fan. I also have over the years invested in peer-to-peer networks that build solar farms, through sites like the westmill solar farm co-op and abundance. I got quite into it. It *can* be a reasonably good (and very safe & predictable) investment. I’ve wanted to do a lot more for years.

Luckily, I seem to be unusually good at running an indie game company, and also unusually good at investing the profits, which means I’m finally in a position to fulfill a very long-held dream and actually start a little solar energy company, which I have unimaginatively called Positech Energy. Its a real proper registered company, and everything! It even has an incredibly crap placeholder website that has almost zero content!

So…whats this for then?

I’m a big fan of solar farms, and have read about them a ridiculous amount., I always wanted to build one, not just invest in one someone else built. Frankly investment is easy, and lazy. You just read some financial documents and click a button. You could do it in the bath ffs. Its not the hard work. The hard work is the actual nitty gritty of where the tires hit the road and you have to talk to planning people, and local government, and solar installers, and energy companies, and regulators, and energy distribution companies… and about a bazillion other pieces of bureaucracy… This is what puts people off, and its PRECISELY because this is so awkward, and difficult, and stressful that I decided to do it…

I am aware of just how easy it is to be a ‘slacktivist’. Someone whose idea of activism is using a hashtag, or adding an emoji to their twitter profile. Thats all well and good, but its not even 0.000001% as effective as getting off your ass and physically making a change. I’ve already insulated my house to oblivion, put solar in the garden, bought an electric car, switched to a green electricity provider, and so on. I’ve done the green-investment thing, but really, its only one step up from slactivism. I haven’t really made an impact on the issue I care about: climate change and green energy’s part in all that.

So… I’m planning on building a solar farm. We have a potential site (actually potential site #2 now…#1 fell through), and are in the haggling stages. Its nowhere near me. I wont be able to nip out there to stare at it daily. It is in the UK though. Also… its kinda MASSIVE from the POV of me, but tiny from the POV of the big energy companies.

It turns out that roughly 1MWp is the size we are aiming for. So a peak output of about 1MW, which is quite a lot. over a year you generate maybe 1,000 MW(ish). For comparison to fill (from empty) a high performance Tesla model S is 100kw, so thats 10,000 cars recharged per year. Its also a lot of space, and solar panels. Thousands of them in fact.

The plan is also to incorporate some energy storage (effectively a shipping container or two full of lithium ion batteries wired into the grid). This allows you to get a better price for the power, as you can effectively ‘cache’ it for when its a good time to sell, and also you can sell ‘grid stabilization’ where you allow the national energy grid to rent space in your battery to dump excess power and then slurp it back a few minutes (or seconds) later if they are having trouble maintaining grid frequency. There is an open(ish) market for these kind of services.

This is going to take MONTHS to have any progress whatsoever. There will be a lot of staring at paperwork, and spreadsheets, and emails, and phonecalls/zoom meetings and bureaucracy and nonsense. I’ve already been driven MAD by the insane demands of simply opening a second bank account in a new company name… But hopefully it will be worth it.

Because I love stats, and the free market, and sharing, I intend to be very open about the technical and financial side once we actually have contracts signed. That might be a while…

(BTW I am still working 40+ hours/week on indie games with Democracy 4. This crazy adventure is my hobby. Its not a big time commitment)

Two orders of magnitude thinking

So… I just watched the neuralink video with the monkey playing pong, if you havent seen it already, watch this:

Now you picked your jaw up off the floor, lets think about how stuff like this can even happen, and what we can learn from how things have got to this point… The main takeaway here is not that neuralink have managed to vastly accelerate progress in the field of curing paralysis (or I guess…working around it), but the approach they are taking. They often talk about some seemingly minor things in their presentations:

  • There is no visible scar on the monkey.
  • The device is charged wirelessly using a baseball cap!
  • The surgical equipment that puts the implant in is very fast, and should be a very simple procedure (relatively).

This is a BIG deal, because its what we might call two orders of magnitude thinking. This seems to be something that Elon Musk does all the time, and I think its amazing and worth learning from, regardless what field you work in. When you look at spacex, neuralink and tesla, the thinking behind the company strategy is absolutely different to the strategy behind every other company I am aware of, because its this:

Don’t work out how to go from where we are to the next thing. Work out the ultimate impossible goal, even if its 100x harder, then make direct plans for that, regardless what it takes.

SpaceX is the clearest example. All other rocket companies had an idea that they would try to make a rocket as good as, or better than the current examples. maybe slightly cheaper, maybe slightly larger, maybe a slightly bigger payload. If they were really ambitious, maybe double the payload, or half the cost. The spacex solution was not along those lines. It was ‘given we need to establish a self-sustaining colony on mars, whats needed to achieve that?’ and the ridiculous answer that comes back is 100% reusable rockets, that land, refuel then take off within an hour.

SpaceX's Falcon Heavy successful in commercial debut – Spaceflight Now

Looked at from the POV of NASA, thats absolutely insane, yet they get closer every year. reusable rockets (at least 1st stage reusable) are now a reality, in fact the norm, and totally reusable rockets should be perfected within a year. Nobody would even begin to attempt this, if they took a standard “where do we go from here” approach.

Neuralink is another example. They are not trying to push forward current tech regarding solutions for the paralyzed. They are thinking ‘how do we make a neural lace from the Iain M Banks novels’, and then working on the tech, the infrastructure, and the processes required to make that a reality. Elon musk wants every human on earth to have the option to have a brain-computer interface. It has to be safe, invisible, affordable, routine. This seems impossible and yet…here we are…

Tesla is a third. They were not aiming to make a few electric sports cars for rich jerks. They were aiming to completely transform the entire car industry. Thats why they moved as fast as possible from the roadster to the model S, to the 3, to the Y and soon to an even cheaper model. This is the plan all along, not even secretly, its been posted online years and years ago. And now? not just building one insanely big factory but two, at the same time, Not aiming to boost sales by 5 or 10% but 50-100% each year, every year, because *thats what it takes* to achieve an impossible end goal.

Tesla Texas Gigafactory drone construction update - DroneDJ

So how does this mindset help anybody reading this?

Its a mental trick. And it works. I use a lot of mental tricks. I used to have a slide in talks I gave showing the troops in a landing craft at the D-Day landings. These are people I visualize when I’m stuck, or feeling slack, or demotivated. I put myself in their position and compare whatever relatively trivial challenge I have to theirs. This mental trick is different, and probably less harrowing, but its similarly effective.

This mental trick is in thinking backwards. You do NOT under ANY CIRCUMSTANCES frame your decision making, your motivation, or your plans based on where you are now. Thats irrelevant, whether it be money, location, knowledge, whatever. You totally ignore where you are now, and work backwards from where you absolutely HAVE to end up, in the timescale of your choice. You plot backwards, writing down the decisions that must have been taken, the action that must have taken place in order to explain how you ended up achieving your goal.

So for example, you want to make a comfortable career out of indie game development. Thats fine, but work out what that looks like and go backwards. Maybe in your country that means earning a reliable $200,000 a year before tax. Ok, fine, whats needed in terms of sales for you to do that reliably? how does that gross up to give a figure before steam/apple/googles cut? How much more is needed to account for hardware/software/subcontractors etc?

Do not compare where you are, to whats needed at the end goal, because if you do, you will give up. its natural. The trick is to assume its already happened, and that you have no say in it. Maybe when you progress back and back and back from the $200,000 a year in 5 years to today, you realize you need to ship a game that sells 5,000 copies THIS year. without fail. Maybe that will take you 2000 hours to make this year and you have a full time job. So thats maybe 8 hours a day you need to find every day this year. How is that even possible?

The point is, it doesn’t matter, you have to assume it is possible, and then everything else is irrelevant. Maybe you work on your game every lunch hour, and every morning before work, and late into the night every night for a year, and thats how you do it. Maybe you remortgage the house, sell the car, sell a bunch of other stuff and take a six month sabbatical instead? Your circumstances dictate the path.

The point I’m trying to get across, is that if you work backwards, taking extreme measures to achieve your goals starts to feel justified, understandable, and expected. If you work forwards, the same actions seem obsessive, extreme, even insane.

99% of people reading this will think I’m nuts, and that nobody should be that obsessed with work. Thats absolutely fine, its aimed at that 1% who keep failing to achieve big goals and need a trick to help them do it, and absolutely want that goal enough to do whats needed.