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

Upgrading my home solar to solar edge

Yesterday I got my ground mount solar panels upgraded to solar edge. This is something people very rarely do, for very sensible reasons, so I thought I’d blog about it, as its something you wont ever find explained.

As some background, I have a 10-panel ground mount solar array in my driveway. We live in an very old ‘listed’ building in the UK so we cannot have roof mounted solar, but I’m a huge fan of green energy and wanted them anyway. 10 panels is all we could fit in the vaguely sunny part of the driveway so thats what we got, and the peak output is 2.1kw. Thats pretty low, and by Californian standards hilariously low, but this is the UK, and we don’t even have air-con (but I DO have an electric car to charge).

Because there is no other sunny part of the garden, and the neighbors are not likely to sell me extra space to put solar,m I have ended up starting a company to build a solar farm, but it still frustrates me that we are not energy independent at home. This is REALLY hard to do for an old house in the UK without a huge flat un-shaded garden. Thus I took it upon myself to try and squeeze as much efficiency out of our existing solar panels as possible. Enter solar edge!

Solar edge is a system that is almost ALWAYS fitted when you get new solar panels (if you opt for it, most don’t), and rarely done as a an upgrade. As an upgrade, it makes very sketchy financial sense, unless you are in my position, have variable shading, and are desperate for higher efficiency.

Solar edge fixes a problem in the way solar panels are wired, that almost no homeowners realize. They are wired so that power flows from one panel to the next, and the next, until eventually they reach the inverter, and get converted from DC to AC. What this means is, in practice, if you have 10 solar panels and solar panel number 1 is shaded, then the output of ALL TEN panels is reduced.

Yes really.

In almost all ground mount, and many rooftop installations, this does not matter. But if you have partial shading at some point during the day, or if you have constant shading of just one panel, you lose a massive amount of potential output. It also means that solar panels have to ideally all be facing the exact same way (not both sides of a roof, unless you literally live at the equator), and be the same type/output. Otherwise you are losing energy.

Solar edge is essentially a bunch of widgets (optimisers) that get wired onto the back of each panel. here is one on one of my panels:

All most all of that extra cabling and cable ties is due to the solar edge system, so its actually a lot of annoying, slow, fiddly work to do it. You need one of these for every single panel:

They are also not cheap, but frankly these days even if they cost $10, the main cost is getting an electrical engineer to come wire everything up. As ever, humans are the point at which renewable energy gets most of its costs these days… Anyway, you also get a new inverter, which is a lot smaller and simpler than many others. Like most inverters these days, it can talk to your wireless network and give you internet-based tracking of everything:

The beauty of this system for people with complex roofs is that a single inverter can now manage multiple groups of panels, even when one might be slightly shaded in the afternoon when the other is in full sunlight. The thing is, it also helps for stuff like partial shading due to clouds, or maybe in my case treetops which will affect coverage for one panel but not others. Check out this screenshot from the solar edge site:

Thats taken at a specific time this morning, around 10am, where either clouds or treetops have shaded a lot of the panels, except panels 4 and 8. In this case they get to produce 65w and 68w, instead of being limited to the 40w of that first panel. (its a cloudy day today, normally output would be way higher!)

What is especially cool about the site is it has a sort of ‘scrubber’ where you can slide through time on any day and see the output of each panel at each point in time. It will also show you total power for the day/week/month for each panel, so you can work out if one of the panels is maybe covered in bird crap or some fine dust, or if it has a technical problem and is failing. Its also apparently safer in case of electrical fires and faults.

This is all total nerdgasm silliness that only someone like me would ever actually do, because the extra output is likely about 10% and the costs are in the thousands, so although yup, I did get a spanking new inverter out of it, the actual economics of it make little sense in the UK, unless your inverter is failing anyway.

However, if you ARE thinking of getting solar, have a complex roof and some shading at parts of the day from a neighbors tree or a power-line or phone line, it may well be worth considering a solar edge setup.

Japan’s economy in Democracy 4: making sense of irrational economics

So… I am currently working on adding Japan as a playable country to Democracy 4, which is still in Early Access. Although I think Japan is super interesting in many ways, especially cultural (very conservative on prisons, super-generous on maternity leave, amazingly high percentage of retired people, very high tech, super-low immigration…), its economics are absolutely batshit crazy. Lets look at some numbers.

