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

Home battery storage expansion, not quit resilient…

Just over two years ago, I took the plunge and added a lithium-ion storage battery to my home. It went in the cellar. Its been doing its job faithfully ever since, and has been pretty cool. I reckon 85% of our energy usage has been either free or off-peak electricity since we got it installed. Here is a pic:

The original blog post is all the way back here. Anyway, today we had someone come to the house to talk about doubling it, and having not 9.5kwh of storage, but 19kwh, by sticking another one right next to it. Cunningly I had forward-planned this, by asking them to make that big wooden backboard big enough for two batteries during the initial install.

At the time, I was not sure what the right size of battery would be. We nearly got a Tesla powerwall, but they were hard to get hold of. They had a 13kwh capacity at the time, so we ended up with slightly less at 9.5kw. It also has a separate inverter (some modern batteries have the inverter in the same box now) and the inverter is limited to just 3kw input/output. So that means if at any point we draw more than 3kw by cooking/heating/whatever, then we pull power from the grid EVEN IF the battery has tons of charge in it. Now with our solar panels, its a bit different because if they are producing at their peak (about 4kw), we can in theory use 7kw of power and still not touch the grid, but that involves being very organised :D.

I mention the 3kw limit because that is not changing. We could in theory get another inverter but thats a lot more hassle. With a second identical battery its just attached to the wall and then connected with a phat cable and thats it. So we will then have 19kwh of storage, that we can use 3kw per hour. This is not ideal, but we are doing it anyway. Why?

We are likely going to get a heat pump soon, probably this year. Heat pumps are very environmentally friendly, but they do increase the amount of electricity you use. In our case it will mean getting rid of an expensive and emissions-heavy oil boiler and oil tank, so its definitely a win, but our actual electricity usage will rise a fair bit. Right now, we have everything balanced perfectly. In a dark cold winter, we get almost nothing from solar (0.67kwh today), and we use about 11kw. So we can buy 10kw overnight at cheap rates, and combined with some solar, we can still just about get through the day without using peak electricity.

The heat pump will change this. We will have a higher average daily electricity consumption, so in order to have the same fully off-peak strategy, we need more storage, and its cheap enough (£3,900 supply+fit) that we may as well double it. I think we don’t NEED double, but I’d rather have 2 identical batteries for compatibility reasons and would rather be too big than too small. We should get the battery fitted soon, way before we get the heat pump. If you wonder about charging the EV… thats done entirely during off-peak times, so its never a problem.

In an ideal world, we would also have re-wired the entire house to survive a power-cut and run off the battery. In practice this is REALLY hard to do. Its not the kwh that is the problem, but the kw and the amps. Houses can draw up to 100amps in the UK, and no, no home battery is going to provide that. What SOME home battery installs do is wire ‘some circuits’ so they work in a power-cut. So basically you can have all the sockets in one room, or all the lighting. Thats likely low amps and low power. However it does involve running extra cables and a new fusebox in the cellar, and when we looked at what fuses were behind what sockets… it all turned into a bit of a nightmare. So we went for a bit of a bodge…

We are going to (pending the quote) have 2 sockets fitted next to the battery in the cellar on a separate battery circuit. In a power-cut, they will still work. So we can charge up a laptop or phone quite happily down there, although its a cold 1650s brick cellar with a well in it, more suited to a lord-of-the-rings re-enactment than leisure time, so no, we won’t be living down there. On the plus side, thats still better than having NO power in a power cut. We had power out for 6 hours a few months ago, so its a thing here. I also think that given climate change and extreme weather, this will be more likely. All our power cables here are overground on poles, so vulnerable…

It might sound ‘not very resilient’ but we have two log-burning stoves here, so not short of heat, and actually we can always charge phones in the car anyway (even watch netflix and disney and apple tv in the car), so we are not totally bereft :D.

BTW if you follow me on X and saw THAT POST about the solar farm, I have not forgotten to blog about it…I just need more information…

So is 2025 another game dev year for me?

I am currently in a sort of limbo, which will explain why my blog posts have been less frequent. When I was working around the clock all day every day on Production Line and spending the weekend doing blog videos, there was a ton to talk about. The same was true of Democracy 4. But the last few years have been a bit of a strange period for me because my life has changed quite a bit, and I haven’t really blogged about it, so here we are.

