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

Defining profit

When you are the only person taking a salary from game development, the simple question of whether or not a game has made a profit becomes a bit fuzzy. Normally everyone takes their salary, and after other costs are paid, if money is left over, there is profit. The thing is, as the company owner, you normally take a tiny salary and thus working out if ‘game x’ made a profit is not as simple as it seems. Do you consider a game profitable if it makes more than the bare minimum salary you pay yourself? or if it makes ANY money at all? or if it earns more than the average salary you would get in a comparable job elsewhere? and WTF is a comparable job anyway?

Democracy 3:Electioneering is new DLC for my political strategy game Democracy 3. It was released just over a month ago. So far, total revenue from all sources for this DLC is $18,600.  The total development and marketing cost of the DLC stands at $21,500 so I have (so far) lost $2,900. Thats a ROI of -13%.

Ouch.

elect_3_s

But that’s kinda nonsense. Firstly, that’s for 1 month. if I look at the one month sales for Democracy 3:Clones & Drones, then compare it to the one month of D3:Electioneering and project to a year out, I should earn a net of $87,042 from the DLC. YAY!

But again, that’s nonsense because it doesn’t take into account my work. I put roughly 3 months full time work into the DLC (over a longer period), so how much should I be charging myself for the purposes of working out if this DLC was a good move? This brings us back to the whole ‘what do I pay myself question.

Looking at game developer salary surveys, it looks like a typical ‘lead coder’ earns around £47,000. I also run the studio, so lets assume I am a ‘development director’ and earn £59k. A salaried employee would have a pension too, plus sick pay and so-on, so lets add another £6k to that and say a reasonable salary for me is £65,000 a year. I’m 45, been coding on and off since age 11. I’m worth it :D. So 3 months at that rate costs me £16,250. Given exchange rates right now at about 1.3 £/$, lets plug it in…

Dev & PR cost  $21,500
Cliffs cost  $21,125
Projected total income  $87,042
Profit $44,417

Whoah thats more like it.  Of course that assumes that the sales of D3:E are the same curve as D3:C&D over time, which they may not be. On the other hand, this is a US election year, and a fairly crazy one, people might be really into a game about election strategy. Or they might be fed up with politics entirely. who knows.

Now before you all quit your jobs to ‘go indie’, its really not this simple. I also released Democracy 3:Africa recently and that game LOST money (so far). It’s close to breaking even, but right now, that cost me money, even assuming I personally earned zero from doing any work on it. Gratuitous Space Battles 2 DID make me a five figure profit (yay!) assuming I worked for free (boo!). Luckily other games, notable Democracy 3 and Big Pharma, are big hits and continue to bring in money, so it all kind of evens out.

The two takeaways from this are:

  1. its VERY RISKY to be dependent on just one game. It really is a hit driven business.
  2. If you have a contract with someone that mentions ‘profit’ relating to bonuses etc, make SURE you know how they are defining their costs. It really is open to interpretation.

My non games idea

I’d like to set up a company one day which solved an inefficiency in the market for consumer services.

Right now, in the UK and most countries individual consumers enter into deals with utility suppliers to provide them with Electricity, maybe gas, water, and telephony / internet access. This involves setting up an account, deciding on a username/password, some bank details, picking a ‘plan’ and so on. We are widely told that the range of deals available means we should shop around and change our providers often. In practice few people do this. (I do, but I’m…different). What bugs me is not that few people do shop around, but that the process is so clunky and manual.

Now I’m not talking about ‘making switching easier’. thats lame, and unambitious. I’m talking about making it automated. Not on a year-to-year basis, but on a second by second basis. Think less like a form-filling bureaucrat, and more like a high frequency trader.

hft

When I switch on my PC, and it draws current from the mains, I want there to be a super-fast auction, right then, in the exact same way banner-adverts are traded, where my AI agent that represents me haggles on the energy market to get me the extra power for the next few seconds. And I want it to keep haggling all the time I’m drawing power. I also want my taps (faucets to some of you) to do the same thing, and I want my telephone, broadband, everything to work the same way.