Tokyo: the latest stock market darling | Business| Economy and finance news  from a German perspective | DW | 16.01.2018

The current GDP of Japan is 559 trillion yen and its debt is currently 1.328 quadrillion yen, which gives us a debt to GDP ratio of 237%. The country in 2019 (pre-covid) had a deficit of 17 trillion yen. Compare this to the USA in 2019 which had a GDP of $21 trillion, debt of $22trillion, which is a ratio of 104% and a deficit of under $1trillion.

The USA has the dollar, which is the reserve country of the whole world, and I think its fair to say both countries have fairly similar stability in political terms. They are both monetizing this debt by using some form of quantitative easing. The US flirts with helicopter money, but the amounts are relatively small. I think its fair to say the biggest difference between the two is that the US debt to GDP ratio is dramatically lower than that of Japan. In other words, its riskier to lend money to Japans government than the US< by quite a margin, as the economy of Japan looks way less likely to repay that debt than the US. This *should* be reflected in the interest people demand to lend to Japan. lets look at 10 year government bonds:

United States 10 year bond yield: 1.59%

Japan 10 year bond yield: 0.09%

HELP. At this point I feel that someone like me with a decent (but hardly expert) understanding of economics is basically in this position:

Pied Piper

This makes no sense. Would you lend any money to the US government for just 1.59% return? me neither, especially when just splatting the money onto the S&P500 would get you 13.6% a year over the last 10 years, but OMG why on earth would anybody lend money to the Japanese government for 0.09%. It makes no sense, and much more fundamnetally than this..it breaks the simulation for my game Democracy 4!

Basically the game has hard coded into it the attitude of the international bond market when it comes to government debt. The general principles of the code are that every six months the bond market evaluates your country and looks at the debt/gdp ratio, the deficit/gdp ratio, the level of ‘stability’ and inflation in the country, and then decides on what the credit rating should be. The interest rate on the debt is then applied, based on that credit rating. The game assumes that the maximum conceivable debt/GDP ratio is 250% (Japan has broken this!). As the game stands right now, a few turns into a new game on Japan instantly triggers a really bad debt crisis:

The game also assumes that this upsets everybody, really badly, but in fact, this may be outdated because it seems that people generally seem very unconcerned by the size of japans debt. This is possibly because right now the world has other concerns with covid, and also because we have had a post-2008 general global credit crunch which has meant global use of QE to the extent that global interest rates have collapsed. Every country has bad debt and low interest rates, which maybe makes japan look not so crazy…

But it still should be WAY worse than the USA. Japan *is* in a debt crisis, and the way in which it seems to be given a free pass on staggering levels of debt is baffling…and yet this needs to be somehow handled in democracy 4… Hence we reading a lot, and looking for some justifiable ‘fudge factor’ I can code into the game that justifies all this. By any standard Japans credit rating should be something like D right now. In fact… its A.

The clearest explanation i have found so far is “A large portion of wealth is held by seniors who lack financial literacy and prioritize stability rather than return” (source). This also states that most Japanese govt debt is owned by Japanese citizens. This kind of implies I need to hard-code in something that says ‘Japanese tendency to not realize they are making shit investments’, as a modifier to boost the credit rating of Japan. That can’t be right!

There is an argument for saying that the country is more stable, and less vulnerable to external pressure on its debt because its mostly owned by its own citizens. The current economics of the game are actually giving Japans super-high debt about the right impact on the finances, so the problem is mostly that the debt crisis is triggering when it probably should be put off a bit by these factors.

So I suspect my actual solution here is to add a special modifier (domestic debt ownership) for the debt crisis situation , but leave the credit rating and interest rate stuff alone. I suspect this works because although the current bond yield on japans debt is super low, some of it will be much older and potentially paying out higher amounts.

Anyway….fun fun fun. I guess its different to balancing games with laser guns and magic spells.

Where do the wishlists for my game ACTUALLY come from?

I was this many days old when I discovered this stuff… Anyway, I have been trying to boost sales of Democracy 4, as you do, and thus have been experimenting a lot with the UTM tracking cookie stuff that steam now supports. The results have been mixed, and complex, and not the direct topic of this quick blog post, but one thing did come out of my analysis…

