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

Thoughts after 5 Years using a pure electric car

I’ve written in the past about buying an electric car, and running it, and what I think, and today to the day is five years since I took delivery of it, so a good time to write down how its been to be driving pure electric all those years.

I drive a 2015 Tesla model S 85D. They don’t make that precise model any more, its kinda of mid way between the low end and high end dual-motor model S. That means its very high performance, but its not ridiculous high performance like you see in youtube videos. For those who care, its 0-60 is 3.8 seconds, and its 518 horsepower. Thats a lot of horses.

When I bought it, this was not only the most expensive car I had ever bought, it was TWICE the cost of the most expensive car I had ever bvought. It was the second time I’d bought a new car, going from a small hybrid lexus to a big pure-electric tesla. I absolutely loved it the minute I got it.

The first thing to mention is that its not exactly the same car as when I got it. I had a few people use my referral link to buy cars so I got given 2 kids-size teslas (one I gave away to charity, one is in my office) plus some ‘arachnid’ wheels, which I guess look a bit cooler. I mostly got em (for free) because it was a plot point in an episode of silicon valley.

As well as getting new wheels, very very recently I gave in and upgraded the screen and the media-computer in the car. TBH this is overpriced (£2k), but in my personal experience was worth it. The graphics chip in the original 2015 model S was just too crap given the insane size of the screen, and it also meant that the screen could be buggy, voice-response was spotty, it was prone to the odd bug (unconnected to the actual car, you can even reboot the media unit while driving…)

Early Teslas like mine have a tendency to flake out due to an old chip that needs replacing. Theoretically you can pester tesla to replace it under warranty, but that leaves you with the same GPU and screen, and I was happy to pay for an upgrade.

During the time I’ve owned the car, thats pretty much all its cost me. Its been serviced twice (in FIVE years), and both times nothing was wrong at all. They check brakes and so on, but with a pure electric car the brakes are used very rarely due to the regen braking. The car has been for an MOT test once, and passed perfectly. It *did* need the front door handles replacing in the first year, but that was under warranty.

TBH the biggest cost of owning the car has been accident-prone driving and having it cleaned. I got a bunch of scrapes and a small dent in the first year, which needed a specialist body shop because the body is aluminum. Then last year I spectacularly screwed up by reversing when the front of the car had settled (air suspension down) onto a kerb by a parking space, which practically pulled the whole front of the car off. Ooops. That was pricey. My fault… BTW insurance is still stupidly low, about £470 a year, even after I recently made a £2k accident claim for the bumper thing. (I’m 51 BTW which likely reduces my insurance cost, also rural UK has less auto-thefts).

shiny body, fancy wheels…

The only other issue I have had is that the glue that the number plate is stuck on with started to fail slightly after four years, so it slightly bent outwards (not really visibly), and this interfered with the calibration of a parking sensor. I ended up just screwing the number plate on myself instead of relying on glue (you cant really tell). The cleaning cost is due to it being aluminum and not really safe for automatic carwashes. I get someone to come to my house, to save me time. Its expensive but super worth it.

In terms of experience, the car still feels like new. If I’d never seen one, and it was delivered to my house tomorrow, I’d assume this was an amazing cutting edge high tech supercar released in 2020. Its still pretty much unbeatable. The new model S has more range, and you can pay more to get the 0-60 time even quicker, but honestly who cares. This one is dangerously fast as it is. The range in practice is about 240-250 miles, given British weather and roads, and TBH thats fine for me. I’ve never really found myself cursing its range. Supercharging is fast!

When we first got the car, the supercharger network was very limited. Since then they have added a bunch, especially on the M3 and M4 motorways, which I use now and then. Sadly the really new superchargers use a different standard, and although I *could* pay to have mine adapted to the new ones, I likely will not bother. In addition to the supercharger network getting better, they have also released a stupidly long list of software upgrades to the car. It has numerous silly and cool features I won’t bore you with it. All software updates are always free.

