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

Official: PC gamers are fairly Liberal and fairly Socialist :D

I have DATA to prove it! For people new to my blog, this is because I’m the developer of Democracy 3, a political strategy game where you play the role of president/prime minister and do what you can to change the country for the better and also stay in power. Its a deep complex strategy game, and also an interesting social experiment because it makes people question their own beliefs, make tough decisions, and often learn to compromise.

One of the interesting aspects of the game is that people almost always play with their own beliefs and morals and attitudes, and are determined to prove that they are ‘right’. The game can be ‘won’ (insomuch as another term in office is considered winning) with any strategy, you can get re-elected as a socialist, a capitalist, a conservative / liberal / religious extremist…it all depends how carefully you play. The game has a built-in ‘political compass’ that plots your election victories so you can see where you were on the capitalist/socialist spectrum and the liberal/conservative spectrum when you win an election. It also shows you the same position for your steam friends (if you opt in to that).

This means that there are two big global ‘leaderboards’ (in the loosest sense) showing every players average position on both those spectra. And harvesting that data and sticking it into a graph gives an interesting picture of how players of Democracy 3 fit into the political compass. First the raw data:

compass_raw

its probably not much of a surprise to see a concentration  in the bottom left. Game players are probably on average younger than the average voter, and younger people tend to be both more left wing, and more liberal. it is kind of amazing how many people have tested the limits and somehow burst out of the range entirely on the right and the conservative scale. I can’t imagine what their countries were like on election night :D.

Fading the data so we can see a bit more into the detail of that big blob gives us this next image. it looks like people are more rigidly liberal than they are socialist with plenty of people shifting towards the middle ground on the left/right spectrum.

compass_blur1

Blurring yet again gives us this… funny to see a feint diagonal line emerging there. I honestly have no idea where that is coming from.

compass_blur2

(Obviously disclaimers apply. Some people may claim its easier to ‘win’ in the game with certain policies, people playing the GoG version have the compass disabled, its only working for people with steam who have not disabled the compass, and only for people who play through to an election victory.) So there you have it, 2015 PC gamer politics in a nutshell :D

 

 

School sign is here!

Oh crumbs, a picture of me smiling. Thats ruined my carefully constructed angry online persona. Pretend I just kicked someone and am laughing at their pain.

smiling

Thats the cheeky sign we will have stuck in the office of the school we are building in Cameroon. More details go here. basically Positech games is building a school in Africa because we are such wonderful people. Not a fan of weird pictures of cliff smiling? Hmm. heres a picture of me by my house instead.

abbey

Ha ha! Not really. My house has a different shaped roof. Plus thats where they film downton abbey, which weirdly is not filmed in my house.

Don’t worry, I’ll blog about games soon. Big Pharma is coming out soon. OH YES.

 

Indie game development risk management

I saw the merchant of Venice yesterday. Weirdly I sided hugely with Shylock. Granted his terms were onerous, but I had no sympathy for Antonio, who frankly sucked as a businessman, and should have read risk management for dummies. I suspect the play wasn’t intended as a treatise on maritime risk management strategy, but thats how my mind works. YMMV. Anyway… There is a proper point here about indie games.

dummies