I’ve been tracking a bunch of different ad campaigns I have been running since the 6th april. Lots of spreadsheet crap later, I concluded that I can trace the relative effectiveness of multiple ad campaigns that have led to to be able to vouch for 167 wishlists adds for Democracy 4 during this period. Unfortunately there is a problem with this number:

In that period, Democracy 4 had over 8,000 new wishlists. That means I’m fussing and huffing over a stupid <2% of the total. Why do I give a damn about these -ad-generated wishlists when clearly I am getting so many more from other sources. But where?

The first place to look at is the graph, to see if we had any actual notable spikes in wishlist adds during that period:

Clearly the answer is YES. Around 30th april to the first few days in may there was a big spike in D4 wishlists. Its not earth shattering, but its pretty good. Sadly steam has no way of telling me directly where they came form, unless they came from people using UTM tracked links, which clearly they were not, or I would have spotted them earlier. So I had a hunch this might be youtube related, as I have done some promotion to youtubers lately. I narrowed down a google search for “youtube democracy 4” with a super tight date range, and the top hit was a bunch of lets play videos from a Turkish youtuber. How can I tell if this is the spike?

Well… this is what I learned today. You will not find this information ANYWHERE in the wishlist stats pages for steam. You might imagine if it was anywhere, it would be there…but no. To be fair, its explained in the steam docs, but its hardly intuitive. If you go to the regional sales reports for each app, and look at each country and then expand the little + icon you find it…

So as I understand it, I got a 2,600% increase in the usual number of wishlists per-day from Turkey over that period. Its actually *not a lot* in revenue or wishlist terms, but the percentage difference is pretty eye popping. This is handy because its not just saying I made $x extra revenue thanks to this youtube coverage, but also potentially more due to the wishlisters who would hopefully then buy the game on sale later.

Of course thats interesting…but it begs the question as to how effective is it compared to ads, and if its effective enough, how to encourage it in future. I got about 8,000 wishlists over my examined date range, and 513 seemed to come from this youtube vid. Total Turkish wishlists were 965, so over half of them came because of one youtube vid. That means its DEFINITELY worth trying to repeat that in other countries.

And of course there lies the issue. How to get youtubers to play my game? And not just the wannabes with 5 followers and 2 views per video (1 to check it uploaded, and 1 from your mother). This is the real problem. You can get your game in front of a lot of youtubers with ads on keymailer, but still, thats just a capsule. How to really get across to them that this is a GOOD video for lets plays?

FWIW I think the game is unusually good for youtub,e but especially twitch. You can literally poll your viewers on what laws to pass or spending to cut/increase. What could be better for hilarious results and interaction with your viewers? The trouble is, finding a way to tell that direct to youtubers without just shoveling money at PR companies to pester them for me. I’m still not 100% sure on the ROI there. (its so fuzzy).

Food for thought anyway. BTW if you *do* want a key and have thousands of followers/views, you can see our keymailer link here:

non-political environmentalism

I’m an enviornmentalist. No surprise, because I have solar panels and an electric car, and am even planning to build a solar farm. However I am not any of these things:

  • A Hippie
  • Into drugs
  • A vegan
  • An ‘outdoorsy’ person
  • LGBT
  • A pacifist
  • Into face painting and bongo drums / festivals
  • A Socialist

I have nothing against any of those traits. I have buddies with probably all of them. (Not sure about the bongos actually), and there is nothing negative about any of them. It just so happens that they are not me. But if you see news footage of environmental activists they pretty much are always someone with dreadlocks and bongo drums face-painted as an owl, talking about how sustainable living is incompatible with the ‘capitalist system’. These are the people who are chosen to be on TV. Why?

They make more interesting TV.

I’m a fairly boring looking stereotypical middle aged dude with rapidly thinning grey-ish hair and glasses. I’m an office-bound company director. If you HAD to guess by looking at me, you would assume I’m middle-management, married, 2 kids, semi detached house, and listens to dire straits on his commute in his Ford Mondeo. You would not assume I’m an environmentalist.

The reason I’m an environmentalist is practical. Climate change is fucking up the environment, and I happen to live in the environment. I’m also 51. if I was 81, maybe I wouldn’t care (I suspect I would actually…), but in PURE SELF INTEREST, I am aware that unless we sort this issue, my retirement years are fucked.

There are a bunch of myths about the environment that are believed by most people in my position. Such as:

I’m too old to worry about it. I’ll be dead before it gets bad.

Firstly…you don’t have kids? I hope not, because you are just letting them have a fucked up life instead of you. Seriously, do NOT bother including them in your will, or educating them. Who cares right? whats the point of a house and an education if we hit 2 degrees warming in their life. (clue: none, they will be dead before needing either).

Secondly… even if you do NOT have kids…. your timescales are off. We are not ‘waiting’ for climate change to start wrecking us. its started. Do you not even *watch* the news. Sure…a catastrophic freeze in TEXAS that bursts pipes, and wipes out the power grid for days at a time is just normal right? (no). The number and severity of extreme weather events is accelerating. Already. And its going to get way way worse before it gets better even if we take this seriously. Like I said, if you are under 80, yes, it will fuck up your life. Also, just the texas event cost $195billion. Just 1 year, One state.

Texas weather: Deadly winter storm sweeps Texas and US southern states -  BBC News

This is all just socialism in disguise.

My close buddies would laugh at me having to argue this. NO. There is NO link between left/right politics and environmentalism as a goal. Sure, a powerful state could ‘fix’ climate change with massive taxes and massive state investment. SO could a revenue-neutral carbon tax that shifts the tax base purely towards pollutants and away from income. One of the most effective companies doing something abouit climate change is the car company tesla. A capitalist company run by a billionaire, and occasional worlds richest man. Elon isnt doing this because he is a communist.

True, a lot of left-wingers are also environmentalists. But there is NOTHING incompatible about capitalism and fixing climate change. It should be seen as a huge business and economic shift that is an opportunity for canny investors to make a fortune. My Tesla shares are up 800%. Thats not socialism.

Elon Musk: 620-Mile Tesla Roadster Will Be 'Part Rocket' & Can Fly 'A  Little'

Its an excuse for big government to control us.

Doesn’t have to be. We already have most of the tools in government to take drastic action. fossil-fuel cars are taxed (at different rates), gasoline is taxed, electricity consumption is taxed. Car efficiency is regulated. Major changes to the way we approach climate change can happen literally by changing some numbers in a database by the government. More drastic measures like a carbon tax would involve new laws/tax policy, but that can be a headache for power-plant operators and oil refineries. The government does not have to VAGUELY get more involved in anybodies life to fix this issue.

It will not affect my country / be good for my country

No. It doesn’t matter where you live, 2 degrees of warming is BAD news for the human race. It sounds like its trivial, whats 2 degrees right? The reason for it is simple, but not talked about, and its nothing top do with sea-level rise (although yup, your beach-side house is FUCKED btw). Its Food production. Food is VERY sensitive both to temperature, and to extreme weather events. Crop yields are vastly affected by climate change. And extreme weather events are generally infrequent enough that we tend to get a decent harvest almost every year. As that ramps up, food yields go down, combined with temperature change to yields and…our food production is going to start to collapse while our population continues to rise.

Crop failure and bankruptcy threaten farmers as drought grips Europe |  Drought | The Guardian

Honestly, even if food prices double, I’m fine.

Great news for you! But I hope you enjoy the idea of living in a gated community with armed guards then, because the fact that YOU can afford food does not mean your neighbors can. Also…even if they can, their disposable income has now collapsed, because food takes up so much of it. That basically collapses the economy. Not your economy, the global economy. Your retirement fund is now worth zero. How are you paying for that food now? Oh and… when entire regions and countries become useless for food production…people leave. They are desperate, hungry, poor and need somewhere else to live. If people think the last decade or so of problems with migration into Europe is bad, its going to get way way worse unless we do something.

Conclusion

You will not be ‘ok’ if we hit bad levels of climate change, and the current forecasts are catastrophic. You might not be ‘interested’ in it (you really think I’m interested in climatology?), you might think ‘its no big deal’ you might think ‘its just for people like X’, but I urge you to rethink all that. Like anything in 2021, Climate Change has been shoehorned into the culture wars and social justice wars. PICK YOUR SIDE! Except actually you don’t have to. People on twitter shout very loudly that sustainability is incompatible with capitalism! Just because its in a hashtag doesn’t make it true. No more than an Ayn Rand advocate saying freedom is impossible without capitalism. Do not let other people decide that environmentalism is ‘not for you’. At its heart, its actually just practical self-interest.

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…