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

First World Geek problems

This has been a few days of severe first world geek problems. I am well aware how pitiful my woes will seem to people. I find great humour in the idea of pitying someone for a minor blip in an otherwise pretty cushy life, and find first world problems to be a bountiful well of amusement. I am still slightly amused by this gif, even after all these years:

So anyway, let me tell you a tale of woe, and you can laugh and experience the pleasure of schadenfreude in blog form. Also why can’t wordpress spell check schadenfreude?

Yesterday, when checking my email first thing in the morning, I had no internet connection. This is *no big deal*, as occasionally our line drops. We live in the countryside, our internet is delivered by tiny tiny copper wires over telegraph poles, rather than nice modern fiber cables underground. Do not get me started on how expensive this would be to fix (the current quote is about £50k). Anyway…it normally connects pretty quickly. But this time…it did not. taking note that my usually responsive ISP had not replied top recent emails from me…I used my spider sense to detect something was wrong and phoned them, only to get a distressing message on an answerphone. here it is in web page form:

To pit another way: “Fuck you. We haven’t been paying our BT bill, and now you are fucked. ahahahaha”. Yuip…my ISP apparently went bust yesterday.

So yikes. I immediately phone BT to see just how quickly I can get set up with them “10 working days”. Ahahaha. No thanks. So I call someone else, in this case ‘Zen internet’ who also say ’10 working days’. Realizing this is not a joke, but actually the norm in the UK in 2016 (that of course does not prevent it being a joke as well), I sign up to them. Shortly afterwards I spot another ISP saying they are managing to transfer people from my ISP within hours. I switch to them! And then cancel Zen (this took ages, phonecalls…emails…). Then today I get told by the new ISP that no…in my case it will in fact be ten working days.

Christmas with no broadband. OH MY GOD.

Anyway, during all this, I went and met a buddy for lunch and a chat about games & stuff. On the way home, I take a corner a bit too tight in a car park and scratch & even slightly dent my shiny black electro-beast of a car. I have already got a quote for previous dentage, and reckon in total, I’m looking at a £2k+ repair bill.

Fuck.

My Cool image as the person with the shiny black techno-space-car and the ‘fastest internet in the village’ lies in tatters, with small children dancing around it, jeering like some twisted version of a marillion music-video directed by an angry Tim Burton.

So hmmm. Things going a bit badly on that front. On the GOOD front, I’ve got a lot of work done on production Line, to do with Robots and upgrades, and actual ‘game’ stuff. Its feeling a lot more like a playable game than before, which bodes really well.  My internet is currently running through a usb-dongle to a mobile phone-created tethered hotspot. I do hope I don’t run out of my 2 gig allowance before I  …</end of signal>

 

 

 

 

Why your indie budget calculations are massively, stupidly WRONG on every level.

I see a lot of pitches that contain budgets, I also read a lot of post mortems. Some of them make me laugh, some make me cry, some of them actually make me irrationally angry about how badly wrong they can be. Just in case you are too busy to read this blog, here is the TL;DR:

The cost of your office chair is not contained entirely within your budget for fucks sake.

And yes…this comes from ME the person who famously argued (seriously) that everyone making an indie game should buy (second hand if necessary, mine was ex-display) a Herman Miller Aeron ultimate office chair. (I paid £800).

chair

I see a lot of budgets that look like this:

2 man-years development @ $90,000 per developer.

2 x top-end development PCs.

2 x office chairs

etc…

I don’t reply, but if I did, it would involve swear words and lots of capital letters. Why? Lets look at it like this shall we? I need a new boiler fitted (I don’t…but lets indulge in the willing suspension of disbelief for storytelling purposes). I phone around and ask for quotes from some plumbers. Here is a sample quote:

Quote for new boiler:

1 x New boiler £2,500

1 x plumbers van £15,200

1 x spanner £4

1 x blowtorch £45

1 x plumbers shoes: £65…

plumber

Aha! hold on! we have just realised how totally flipping insane this is haven’t we? Please tell me its obvious…please tell me I’m not the crazy one here? I’m literally begging you. The chair I am sat on typing this is the chair I bought shortly after moving house about 6 years ago. its the chair I coded all the DLC for Gratuitous Space Battles in, also the chair I made Democracy 3, Democracy 3:Africa, Democracy 3’s DLC, Gratuitous Space Battles 2, Gratuitous Tank Battles, and the chair I published Big Pharma and Redshirt from. Its the chair I’m coding for Production Line from. Have I made my point? I hope so. Also its as good as new, I suspect I’m less than half way through this chairs working life. My per-game costs for this chair are probably about £50, of the £800 I invested in it.

Depreciation and Capital Investment are things. If you want a publisher to invest money in you, you MUST at least understand them as vague concepts. Also…fuck publishing, if you are starting in a career as an indie developer (or anything!) you have to understand them. You have to understand investment, you have to understand the long term. It seems a growing number of people are attracted to the ‘romance’ (ha!) of being an entrepreneur, without any willingness to understand what it really means. There are also a LOT of wannabe game developers who think ‘paying your dues’ is something that happens to other people, or only in the movies. While I am annoying and offending everyone, lets go the whole hog and share some realities:

Reality Check #1: You having graduated with a degree in Computer Science does not mean you are gods gift to programming. You will be VERY VERY lucky to get a junior coders job fixing bugs in the tools. Expect to do that for at least a year.

Reality Check #2: Its quite practical to employ programmers on the other side of the planet, even without meeting them. I’ve never met half of the Squeaky Wheel team, and they did a great job. Your competition is global, not the other guys/girls in town.

Reality Check #3: Some cost comparisons:

Consumer Prices in Manila are 59.57% lower than in San Francisco, CA
Consumer Prices Including Rent in Manila are 74.11% lower than in San Francisco, CA
Rent Prices in Manila are 86.59% lower than in San Francisco, CA
Restaurant Prices in Manila are 73.26% lower than in San Francisco, CA
Groceries Prices in Manila are 66.51% lower than in San Francisco, CA
Local Purchasing Power in Manila is 57.87% lower than in San Francisco, CA

Remind me why a studio based in Silicon Valley, made up of young (inexperienced) recent graduates is a better bet for making commercially successful indie games than…I dunno ANYWHERE else on the planet? Oh and by the way, pointing out that health insurance costs are expensive in the US just makes the case for hiring someone from Europe/rest-of-world even stronger.

I know I’m coming across as one of the famous monty python yorkshiremen sketch members..but jesus christ on a bike, why are so many people expecting to walk straight out of college in the west coast of the US straight into a middle class income in a much-desired profession without so much as breaking a sweat? Frankly, even if you DO have skills that are awesome enough to compete with the price differential against coders in other locations, I’d STILL prefer someone who had struggled, and was ‘hungry’ for success than someone who just ‘expected’ it.

I feel that generally there is a vast discrepancy between the income/lifestyle that many recent graduates ‘expect’ and the lifestyle & income they will actually get. I never expected to earn a tenth (seriously) of what I do now, and that’s why I still work as hard now as I did back then. I’m used to expecting to have to work my nuts off to stay in the industry and keep my head above water. Why am I MORE paranoid about competition that many people who are so new to the industry?

 

When I started as a programmer, There was way less domestic competition, international competition was very low, we had little competition from serious middleware (most studios made their own engine), and nobody thought the industry was a path to riches. It was still VERY hard to get a job, and my first job was indeed…tools programming,  and I had to commute four hours a day (yes…four) to get to and from that job, to earn HALF what I’d earned a year before working in IT support. Just because people like me, who have been coding for 36 years (yes really) and released over a dozen games have nice flash cars doesn’t mean you get awarded one on your first day in the industry.

TL;DR: Your salary expectations are very high, and you need to google ‘depreciation’ and ‘investment’.

Production Line blog#8 R&D and Car Sales

Another week…another video blog. This is number eight. I suspect thats more video blogs for any game I’ve ever made, and all before release. Just call me cliffski: the god of social media marketing eh? Maybe not… but at least I’m trying. I wish I could stream on twitch but with a 75k upload speed, that isn’t going to happen. Anyway, it would just be me swearing a lot and drinking tea, who honestly wants that in their life eh?

Here is the exciting new video! it features never before seen dialog boxes and more!

My plans for next week include seeing Star Wars: Rogue one before all you peasants in America, and gloating. I may also get some work done on the game. I aim to get some tutorial style hints on the screen to make it more obvious where all the conveyor belts are facing and what slots can, and can not go next, to make it easier for people to put together their first few Production Lines. I also need to add some cursor hints for when you are dropping conveyor belts and resource conveyors, and I need to get those floating text things back in and looking nice so you can see when you spend money.

In short, I’m going to be concentrating on getting gameplay & usability stuff in there, and not any more graphical features. Ultimately I want a lot more animation and ‘life’ in the game, which will mean a lot of flashing lights and little micro-animations on some of the props, but thats filler for later, after I have some people playing the alpha build and telling me what they think. I *still* have no idea if I will do a closed invite-alpha or an open, pre-order alpha, or some other hybrid. I suspect I’ll go the ‘pre-order and get alpha builds’ route around February next year which is not *that* far away now.

As always I implore you to share, link, tweet, instagram, snapchat, facebook, reddit, square, uber or tinder these videos. I have no idea what half of those are.

Rolling your own 2D Animation compressor in directx FOR FUN

This is the short ‘story so far’ on animation compression for Production Line, my next game. I use my own engine that runs on directx9,a nd the game is isometyric in style, so uses a lot of spritesheet-style animation frames. In short, this is about how I enable animations like the one below (excuse the crappy gif compression, actual image is less pixelated in the real game), to fit into tiny amounts of video memory. (The disk version of that anim is 4MB, compressed for download its 355k). This is an ‘idle’ anim of a marketing manager in the game checking his phone to make all-important marketing related phonecalls…