People complain there are far too many indie games being released for the actual number of games bought, and I guess there kinda are. I think the bigger problem is that the results of shipping those games are less of a bell curve (in terms of return on investment, which is what people seem to expect…

expectation

…and more of a hit driven model like this:

reality

Which means that the number of indie games that are ‘failing’ in terms of not returning a proper ROI (normal profit) and thus building self-sustaining businesses is really big. People assume that a lot of games will break even, but in actual fact, I suspect the vast majority lose money, a few ‘break even’ and a few are mega mega hits. There is some great writing on this topic here.

This is a problem because what it means is, we miss out on great games. Why? Because we should start with the assumption that peoples first few games suck. On average. Some people get lucky and their first game is awesome, but lets say your chances of having a smash-success game are roughly one in ten. Lets also assume that you can basically have only a few flops before you have to give up and get a job in a bank.

Now in a more even distribution of success, a lot of people will have a track record that goes something like this:

Flop, Almost-break even, Mild success!, Flop, break-even, Mild-success, Flop.

And you can just about eek out a living doing that. Eventually you might have a hit. With my own history it looked like this:

Star Miner (flop) Starlies Inc (Mild success) Rocky Racers (flop) Kombat Kars (flop) Kudos (Mild success) Democracy (hit!).

The trouble is, with the current hit-driven system its basically this:

Flop, Flop,Flop,Flop,Flop, *Get a proper job here*.

Because so many games are not hits, and production values are now driven so high, the risk associated with ‘hanging in there’ until you get your hit is very high. Lets say each indie game costs you a minimum of $150,000 to make, including your food & housing as you code away on it. To get that hit at game number 10 is going to cost you $1,500,000. Granted, the hit may then earn you $2,000,000, and you *win*, but who has $1,500,000 ready to gamble?

This is a classic economic problem. Its solved for farmers (with unpredictable harvests) by the futures market in commodities./ Some years the commodity traders lose, some they win, but they hedge their bets over multiple commodities over multiple farmers. The security for the farmer is higher. In Silicon valley, you have ‘accelerators’ where a VC will throw small amounts of money at ten developers with ten apps, hoping one hits it big. Peter Thiel; says never to invest in anything that can not potentially pay for the losses on every other investment you make. In the example above, they invest $1,500,000 and get $2,000,000, a very good ROI.

Image3

Basically this is indie fund. And the unofficial equivalents that have spawned elsewhere. I do it a bit myself. I fund Big Pharma, and spread my risk between BP and GSB2. I also am funding 2 unannounced games, so my risk is currently spread over 4 titles. The thing is, with just one investor (me) and four titles, there is still considerable risk. What is really needed is a lot of investors and a lot of titles. Basically kickstarter, but with actual proper investments. In some ways, I’m talking about a hedge fund. Is there a market for this? And is the ideal system one with wealthy individuals investing $100k each, or thousands of gamers/savers investing $100 each, acting as a sort of ‘greenlight-but-with-investment’ model? Is it regulatory hassle that has prevented people crowdsourcing investment? It already kinda happens in the UK with sites like funding circle. (Although thats business loans, not actual shareholder investment) Why not a game-specific version?

 

Games look (or feel) like their owners.

One of the best things about the indie dev community is that you get to meet a lot of people from all over the place who wouldn’t otherwise necessarily meet. You can be an indie dev living anywhere (although its harder some places than others), and more than ever before, they come from different backgrounds. I find people pretty interesting (ok, I find 0.1% of people interesting), and I do find myself doing a bit of pop-sciency amateurish analysis of people. When you do this with creative people it gets rather fun.

I find it very amusing that when you meet Tim (wicksteed, designer of big pharma) he basically *is* big pharma. Its truly his creation. He is always happy and upbeat and smiling and positive, just like big pharma. From my POV, Tim is young and modern, just like big pharma feels. The music is the clearest indication of this. The music is like Tim. The game is bright and cheery. Tim made a game about curing people.

owners1

When you play Gratuitous Space Battles 2, thats me. If you haven’t met me, just watch a few minutes of the battles and listen to the music. Thats me. Thats what my brain and my soul is like. it’s lots of explosions and power and drama and a voice shouting ARGHHHHHHHH at a billion decibels whilst smashing things. The game is dark, over-complex, ambitious and pushy. Cliff made a game about destroying everything.

owners3

It’s kinda funny how games made by just one person really are a window into their soul, and their personality. Mike Bithel basically is Thomas Was Alone. If you introduced me to a random line up of 100 game developers I’d never met, and told me one of them did a game about repressed rectangles with feelings, I’d know it was Mike. And after playing TWA, I know mike probably reads the guardian and is a vegetarian. Mike made a game about friendship.

owners2

And this is awesome. It means that entertainment really is connecting us to people. That gives us empathy, and opens our mind in the way that ‘committee design’ never can. I have no idea who the designer of the Battlefield 4 games is. I imagine its probably Tom Clancy, more likely a committee of people with a tom clancy design manual. Who knows.

In any case, I think it is really good when games have personality. The absence of it definitely feels bad, like a farmville clone (or for that matter the original) designed mostly by people in the PR and accountancy department. The best artistic design is done by slightly crazy people who are drunk/drugged/suffering in some way, which drives them to think of things other people would not.

Don’t do your game design by committee, or with a spreadsheet. Let it just flow from your soul. If that means your games are downbeat, or dark, or whatever then thats fine too. Better to be dark than to be fake.

Coding the GSB2 Radiation effect (directx9 C++)

I was never 100% happy with the radiation effect in Gratuitous Space Battles 2, so I’ve coded a better version for the next patch. Here it is in very short silent video form:

I thought maybe some people may be interested theoretically in how it is done. Now I’m sure if this was in 3D in unity there is already a 99c plug-in that does it without you even having to understand coding, but thats not how its done so here we go…

The first thing to remember is that the spaceship is not a 3D mesh at all. its a series of sprites rendered to different render targets and then composited. That means that I’m not wrapping a texture around a mesh, but drawing one sprite on top of another, but cropping the final output to the alpha channel of the base (ship outline) sprite.

Before I learned much about shaders, I had a system that did this using mostly fixed function, which I use here, but build on with better shaders to do more stuff, making it a hybrid approach and fairly complex :D. To simply draw one sprite on top of another, but use the alpha channel from the bottom sprite, I use a custom vertex format that has 2 sets of texture co-ordinates. One set is from the splatted image ‘radiation’ and the other is from the alpha channel of the ship outline.

It gets a bit fiddly because where I’m drawing the splat sprite could be anywhere on the ship, so I need to work out the offset and dimensions of the splat in relation to the ship image, and store that in the second set of texture UVs, and pass that into a shader.

The shader then simply reads the color data and alpha data from the radiation splat, and multiplies the alpha by the alpha at that point on the base ship texture, and voila, the image is cropped to the ship.

But thats a very simplistic explanation because there is more going on. To make things fast, all of my radiation gets drawn together (to minimize texture / render target / state change hassle), so its done towards the end of processing. In other words, there is no painters-algorithm going on and I need to check my depth buffer against this ships Z value to see if the whole splat is obscured by some nearby asteroid or debris. That requires me passing in the screen dimensions to the shader, and also setting the depth buffer as a texture that the shader can read.

So that gets us a nicely Z-cropped image that wraps around the ship at any position. It also fades in and out so we need to pass in a diffuse color for the splat sprite and calculate that too. We also have to do all this twice, once for the splat, and once for the slightly brighter and more intense lightmap version, allowing the radiation effect to slightly light up areas of the ship hull during final composition.

At this point the shader is a bit complex…and there is more…

I wanted the radiation to ‘spread’, and to do that, I need to splat the whole thing at a fixed size, but gently reveal it expanding outwards. To do this I create yet another texture (the spread mask) which also gets passed to the shader. There were various ways to achieve this next bit, but what I did was to ‘lie’ to the shader about the current UV positions when sampling this spread mask. Basically I calculate and pass in a ‘progress’ value for the spread, and I use that, inverted, to deflate the UVs of the source image (which is CLAMPed). So effectively my first UVs are -4,-4,4,4 and the spread splat is a small circle in the center of the splat, expanding outwards to full size.

Because I’m only doing this when I sample the alpha channel from the spread mask, the color and alpha data from the base ‘splat’ texture remains where it is, so it looks like its a static image being revealed by an expanding circular (but gaussian blurred) mask.

I’m pretty pleased with it. The tough bit I’ll leave for you to work out is how that works when the source radiation image is actually a texture atlas of different radiation splats :D

Fun fun fun.