Firstly, I have been making games and selling them online since 1997. Its sounds ridiculous to me that I might be about to retire, and yet the truth is that I sort of already have. Kind of. Not really. I had a number of other jobs prior to games, including mad ones such as window-cleaning, boat-building, guitar-teaching and IT support. When I finally made it into game full time I worked at two triple A studios, and THEN I finally went full time indie and made the games most people know me for.

So I’ve been around a while. For the record, I’m 55. Young to retire, but not young for gamedev. Not many people in videos about game development have grey hair (and not much of that any more…).

Somewhere along the line, as I was building up my portfolio of games, two things happened. Firstly, I had enough hit games that I had kind of made retirement money, and secondly I invested that money, and spent a fair bit of time managing the investments. To give some context, I used to work in IT for city trading floors, and did a degree in economics, so markets come quite easily to me, and I am fascinated by the stock market.

To cut a long story short, I did quite nicely from that, and managed to save up the money to build a solar farm. There are many posts by me about it, and I now own two companies: A games one and an energy one. On top of this, the investments fluctuate so much that it means that the ‘average’ year now, I am about as dependent on the stock market for income as I am games. Weirdly, games has gone from a teenage hobby to a full-time job back to a hobby again. This is strange.

Plus I have finally come to the conclusion that what I really need is a stress-free and happy life. There are studies that show that any income over £70k a year no longer increases your happiness. I can state that this is absolute bollocks, and the number is higher, but its not THAT much higher. My current goal is definitely happiness above all else. So given that early retirement is an option, what would you do?

Well it turns out that this question is MUCH harder for me than most people. I just read a book on hypomania, and although I’m not hypomanic… I am a bit. probably more than I care to admit. The idea of me sitting in the garden with a cup of coffee and a book each afternoon seems ludicrous to me. I just can’t do it, or at least I can’t do it every day.

So I ended up making a little game to keep myself busy. I even released it on steam for a laugh. Its a vertical shooter, the exact kind of game that never sells on steam, so nobody makes any more. It took a few months. Here is the trailer:

I think its kind of fun, and I enjoyed making it. Obviously I had a lot to do to build a solar farm, but it wasn’t even 10 hours a week, let alone 40. Now the farm is up and running its likely under 2 hours a week. So what to do? At one point I actually completely re-designed my entire website from scratch, which took a few weeks, but no more (and I am SO glad I did it). Also during this time I started making a new game…

…and I seem to have taken it a bit too seriously. I’ve written code that takes up 1,607,029 bytes of text. I guess the average line is maybe 40 bytes? So 40,000 lines of new code? I now have a complete strategy game that is playable, although not balanced, and likely a bit buggy, and has some missing content. I reused some assets from an old game for some bits, and I will change all those, and also I’ll need new music, although I might even buy stock music licenses for that. You may have noticed that I have not announced this game, let alone shown a screenshot or trailer, although I have a ton of screenshots and it sometimes looks pretty awesome in trailers. I’ve been working on it for about a year now, and do work on it most days. Its not a hobby any more.

I would LOVE to just announce it and paste some screenshots here, but I am teaching myself to be careful, and patient, and only do that when it is ludicrous not to. There is a lot of attention, and stress, and instant feedback you get when you announce a game, and TBH I am not really up to handling any of that right now. I guess most people would say they are exhausted or overwhelmed, and I probably am, but simply do not recognize that.

So anyway, this is the very start of 2025, and in theory this should be an easy year for me. The solar farm is almost 100% done and should just tick along and make me content and happy. I do not have any pressure to release a game this year, and I can chill out. Obviously I won’t chill out, so the nearest thing for me is to just work on the thing I am secretly very proud of, but not expose it to the world for judgement until I am 100% calm and content.

A lot of words to type to say ‘I’m working on a thing’ but I have spare time to type them :D.

An experienced coder’s approach to fixing business mistakes

