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

A side effect of a potential AI mega-bubble. Maybe do not buy a house?

Nobody should take financial advice from a dude who often writes sarcastic nonsense about star trek, and whose financial background is… guitar teaching and boatbuilding, but on the other hand if you are here, and reading this, then you probably know a bit about me, and know I at least put some thought into these posts. Maybe this is all BS, but maybe it isn’t. Enjoy…

If you are someone who thinks AI is a bubble, and that it will pop soon, and its no different to NFTs, VR gaming or 3D TV, then you might as well quit reading now. This is not a blog post about how AI will change the world and usher in a star-trek like future of abundance and happiness. I actually think it MIGHT do that, but my main thrust here is the financial implications for somebody reading this in their twenties. If you are in your thirties, you might be in house-and-kids mode, and this advice might be useless for you. If you are older still, then it may be even less relevant. It also may sound insane, or scary, but at the least I hope it will be interesting.

I’m 55, I bought a house about 25 years ago. It was hard saving up the deposit for a house, and at the time, we thought house prices were insane, and stupid, and hated knowing we were probably buying at the top of the market. Ha ha. We were not. My first house was a 3-bed semi-detached house costing £98k. It wasn’t anywhere special, but it was ok. I think it had tripled in value when we sold it 10 years later. So far, a typical smug boomer story about how cheap houses were back in my day. Feel free to hate me.

People my age got used to the crazy certainty that house prices only went up. Many became ‘buy-to-let landlords’, and the default retirement plan was to buy a second home, rent it out to some poor young person who couldn’t afford the now much bigger deposit, and enjoy the fat easy profits. As someone who came from a pretty low income in my twenties (boatbuilder), I hated this and never did it, but I noted the phenomena with interest. Almost nobody ever revisited this core belief: that getting a mortgage was always an excellent investment. Nobody ever looked at a spreadsheet or did any maths. You just invested in property. Safe as houses.

I was recently chatting to friends about stock market investments. I do a lot of investing and trading. I love it, and have done well from it. I enjoy debating it and discussing it with people. I am however aware, that the advice you give people has to be tailored to their circumstances. I invest in some really risky stuff with money I can afford to lose, but many people cannot (obviously) afford to lose *anything*. How do you give advice to people in those circumstances? Its hard. But the very fact that you then find yourself recommending really ‘safe’ investments with really low returns (but little chance of financial ruin) is kind of depressing to me. I get WHY people do this, but on the other hand its just perpetuating inequality. People on low incomes pick safe investments and make bad returns, while the real mega-gains are effectively ‘reserved’ for people who already have enough money to take the risks.

In the UK we have official terms such as “self-certified sophisticated investor” and “high net worth individual”. These are terms used in financial services to basically fence-off some risky investments so that only people who are either very familiar with financial systems, or who have quite a lot of money, can invest in them. Sure, I get it. Nobody wants a system that robs people on low incomes of everything they have, but part of me hates how those amazing companies that go up 900% in a year only have investors who were already rich. Surely this is kind of fucked up?

Ok, so back to AI, and buying a house (or not). How is this relevant?

When I was saving a deposit for a house, I think we needed a minimum of £5,000 ($6k). That was between two of us. This seems laughably low now (it was 25 years ago remember). I did some research. In the SE of the UK, the average first-time-buyer house deposit now is £60,000, which is 110% of the average salary. This is huge. This is insane. Who can afford this without wealthy parents ‘helping them out’? Neither of us had wealthy relatives. We had to pay the rent AND save enough money. Who can save 110% of their salary? Thats salary, not take-home pay…

What I’m thinking… is that this might be a BAD idea anyway. Not just because its a ludicrously high amount, but because the return on investment from property might not be that great. In fact, in the SE UK over the last 3 years the average house price rise has been 1.9%. Yes ONE POINT NINE PERCENT. I think you can see where I am going here:

Nvidia stock over those 3 years rose 1,103%. If you were boring and just picked the S&P500 its up on average 19% per year. So even if you had NO idea what to invest in, and just picked a US stock fund tracking the biggest names, you would make ten times as much money than if you have bought a house. And to add to this, you can invest a small amount (probably you need $1k to avoid mad fees), and build from there, unlike a house, where you are either buying the whole damn thing or not. Oh and by the way, the interest on the rest of the house cost is WAY more than 1.9%.

