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

Why (as a consumer) you should love and support advertising

Not a trendy POV, especially for the younger net-savvy crowd. After-all, what kind of dumbass doesn’t have ad-block installed right? That will ‘stick it to the man’, and make your life easier right? Well frankly…some sites may as well have a huge banner that says ‘INSTALL ADBLOCK’, because they have flashing strobing monstrosities designed by people who have no idea how proper 21st century ads actually work but hey…don’t tarnish all ads with the same brush.

I’d suggest that as a consumer, you should LOVE advertising. Here is why. Like Democracy, advertising is a shit system, but its better than all the alternatives. There is basically a dilemma for anyone who makes a product, and that is ‘how do I get people to hear about my product’. The most honest answer to the question is that you set aside part of your budget to rent space where people will look, and use that space to inform people that your product exists. This is, of course, simple advertising. It works. It’s also fair. People would say it is biased towards those with money, but that money is simply an expression of faith in the product. Where some people have money, others have time. Time basically is money.

If you block all ads, or worse still, tar product-makers who advertise as being ‘evil’ or ‘corporate’ or, to quote some reddit replies to my ads ‘shilling scum’ (yup, under a ‘promoted link’, clearly paid for openly and proudly by me…’go figure’), then you are simply forcing business to find an alternative solution to promoting the product. The thing is, people WILL find another way to get their product promoted over the opposition. It is the life-blood of business. If you prevent them using ads, then the temptation to go with less obvious, less honest, frankly underhand and shady methods is going to win out.

From a business POV, spending $30k on ads vs handing $30k in a paypal payment to a famous you-tuber are essentially the same thing. The end result is the same, and the cost is the same. The first choice is very up-front and honest and people know what is going on. The second choice (assuming its undeclared to the viewer) is basically subverting what claims to be impartial information and manipulating it to push an agenda. Do people want that?

There are a vast range of businesses (I get emails from them all the time) offering to sell people twitter followers, or post on forums on your behalf, or up-vote social media posts, and all the rest of it, no-doubt linked to click-farms in China or India. This is the dark-side of ‘social-network-marketing’. If you want to just ‘buy’ popularity on a site where commercial concerns are banned, then it’s easy, just fill out this form and send the money. Unethical as fuck, clearly, but do you really think that nobody does it? if they didn’t, the spam emails wouldn’t be economic, for starters.

There is a myth, in the ‘anti-corporate, anti-ads’ world, that you can block out all ‘corporate’ influence, but you cannot. Not outside of North Korea, anyway. Even if your site has no ads, and absolute rock-solid captcha stuff to ensure there are no bots, and that nobody from (perish the thought) a games company is posting on your site, then it would still be trivial, trivial, trivial, to completely rig the odds.

Anyone with their own forums knows that preventing spam is almost impossible because a lot of it is ‘human spam’, in other words, accounts created by actual people (paid minimum wage in India/China) who can enter the captcha quite easily, make a few seemingly innocent posts, before (in my experience), spamming your site with links to cheap kitchen fitting. When you see this, it is basically human-marketing agents done really really badly.

Now imagine a situation with a smarter ‘black hat style’ marketing company. Say they have $100k to spend to promote game X. Why spend it on 10,000 Chinese kids who are obvious as hell, when you can just employ 10 full time western ‘social marketing agents’ for 3 months to actually go out there and hustle for the game. They can join dozens, if not hundreds of sites, read loads of threads, make loads of posts, look like any other member of the community, just hanging out, chilling, talking about games, and they all just so happen to have recently picked up a copy of X, and you know what? to be honest, game X is the best damned game they ever played, no seriously.

That is the world of game marketing without ads. It’s not always obvious. There is a spectrum. On the one hand, you have 10,000 Chinese kids spamming the world about Civony, or some other browser-based crap. On the other end of the spectrum, you have just two or three marketing experts who do their job so well you have absolutely no idea they have any connection to a games company whatsoever. What they have in common, is they are trying to subvert a non-commercial arena into being a commercial one.

Ads are different. there is a clear dividing line. When you see an ad for my games, It’s not disguised as anything else. It’s honest. It’s me saying ‘I believe enough in you liking the look of this game, I’m actually paying out money to tell you about it’.¬† I reckon thats good, thats fair, thats what I like, and thats why I have adblock off for the majority of my surfing.