I was the victim of an email today that was basically an invoice that was wrong. A company that has sent me a wrong invoice in the past has sent me it again another 3 times now, with increasing levels of angry demands and warnings about credit ratings. This raised my heart rate and anger level to extremely high distressing levels, but this is not a rant about how some companies are just awful, that would be too simple. This is more of an investigation into why stuff like that happens, and how software engineering can help you learn how to not fuck up like that.

I have been coding for 44 years now, since age 11. In all that time I’ve only coded in BASIC, C, C++ and some PHP, but 90% of it has been C++, so that’s the one I’m really good at. I don’t even use all of C++, so lets just say when it comes to the bits I DO use, I’m very experienced. This is why I’m using the term software engineering, and not coding or hacking, which implies a sort of amateurish copy-pasting-from-the-internet style of development. I’ve both worked on large game projects, and coded relatively large projects entirely from scratch, including patching, re-factoring and a lot of debugging. I coded my own neural networks from scratch before they were really a popular thing. Anyway…

Take the simple example of my experience today. An invoice is wrong, and sent to a customer anyway. This has happened three times now, despite the customer replying in detail, with sources and annotations and other people copied in, AND including replies from other people at the offending company who openly admit its wrong and will be fixed. Clearly this is a smorgasbord of incompetence, and irritating. But why do companies do this? what actually goes wrong? I think I know the answer: Once a problem like this is finally flagged up (which often involves threats from someone like me to visit the CEOs home address at 3AM to shout at them), the company ‘fixes’ the mistake, maybe apologizes, and everyone gets on with their life…

This is the mistake.

Companies want to ‘fix’ the mistake in the quickest, easiest and cheapest way possible. If an invoice was accidentally doubled, then they ‘go into the system’ (they just mean database) and they halve it. Problem solved, customer happy. Now I don’t give a damn about the sorry state of this company’s awful internal processes, but I am aware of the fact that companies like this try to fix things in this way, rather than the true software engineering way. So how SHOULD it be done?

Before I was a full time computer programmer I worked in IT. I had a bunch of jobs, gradually going up in seniority. I saw everything from ‘patch it and who cares’ mentality (consumer PC sales) to ‘The absolute core problem must be fixed, verified, documented and reported on with regards to how it could have happened’ (Stock trading floor software). I can imagine that most managers think the first approach is faster, cheaper, better, and the second is only needed for financial systems or healthcare or weapons systems, but this is just flat out wrong.

When a mistake happens, fixing it forever, at a fundamental level, will save way, way more time in the lifetime of the company than patching over a bug.

Spending a lot of time in IT support taught me that there are many more stages to actually finding the cause of a problem than you might think. Here is a breakdown of how I ended up thinking about this stuff:

Stage 1: Work out what has actually happened. This is where almost everyone gets it wrong. For example, in my case I got an email for a £1k bill. This was not correct. Thats the error. Thats ALL WE KNOW RIGHT NOW. You might want to leap immediately to ‘the customer was charged too much’ or ‘the customers invoice was doubled’ but we do not know. Right now we only know the contents of the email are wrong. Is that a problem with the email generation code? Does the email match the amount in the credit control database? Until you check, you are just guessing. You might spend hours trying to fix a database calculation error you cannot find until finally realizing the email writing code is borked…

Stage 2: Draw a box around the problem. This was so helpful in IT. Even when you know what you know, you need to be able to define the scope of the problem. Again, right now all we know is the customer ‘cliff’ got a wrong invoice. Is that the problem? Or is it that every invoice we send out is wrong? or was it only invoices on a certain date? or for a certain product? Until we check a bunch of other emails we do not even know the scope of the problem. If its systemic, then fixing it for cliff is pointless.

Stage 3: Where did things go wrong. You need to find the last moment when everything worked. Was the correct amount applied to the product in the database? was the correct quantity selected when entering the customer’s order? was the amount correct right up until the invoice was triggered? Unless you know WHERE something went wrong, you cannot work out WHAT or WHY.

Stage 4: Developer a theory that fits all available data. You find a line of code that seems to explain the incorrect data. This needs to not only explain why it screwed things up for cliff, but also explain why the invoice for dave was actually ok.

Stage 5: Test a fix: You can now fix the problem. Hurrah. Change the code or the process and run it again. Is everything ok? If so you may be preparing a victory lap but this is laughably premature.