Elon Musk Promoting "Lifestyle" Not Climate Help, Says Singapore - Bloomberg

Luckily, as an early buyer, my supercharging is also free for life. This sounds amazing until you do the math. Filling up my car paying retail (5p/kwh) electricity costs me £12.75. That gives me about £0.05p a mile to run. Superchargers cost more, but you use them really rarely. I reckon that perk earns me about £100 a year tops. I also get free premium connectivity (free Spotify with voice control!) which is actually more valuable I think.

In terms of reliability, performance, and general driving experience, the car is as awesome as when I bought it. There are no discernible squeaks or creaks or bumps. It feels new. An app I have on my phone (tesla core) says my battery degradation after 5 years is 2.69%. Yup, 2.69% of battery capacity lost over five years… BTW I’ve done 38,000 miles so far.

I guess the best question to ask someone in these circumstances, is would you make the same choice again, and will you keep it? To the first, The answer is actually….not sure. I Bought mine because the Tesla model 3 was not out in the UK at the time. I live down single-lane dirt track roads and the model S is WIDE and LONG for rural UK. But thats the ONLY reason that would make me choose the 3 over the S. I also really like the big dual-screen setup for the model S.

We do not yet have the Tesla model Y in the UK, but when we do, I may be very tempted to trade in my car for that. My model S has lost roughly half its value in 5 years, which means its still quite a chunky trade-in value if I wanted to swap to a new model Y. I’d do this in order to get the new autopilot hardware (something too involved to upgrade for mine), and dramatically longer range and charge time, and also the much smaller car. I would miss the dual screens though, and probably be a bit sad to lose free supercharging and connectivity. ho hum. Mine is also a ‘panda-nose’ early model, might even be considered vintage one day…

I do have to say that there is NO CAR on the market other than a tesla that would vaguely tempt me away from what I have. If I won a Porsche taycan in a lottery I’d sell it the next day, same with the Audi e-tron or anything else. The supercharger network + autopilot is a complete game changer, and only Tesla has those. I’d never even consider a non-electric car of any make or any value. Smelly, unreliable, expensive to maintain, awkward to fill-up, less safe and more expensive to run, plus they belch out fumes and contribute to climate change. No thanks.

Hollywood and Gaming is a tale told by an idiot, full of sound and fury, Signifying nothing

Look at me, I know some shakespeare. Actually I probably got it from star trek, whatever.

For my sins, I enthusiastically agreed to watch a movie on the Disney channel (gotta make that Mandalorian subscription worthwhile) for kids called Artemis Fowl. Its a sort of harry-potter meets enders game action adventure about faeries. yeah. I didnt know that when I agreed to watch it. But apparently a popular series of kids books, so there ya go. Harry potter was ok, even His Dark Materials is kinda ok, in a generic lord-of-the-rings clone kinda way so this will be fine right?

No, it was BAD. it was REALY REALLY BAD. I’m not the only person who thinks so. I could whine about the plot, and the script and the casting and the voices (TBH the actors did their best), but what really ruined it for me was the budget. The budget was way TOO BIG.

Judy dench and her army of faerie shocktroopers err…?

You might not think having a big budget can ever be a problem, but maybe its an age thing, when you hit my considerable age (older than Elrond), you have just seen SO MANY CGI BATTLES and so many ‘amazing’ computer generated worlds that they actually start to become bland. After a while you just stop seeing it. The familiar becomes invisible.

We have a really nice view out of our front door, and occasionally delivery drivers on a summers day will say ‘its an amazing view isn’t it?’ and we are momentarily confused, thinking what? However good something is, however amazing it is, familiarity breeds dismissal. Economists call this ‘diminishing marginal utility‘. It applies to movies too, and to video games.