Of course, this works WAY better when we can defer demand. A smart fridge can, for example put in a  request for power to its compressor *some time in the next five minutes*, but not care exactly when. As a result, it should get a darned good deal. On the other hand, a hairdryer needs power RIGHT NOW, and at the other end of the spectrum, my fancy-pants electric car can charge *at some point in the next eight hours*. I don’t care when.

This would make for a huge boost in energy efficiency. The demand curve of UK power would flatten out substantially, meaning less need for overcapacity to handle ‘spikes’. It used to be the case that the definition of a UK power spike was either the adverts at the end of the TV show ‘coronation street’ or the end of the queens speech on Christmas day. Why? Because thats when about 10 million Brits switched on a 240volt 2,000 watt electric kettle. I’m not kidding. Apparently after the ‘who shot Phil Mitchell’ episode of EastEnders, power surged by 2.6 GW. As I type this, demand is 32GW in total.

grid

Anyway…what annoys me is not that we do not have this system in place (I understand it involves huge infrastructure investment and new appliances), but that we do not seem to be making ANY steps in that direction whatsoever. I have a big energy-guzzling car, which would be perfectly suited to negotiating a time to draw current with the power company, and yet there is, AFAIK, NO provider in the UK that even has a prototype for such a system. Why?

Sadly I expect this will never happen, and what we will end up is local co-operatives handling power management themselves. if I had a Tesla powerwall, I could save any excess from my solar panels, and either use it to charge my car, or to sell into a village-linked system to a neighbour. I suspect local systems like this, with a fraction of the potential savings are going to become commonplace before any of the big players in UK infrastructure take a step in this direction.

Sample C++ game loop : Democracy 3

When I first started coding, especially when I first did C++, there was a lot of confusion about where exactly the ‘game’ was, and more specifically, what a main game loop looks like. Because these days, all you hip kids code in Unity or Gamemaker or MyFirstIDE or some other colorful beginners IDE for the under 5s*, you never actually see your game loop, and have no idea where it is, let alone what it does., However, us real-men who code from the ground up have to write one. Here is mine from the PC version of Democracy 3. There are few comments, because in my godlike knowledge, I understand it all at a glance.

======================================================================================
void APP_Game::GameProc()
{
    HRESULT result = GetD3DEngine()->GetDevice()->TestCooperativeLevel();
    if(FAILED(result))
    {
        if (result == D3DERR_DEVICELOST )
        {
            Sleep( 50 );
            return;
        }
        else if(result == D3DERR_DEVICENOTRESET)
        {
            if (!GetD3DEngine()->Restore())
            {
                // Device is lost still
                Sleep( 50 );
                return;

            }
            Restore3D();
        }
        else
        {
            Sleep( 50 );
            return;
        }
    }

    GTimer looptimer;
    looptimer.StartTimer();
#ifndef _GOG_
    GetSteam()->Process();
#endif //_GOG_
    GetInput()->Process();
    GUI_GetCursor()->SetCursorStyle(GUI_Cursor::DEFAULT); //reset each frame...
    if(BActive)
    {

        GUI_GetMusic()->Process();
        GUI_GetSounds()->Process();
        if(PCurrentMode)
        {
            PCurrentMode->ProcessInput();
        }
        SIM_GetThreadManager()->ProcessFrame();
        GetTextureHistory()->Reset();
        LOCKRENDERTHREAD;

        GetD3DEngine()->BeginRender();
        if(PCurrentMode)
        {
            PCurrentMode->Draw();
        }
    
        GUI_GetTransition()->Draw();


        GetD3DEngine()->EndRender();

        RenderFont();
#ifdef _DEBUG
        if(GetInput()->KeyDown(VK_LSHIFT))
        {
            GetTextureHistory()->Draw();
        }
#endif //_DEBUG
        GetD3DEngine()->Flip();    

        RELEASERENDERTHREAD;

        looptimer.Update();
        if(looptimer.GetElapsed() < 16.0f)
        {
            looptimer.Update();
            if(looptimer.GetElapsed() < 16.0f)
            {
                Sleep(0);
            }
        }
    }
    else
    {
        ReleaseResources();
    }

    if(BRestartPending)
    {
        BRestartPending = false;
        SilentRestart();
    }
}