Thats the last three years, and the stock market has done ‘fairly well’, but there is a good chance its about to go really bananas, if AI lives up to its promise, and results in huge economic growth. If you pick wisely, you could get way more for that ‘house-deposit’ money if invested in stocks than you could ever hope to get from house prices rising. Now I get it, this might sound like the idle musings of some arrogant ass who owns a house and is going all ‘let them eat cake’. I hope not, because its not like I do not understand the financial struggle when you want to buy a house. I totally remember paying rent for an AWFUL flat, which was freezing cold, and saving up our money to try and get enough to buy our first house. We searched for ages, and they were all awful, until we lucked into finding one that looked awful at first glance (someone had died, and the interior decor was….bad), but was easy to do-up. I have no idea how many houses we looked at…

But anyway, my point is aimed at people who SOMEHOW manage, through hard work and effort to scrape together the money for a deposit for a house whilst working and renting, just to say *actually this might be a really bad investment right now*. Now I understand that renting sucks, and you want to own a home, and are not thinking about investment but… make the right decisions now, before AI goes insane, and it might prove to be the best financial decision you ever make. Wait a few years, watch those investments outpace house-prices, and THEN buy…

I get that this might sound crazy.

But think about it unemotionally. Don’t think about emotive terms like ‘my own home’ and ‘what we have been saving for’. Just think about the numbers. You have the largest single sum of money you have ever accumulated. You saved it up for a house, whose value will accumulate at 1.9%. Or you can invest it (with careful research!) into the stock market just before AGI and humanoid robotics and self driving cars became popular. And obviously this assumes you already have somewhere to live (either rented, or with parents etc). Yes there is risk, but there is also no guarantee house prices will always rise.

Food for thought. But this is just a thought experiment. Do not blame me for any financial decisions you make! And think carefully and analyze everything, and discuss with friends & family! I will just point out that I am a game developer and solar farm developer. I’m not trying to sell you stock market advice, and have no financial interest in what you do. But do look at the numbers. Always look at the numbers.

New power-purchase agreement signed

I haven’t blogged about the solar farm for a little while because to be honest there has not been much to report (which is good! this is supposed to be a very stable low-maintenance project!) but I thought I would briefly update the blog to mention communications upgrades and a new PPA.

The site has multiple means of communication, because we need to be able to connect to, and monitor the CCTV cameras, we need reporting from the meter that actually determines how much we get paid (which is reported by a neutral 3rd party who charge a frankly comical amount just to read a single number every 30 minutes and report it), and we also need (or rather we like to have…) reporting from each inverter on the site to tell us the status of each inverter, and indeed each string. When I share the really cool charts and breakdowns with a ton of data, thats from the inverters. This measures DC power, at the inverters, before its converted and then sent some small but noticeable distance along underground cables to the site substation containing the site meter. Because some power is lost in conversion and transmission, the two meter readings are not the same.

Anyway… all of that stuff has to communicate off-site somehow, and its all routed through an aerial on the top of the substation. Its a bad aerial, and it uses a mobile phone connection which sucks. The site is somewhere quite remote and mobile phone coverage isn’t that good. As a result, often the signal is below 25% strength, and we get gaps in the data. The final generation readings are always there, but losing ‘sight’ of the plant is no fun, so we recently had all that comms stuff upgraded. The site now has a constant 48-49% signal strength which is good to see. This cost me unexpected money, but coincided with a maintenance check so the costs of sending people to site were not included.