The original Star Wars movie probably had about the right mix of amazing special effects and….not special effects. The number of shots in that movie involving ILM is not that high. As a result when something SFX-like happens, you can legitimately feel the need to go WOOOO. Like when the millennium falcon enters hyperspace. The vast majority of the film is based around characters, plot, and cool production design/costume design.

To quote a famous expert in chaos theory:

“so preoccupied with whether or not they could that they didn’t stop to think if they should

Sequel Bits: Harry Potter Prequel, Jurassic World 2, and More

Which is so true of SFX and CGI in movies, and also I think games as well. Sometimes you just have TOO BIG A BUDGET, and a desire to just hose it all over the screen. I still remember my confusion, and frankly disgust at playing one of the civilization games that instead of having a simple text-based tutorial, came with a jankily animated ‘virtual sid meier’ to explain things. WTF? Who asked for this? who needed this? where were all the comments complaining that the game was too complex, but would be fine if a 3d animated version of the designer slowly talked through each dialog box?

This is a big problem for ANY part of life where money is involved. Apples market cap has accelerated like crazy since steve jobs died. They have SO MUCH MONEY and have thus slowed their pace of innovation to practically nothing. Oh look, now the iphone has no headphone socket. Now its a bit bigger. Now its a bit smaller. Errr… guys shall we splurge it all on a big headquarters building instead?

Inside The $5 Billion Apple Headquarters - YouTube
$5 billion of shareholders money spent well I’m sure.

Compare the catastrophic waste, failure, delays and nonsense that defines the US governments efforts to fund space exploration through the likes of the ‘space launch system]’ (swimming with cash) versus the scrappy ‘we have no budget’ spacex. Who has made more progress?

Sometimes too much money makes people do crazy things, makes them so keen to prove how big their budget or market cap is, that they act irrationally. Not only could artemis fowl have been made for a tenth of its $125 MILLION budget, it would almost certainly have been a better film as a result. More room for character development, more room for decent plotting. You cannot have a nice emotional scene that deepens the characters motivations when they are surrounded by a million dollars a minute of CGI. Just ask George Lucas. Same director did A New Hope and The Phantom Menace…

I think its worth considering how this applies to videogames. We too have entered an era of fantastic budgets, huge development teams and incredible spectacle… but although we probably don’t have the problem *AS BAD* as Hollywood does in terms of just shoehorning budget in front of our customers to impress them, we are certainly heading that way and occasionally flirting with it.

I have NO IDEA how much it cost to make Minecraft before Microsoft bought it, but you can bet its not a lot. There was no 300-man art teams designing those cubes. There was no symphony orchestra making the music (did it have any?) there was no army of Hollywood actors doing voiceovers…. and yet bizarrely it become a staggering success.

Is Minecraft good or bad for kids?
This did not cost a trillion dollars

For the price of a mere $100 million, you can make an amazingly high budget video game, or I dunno… a hundred REALLY well funded video games. Maybe one of them will take off, angry-birds style. The choice is between an all-eggs-in-one-basket strategy, or diversification. I know which would help me sleep at night.

I think there is a very strong argument, financially, economically, from a business-strategy POV, that companies are better off making more games with smaller budgets. Clearly the heads of studios disagree, and given their bazillions, can I really claim they are wrong? But even if you think I AM wrong on that basis, then I still think there is an artistic argument to be made.

Huge budgets do make art better, and they can very very easily make it worse. Would handing an extra $10 million to George Lucas have made ‘A new hope’ a better movie? or would it have made it more like the phantom menace? Is the relationship between the star wars movie budgets and their value as art in ANY way positively correlated with the budget?

I find myself increasingly ANGRY when i’m watching a movie and I can see the money literally dripping off the screen. A character arrives in 19th century London. Ok cool…what do they do there. NO! WAIT! STOP! You do not understand, you have to be MADE to SEE just how much money we spent on this establishing shot. Did you not SEE all of the CGI horses and carts? did you not count how many actors had 19th century costumes on as they walked down the street? Are you not impressed?

single shot in death valley used to be THE mos eisley establishing shot