I could take the hint, realize gamers have decided that ads are evil, that actually ‘lets players¬† deserve to be paid’, and just say ‘fuck it’, and hand over loads of cash to a PR company to do whatever the fuck they like, and ask no questions, but I’d rather not. I don’t want to be a full time promoter and schmoozer. I’m a game designer and programmer. Don’t let the underhand schmoozers take over.


Too much stuff on screen

This is a screenshot of GSB2 (click to enlarge). Nothing particularly impressive, but when looking at it, and then stepping into code to see whats going on, it’s clear that the engine is kinda pushing against limits for hardware on laptops etc (This is with graphical detail at maximum, so that will be less of an issue eventually).


I think that ultimately, I’m making too many draw calls, and lesser hardware can’t handle it. because of the nature of the engine, those draw calls are vastly higher than the amount of actual objects on screen, because there is depth, and lightmaps and other trickery that magnifies the effect of, for example, just rendering a single sprite of a fighter ship. That fighter ship probably involves more like a dozen draw calls :(. In the scene shown, we have 915 3D objects (most are not onscreen), 266 depth objects, 648 lightmap objects, 89 ‘splats’, 372 effects and 216 saturated effects. Thats clearly a lot :(

I’ve seen the game do 5,000 or more draw calls in one frame, and thats kinda bad, so the way I see it my approach to optimization could take various paths:

1) degrade some less important stuff when we exceed a certain number of calls / drop below 60 FPS. Not ideal, but a brute force way to fix it.

2) Further optimize some stuff that is currently done in single draw calls, like parts of the GUI, to get the general number of calls down.

3) Slot in a layer between my current engine and DirectX, which caches states yada, and collapses draw calls into fewer calls where the texture/shader/render states are the same.

Theoretically 3) is vastly better than the rest, but I fear that I’m adding another ‘layer’ here which could in fact be slower, and also that I’m keeping poorly optimized code and fixing it after the event. After all, the best solutions to speedups are always algorithmic, not close-to-the-metal; tweaking. However, another benefit of 3) would be that such an abstraction layer makes the job of porting the game slightly easier. I’m considering implementing it anyway, so I can at least see how often such a ‘collapse’ of draw calls can happen. In other words, would this reduce the count by 5% or 90%?