Stage 6: Reset back to the failed state: Now undo your fix and run it again. Seems redundant doesn’t it? Experience has taught me this is vital. If you REALLY have the fix, then undoing your fix should restore the problem. Maybe 1 in a 100 times it will not. The ‘random’ problem just fixed itself for some indeterminate period. Your fix was a red herring. A REAL fix is like a switch. Turn it on and its fixed, turn it off and its broken. Verify this.

Stage 7: Post Mortem: This is where you work out HOW this could ever have happened. This is actually by far the most important stage of the whole process. If you just fix some bad code, then you have just fixed one instance in one program. The coder who made that mistake will make it again, and again and again. The REAL fix is to make it IMPOSSIBLE to ever have that error again. This takes time, and analysis. The solution may be better training, or it may mean changing an API to make it impossible to process bad data. It might mean firing someone incompetent. It might mean adding a QA layer. Whatever the mistake was, if you do not go through this stage, you failed at the task of fixing the problem.

Coders and organizations that work like this have fewer bugs, fewer mistakes. They need smaller QA teams, and less time devoted to fixing mistakes and implementing patches. Their complaints department is tiny, and yet still provides great communication, because there are hardly any complaints. In short, companies that run like this are awesome, popular, profitable, and great places to work. Why is everywhere not like this? Because it requires some things:

  1. A culture of giving people fixing problems free reign to follow the problem everywhere. If only the department that sends the emails is allowed to get involved in complaints about email, database errors or coding errors will never get fixed because they CAN never be fixed. The phrase ‘not my department’ needs to be banned.
  2. A culture of accepting that someone is STILL working on a proper fix, even after the complaint has been handled and the customer is happy. When there is a bug, there are TWO problems to fix: the customers bad experience AND the company process failure that allowed this. Managers who pull people away from bug-fix post-mortems to fix the next thing right now are a curse.

Of course your mileage may vary. Be aware I am a hypomanic workaholic who works for himself so my ‘advice’ may not be applicable to everybody, but I hope this was interesting and thought provoking anyway. Too many coders are just copy-pasting from stack overflow or asking chatgpt to quickly patch their bad code. Working out how to fix things properly is a worthwhile pursuit.

First full solar month stats

Ok, the sun is still in the sky, but its late enough that I am going to declare November over now, and blog about my generation from my solar farm. First here is the exciting main chart thing:

So thats 34.2 MWh, or to put it in rooftop-solar or home-energy terms, 34,248kwh of lovely renewable green solar power! Not bad I think for a pretty wet, cloudy November in the UK. June in the Sahara desert would be different…

A crude extrapolation to 12 month would give 410MWh which is obviously way too low. I am expecting more like 1,000-1,200 MWh for the whole year. If I can get 1,200 that would be nice, and I would not worry too much about the business case for the whole thing. However that depends on the ongoing costs. I am still comparing quotes and discussing ways to cut that. The actual annual sums for each individual component always seem reasonable, until you multiply them by 25 years…

I do have some other software that analyses the output and gives an estimate of how good or bad you generation has been. That software suggests that November output for me has been noticeably better than expected, but you shouldn’t get too excited extrapolating from a single data point. Lets not forget the panels are new(ish) and clean(ish), and that will not always be the case. The real reckoning will come after a full years generation and operations.

In other news, I got paid! So its only for part of October (we had some downtime, and also did not switch on until the 4th) but the money turned up in my account on time and the right amount, which is never something a small business can take for granted. If you are a UK residential electricity customer of OVO, then I am providing some of your power :D. I get paid for the power plus VAT (sales tax in UK of 20%) so I have to pay that tax to the government (useless busywork!). It definitely feels good to have even just this ONE entry in the company accounts that is green instead of red!

Global investment and the coming chaos

When I am not making games or building a solar farm, I am quite into investing on the stock market. I am NOT a day trader, but over the years I have built up enough to invest that it does require me to constantly keep an eye on stuff. I also like reading about the world, and technology, and politics, so it fits in nicely. As a result I spend a lot of time thinking about where to invest.