I just don’t need this. I was fine in the way Mos Eisley looked before the special edition added all the establishing stuff. It added nothing, except cost. But even that looks tame given the way Hollywood sprays cash around now. The tendency now is to have a million dollars (or way more) spent on an establishing shot while the titles appear. Why? What does this add?

My point here I guess is to encourage people not to do this with games. We don’t need it. We really don’t. By all means hire a lot of people to do better writing (most game writing sucks), or to do more QA, or to work on customer support, but the instant, automatic response to having a big budget is to splurge it on big-name voiceovers, ten hours of orchestral music, and FMW and cutscenes that go on for hours, and hours and hours.

And please remember, its not illegal, its not immoral, and it doesn’t make you a failure, or a fool for uttering the completely forbidden words ‘I don’t think we really need to spend that much to make this’.

The war on needless draw calls with GPU profilers

Democracy 4, (my latest game) is quite evidently a 2D game. There is an assumption by players and developers alike that 2D games always run fine, that even the oldest, crappest PC will run them, and that you only need to worry about optimisation when you do some hardcore 3D game with a lot of shaders and so forth.

Nothing could be further from the truth! There are a TON on 2D games that run like ass on any laptop not designed for gaming. I think there are a bunch of factors contributing to this phenomena:

  • The growth in sandbox building/strategy games with huge sprawl and map sizes that can result in a lot of objects onscreen
  • An emphasis on mobile-first computing has resulted in a lot of low-power low-spec but affordable CPUs/GPUs in laptops
  • An emphasis on ‘retina’ display aspiration ahs meant high screen resolutions being paired with low-spec GPUs
  • A lot of game developers starting with unity, and never being exposed to decent profilers, or ground-up programming, without understanding how video cards work

So my contention is that there is a bunch of people out there with mom or dads hand-me-down laptop that was bought for surfing the internet and using word, and is now being pressed into service reluctantly as a games machine. These laptops aren’t about to run Battlefield V any time soon, but they can run an optimized 2D game very well indeed… IF the developer pays attention.

Its also worth noting that markets like Africa/India/China er definitely good targets for future market growth, and a lot of these new gamers are not necessarily going to be rocking up to your game with a 2070 RTX video card…

I recently did a lot of optimizations on Democracy 4 and I’d like to talk through the basic principles and the difference it can make. Specifically how to double the frame rate (from 19 fps to 109fps) on a single screen. The laptop spec in question: Intel core i7 6500U @ 2.50GHZ CPU Intel HD Graphics 520 GPU, screen res 1920×1080. Here is the screen in question:

This is the ‘new policy’ screen in Democracy 4. TBH this screen looks a lot more complex to render than it actually is, because of some trickery I’d already done to get that lofty 19 fps. That background image that is all washed out and greyscaled is not actually rendered as a bunch of tiny icons and text. its drawn once, just as we transition to this screen, and saved in an offscreen buffer, so it can be blapped in one go as the non-interactive background to this screen. I use a shader to greyscale and lighten the original image so this is all done in a single call.

So here we are at 19 fps, but why! To answer that I needed to use the excellent (and free) intel GPA performance tools for intel GPUs. Its easy to use and install, and capture a trace of a specific frame. With the settings i chose, I end up with a screen like this:

The top strip shows time in this frame, and how long each draw call took (X axis) and how many pixels were affected (y axis). A total of 158 draw calls happened in this frame, and thats why this puny GPU could only manage things at 19 fps.

Its worth setting up the frame analyzer so that you have GPU elapsed time on the X axis, otherwise all draw calls look as bad as each other, whereas in fact you can see that the first bunch of them took AGES. These are the ones where I draw that big full-screen background image, and where I fill the current dialog with the big white and blue background regions. It seems like even fill-rate can be limiting on this card.

By stepping through each draw call I can see the real problem. I am making a lot of really tiny changes in tiny draw calls rendering hardly anything. Here is draw call 77:

This draw call is basically just the text in that strip in the middle of the screen (highlighted in purple). Now this is not as inefficient as a lot of early-years gamdev methods, because the text has actually been pre-rendered and cached, so that entire string is rendered in a single strip, not character-by-character, but even so its a single draw call, as is each icon, each little circular indicator, and each horizontal line under each strip.

So one of these strips is actually requiring 4 draw calls. And we have 18 of them on the screen. So 72 draw calls. Can we fix this?

Actually yes, very easily. I actually do have code in the game that should handle this automatically, by batching various calls, but it can become problematic as limits in buffers can be reached, and textures can be swapped, requiring an early ‘flush’ of such batches, which if they happen in the wrong order, can mean missing text or icons. As such, the simplest and easiest approach is to change the code that roughly goes like this:

for each strip
  Draw horzizontal line
  Draw Icon
  Draw little circle icon
  Draw Text

…to something more like this…

for each strip
  Batch horizontal line
Draw all lines
for each strip
 Batch Icon
 Batch little circle icon
Draw all Icons
for each strip
 Batch text
Draw All Text

Which on the face of it looks like more hassle. isn’t it bad to iterate through the list of strips 3 times instead of 1? Well kinda…but I’m GPU limited here. the CPU has time to do that stuff, and actually there is likely NO TIME LOST at all, because of CPU/GPU concurrency. Something people forget is you are coding 2 chips at once, the CPU and the GPU. Its very common for one to just be waiting for the other. While the GPU is doing ‘Draw All Lines’ my CPU can keep busy by building up the next batched draw call. Concurrency is great!

I guess we nee to take a moment here to ask WHY does this work? Basically video cards are designed to do things in parallel, and at scale. A GPU has a LOT of settings for each time it does anything, different render states different blend modes, all the various fancy shader stuff, culling, z-buffer and render target settings etc. Think of it as a MASSIVE checklist of settings that the GPU has to consider before it does ANYTHING.

When the GPU has finished its checklist, it can then pump a bunch of data through its system. Ideally everything has been set up with huge great buckets of vertices and texels, and they can all blast through the GPU like a firehose of rendered pixels. GPUs are happiest when they are rendering a huge ton of things, all with the same settings. The last thing it wants is to have to turn off the firehose, and go through the darned checklist again…

But with a new draw call, thats pretty much what you do. Unless you are doing fancy multi-texturing, every time you switch from rendering from texture A to texture B, or change the render states in some other way, then you are ‘stalling’ the video card and asking it to reset. Now a GPU is super-quick, but if you do this 150 times per frame… you need to have a GPU that can handle this 900 times a second to get the coveted 60fps. Thats without the actual rendering, flipping or anything else…

So the less resetting and stalling of the card the better, which means BATCH BABY BATCH!

Now with the re-jig and those strips being done with the new algorithm (plus a few other tweaks), the GPA analysis looks like this:

Let me here you shout ‘109 FPS with only 52 draw calls!‘. Its also worth noting that this means less processing in general, and thus less power-draw, so that laptop battery life will last longer for games that have fewer draw calls per frame. Its a missive win.

There is actually a lot more I can do here. Frankly until I get to that tooltip right at the end, ALL of the text on this screen can be done in a single drawn call near the end. The same is true of a bunch of other icons. Essentially all I have done here is optimize the left hand side of the screen, and there is scope to go further (and when I have time I will).

I thoroughly recommend you keep (or get) an old laptop with a low spec video card, and slap the intel GPA tools on there. Other such suites of profilers exist for GPUs, the AMD one is pretty good, and nvidia have nsight as well. It all depends on your GPU make obviously.

I do wish more people were aware of the basics of stuff like this. Its hugely rewarding in terms of making your game more playable. BTW these tools work on the final .exe, you don’t need a debug build, and the engine is irrelevant, so yes, you can use them on your unity games no problem.