======================================================================================

*yeah I’m mocking different IDEs. deal with it :D This is sarcasm. There is no proven link between masculinity and choice of game development environment.**

**yet.

Oh god the streesssssssssss.

The last few months have been pretty tough for me. I basically did too much at once, and missed a few things, and made some mistakes and I am not the sort of person who shrugs things off and goes ‘well shit happens’. I get angry with myself for screwing up, and I don’t forget it, which means I get more stressed and argghh… I end up a bit like this:

stressed

which is obviously *not good*.

Recently we found a bunch of bugs in the implementation of getting Democracy 3:Electioneering (DLC for democracy 3) to work seamlessly with Democracy 3 Africa (A different game) without people having to re-buy it, or move any files. This sounded like a good idea at the time, as a programmer, but when running a business you have to realize that OH MY GOD it is not that simple.

The problem is that D3 is not just ‘a game’. That would be simple. It’s Democracy 3 on steam, on GoG, on the humble store, the mac game store, direct from us and also on ipad (which does not support the new DLC). Plus…its in OSX and Linux. Oh and also the builds for the French, German and Polish language are ENTIRELY separate (and the DLC is not translated). This means we have D3(direct)D3 German(direct) D3 French(direct) D3 osx(direct) D3 linux (direct), D3 Gog, D3 Gog osx, D3 steam osx, D3 steam Linux, D3 steam. D3 steam French, D3 steam German, D3 steam polish. Humble osx, Humble win, Humble Linux. Oh and there is a browser version on humble (but nowhere else, and only in English).

Holy fucking shit.

Then we added Democracy 3 Africa, which is multiple languages but ALL IN ONE BUILD, and thats on humble, GoG and Steam. Its in Windows and OSX, but not linux. BTW Africa doesn’t have polish, but D3 does, but only on steam, and in retail, because yes…D3 is in retail, but only in Poland.

Again…

stressed

So holy fuck. And I have fucked up a few technical things which I THINK are all now sorted, despite giving cause to angry emails and twitter outbursts and general stress., Plus today is the HOTTEST day of the year in England. (don’t laugh, we have heat some days). Oh and I nearly cut my arm off in a gardening injury (yeah funny huh?) and damaged my neck doing sit ups (you can laugh here), and had to miss DEVELOP which was the first time I’d bought a full conference pass and booked a hotel . FUCK.

So ideally I’d have all this behind me now and be heading back to my favourite relaxing place (st lucia…)

not_stressed

Which I haven’t been to for three years because…being a treehugger, I rarely fly, and games conferences have kinda used up my personal angst budget for long distance trips for a while. But wait! there is good news ahead…

Firstly, barring tech support, Democracy 3:Africa is DONE and shipped, Big Pharma Marketing & Malpractice is DONE and shipped, Electioneering is DONE and shipped. The only planned releases by positech games in the next six months are two third party games, Shadowhand and Political Animals. Both are looking in really good shape, and I am not writing a single line of code for either of them. YAY.

Plus its very sunny out there, the garden looks AMAZING, and today I am going to visit friends for a day and wont do much work. YAY. Plus I *have* actually learned a lot of lessons from all this stress. The most obvious one being that the less builds you have of your game the better. To that end… A lot of this mess is being cleared up by the super-talented Jeff from stargazy (he coded Democracy 3 africa). Soon(ish) we will have a Democracy 3 build for all languages (in unicode no less), and that will kill off a chunk of these useless bastard builds that cause me so much admin hell.

DOUBLE YAY.