Investing is super hard, because it involves keeping emotions in check (hard), being objective (hard) and for best results, being happy for absolutely everyone to tell you that you are wrong (I find that quite easy tbh). It also involves a lot of risk, and you have to be ok with all of that. Plus it involves a lot of checking numbers, and being objective, and not making panicked decisions.

Because I think that short term swing/momentum/day trading is more likely to result in losses than gains, I focus on picking shares that will give me a decent return over the next 1-5 years. I have found this is the approach that works best for me. Its certainly not as EXCITING as day trading, but I actually want results, not a sugar rush. So I find myself thinking hard about what the future may bring. Ultimately I am a value investor: I am buying stocks where I think the underlying company will be very profitable in the future. I DO hold some dividend stocks and bonds, but most of my picks are for stock-price-growth, where I assess that a company will have rising profits in the next few years, and I will sell once the stock price catches up to my point of view.

Individual companies can be very good investments, regardless what the people selling funds and generic investment advice tell you. If its obvious that 50 of the stocks in the FTSE100 are rubbish, why would you want to own ANY of them? If your funds are limited, indexes and funds might make sense, but when you are able to pick 50-100 stocks, its worth taking the time to pick winners.

So anyway, with all that in mind, what am I currently thinking about when it comes to upcoming events and themes that might influence investment? I have a bunch of ideas:

  1. The decline of the USA : This is quite a big one, and probably very triggering for people who live there, but I think USA in 2024 is the UK in 1930s-1940s. A big global superpower that has not yet realized that it is screwed, despite all the signs being there. The US has incredibly tribal politics, huge social-division, bad levels of skills/education, bad infrastructure, a colossal debt problem, and a bad global image. Sure, the $ is a popular global currency for now, but in 5,10,15 years? I think China is clearly overtaking the US in everything that matters. I also think the US is so focused on its own awesomeness that they will not manage the decline well. I am hugely over-invested in US stocks but will be diversifying out of there.
  2. Clean Tech Revolution: The entire planet will embrace electric cars, solar & wind power, battery storage and heat pumps. Nuclear Fusion is too late, too pricey and too concentrated. There is no stopping this transition now. Along the same lines we will likely see a global transition away from meat consumption towards vegetarian or vegan diets. Thats a movement that is just too big and especially too popular with the young for it to be stopped.
  3. Rise of Asia: I mostly focus on China. The predominant view in western media is filtered through frankly xenophobic and tribal hatred of China in the US media. But the Chinese are starting to lead in tech, science, infrastructure, and geopolitical influence as well as manufacturing. They even have their ow space station, something the USA cannot afford. I do not expect war with Taiwan, but I expect savvy Chinese leaders to rattle just enough sabers to keep bankrupting the USA with its ridiculous military budget
  4. New Space Race: Not just spacex, but a whole range of new space startups is revolutionizing our capabilities in space. Starlink is the first tangible benefit but there will be more. Space Tourism will be one part, but zero-g manufacturing may well become a thing for some specialist pieces of technology. I fully expect all major cabled telecoms links to be replaced by satellite networks soon. Its just so much simpler.
  5. Fall of Russia / Chaos in Europe: Russia will have a messy transition when Putin dies. The country is not in a good state, but cannot be allowed to collapse into chaos because it has nukes. I can imagine a world where Europe steps in to handle the transition, in a similar way to the handling of eastern-european ex-soviet countries after the USSR collapsed. It will be messy and awful. I do not expect the UK to rejoin the EU, so we may escape some of the costs. It will be tough
  6. Climate Chaos: Insurance companies are likely screwed. We have been lucky so far but one day a big hurricane or flood or other climate event will wreck a big famous city. Might be New York, might be London. Who knows. Impact will be extreme. I will not buy insurance company stocks. Also worsening weather will destroy so much food production. I sometimes speculate on commodity prices to play this, and may do more. Global food price rises may destroy fast food chains, when people can barely afford the ingredients and cut back on dining out or takeaway food out of necessity.

Thats my list for now. I also have a speculative investment in quantum computing, just in case it really becomes a thing. I also expect AI and robotics to be big, so hold a lot of AI/Chip/Robotics stocks. Those are quite trendy though, so those investment ideas are less contrarian.