Hope this was interesting :D

Democracy 4 in Early Access (after 2 months)

So…. my political strategy game Democracy 4 has been in Early Access on steam for 2 months exactly today, plus on sale in a soft-launch alpha before then for a few months. How are things looking from the POV of one of those oh-so-predictable stats-dump indie dev blog posts?

Here are the headline numbers:

Net revenue (cash I get) about $500,000.

Gross revenue (headline dick-swinging number) about 800,000.

Before you go OMGZ how successful, I must also make a political strategy game ASAP, lets dig deeper and find out more about what that means in terms of profits. Firstly, the game is not actually even profitable yet, unless I count money that is in sales reports that I have not received. (Stores can take a while, usually 20-30 days to pay you after a month ends).

Everybody likes pie charts, so here is a breakdown showing where the NET money comes from. Note that the gross split is different as epic famously gives a higher rev share to the developer (as does the humble store). Direct sales came through itch.io and through the humble widget, both of which net me 95% of the sales revenue (woohoo). You can see how that pays off if you can get early, keen players to buy direct instead of through a store.

Of course, as I KEEP trying to make new devs aware, revenue, even net revenue after currency conversions costs and everything else are NOT profit. You have to spend money to make the game. So far Democracy 4 has cost $357,000 to make, including a reasonable but not exorbitant salary for me. Thats to get to *this point*, and there will be more spending to come because the game will likely need some more translation costs, some more time (quite a bit more), and just existing as positech costs me over $200 a month server fees and $150 month forum fees, and all sorts of other nonsense.

Still… it looks like I have a profitable game, and certainly one that should make a profit by the time it comes out of Early Access. Its a sequel to a very successful indie game so that’s not a surprise, but I didn’t take anything for granted. Its easy to get cocky and arrogant and then lose a fortune on a sequel.

So far I have not spent the majority of my allotted marketing budget for the game. My plan was to have a marketing spend of $150,000. So far I have spent just $35,000 of that. Part of that was to promote the recent autumn sale. Some more will happen between now and early access release, and then there will likely be a bit of a big ad-splurge when we come out of Early Access.

So far the game has been full price apart from the recent autumn sale on steam where it was 20% off. Its not a cheap game ($26.99) so its still likely at a price a lot of the more cost conscious gamers are not going to bite at. Also there are a lot of people who just *do not buy* early access games, so I am guessing there is a fair bit of pent-up-demand waiting for future purchasing opportunities.

In terms of wishlists the stats are like this:

D4 currently has about 60,000 wishlists. Conversion rate is 13%, total additions is 75k. I don’t get that obsessed with monitoring those figures TBH.

Because my strategy has always been maximum independence and resilience as a company, I try to spread my income as much as I can between different stores. I know a lot of indie devs think that PC == steam, and that’s just flat out WRONG. I got Democracy 4 on the epic store slightly later than I hoped for, so it missed the initial launch, but its still a nice source of revenue, and has not been discounted on that store yet, which is interesting.

Feedback on the game has been GREAT and last time I checked the average review score was in the 90s, which is fantastic. Obviously these are keen, early-players so that review score might be skewed high, but I can live with that :D. Its also worth pointing out, when assessing potential sales, that the game is currently PC only, and in English and (90% done) Italian languages. By the start of January I expect to have French, German, Spanish and Portuguese translations, which should open up the games potential market quite a bit.

A final note: My personal opinion, with a LOT of years indie experience (selling since 1997) is that new indies get WAY TOO OBSESSED with comparing their own games to those of others in terms of stats. Unless you have the exact data on 50,000 indie games (including their budgets) and a machine learning AI, its NOT going to predict whether or not your indie game will do well. I think devs should spend less time analyzing sales stats and more time analyzing player feedback and player stats. I spend a LOT of time trying to balance and optimize and improve the GUI for Democracy 4, and thats a far better use of my time.

I hope this was of some interest.