So that means replacing the DrawPrimitve() calls with a macro, maintaining a cache of the render states (or maybe just letting any RS change flush the buffer? and just (for now) initially keeping track of the collapsible draw calls. I’m going to give that a go… Or maybe I should see what the hell all those objects are first…

Why your game design is generic, and rubbish

Ok, it’s just a theory, but hey, if you don’t come to a guys blog to hear his personal take on things…you are doing it wrong…:D. And to be fair, it’s not just mine, I don’t recall where, but I recall once reading someone make the point that if you could go back in time and remove the movie ‘aliens’ and the book ‘the lord of the rings’, you would basically eradicate modern gaming. Obviously that is a huge generalization, but I think a decent point is being made. I’ve also noticed it in personal experience, I’ve been in a design meeting where the designer has described big sweeping changes to the way the game should look, and it was obvious to absolutely everyone that he saw ‘The Fellowship of the Ring’ the night before.

The problems with that is we have ALL seen Aliens and we have ALL seen The Lord Of the Rings. I’m serious in suggesting 99% of you readers have seen both. You have all seen Star Wars too.

Now there is some decent mileage in saying that you are making a game that appeals to your demographic, and that this is a sensible thing to do, and that yes, lots of people like space monsters, laser guns and orcs. The trouble is, EVERYONE ELSE is doing this too. As a result, you need to bring something else to the table if you are going to compete. The problem is, you are stuck, creatively speaking inside the prison of your own experiences.


Game developers tend to be young, sometimes shy, introverted indoors types who can be a bit obsessive. As a result, they tend towards having knowledge and experience in depth, rather than breadth, and from a game design POV that is stifling. Game design works well (in fact I’d suggest all creativity works well) when you bring multiple influences, hopefully really diverse ones into the mix. Saying you like both Star Wars AND Star Trek does not count. I mean really diverse.

I’d never heard of Ayn Rand before Bioshock. Since then I’ve even bought a book of hers (out of curiosity, don’t hate me, I’ve read The Communist manifesto too, I’m open minded…). I really liked Bioshock (up to a point), and I think the atmosphere and story was what made it great. When I play Bioshock I feel like I’m experiencing ‘Alien’ ‘20,000 leagues under the sea’ and ‘Doom’ combined with a (to me) fairly obscure Russian philosophers writings, with a strong background in art deco. This is why it works. This is why it is cool. This is why Bioshock is not just another corridor shooter or RPG.


Nobody who really does any proper game design thinks they are gods gift to game design. I certainly do not. But sometimes people *do* ask me for advice, and the advice I give is nothing to do with games. If you want to be a better game designer, Read a book you would never normally read. Sit through a movie you would never normally watch, Go somewhere amazing, try something weird. Build up as many experiences as you can. I’ve tried tons, from helicopter/fixed wing flying to horseriding, archery, clay-pigeon shooting, guitar & piano playing, and lost more. I’ve read a fairly bizarre range of books from War & Peace to Chuchill’s War Diaries to Kurt Vonnegut to A.S.Byatt and Naomi Klein.

Kudos (my life sim game) was inspired by a film (Donnie darko…don’t ask), Democracy inspired by a book about cybernetic chimpanzees, GSB by a book about D-Day. It’s probably hard to tell any of those connections, but there are there, and they make a difference.

Don’t stay in the geek bubble, don’t just read science fiction and fantasy, don’t just watch the blockbuster movies. There is a huge range of amazing culture out there that can act as your inspiration, stop sticking to the same few movies.

And yeah…I get the total irony of a guy making ‘Gratuitous Space Battles’ typing this stuff :D

The immaturity of silicon valley

Sooo.. I read (for the first time) today some details of all of the sexual harassment cases that zillow are fighting. Reading about them makes me sigh quite heavily, because stuff like this is just *more evidence* that silicon valley is a VERY immature place.

Some background: I’m British and 45 years old. I’ve visited San Fransisco three times, that’s the extent to which I know the place personally, so these are the views of an older, foreign outsider.

I remember back when Bill Gates was ‘the new rich dude’ and computer people were suddenly becoming very wealthy and successful. I was really incredibly positive about the whole thing. As a scruffy long haired and occasionally bearded geek, I loved the idea that no longer could I be automatically sneered at in posh hotels or restaurants on the assumption I must be some homeless loser. For all anyone knew, that scruffy guy sat there in the corner was a dotcom billionaire. Plus the idea that I could have memorized the script to star wars, enjoy computer programming, and NOT be regarded as a ‘dork’ was awesome. It was time for the geek to inherit the earth.
And there is no doubt that we did. Us geeks with our understanding of C++ suddenly became very cool,. very famous, and very, very well paid. Maybe less so now, but even so, computer programmers do ok in the UK…


And of course those of us who have a LOT of experience, and start our own software business can do much, much, much better than that. Excellent! we win! we have replaced the city-types and the arrogant smooth-talking idiots in suits and a new world order is here…
Except the new wave of highly skilled computer-geek intelligentsia seem to be perpetually behaving like they are still in kindergarten. Frankly, I’m embarrassed to be associated with the ‘silicon valley dotcom success story’ type.

Exhibit A: Stupid office accessories.

When you are 15 years old, or even a drunk twenty something, an office filled with slides and bumper cars sounds awesome. But beyond a certain age, or level of maturity, it just seems kinda dumb. Do you really want to negotiate million dollar deals while sat in a bumper car? Do you genuinely think it makes you more creative? Was creativity not invented until people designed slides and bean bags? To me, an office filled with bean bags and ‘zany’ things is a lot like someone who wears over-sized brightly colored glasses and a loud bow-tie everywhere. In other words, its a desperate attempt to compensate for the fact that you know you don’t have any creativity, and convey a tragic, almost pleading message to the outside world that convinces us otherwise.


Exhibit B: A complete lack of awareness of the real world.

There is life outside silicon valley. There are countries whose main problems are a lack of clean drinking water and a lack of energy or food. Silicon valley focuses purely on people whose main problem is that they think their smartphone isn’t bendy enough, or that a 2048 resolution for their TV isn’t good enough. Social problems are largely ignored, especially if the start-ups actually contribute to them. Ifd there is a massive property price problem and inequality being caused by the tech workers, no problem! just bus your workers past the poor people so they don’t get in the way!


Exhibit C: Short-term thinking.

Some Silicon valley types are awesome at this. It seems like Zuckerberg, Peter Thiel and Elon Musk really get it. Most don’t. Especially the desperate young twenty-somethings who want to become a billionaire NOW, RIGHT NOW, and it really doesn’t matter what happens the day after they ‘cash-out’. Everyone is obsessed with an exit-plan, not a plan to grow something you are proud of, make people happy and create something worthwhile. Just big piles of cash and an exit plan. Many of them even intend to sell their company long before it’s made any profit. As an environmentalist, I’m really sick of business people with short term thinking. Many silicon valley types just want to be rich. They don’t care how, or why. The product is irrelevant to them.

Exhibit D: Laddish, ostentatious behavior.

When people spend an insane amount on a wedding, trash part of the environment in the process, then make amends by just throwing a pile of cash at it afterwards to ‘fix the damage’, I am strongly reminded of the attitude of the upper class UK ‘bullingdon club’ (see below) who would trash expensive restaurants then throw money in the faces of the owners. In short, there is nothing wrong with being rich, but when you literally throw that money at people with indifference after you behave outrageously, and think that makes it ok, then people are perfectly justified in calling you a spoiled brat. The differences between some of the silicon valley set and the wold-of-wall-street set is paper thin. That goes especially for people who hire escorts to mingle at office parties.


Exhibit E: Regulation is so last-century.

I’ve been in Uber cars, thanks to smart friends with smartphones. (I don’t ever really use a phone) I like the ‘idea’ of Uber. I think it could work well. Not having to pay the driver is cool. Knowing when they will show up is cool. Bringing the free market to the closed-in monopolies of city cab firms is awesome. But guess what? Cab drivers need regulation. You need to know that driver is paying tax, you need to know that driver isn’t someone with a history of violent assaults. You need to know that vehicle is safe to drive, and taxed. These regulations exist for a reason. The same applies to regulations about renting out a house or flat/apartment. There are regulations on fire escapes and insurance and safety for a reason. The reason given by the owners of Uber and AirBnB for ignoring all the regulation seems to be ‘errrr….internet dude!’. Sorry that just doesn’t cut it with me, and I’m hardly a flag waving communist.

Exhibit F: Taxes.

As I just said, I’m hardly a marx-quoting leftie, but taxes are the price we pay to live in a fair, safe society. Tax rates in Italy might be nuts, but not in the US or UK. Don’t be dicks, you have stockpiles of cash. Paying your fair share of tax is what makes you a pillar of society, rather than a cancer upon it. Don’t be dicks about tax. And yup, Positech pays all the tax it should, as a normal company registered in the UK, and paying UK corp tax levels on every penny it earns. It’s really not that difficult to do the right thing.


So anyway…my basic theme, is internet billionaires, we thought you could be so much better than this. You are making geeks look bad. Get your shit together. Act like grown ups, not frat-boys.





Stuck on a normal map thing…

My lack of maths skill will be my undoing…

I have some normal maps, you know the kinda thing…


And I have all the code (dot product stuff) that plugs in the float3 that is the light direction, and then gives me a tint I can apply to the final pixel to get a nice pseudo 3D bump map effect. Thats all lovely and works, and is cool. The problem is, when I want to rotate that bump map, it obviously all turns to crap :D

This is NOT a case where I can just liue about the light angle, I already get all that… What I need (for this pre-processing cleverness) is a way of taking that image above, and effectively rotating the whole thing by a given angle, and working out what all the pixel colors would be in that case. This is an arbitrary rotating value (so not just 90 degrees or whatever). I’ll work it out eventually, but I suck at this, and I bet it’s easy. This isn’t speed-dependent stuff so slow is fine, either pure C++ maths or some shader code.

My current shader code for rendering using the normal map:

float4 normalcolor = tex2Dbias(g_samNormalMapColor, texCoord);
normalcolor.b = 0; //experiment to force only r or g channels

//convert it to +/- 1.0 range
normalcolor *= 2.0f;
normalcolor -= 1.0f;

float3 LightDirection;
LightDirection.x = cos(sprite_angle);
LightDirection.y = sin(sprite_angle);
LightDirection.z = 0;

float dot_prod = dot(LightDirection, normalcolor);

Thats just lovely, and obvioously I could lie about the angle I put in, but then how do I get the red and green out of it?