In other news, we have signed a 2 year PPA (power purchase agreement) again with Ovo. That starts in November and runs out in November 2027. At that point we may stay with them, or switch if anyone offers a higher rate. One of the perverse things about owning a power station is that prices change every 30 minutes, but when you agree a price, it will then be fixed for years. Its tricky, because you are basically watching a fluctuating stock-ticker like price, but where you have to MANUALLY email people to ask for new quotes, and then pick your moment. There are services that offer more visibility into price trends, but I can’t afford them really… You can get 1 year, 2 or 3 year PPAs. I chose 2 years as the 3 year price looked pretty low :(.

And to be honest the actual ‘energy’ price part of it is only about 65-70% of what you get paid anyway. Some of it is benefits accrued through being a remote site, or a site where extra generation is beneficial, and some of it is discounts for having consumption near generation (so you put no strain on the distribution or transmission lines). Basically if you can find a site on some remote island with tons of local businesses and houses needing more power, then go for it. Anything to avoid upgrading the transmission network, apparently! How exactly you are supposed to guess those value pre-build is beyond me. There are probably expensive consultants, or you have to know who to ask and how to ask it.

Price-wise we are roughly the same as we were for our first year. Its… ok. Its not going to make some huge ROI, but its not losing us money either. I did actually pay out some actual company dividends for the first time (OMG), although it will be another few months until I can look at proper accounts and do a real analysis of whether or not we make enough in profits to make that an annual thing… I think larger sites have way better economics.

Designing the orders system for ridiculous space battles

Yikes, this has turned into a really complex and confusing beast. I am very happy so far with the improvements, but I need to publicly brainstorm the details. Simply put, the orders system in Gratuitous Space Battles was a mess, and I needed a much better one, PLUS I wanted to add new orders to take into account the new gameplay style of Ridiculous Space Battles.

In GSB there was a whole bunch of orders, and they all apparently pretended to work together to come up with an opinion on which ship a weapon should target. Orders are per SHIP, not per weapon, which frankly is a whole other story, but I think it would be stupid overkill to have the player assigning different orders to every weapon. My whole unique selling point is BIG fleets with LOTS of ships. Anyway, the original game had orders like Attack Fighters and Co-operate, but it was never clear how they all worked together.

RSB introduces three new orders entirely. Raider (race ahead of the fleet up to a given distance to engage enemies) which is used by Fighters, Last Defense, which concentrates fire on the enemy ships that have got the furthest through our lines, and Breakthrough, which is for punching a hole in enemy defenses, and only fires on ships right in front of you (or in that row anyway).

Here is my new current implementation:

So the big things here are categories, color coding and priorities. OH YES. To explain, this ship has one ‘Special’ Order, which is to engage enemies at 2 squares range. Thats a movement order, so independent of all the targeting stuff.

The next order is ‘co-operate’. Its one of a class of (blue) orders I’m tempted to call ‘Discriminators’ or ‘Tie-breakers’. There can only be ONE of these (Co-operate, Vulture, Retaliate, Breakthough or Last Defense), and essentially they are used at the end of the process to choose which out of a series of potential targets is picked.

The Green and yellow orders are Target Criteria. They describe a target size class or a defense status (shields up, or shields down but armor intact, or down to naked hull). These orders are special because they are in priority order. (I realize now I should show the numbers!). So when the ship decides who to shoot at, it first builds a simple list of all enemy ships in range and fire arc, that match any of those criteria. (You can delete one to make the ship NEVER target those ships). Once that list exists, it then goes through the target criteria from top to bottom seeing if any ships meet that criteria…

And this is where I have a decision to make…

I can either stop the processing once it has one or more targets, then pick the best using the discriminator OR I can then keep filtering down through the list as long as I have 1 or more targets and THEN use the discriminator. I cannot decide which. Are you confused? I suspect so:

Example 1: Using the above orders, I scan my target list and find 4 cruisers and 12 frigates in range. All of them have shields. Cool! So I stop there, and evaluate them all using Co-operate, firing upon the one that is the most under fire right now.

Example 2: I scan my target list and find 4 cruisers and 12 frigates in range. All of them have shields. The NEXT criteria is Fighters. There are none in my list so I ignore. The next is armor. All 16 have armor so again I ignore. The next is Frigates. Wait! only 12 are frigates, so I prune the list. The next is Hull, all check. The next is cruisers, none found. I finally use co-operate to evaluate which frigate to fire at…

Is this dilemma even making sense, let alone deciding on a system? Its very involved. My game IS a complex strategy game, but I don’t want to rely on crazily complex tutorials. Now to be fair, Gratuitous Space Battles had a completely opaque system that nobody understood and was poorly explained and it sold a bazillion copies, so maybe I am overthinking it. But I would like to do a MUCH better job… I know SOME players would be happy to literally write code to control this stuff, and might suggest I add conditional clauses and other complexity but I think that makes the game seem more like work and less like fun…

Looking at it now I KNOW I need to add priority numbers to those yellow/green strips. Maybe they should be called Filters now Criteria? Who knows. I may need to think about this a LOT.

By the way add the game to your wishlist :D Or pester a news website to cover it! Or share a screenshot somewhere you hang out. That stuff all helps :D.

Are all modern entertainment/global careers impossible now?

I’ve been thinking about this for a week or so. I had a bit of an epiphany when it came to how hard it to make a living from video games, and also as someone who was a musician (briefly) and who is well acquainted with a novelist. If you have ever tried to make a career out of making your own video games, music, writing or art, then I suspect you are aware that it is hyper-competitive and very hard to make a living. I suspect its going to get way, way worse, and its got absolutely nothing to do with AI. Just a matter of population, scale, choice overload and numbers.

First I have to burst a bubble. You are not special. You might *think* you are, and everyone ironically thinks they are both special and has above average IQ. To quote the crowd chanting in unison in a classic monty python film “We are all individuals”. In reality, you, or more specifically your tastes are not individual. At least not to the point where it really matters given the problem of choice overload.

When I was a kid, there were 3 TV channels. Just 3. I remember watching the first ever show to be broadcast on channel 4. (It was countdown). These days we have blasted way way past ‘too many channels to count’ and we now have streaming and youtube. The amount of content available for me to watch right now is staggering. The problem thus becomes not one of availability but discoverability. There MIGHT be a youtube channel you would like 5% more than the one you are about to watch, but will you spend 8 hours scrolling to find it? As someone who sells games, I know you will not. In old language, being ‘above the fold’ was how you got noticed. (This is from which news stories you could read on a newspaper that was folded to fit in a display stand). These days being on the front page of steam is a huge big deal. Being on page 2 is way worse. On page 199 you might as well not exist.

There is a limit then, to how much effort we will go to in order to find something that suits our tastes. Given 20 choices, we probably pick the most suitable. We do not go looking for 100 or 1,000 choices. This is just human nature and probably a survival instinct. Maybe buffalo #199 has more meat on it, but if we don’t decide to hunt one of the first 20 we find, we will lose the light and go hungry?

So given that we do not have hyper-individual tastes, and that choice-overload funnels us into one of the top 20 choices anyway, what are the implications? Well the implications are awesome for a tiny tiny tiny tiny proportion of content creators, and catastrophically terrible for everybody else trying to make a living. And frankly, I think there is no solution. Let me explain with some illustrative numbers.

The year is 1546 and lute-playing is the new hotness. There is no ability to record music, and no powered amplification. The lute can be heard in just one room, so maybe 50 people can attend a performance. A lute is an expensive instrument few could afford anyway. A roaming lute pop-star has to travel by horse or donkey and cannot cover that wide an area. Perhaps you are the best lute player in somerset, and wildly reknown among the locals for your l33t skillz. You earn a reasonable living. There are rumors of even better lute players in Wales, Scotland, the Midlands, Kent and Sussex, but thats many days ride away so they will never come here. You have a decent middle class income, and are ‘pretty good’ at the lute. Life is good.

The year is now 2025 and Taylor Swift is a huge pop star. Recorded music is available and ubiquitous, deliverable to almost everyone on the planet. That population has grown by 1,632%, but thanks to the power of amplification and global media delivery, Taylor Swift can perform all over the planet, often to crowds of 90,000 or more in one night. Even if there were no recordings, she can entertain >1,500 times as many people as the lute player. The potential ceiling for revenue from entertainment stardom is staggering compared to 1546.

But hold on, with a huge global population, surely the industry can now support way, way more people than it did back in the lute days? NO. In fact probably FEWER people as a percentage of the population. In 1546 our village needed our local lute player, because local was all there was. But in 2025 Sting can ‘entertain’ people with his lute playing on a global scale. People are still being entertained, but they have not taken advantage of the global growth in population to have a larger number of ‘entertainers’. They do not need them. There is already enough choice. Way, way too much choice. We used to just have Joe ‘the lute guy’. Now we have more than 20 lute players. Enough already.

So what does this mean as we extrapolate forwards to an even more connected world and an even more global culture (witness the rise of kpop, and korean TV dramas like squid game, both relatively new, and the global rise of anime, again in global terms very new)? It means that the top 20 choices of anything can (and will) dominate the entire planet. Thats depressing enough as it is, but it gets worse than this. Because the population goes up, but the number of megastars we support doesn’t seem to change, it means the standards go up, and up, and up, until frankly you have to be a genetic abnormality, have serious obsessive mental health issues, or a staggeringly lucky combination of the exact zeitgeist skills and looks and charisma to even have a chance of being in that top 20.

Top athletes do not have much of a social life. How could they? Competition is extreme. Top models have basically never eaten a cake. Top musicians are absolutely oblivious to anything that is not a metronome or a practice schedule. Top artists have, for a very long time, been people who have a smorgasbord of issues you would not choose, but have the fortunate side effect of helping them create great art. Van Gogh was not a chill dude with work-life balance. This applies to entrepreneurs too. Elon Musk is clearly staggeringly brilliant and hard working, but also unimaginably stressed, distressed and in need of serious psychological help. Do we really think that is uncommon? Social media heralded a mass wave of ‘cancelling’ as people suddenly had access to the personal opinions and thoughts of celebrities who have a tenuous grip on reality, and the world outside their profession.

So my unfortunate and depressing conclusion is this: Global population growth and the persistence of choice-overload are combining to ensure that the standard of work required to be successful in entertainment is so high, that only people who dedicate every waking moment to it AND who have some sort of natural/genetic ability or mental health issue that helps them work can possibly, ever hope to succeed. And obviously as the standard at the top rockets up, the standards at all levels also rises alongside them. Can you have work-life balance and a career in writing/art/music/indie games? Of course not.

My first released indie game in 1997 was ‘Asteroid Miner’. It was on the front page of ‘download.com’ the biggest download site on the entire internet, for a week or so because ‘Look! someone made an asteroids game in color’. Its 2025 now and getting to the front page of steam (just one of many games stores, let alone stores in general) is staggeringly, impossibly hard. And it will only get harder and harder from now on. This is what it took in 1997:

Now the cheerful bit!

Do you want it though? If you have to become such a tortured soul, so in pain, so obsessed, so focused in order to ‘make it’, then is the price worth it? How many rock stars drunk or drugged themselves to death. Do you want to be Kurt Cobain? Do you want to turn out like Michael Jackson or Elvis? Do you want to be Elon Musk? That level of fame and recognition is impossibly hard to deal with *even for people with perfect mental health*. Be aware that when you look at people who are hugely successful in the entertainment field you work in, these people are often ill, unhappy, stressed. That might be the price you have to pay. It probably is not a price worth paying. You can get a lot of happiness and fulfilment by having a normal career and making games/writing books/making music as a hobby. Its probably a much more balanced and stable life.

And yes, I know that I have sold a ton of games and obviously done well, and don’t want to come across as telling people to give up on their dreams. I’m not the worlds perfectly balanced mental health exhibit either. I’m an anxious, stressed, hyperactive workaholic who finds it almost impossible to relax. Not many people would choose those characteristics, even it meant selling more games.

Coding a load-balanced multithreaded particle system

Background: I am coding a 2D space-based autobattler with ridiculous levels of effects called ‘Ridiculous Space Battles‘. I code my own engine, for fun, in directx9 using C++ and Visual Studio.

Because I love coding, yesterday I found myself wondering how well the multithreading in my game was holding up. So I fired up the trusty Concurrency Visualizer in Visual Studio. I love this tool and have used it a lot on previous games. One of the biggest demands on the CPU for my game is particle processing. There are a LOT of explosions, and other effects, and a crazy number of particle emitters (thousands of emitters, hundreds of thousands of particles). Obviously this would normally be a code bottleneck, so I have a task-based generic multithreading engine that handles it. The main thread builds up a bunch of tasks, the threads grab the next task on the list, and the main thread will wait until the task list is empty. If there are still tasks in the queue, the main thread will do one as well. So how did things look?

Disastrous!

So what is going wrong here? I have a generic ‘marker’ set up to show the span of the main thread’s drawing of the game (GUI_Game::Draw()). Inside that, a bunch of unlabeled stuff happens, but I added spans to show when the multithreaded task called UPDATE_PARTICLE_LIST is called. There are two massive things going wrong here. Firstly, there are only two other threads joining in to process the particles, and secondly one of those updates seems to take 20x as long as the other. Worse still, its the one the main thread chose… so its a huge bottleneck. Technically this is still a speedup, but its marginal. How have I fucked up?

Some background to my rendering algorithm is needed: The game has 2 blend modes for particles. A ‘Burn’ mode, that saturates color and is used for fire, lasers, sparks etc, and a ‘Normal’ mode for smoke and debris etc. The particle effects are batched as much as possible, but I cannot mix those blend modes in a draw call. Also, some particles are below the action (the ships) and some above, to give a semi-3D look and make it look like the explosions engulf the ships. So this means particle emitters fall into one of 4 lists: NormalBelow, BurnBelow, NormalAbove, BurnAbove. This is all fine and works ok. In action, the game looks like this:

Because you can freeze frame and scroll around, everything has to be properly simulated, including particle effects currently offscreen. Anyway it all works, and I have FOUR particle emitter lists. So naturally, to load-balance everything, I gave one list to each thread and considered the job done.

BUT NO.

It turns out that those 4 groups are not equal in size. They are laughably unequal. The ‘BurnAbove’ list contains all of the fire and spark emitters on all of the pieces of all of the hulks from destroyed ships, plus sparks from fiery plasma torpedoes, expended drone explosions, and missed or intercepted missile explosions. Thats MOST of the particles. When I checked, about 95% of particles are ‘BurnAbove’. I had 4 lists multithreaded, but they were not vaguely really load balanced.

Once I realized that the solution was theoretically easy, but fiddly to implement and debug. I decided I would add a new load-balanced list system on top. I created 8 different lists, and when an emitter was created it was added to the ‘next’ list (the next value circled round through all 8), and told what list it was in. When it was deleted, it was removed from the appropriate list. Note that ‘deleted’ is a vague term. I delete no emitters, they get put into a reusable pool of dead emitters, which complicates matters a lot…

So in theory I now have a nice load-balanced series of 8 lists that contains every particle emitter that is currently live. The original 4 lists are still valid and used for rendering and blend mode data, but this ‘parallel’ list system existed alongside it, purely to handle load-balancing. What this means is, that a load-balanced-list may contains particles from all 4 render groups, but this does not matter as I am running update code on them, not rendering!

It didn’t work.

Crashes and bugs and corrupt data ahoy. I worked on it for ages, then watched a movie to try and forget it. Then this morning, after some digging, it was all fixed. What actually was going wrong was related to smoke plumes. Because there are a lot of smoke plumes, and they always reuse the same particle config data, they exist in a separate system, updated separately. I had forgotten this! And what was happening was my new load-balanced lists stupidly included these emitters when they should have been kept out of it. The emitters would expire and be deleted in the multithreaded code, then later accessed by the plume code. CRASH.

I worked it out this morning before breakfast! I was very pleased. You might be thinking, what about the only 2 threads thing? LOL I had hard coded the game to use maximum of 4 threads, probably as a debug test. Idiot. I just changed it to be 10 and everything worked:

This is more like it. I wasted ages trying to get the dumb concurrency visualiser to show my custom thread names instead of ‘Worker Thread’ but apparently thats the category. Not much help. FFS show us the thread names! (They work in the debugger). But anyway, that image above is a snapshot inside a busy battle for the GUI_Game::Draw() showing how UpdateParticles tasks get spread over 8 threads. I’m still not sure why that sixth thread misses out on a task, which gets nabbed by the main thread…

Anyway, the point is it works now, and in theory updating particles is 8x faster than it would be with single threading. I do need to apply the multithreading to a lot more of the game code to get the best possible results. I am testing this on a fairly beefy GPU and CPU (Ryzen 9 5900X 12 Core @3.7GHZ and RTX 3080) in only 1920×1080 res. I want the game to look awesome at 5120 res or on a five year old cheap laptop, so plenty more to do.

If for some reason this tips you over the edge to wishlist the game, here is the link :D.