marketing

You might think that cannot possibly be a 4MB animation, but you would be dead wrong. The actual source graphic is 128 wide by 256 high, after cropping, meaning that a frame of it gets delivered from the artist looking like this:

people_business_phone_sw_0218

Thats no problem, but a complete animation cycle is 300 frames long, and I need two versions, one to look towards, one away (I can flip in X axis for the others). 128 x 256 x 300 is 9.8 million pixels, or a 4096 x 2,400 pixel sprite sheet, which takes up 39MB of VRAM. Assume both directions are in use = 80MB, 3 different characters is 240MB. Thats with one skin color and one gender. Ouch. So obviously we need to compress it.

I rolled my own compression system for fun, and to give me total control over how it works. The first step is to cut out any dead space and remove any duplicates. When our little dude is on the phone, the image doesn’t change, so we have a lot of duplication in that colossal theoretical sprite sheet. How did I approach this?

I decided upon a 64 chunk ‘grid’ for any image that would be animated, dividing it into 8 sections horizontally and vertically. With the raw image I get given, that gives me this:

grid

Actually this is annoying because his hair only just clips into another row, which is inefficient… never mind. The most obvious thing here is that a lot of the animation frame is just empty space. In order to kill both the ’empty space’ and the ‘same as last frame’ problems in one go, I work out a CRC (basically a unique signature) for each of those grid squares, for each frame, and store it in a great big list of data as a pre-processing step.

With all that data in memory, I then go through each chunk of each frame, and look for previous frame chunks with the same CRC. If I don’t find any, I mark it as a ‘used’ chunk. if I do, I just make a note of which earlier chunk to use, and increment the use count on the old chunk. Once this is done, I can go through all the chunks and discard the ones that have a zero use count (or are blank).
Stage two is to create a whacking great spritesheet of all of the chunks that I actually *do* use, which looks like a weird mashup of imagery like this:

sheet

(It also has an alpha channel). I can then go through all of those ‘used’ chunks and make a note of the UV values for each of them in my new spritesheet. Now, the final stage is to go through every frame of the animation, and make a note of which chunks actually get drawn, and the index into my list of ‘used’ chunks. This means I now have a big text file for the animation that tells me which of the 64 maximum chunks of the spritesheet I need to draw in each frame. In the case of this phone-dude, that shrinks the actual texture memory usage by 95%, meaning I can easily have a bunch of different animations.

Thats where I am right now, and its pretty fluid, and works without bugs. The next step will be optimizing the code, rather than the source. An optimisation I managed today was to actually successfully only draw the non transparent chunks when I do the rendering of each frame, which reduces the number of polys and draw calls. The next obvious optimization is to spot when a chunks ‘source id’ is the same as the previous frame, and then not bother updating it at all. Right now, I redo the UV lookup and apply the values every frame for this dudes legs, even though they don’t move during the whole animation. Thats a bit too much processing for my liking.

I’m sure middleware *does* exist that does this, but I like to code stuff myself so I know 100% how it works, 100% how fast/slow it is, and can ensure compatibility with all the rest of my code and workflow. I’ve probably spent a week doing this, maybe a bit more, but I have a pretty cool system now that lets me knock up a 30 secon text file when I get a new bunch of animation source files, then hit the launch button and the game will do all the preprocessing and give me the compressed data automatically. Yay.

This also means that with only 4MB+4MB of VRAM for an animation for a character, I could double the characters, and have both genders without running out of VRAM. This also makes the game more usable on low end PCs. Now the limit is my art budget, rather than the hardware :D Anyway here is a reminder of the final video, and also that this is for my car factory game: Production Line

marketing

Production Line blog video#7: BIGGER factories, sounds, and some gui stuff.

Trying to get Production Line close to an alpha release for people means doing a lot of relatively tedious stuff like resolution pickers on options screens, proper save game support, and so on. I still need some vague tutorialish stuff in there, and a host of minor bug  fixes before I even consider letting real early-adopter hardcore types try the game, but I am definitely making real progress in that direction.

Here is the latest video:

There is always something dodgy that has just gone in when you release a video, and this time its a mish-mash of factory sounds that er a bit ‘overpowering’ and not right. Still…better to have something rather than just a weird silence, or all those 1900s hammering noises I had in beforehand :D I’m also slowly working towards a better video presentation. I keep getting a glitch on my webcam which is I think because I was setting it to record at 1920 res, when I only use it for that bit in the corner, so hopefully shrinking that means I will have less demand on the video card and a smoother image next time. I am still really new to youtube, but at least I have a regular schedule I can tempt people to subscribe to now.

BTW Democracy 3 and Big Pharma are currently in the Humble Tycoon simulator bundle, which you may wish to check out:

66a4d2a484e775d3c344d6d258a8b5f2f3920c48

https://www.humblebundle.com/tycoon-simulator-bundle