Friday, June 06, 2014

Billy Bragg: The Video Game Hero

It feels like I've been building this game for months but I discovered today that tomorrow will mark eleven weeks. As far as development times go, that's nothing. For me, it's been eleven hard weeks of learning something entirely new and working long long nights. And it does, finally, feel like I'm nearing the end. The past few days has been about adding a few aesthetic effects and balancing levels so challenges are neither too easy nor impossibly hard. Last night, I had one of my most important breakthroughs: I managed to integrate interstitial advertising into the game. It's a horrible business, inserting these ugly ads into something you work so hard to get looking good but it's the ugly reality of this business. Nobody is willing to pay for anything and advertising is the only way I'll ever make any money from this terribly doomed project. I'm also tidying up some of my animations, which look okay, though sometimes just plain rough. A better example of my animations (and, yes, this is the 'good' stuff!) is my Billy Bragg character (above), who features as one of the game's heroes or antagonists, depending on which side of the political spectrum you fall. The game, as I think I've mentioned, is broadly satirical and Bragg acts as a nemesis to the game's chief protagonist along with other celebs and politicos ranging from Stewart Lee to the Mayor of London. I'm posting this Bragg video today because I like to prove that I'm not idle and because it links conveniently into a brief ramble about the most depressing thing I've heard in a long time.

Billy Bragg has confessed (perhaps tongue in angora bearded cheek) that 'the internet has changed my songwriting by taking up all the time I used to spend writing songs'. He was talking on the today's excellent Guardian feature, 'Seven Digital Deadly Sins', where he proceed to suggest that he spends most of his days watching a variety of people falling down holes.

I'm sure Bragg was playing up to the camera. At least, I hope to hell he was playing up to the camera. If not, then I'll take my ticket now and catch the next bus off this lousy planet. If the dimternet has tamed Bragg then what hope the rest of us? Had George Orwell been around today, would he be spending his time watching 'Charlie Bit My Finger' (a video, I'm happy to say, that I've never seen) rather than writing '1984'? Or would he, as I'd hope, be among the few of us who are genuinely trying to cut ourselves off from the online world or, at least, merely use the medium without it robbing us of our lives and souls. I've written before that social media is the soma of this generation and nothing has changed to make me question that. I don't think I'm simply being reactionary to say that we are losing strength in our mental limbs and we must do everything in our power to retain focus on the things that matter. Social media boasts about 'ease' and 'speed' and its integration into our lives but I fail to see how that's a good thing. It's why I find Bragg's confession so depressing. He's spent his life talking about activism yet it's left to Bill Bailey's contribution to the debate to point out how political engagement has changed with social media. Politics has become a trivial and, frankly, no so interesting meme in a greater world of hamster videos and fat people falling over. That's not to say that I don't appreciate the power of a good one liner, wit squeezed into 140 characters, but there is also a place for length, pace, argument, and complexity. In a separate piece yesterday, Will Self (who also, incidentally appears as one of the 'good guys' in my game), recommended books for teenagers based on their length. He's right, of course, but that doesn't make it any less depressing. Explore the places of difficulty in your life. It's where you always discover the most fascinating revelations. I suppose I'm as much a victim of this change as anybody. Friends shake their heads slowly, clearly thinking I'm a fool because I don't get involved in social media. I've certainly made decisions I've regretted. I always thought my book by Stan Madeley (the UK's top Richard Madeley lookalike ) would have been more popular than it was. The fact I didn't engage in social media and publicity was plain stupidity on my behalf. Yet I'm stubborn when it comes to my convictions. Bragg is probably right when he concludes by saying that 'everybody wants to be famous, nobody wants to be scrutinised'. That's the world where people are more interested in celebrities for their celebrity rather than anything they actually do. I genuinely can't see the attraction of fame. Scrutiny sounds far more interesting. I'd rather be disliked by a few than loved by millions. I'd rather be Will Self than Katie Perry, Billy Bragg rather than Stephen Fry. Social media is made for the latter, which makes it sad when I see it embraced by the former. This is a ramble but I'm tired and I suppose it's when I'm tired that I can see that my Android game is only going to be another expression of my stubborn unwillingness to join the throng. Only I could make a game that skips merrily past the mainstream and attempt to attract a very small minority. I only hope just a few people will smile and appreciate that I've tried something a little different. I'm hopeful, for example, that it will be the only video game featuring Billy Bragg. Naturally, he won't be singing but, so far, neither will I. The game looks pretty good but it still lacks music. I'm still attempting to finish recording my closing satirical song, though getting a quality track is killing me. I've fingerpicked a pretty good acoustic guitar pattern and even if my £12 USB microphone isn't exactly studio quality, it's not entirely bad. My singing remains the problem. I can't decide if it's a problem of my accent (I sound terribly northern) or simply a weak voice. I've been recording multiple versions in different registers so I can stack my vocals. Oddly, I think I probably sound less bad singing as a group than I do singing alone but I'm finding it difficult to mix them into anything reasonably listenable. Ideally, I'd like to just record myself singing over the guitar but one mike and a bad voice don't make for a good combination. But that's another ramble for another day and I must go and make this blog post available on social media. [sarcasm=true; walks_off = "chuckling maliciously";]

Monday, June 02, 2014

Thinking Alpha

My intention this week (yes, I know it won't happen) is to have a build of the game ready to give friends and family to play and report back any bugs / ideas / impossible to complete levels. I also hope to get access to a Mac to see if I can build a version to test on iPads and iPhones, though that's less important given that I can't see myself spending the £100 to buy an Apple developer's license anytime in the near future. However, I've discovered that there's a way for developers to send apps over the web to Apple devices, which will at least allow me to see how the game works in that alien environment. Today I have two jobs. The first is to throw myself into writing the game text. I've (somewhat foolishly) created a game with plenty of places to insert funny stuff. The only point of the game is to make the player laugh and so there are dozens of arrays to fill with as many witty one-liners as I can fashion. They'll get served dynamically as you play the game, hopefully meaning that it shouldn't get too stale too quickly. The second job is to get the app's size down. Last night it stood at a whopping 47mb, which was worryingly close to the Google's stores 50mb limit. It's a problem of textures. Many of graphics are still the size they came of my Samsung tablet, which is where I've drawn everything for the game. A megabyte for a pair of underpants definitely seems like overkill. I've started to tinker with the texture settings within Unity, brining many of the textures that were 2048x2048 to 1024x1024, those that were 1024 down to 512, and taking icons down much further. I can barely see a quality difference on the screen and the app is already down to about 33mb. My biggest breakthrough of the weekend was to get my game objects flipping across the x-axis. I'd read last week's Unity changelog and noticed they had claimed to have fixed the bug which broke the physics engine when scaling negatively. However, when I sat down and tested this claim, scaling the objects by -1 on x, any physics attached to the objects immediately failed. I either had characters looking one way but their bodies acting as though they were facing the other or I had characters falling in a heap of body parts on the floor. Clearly, the Unity bug hasn't been fixed. After a little work, I realised that the problem seemed linked to having objects in a hierarchy. If, for example, I had a human figure with arms and legs and I created the usual hierarchy of hand attached to lower arm, lower arm to upper arm, upper arm to torso, etc, then the physics would fail when scaled by -1. However, removed from the hierarchy, they would work. My solution was to recalculate the object's physics settings and apply them on the fly as objects changed direction. Since the problem only occurs when objects moved out of the kinematic state (that is, went from being unaffected by the game's physics engine to having all forced acting upon it) I would also only keep them in the hierarchy when the object is kinematic and then dynamically flatten the structure when I needed them to work under physics. Christ, all of this must sound so very boring. Is there anything duller than tech talk to anybody other than a very smaller number of people who enjoying reading tech talk? Is it a sad confession to say that I actually visit the Unity forums just to read about this stuff? Okay. I have writing to do including as many insulting put-downs as I can manage for my 'failure' screen.

Saturday, May 31, 2014

Rain! Beautiful Virtual Rain...

Two dull programming-related blog updates within two days? What am I thinking? Does anybody read this stuff? But I guess I'm excited because it's raining. In my game, I mean. I keep saying it's all about the small details but I genuinely think it's half the battle. Being able to add little touches without impacting too severely on the performance is one of the ways that Unity never fails to amaze me. When I set out programming this game, I assumed that my lazy techniques would soon punish the game's performance. I'm not by training an Object Orientated programmer, so it's taking time for me to come around to not writing things in a very linear fashion. I'm also writing this game for tablets and (I hope) mobile phones, which means I haven't got huge resources to play with. Each time I add a feature, I think the frame rate will be impacted hugely. Last night I added rain. Unity barely flinched. [Sidenote: the way I added rain was to create a long sprite, fading towards the upper end, a slight tear on the other. I then display about 20 or 30 of them (random intervals and timings on each) inside the camera bounds (don't waste precious CPU cycles drawing rain you can't see), and then I move them down as I very quickly stretch them. I also apply a gradual fade by adjusting the alpha values. Add a random angle of slant and with the right timing, they look just like rain. I keep reusing the same GameObjects to save time, repositioning/re-angling/retiming the line of rain as soon as it has faded from view. I also animated a few drops of rain splashing on the ground which I also randomly display. ] game1 The effect isn't bad, as I hope you can see from this deliberately empty and uninspiring shot of my game. And, yes, it's mainly in black and white but it does have splashes of colour. The lack of objects on the screen accounts for the framerate nearly hitting 70fps, as you can see in the top left corner. I added that frame rate display to show me the average performance and the numbers are surprising. On the PC, the framerate is effectively about 450 frames a second (though, of course, my screen doesn't update that quickly). It means that the code could update the screen over four hundred times per second if called upon. In reality, 30 frames a second is what most games run at. Some of the newer games run at 60 frames a second, which is something of a gold standard for 3D games, and accounts for much of the current bickering between XBone and PS4 owners. My game is 2D so it's not quite so impressive to be hitting around 60fps on my tablet but that's (apparently) it what it's doing. It drops a little on my phone to somewhere in the 40-50fps but that hopefully means that I'm in a sweet spot given that my phone is neither the most recent nor the powerful. The more people can play this game, the more my efforts are worth it. Today it's about fixing more bugs, adding more content which I drew last night, playing and replaying each level to see if it feels right. I'm thinking about ripping out all the music since I also need to start to reduce the final size of the final app. It's compiling into a 45mb package, which is just under the Play Store's limit of 50mb (I believe you can go much higher but it involves breaking the app into different resource files, which is something I don't want to do). 45mb seems far too big for this game, even if it is packed with hand draw graphics which don't lend themselves to tight compression. The main problem seems to be five or six very large graphic files, which I'll need to reduce in quality. Hopefully there'll be no obvious visual impact on the game. Hmm… I push on.

Friday, May 30, 2014

On Vube Talent, Alan Gogoll, Google Ads and English Folk Music

Morning was creeping over the local church by the time I finally fell asleep last night. I'd been working late trying to get a website finished but also struggling with a problem with my soon-to-be-published Android game. Taking a break from one kind of code or the other, I was browsing the web when I accidentally clicked on a link that took me a website called Vube. It seemed to consist of amateur (and not so amateur) musicians posting their work to be voted on by the public. It was apparent very quickly that these people are serious about their music. For 'unknowns', the quality of the videos was astonishingly high. The sound quality of most of the recordings sounded, to these ears at least, on par with something produced in a professional studio. Yet as I browsed through the performances, amazed by some, I was equally depressed by others. It's not the level of talent that I found depressing – though, I suppose the internet has collectively taught us that the world has an abundance of talent which routinely gets ignored. What I found depressing was the real lack of creativity. By a huge margin, the majority of these performances involved the word 'Cover'  and I very quickly established how many versions of 'I See Fire' by Ed Sheeran a man needs in his life before he starts to root for dragons instead of hobbits. The answer, incidentally, is five. The experience reminded me of walking past those artists you usually find working in shopping centres. They work in pencil and produce amazingly accurate reproductions of famous faces. Because they work from published photographs, their work is a copy of another, so despite their copious ability with the pencil, it's all a mechanical effect. There's no true 'art' to their work. Nothing of themselves on the paper, though, of course, they clearly draw the chipmunk member of One Direction because that's what will sell. Likewise, there's very little of the people performing the covers on Vube, just lots of pitch perfect good looking young women singing songs that involve vocal gymnastics. Lots of seasoned instrumentalists proving they've mastered their instruments as well as their heroes but have no message of their own they feel willing or able to convey. There are exceptions to the rule, of course, such as the amazing Alan Gogoll whose genuinely original guitar work just shone above anything else on the site. It's strange how Gogoll's talent has lodged itself in my mind. I saw a video of his posted on another website a few weeks ago and (not recognising the name then) I stumbled across more here where his name has now firmly lodged. His is the kind of talent it's good to see emerging via the web. I don't know. Perhaps I'm just jaded. Everything about my work is rough and imperfect. I like that but also recognise it as a huge defect. I've mastered nothing, even if I put my heart and soul into every one of my projects. It also saddens me to see in linking to Gogoll's site that he earns a crust by performing at weddings. Reminds me of those amazing street musicians you see begging for coins as rich bankers stroll past. Some might say that the latter make the world turn but it's surely the former, people like Gogoll, who make it worth lingering around in that world. I'm neither a banker nor an artist. It's been over a week since I last blogged and I'm still slowly getting there with my game. Monday night, Unity updated to version 4.5 and immediately my game blew a fuse. As far as I can figure out by looking over their changelog, they'd fixed a problem registering touches on the screen which meant that my game had been calculating certain things based on the wrong values. With the correct values suddenly entering into my equations, things began flying all over the screen. That was a worrying few hours as I struggled to get my game back to where it had started. However, things began working again and they perhaps now work better than they did before. I'm now looking forward to trying a few of the other things the Unity gurus have fixed. Yesterday was what's commonly known as a 'ball breaker'. This week I've been trying to add ads to the app, which hasn't felt right. I've worked hard drawing every graphic in my game and I really didn't welcome the intrusion of ads for some woeful Kim Kardashian flab busting workout DVD. However, this is the world we live in, I need the money, and I had to face the more pressing problem of actually getting the game to compile with a library of code for Google Ads. At the same time, I've been using all my valuable time building a website for a nursery school (just as depressing as it sounds), with breaks from that relatively easy work broken my throwing myself into the ugly world of Java libraries, Unity plugins, and worse. Yesterday was a fourteen hour stretch of work (minus a couple of quick stops for food) but the website now looks complete but more importantly, the following appeared on my game's level select screen in the last hours of darkness. Screenshots_2014-05-30-00-41-42 Damn, doesn't it look beautiful? The answer to my problem was to remove the old Unity plugin I'd been using to integrate my game with Google's Play Services and use the official Google plugin, which didn't  conflict with Google's other plugin for AdMob, their ad delivery service. Beyond all of this, the last week has been about bug catching (both real [damn this muggy weather] and virtual) as well as adding small details, such as a credit screen that isn't a boring credit screen. I've also… Well, I really hesitate to admit this given my criticism of Vube, or perhaps out of shame, embarrassment, or what Stewart Lee once described as the horrible thought of 'a man trying to do something sincerely and well'… However, I've written a song for the game. The music has been bothering me since I began because I really like doing things myself and I didn't want to use third party music, even if it's in the public domain. I've been currently using a 1920s jazz recording as my soundtrack. I've yet to decide whether to keep it (it fits in with the theme of the game) or go without music. My song, however, is meant to accompany my credits. I can (but rarely) write songs but this, I think, isn't one of my worst. The lyrics are nicely twisted and, in my few spare minutes, I've even worked out an arrangement of odd finger-patterns for the guitar. All was good until I sat down and tried to record myself singing it. The guitar part sounds surprisingly good but the recording sounded terrible. A bad voice, my battered old Gibson acoustic fitted with new strings, and a £12 USB microphone doesn't make for a combination worthy of Vube. Yet amid the hissing and crackles, I could recognise something I've never realised about my singing before. I sound like a bloody English folk singer and that's not something that fills me with particular enthusiasm to try again, let along post to Vube, here, or the Google Play store attached to my game. I don't know why I should find this odd. Perhaps it's because I predominately listen to American musicians, with the notable exception being P.J. Harvey, so I my tastes are fairly attuned to American tones. My voice seemed naturally to drift to very different places which were purely English folk. Vocally I sounded a bit like John Renbourn or (now sadly late) Bert Jansch. My guitar work sounded like Bert Renbourn or John Jansch. Perhaps I need to hire a Vube star to record my song… I'm not sure what makes me uneasy about English folk music. Perhaps it's the image of middle-aged real ale-drinkers talking about church sculpture. I'm now trying to convince myself that it's not all bad. There's always Billy Bragg. I was buying superglue in Wilko earlier in the week (trying to repair my favourite USB cable -- yes, I have a favourite USB cables, mock as much as you like!) when they started playing Billy Bragg's 'Handyman Blues'. It's a great track from an excellent album but never before had I thought about the Englishness of Bragg's voice. Perhaps he doesn't sound enough like me to make me aware of his sameness. I suppose it's why, when I first started to read English poetry, I found Larkin unbearable. Eventually, I realised it was only because I was responding to a world he was describing which felt too much like the grim world around me whereas a poet like Ted Hughes felt elevated, distant, heroically what a poet should be. I found Larkin's similarity  too unsettling and only after a very long time did I begin to enjoy his poetry without that sense of suffocating identification. All of which is me rambling slightly because I can. I needed more sleep than I got last night. This is the dull reality of what should (and, in truth, usually is) a fun business. Today I really want to devote itself to rain, as I'm suddenly taken with make a late addition to my game in the form of an aesthetically pleasing rain effect. But perhaps I should just get the game finished and out the door. It's taking far too long to get everything right.  

Monday, May 19, 2014

The Angel of High Satire

I seem to spend my life between identities. What do I mean by that beyond trying to sound profound? I suppose I mean: I don't know what I am. So many people seem to define themselves by their jobs or their religion or their marital status and number of children. I don't really have any identity in those respects. I don't think of myself as 'a writer' and even when I had a book in bookshops, to say 'I'm a writer' felt hollow and not entirely truthful. I never say 'I'm a cartoonist' because I haven't had any cartoons published and I refuse to spend the rest of my life being Private Eye's least successful would-be cartoonist. I'm not an illustrator, though I occasionally provide people with illustrations. I'm not a web designer though I sometimes build websites. Nor am I an animator, though I've made a few animated shorts. I can't even say that I'm an academic because my PhD never led me into any academic post of significance. Now that I'm programming again, I am reluctant to call myself a programmer because the programming is only serving an end as far as another of my non-descriptors, that is, the cartoonist part of me. cherubI've spent two months (or is it now three?), building a game which is little more than a very large satirical sketch or (more accurately) oafish cartoon. It's taken as much efforts drawing the graphics as it has programming the code. I'm part proud of it as I am part ashamed of it. The whole thing is meant to be satire, which is why, over the weekend, I added the following character to the game. At the moment, he flies onto the screen at random moments to add a little difficulty (and some reward) to the challenges. Yet I suppose my 'Angel of High Satire' (is the minuscule penis too much?) is a way of my acknowledging that everything I do is really directed towards satire. I suppose I might call myself 'a devil of low satire' because I think it's always been the closest description I would recognise of myself had I actually achieved anything of note in that field. I don't think my game will change that, though I hope it will have a enough edge that people might share it and laugh for all of the few moments they play it before deleting it forever. The humour might not be up to quality demanded by the real High Angel of Satire, on whom I modeled my version, but it has amused me. And that's the problem. My worry now is that the game contains too many of the things that amuse me such as the thought of a naked Ian Hislop providing the game's hardest challenge. I wish I could have created something playable by somebody other than that person I see in the mirror. Next time, perhaps.

Unity2D: Creating An Explosion Effect

A quick video I put together to show my workaround for the missing AddExplosionForce2D in the Unity engine. It's probably of interest to nobody out there but it gives a good idea of how Unity works and the very basics of making things move around on the screen.

Saturday, May 17, 2014

Small Details

Writing this feels like I'm coming up for air. I read an article somewhere the other day which suggested that it takes six months to develop even the simplest game. I'm not entirely sure that can be correct, but, perhaps taken as an average, it's probably much closer to the truth than the fabled 'couple of days' it took the Flappy Bird genius to weave his magic. At the other end of the genius scale where things don't come easily and everything is a struggle, it only feels like I get closer to the end as I tick off the increasingly mundane tasks that dominate my 'To Do 'list. Beyond that, I spend most of my time fixing bugs and populating my levels with graphics. My problem goes back to the beginning when I didn't so much design the game as start to play with Unity and a game gradually began to emerge. My game levels are potentially huge, though there are limitations which means not every square inch needs to be populated with landscape. I'm naturally reusing assets all the time but I need to break that up with unique graphics, which is where most of my efforts are not deployed. The bug fixing takes the longest. A bug earlier in the week took two days to figure out but taught me an important lesson about the difference between Unity's Awake() and Start() methods. Compared to that, coding new features is an absolute pleasure that rarely takes a very long. The exception to that rule was the problem I faced creating explosions in my game. Having explosions came pretty late in the process and I thought it would be an easy thing to add. Unity has an AddExplosiveForce method  which you can add to game objects so they act as a bomb, pushing other objects away. However, Unity separates its 3D functionality from the 2D in an obvious way. If a method is designed for 2D games, it will have '2D' appended to the end of the name. So, for example, there's a RigidBody component, which makes a 3D game object respond to gravity and forces. There's also a RigidBody2D component with does the same for 2D objects. AddExplosiveForce adds an explosive force to a 3D object and, as you'd guess, AddExplosiveForce2D would do the same for 2D objects. Except Unity doesn't currently have AddExplosiveForce2D which meant I had to write my own. It took a day but I solved the problem and my explosions are now working well, with sticks of dynamite even destroying other objects with a nice blast that radiates out. However, it's an example of how I'm spending my days implementing features which are only a very small fraction of the finished game. Not everything takes so long. I'd been putting off adding more online leaderboards to the game but I finished that just now, perhaps half an hour's work to add 30 leaderboards, one for each level I'm currently planning to include in the finished game. I also finished adding the majority of my 'achievements' and they now stand around the fifty mark which means I'll have to spend extra time checking that every one of them works, which means yet another game reset so I can play through it and unlock the achievements myself. Even at this relatively late stage in the process, I'm learning new things. The surprising thing I've recently discovering is that it can be really small things that make a difference. Attention to detail is important. Just as a whim, I added a very small detail to the game about three days ago and it has completely changed the game's dynamic for the better. It was an addition I made simply to add a little variety to the gameplay but it completely changed the way the game feels. The same is true of sound effects. I still have a few sound effects that don't fit but those that do really make a difference. In a way, I suppose all of this is my way of saying that 'things are coming together'. As it stands, the game is pretty much finished in terms of the gameplay (though I constantly worry that there are times when the player doesn't have enough to do). I have quite a bit of level design to complete, but that simply comes down to my finding the time to draw custom graphics for the different challenges. On top of that, there are things to write and I have to create some tutorial mode or, at the very least, provide instructions on how to play the game. Then my final step will be to add some advertising, which I'll do simply in the vague hope that it might earn me a few bob when others try this game. I don't expect it to hang around on people's smartphones and tablets for very long but I'd like to maximise whatever revenue I can generate. All this work should have a point and, I admit, at the moment, I fail to see what that point could be beyond my own amusement.  

Thursday, May 08, 2014

A very long day yesterday thanks to Other Work but when not struggling to edit corporate videos, I found time to write some code. I also took the plunge and paid the $25 fee to become an Android Developer.  By the end of the day, I had my first online leaderboard up and running as well as my first two achievements unlocked. Today I need to code a method of keeping track of all the game's many achievements (I want there to be about 30+) as well as unlocking them as soon as they're achieved. The game has taken huge strides since Sunday night when, in a moment of rare clarity, I finally wrote the algorithm that had been eluding me for a month. The game runs in 2D and involves a fair degree of parallax scrolling. Parallax is an effect you see in many games, most notably in Ubisoft's new Child of Light, which I've taken a little time to play simply to enjoy the stunning artwork. Whilst I can't achieve anything like the Child of Light effect (my artwork is pretty woeful), I have programmed about eight layers of parallax which seems to run well on both my new tablet and my aging mobile phone. In Unity, that shouldn't be that difficult since it's a 3D engine and if you set up your layers in 3D and move a camera across them, they would naturally move in parallax with the more distant layers scrolling more slowly than those in the foreground. However, I've not followed that approach. I wasn't sure that building an entire 2D world in memory would be the most effective use of resources so I took a programmable approach. My 2D layers are constructed from patches and I only display those patches which are visible to the camera. I thought it would be an elegant solution so long as I could get a simple script to move each piece the right amount depending on their  supposed distance from the camera. Finding that 'simple script' took about two months of work. Last week, I had about four different versions of my script working away at the same time, depending on the kind of scroll effect I needed for a particular layer. Each routine ran to a few hundred lines of code but, on Sunday night, half an hour of scratching on the back of an envelope and I'd managed to write a new routine which did the same job in 20 lines and could work for all my layers. It's now running quicker and allows me to reposition the camera anywhere in the landscape. Previously I couldn't move the camera around by any large amount without leaving the landscape lagging behind as it tried to catch up. Now I can switch the view from point to point as often as I like, as well as occasionally widen the camera's viewpoint to open up a larger view of the landscape. I got up on Monday so delighted that I completely removed another function which allowed the user to slowly move the camera using onscreen controls. I'd been shying away from using touch gestures but found a simple explanation online and soon had written a routine to handle pinch zooming and finger scrolling. So, the game is looking quite good, feels like a real game, and now has the online connectivity that I wanted. I wish I could just figure out the remaining problems with the gameplay. It's fun but I'm not entirely sure it requires enough skill. That's my job for today, providing Other Work doesn't slow me down.

Thursday, May 01, 2014

New Month, Old Problems

The start of a new month so I thought the very least I should (and could) do is write a blog post but, as you can see, ended up also posting a brief video about Unity. I suppose the video proves that I am actually working on something, even if my usual reticence about ongoing projects means that I'm not ready to send it out into the world. I'm also horribly aware that the previous app I wrote still hasn't emerged. To be honest, I still haven't decided what to do with it and I haven't the time to invest in finishing it with the degree of polish I'd expect from any published app. I just never have enough time. I'm not entirely sure what happened to April. The month went quickly, dominated as it was by trips to various local (and not so local) hospitals where my sister underwent a series of increasingly unpleasant (for her) investigations and then procedures. I'd like to say that she's feeling better but she isn't. Nor are we much more advanced in knowing the cause of her long time illness. Things have been found but no real explanations give. We have a few ideas, some theories, but, as ever, we await somebody who might actually understand it and wish to treat it. As for myself, I've just been trying to keep my head down and plough on without stopping to think too much. Reflection breeds misery so I haven't stopped drawing and coding. You might also have noticed that the month ended with a rarity. I exceeded my bandwidth and this blog disappeared for three whole days as I waited for the new month to bring a bandwidth reset. There might have been some way for me to keep it running but I refuse to plough what little money I don't have into something that earns me nothing. I don't honestly know why I keep on with this charade, though it was a little gratifying to learn that my outpourings are now being archived for posterity by the British Library. So, hello people of the future.  [Waves forlornly across time and space] Speaking of earning nothing through my labours: as the video proves, I'm *still* toiling away on the game. I'm well past the stage where I should have abandoned it for something better. I have better ideas than this and the gameplay mechanic still has a flaw in that I still can't widen the player's view to give them better control over events. The only thing I can say positive about the game is that it makes me laugh on a regular basis and that, ultimately, is the only thing I'd intended when I set out to create this monstrosity. I now feel like I'm in the Unity2D zone. I keep getting better ideas for better games which I think I could build. Last week, I had an idea for a simple game and I built a working prototype in less than two hours. If I had time to devote to it, I might work on that simpler game. I have a Unity mindset and my projects are now mainly constructed in code rather than using the visual editor and nothing in my game exists long than they are needed. I think I've said before that the beauty of Unity is the ability to create and destroy GameObjects: which are containers for graphics, sound, and even game logic. If I were making a tennis game, I could simply create game logic for a single's match or a different set of logic if you're playing doubles. The last couple of weeks have been about small things: getting menus working, unlocking trophies, and victory messages. I have a high score system in place, though it's not connected to any internet leaderboards which I would eventually like. My one obstacle remaining is really learning about serializing data but that is for another day, week, or even month. The other stumbling block is music. Sound effects I've pretty much solved by going around the house snapping twigs, hitting pans, and making grunts into the microphone. Again, I'm not much of a foley artist but the effects don't sound too bad. I wish I could say the same about the music. Ideally, I should find some musician willing to provide a little background jingle but I've ended up doing it myself. Not having a proper MIDI keyboard limits what I can do. I've borrowed a Apogee JAM from a friend so I can connect my guitar to the PC but I don't have facilities to really record my battered old acoustic guitar and my (almost as battered) electric sounds too grungy. So far, I've had only limited success primarily because the sounds I like to make don't at all fit the game which requires something more comical, possibly played on the tuba. But I could waffle on like this all day and I have jobs to do instead of talking to myself and people in the year 2153 studying low-end blogging in the 21st century. I'll blog again, hopefully before this month's bandwidth runs out. Not that I'm complaining that the blog gets visitors but I'm sure it's only people looking for America's hugely successful Spine blogger who talks only about spines. That's clearly where I've been going wrong...

Friday, April 18, 2014

Getting Pretty Alpha

I guess I made some bad design decisions early on which have taught me to take longer designing any future project before I start hacking away at the code. However, I didn't set out to write a full game. I thought I'd simply take a few days to see how Unity worked. Weeks into what has become the equivalent of writing a book (with about an equal amount of work drawing all the graphics), I'm still left with things that require too much work to get entirely right. One such bad decision was the placement of my camera. I didn't understand anything about the Unity orthographic camera when I began and I set it up pretty much at random, with no thought to what might be right or what I might need. The problem is that the camera is now too close to the principal subject . I can easily pull it back but that exposes more of the background and I'm not sure that the code I've written to generate that background could work quickly enough to double or quadruple the amount of terrain than needs to be shifted. I'm tempted to give it a try. I installed a build of the game on my old Samsung G2 and it runs nice and fast and it is pretty playable… Or, at least, I find it a bit distracting.  I never intended it to be phone compatible so that's an unexpected bonus. However, I'm not entirely sure where the G2 sits in the spectrum of devices out there. But back to the problem with the camera: I've adopted a compromise by widening the camera's view at certain moments and then returning it to the closer view. It works but I think I'll need to start getting feedback. I'm reaching the stage when I really need some people to try the game, even in this early stage. In software development terms, I'm probably reaching the Alpha release where you can actually play the game but lots of things are rough and need work. There are about eight levels to play and complete and things to be won. But the whole thing doesn't quite hang together as a finished project. I'm currently scouring the internet for free sound effects so I can liven up this generally silent world. So far, I've limited myself to making the noises myself, going around the house hitting objects together, dropping bags of sugar on bags of rice, and then strangulating myself simply to get the right sound effect. Of course, finding people with Android devices isn't that easy. Literally everybody I know has Apple and although Unity can easily build an Apple compatible version of my game (it's all device independent), there's no way I can afford to do that. Unlike Google who have a relatively friendly ecosystem (bar the £20+ they ask if you want to become an Android developer and have access to their cloud services), Apple won't even let you develop or test for their devices without you first coughing up £99. However, that's something I guess I'll deal with if ever the time comes that I think it's actually worth exporting this to Apple devices. At the moment, I'm hoping all this will come together at the end. The beauty of Unity is how it separates the hard work of getting things to appear on the screen on difference devices from the less difficult but far more intricate work of getting the game logic working correctly. I seem to spend most of my hours either telling the software when to enable or disable controls and buttons or puzzling over some strange behaviour such as this morning when I spent an hour trying to figure out why some of my graphics were shifting through the z axis, i.e., moving behind other layered graphics in front of which they were meant to be sitting. Yet when Unity is willing and if you're filled with bargain Lucazade which I've started to drink to give me the energy to finish this project, things can happen very quickly. Last night it took me about four hours to build a reward system into the game. I want people to play the game simply to unlock the things I'm hiding in there. The way I'm doing this is probably the only good idea in the game and I've not seen done anywhere else but it's precisely the kind of silly little attention to detail that gives me real pleasure. When writing my Stan book, it was actually things like the fake photo credit on the back cover that gave me the most pride. I love things that warp traditional formats and though my game is about as simple, mundane, and downright run of the mill as any, I hope there are things here that will give amusement to people will my own warped outlook on the world. My next job is to draw a panel cartoon strip for the introduction. The game has very little story but a little context might help it feel a little less like the random product of a tinkering mind.

Thursday, April 17, 2014

The Mike Harding Conundrum

Mike Harding seems to be following me. Or I'm following him. The least likely answer is that there exists some strange quirk about the great universal cog that makes Mike Harding decide to visit Manchester's Waterstones whenever I'm there. It's been weeks since I last visited the Deansgate store and I remember the day because I was relaxing in the top floor restaurant (my favourite place in Manchester) when Mike Harding's head appeared at the top of the escalator. It was followed by Mike Harding's body and Mike Harding's legs. He looked just as he looks on the radio. DrewFriedmanYesterday I found myself in Waterstones after a rather sad trip to visit the University bookshop. It didn't have any of the books I wanted to browse nor any real surprises. It was in Waterstones that I landed my bargain. Waterstones never ever have Drew Friedman books on the shelves. I check fairly regularly and the only time I've come across a Friedman, was a few months ago when they were selling one of his collections in their sale for a criminally low price. They had another sale on today and, sure enough, there was more Friedman books. This time both of his Old Jewish Comedians were sitting beside each other there on the shelf and each had been marked down to £3. I felt slightly ashamed taking advantage of the sale but delighted I'd actually managed to find a couple of books I'd been meaning to buy for a long time. After that success, it was time for a coffee. And that's when Mike Harding made his regular appearance. I guess you'd have to be of a certain time and place to appreciate who Mike Harding is and I'm not entirely sure that any of the other diners were quite a star struck as me. I'm tempted to say 'Fred Dibnah with a banjo' or 'the Billy Connolly of the north' but neither is quite accurate. Not being a folk fan, I didn't follow his metamorphosis into one of the UK's top champions of folk music. However, growing up loving comedy, his voice was always lodged deeper in my subconscious than I'd probably like to admit. It's a strange business seeing people you recognise from TV because the part of your brain that recognises them, doesn't know where you recognise them from. Pure instinct makes you look and prepare to acknowledge them. Then some higher order thinking kicks in and you have to quickly adjust your eyes to look at something else. The worst time that ever happened was walking down from the University in Liverpool. I was just coming out of Reid's second-hand bookshop a few years ago and a tall guy was walking towards me. I sort of nodded and smiled and only then realised that Alex Cox has no idea who the hell I am. Cox is another of those important figures whose opinions always matter to me. His Moviedrome series was one of the most influential things in my early life. In many respects, film criticism on TV has never been as good as those seminal shows. In what just world does Cox end up teaching at an American University and Claudia Wrinkleface hosts the BBC's premiere film show? But back to Mike Harding (another victim of the BBC's crass stupidity): this is now the third or fourth time I've been in Waterstones and he's been there. I always feel temped to say hello and ask if he ever got the letter I wrote to him back when I was writing my Stan Madeley letters. Any reply would have been sure to make the finished book. It wasn't one of my best letters but it wasn't the worst either. Mike_Harding   Okay. Today I want to devote to getting my 'game' closer to being finished. The level selection screen is working (I'm aiming for 20 levels to begin) and late last night I figured out a gameplay mechanic which hadn't been working right. The only jobs remaining are getting a reward system in place, unlocking content as levels progress, high score tables (trickier than I thought) and then filling each level with as much work content as I can create. In honour of Mike Harding, I'll even add his likeness to the game in one form or another. Everything I've drawn recently is finding it's way into this game.

Tuesday, April 15, 2014

So that was a Monday....

It's the end of what was a cruel day in which I ultimately gave in to the world. A bad photo of myself is now out there, not that it matters to anybody but myself and I doubt if anybody would really understand how sad, frustrated and red-mist angry I've been today. But life is currently too difficult to make a fight of these things. Tomorrow I have to take my sister to the hospital. It makes my anger seem trivial. It's not right that doing a little work for people means that those people own you, image and all. Yet I'm in no position to make subtle points. Nobody listens. Nobody cares. I'm bad meat trying to compete in a global market where there's always some poor bastard on the far side of the globe who'll do the same work for half the wage and they won't be frown crazy truculent and idealistic. They won't be me. So I spent the day biting my lip until my teeth were sore. I've been working on another video for my employers but tonight I spent with Unity, which has become my second home. I'm adoring the Unity process, from the simplicity of creating GameObjects to the ease with which the whole process of game design becomes a fun iterative process in which I sit here and constantly think: wouldn't it be great if I could do x, y, and z. A couple of hours later, I've usually managed to get two of the three things working and when I finally hit my bed, my mind full of new ideas for the next time I get chance to program. I didn't set out intending to write a game (if I had done, I think I'd have had a more rounded concept). I began simply wanting to see if I could get something moving around on screen.  Then I thought I'd add a background based around tiles, which took a ridiculous amount of effort but now it's finally working pretty seamlessly. Soon, I found myself beginning to build the menus around the game and the more I write, the easier everything feels. Every day, I spend a couple of hours just drawing graphics to populate that background. They're the two parts of the process I enjoy and they blend seamlessly. The process is so simple. Want a bad guy doing bad guy things: you create what Unity calls a GameObject and you give him a name like 'bad guy'. Then you attach scripts which handle his behaviours, enable him to have rigid body physics so he can bounce off walls, or give him easy-to-check colliders so you know when you've hit him. Once he's created (dragging graphics from your graphics program of choice), you simply bring him into life in the code with a single line: GameObject badguy = (GameObject)Instantiate(Resources.Load("BadGuyModel")); It might look complicated but once you get into the syntax, it becomes second nature. Stick that line in a simple loop and run it ten times and you get ten bad guys who will begin to interact with each other. It makes a difficult job relatively easy. Part of me thinks I should stop what I'm doing because I've spent too long learning to do this stuff but I've been working on this little game for a few weeks. I actually want to finish something I'd be proud to show people. I still have so much to get finished and they're all little jobs like getting controls to disappear when menus appear, ensuring that messages display at the right points. I also need to think about music. I thought I might be able to find some looping software which might allow me to create something myself but my efforts have been woeful. I need to find either free music or forget about music. I'm leaning towards the latter. It won't matter until I get a sense of completing this. Perhaps I will. There's a chance I won't. All I know is that tonight, programming, I didn't feel the frustration that ruined my day.

Monday, April 14, 2014

Selfie

Terrible night's sleep. Couldn't rid myself of my self-loathing and sheer nervous worry about this job and their demand that I provide a photograph of myself. This morning, I'm utterly tired of being me, of having thoughts, ideas, feelings, and having strong opinions about the internet, privacy, and the right to your own identity. I woke early, cut the lawn in a desperate act of trying to put off the inevitable and then sat down and tried to take a 'selfie' and utterly hated the way I look. I hate my bottom lip and also my top lip for different reasons. I have a David Cameron mouth and I despise it. I despise the fact that I'm forced to look at it because somebody wants to add me to their organisational chart. I hate the fact that I'm considering giving in because the act of compromise is so much easier in the short term given that life is already difficult enough. This situation has happened before in my life but I've previously managed to avoid it but this is how small companies operate and the problem is always going to reoccur. Small businesses like to see the stretch of their dominion, counting heads as if to say they are this far on the road to total world domination. Every one of them think they're the next BP or Microsoft. Browse company websites and you'll eventually see a roster of people looking either comfortable or uncomfortable about having their photos taken. Nobody stands up and says no. Or at least nobody stands up and says no and stays in the job for very long. But why must I think like this? If it were mere self-loathing, I could perhaps accept my fate. Yet it's more than that. Taking a photograph of myself is existential and I hate French philosophy. I live in my mind and I how I think of 'me' is quite different to what the camera tells me. I'm not sure why I'm so utterly miserable about this situation. Why can't people just accept me for who I am rather than turning me into another version of their selves?

I Think Therefore I'm Not...

At some point in the past decade introversion was criminalised. Being what was called 'an introvert' somehow became synonymous with old hackneyed phrases much loved by the media such as 'loner' and 'misfit'. 'Oh, he liked to keep himself to himself' has taken on an ominous meaning implying dark habits in dingy rooms involving shaved cats and rubber spatulas. It doesn't mean what I know it to mean, which is writing, reading books, or drawing the odd (hopefully) funny cartoon, which is how I've been 'keeping to myself' these past few weeks. Tom Wait's odd song, 'What's He Building In There?', wouldn't have any exciting answers if applied to my life. That answer would be:  a silly little Android game which will never earn me a fortune but has taught me how to write games for mobile devices. Of course, being an introvert doesn't mean that I'm completely without human contact. I like being with those close to me and I like having friends but I'm totally indifferent to leading a social life out there [points vaguely towards the window]. Watching a Youtube video last night, I heard some guy describing how he couldn't practise his hobby (the topic of the video) because somebody had rang him to say that he and his wife had been invited to dinner. That sounds like a definition of 'living hell', when small talk over a dinner table keeps you from doing what you actually want to be doing. Parties, drinking, pubs, clubs, and all that's associated with that has never interested me and what little I've experienced of it makes me even more confident in my choices. I'm an introvert and I've always been quite happy about that. Yet tonight I feel like I've been caught paddling a shaved cat. I'm still being harassed for my photograph since it seems inconceivable to some people that a person might not actually want his mugshot on the internet for no other reason that he simply doesn't want his photo on the internet. I suppose there might have been a time when I might have submitted to this petty request without much protest. Yet the more I'm pressed to do something that I instinctively don't wish to do, the more trenchant my refusals become. It has now become a small point of principal to me. Yet I'm not entirely sure what that principal is. Or, at least, I think I know but it probably sounds shallow. The reason, I suppose, is because I refuse to crust myself in the self-generated effluent of the 'me' generation to whom style means everything over substance. I don't think putting my photo on some corporate website is robbing me of my soul but I also think that it is. I don't mind giving time over to people to do their work but using me to advertise their company is to rob me of something more precious than a few hours. It's to take away my individuality and to turn me into another bean-counter in the sham kingdom that would have us all identical and servile to the people in marketing. I don't want to be another gormless victim of a selfie, gazing dead-eyed into a camera that can never record anything truly meaningful about me. I don't wish to be judged by my eyes, my nose, my double chin, or my thinning crown. None of that actually means anything beyond what was written into my DNA by the great cosmic finger. I suppose that's why I've blogged for so many years but always used something else to stand as proxy for me. I grew up watching TV and admiring people who seems enormously gifted in the things they did but were also humble by their achievements. My earliest comedy hero was Spike Milligan, though I was a few generations too young to have heard The Goon Show. Milligan never seemed overtly bothered by his appearance and that never mattered to me. Nobody seemed that bothered by their appearance. Oliver Reed (who it's so easy to forget was really talented actor) would appear drunk on TV and the great Barry Humphries would occasionally adopt the personal of Les Patterson and push the boundaries of unpleasantness. Peter Cook smoked and was cruel on mainstream TV and there were truly abrasive stars on film and television that were somehow more human because they were abrasive. Yet at some point, a change started to happen. Beautiful people started take over TV and shows lost their rough but life-affirming edge. TV forgot that we get most pleasure from moments of accident and unpolished spontaneity and replaced it with a professionalism that remains obvious to this day. We entered into the Vernon Kaye years when men could be famous for simply being famous. When Vernon Kaye could be famous for being Vernon Kaye, whatever the hell that actually means. Sky News has gone from a young upstart that broken the rules by broking news, often via hastily set up cameras, to a channel that seems to exist to review the day's papers in the company of two polished London types, one usually a professional woman with big hair and who self-importantly describes herself as 'writer and broadcaster' and some bequiffed shirt-open-to-his-navel Henry who trots out the usual slightly right of centre guff. It's why I detest polish in TV and why I'm drawn to enjoy comedy that isn't hugely professional. It's why, for example, I rate Stewart Lee so highly. I know that some of what he does isn't funny but I'm pretty sure he knows that too and that's why it's hilarious. It's not because he couldn't do what other comedians do and do with perfection. It's because he doesn't want to do what they do and that's what I always seek out. There is more to life than perfection. There is more to life than vanity and appearance. So I don't do Facebook and I've written everything I've ever written under other names and I've never once published anything to the internet as the real me. Yet thinking about this over the course of the past few days, I find myself wondering if there can be any form of success these days without a preceding image. Those people we celebrate the most are often accused of being 'all image'. They are the celebrities who have no real or discernable talent other than the talent of being themselves in loud and obvious ways. Perhaps that's part of the 'postmodern' condition that we all supposedly share where it's impossible to separate the artist and his work. I don't know. There are exceptions. Robert Crumb is front and centre in most of the things he draws but he does so in a way that's unruly and unkempt and perhaps that's why I'm a fan. We are all part of the Gonzo generation in which the news can never be reported objectively. It sometimes feels like we don't exist unless we have our faces in an avatar. I don't have my face on the internet. In a sense, I don't exist. The extroverts have won.

Wednesday, April 09, 2014

The Best Mouse I Ever Owned

deadmouse My beloved laser mouse has died. It was a ten year old Logitech RAG97 and simply the best mouse I've ever owned. I've just checked the websites and £50+ for the latest model is just too much, especially since I can never see myself wanting to use a mouse on glass, which seems to be the proudest boast of the current model. Instead, I've settled on a cheap but actually rebadged Anker mouse which promises to be suitably heavy, big enough for my big hands, and comes with a long six foot cord so it might take me a little time getting use to old-fashioned mousing. I hope it arrives by tomorrow. Doing everything by keyboard and stylus is driving me nuts. Around 2am this morning, desperation had forced me to dismantle my Logitech following a Youtube lesson in how to fix broken mouse buttons. The fix worked for a little while and then stopped again and I was soon dragging the entire contents of hard drives into Photoshop when the button stuck. It means I'm now stuck waiting for the new mouse to arrive and with time to write instead of code, which is what I've been doing for weeks now. Speaking of code: the game is going quite well. I'm utterly addicted to Unity which makes 2D game coding so easy. My game won't be anything special but seeing the video of Murasaki Baby running on the PS Vita and also written in Unity, inspires me to throw everything into my work. The day before yesterday I added a free look function which allows players to scroll around the world and yesterday I took the big step of changing the gameplay mechanic so it dealt with screen gestures rather than the buttons I'd previously been using. I also took an even bigger step of completely changing the game logic, distributing it around the individual game objects instead of putting everything in the single object simply because I didn't quite understand the beauty of the Unity model. The more I work on the game, the more I realise how much work still needs to be done in even the simple things like getting a score looking good on the screen. I also have to design enough playable levels to make it challenging and worth downloading. Today I intended to fine tune the physics of the game, to make it less realistic and a little more fun to play. And that has become my mantra. I don't care about rough edges and even the logic of the world I'm creating. I just want it to be funny and fun to play. It's a lofty goal and one I'll undoubtedly miss but I want my aspirations pointing in the right direction. Speaking, tangentially, of the wrong direction: on the freelance front, I'm currently being pestered for a photograph. The people I work for want to update their website with an organisational chart of their employees. I think I'm the only person holding out on providing a picture and I'm sorely tempted to provide a photo of Robert Redford circa '3 Days of the Condor'. The simple fact is that I don't have my photograph anywhere on the web and I hold that as a point of principal. I detest Facebook, Google+ and Twitter which would have us believe that the entire world is made up of extroverts with great body image and sense of self. The last thing I want is to be doing is looking at pictures of myself but should I ever to decide to start posting photographs of myself, it would be to this blog and not to some completely fake organisational chart. Some days I wish I could just give in to the whole ugly business of being a team player and just going with the crowd. But I guess the world is run by extroverts and there's no place in it for an introvert who value his individuality. I always seem to be swimming against the tide. Every day I wake to find new motivational emails from the other members of 'the team' and one on Saturday actually made we wince. It was a supposedly poignant series of observations about life which included the thought that 'I'm glad to have washing up to do because it means I'm not going hungry'. That's not so bad but another was 'I'm glad to pay my taxes because it means I have a job'. There were others and it made me reflect on the relative luxury afforded to even the poorest of us living in Western Europe with a relatively prosperous economy. My sympathies have increasingly swung, in recent years, towards the plight of the worker. I see it around me where people are exploited by a system that has found ways to ignore rules about employment rights. For example, I quite like the concept of getting Amazon deliveries on a Sunday but I also know that this luxury will eventually come (if it's not done so already) at the expense of our right to have at least one day's holiday a week. I know of a teacher who teaches at a school where staff voluntarily go in on a Saturday to teach extra lessons. This teacher refuses to do so as it's not in his contract but feels increasingly pressurised to sacrifice his weekend. Of course, it will never be grounds for dismissal but he knows that there will come a time when his refusal will be noted by those in management and ways will be found to make him move on. Yet, perhaps that's the way of the world. Perhaps individuality is a decadent luxury. My problem is that I can never sacrifice the things I want to do – write, cartoon, or, currently, making a very silly computer game – simply for money that might make the hours left to me after work a little less miserable. My time is more precious to me and it's deeply painful giving up time to serve other people's ambitions. It perhaps explains why I have so much trouble communicating with my employers who aren't in this country or even this continent and constantly feed me propaganda that denies the individual in favour of the team. I've never been a team player. I'm an individual. An individual with a dead mouse and very little hope.

Thursday, April 03, 2014

Unity

Dear Blog, I know I've not written in quite a long time but there haven't been enough hours in the day to do everything I've wanted to do. I think things went crazy when I discovered Unity. Unity, if you don't know (and why should you, my dear blog, when you're just sitting on a server in a cupboard somewhere)… Unity is a Game Engine which makes game programming 'easy'. And that's what I've been doing. I've been creating a game and it's making me very happy. It was difficult at first. My previous App (oh, how simple it now looked), was written in Java whereas I'm writing my Unity scripts in C#  (pronounced C sharp) which is very similar to Java but not quite the same. I thought at first I might make a little app to display 3D models on the screen, just to see if I could, but I quickly fell in love with the 2D side of the Unity engine. My game is in 2D and I was delighted last night to finally get my background scrolling with as many levels of parallax as I care to create and the hardware can handle. The hard task going forward will be to create all the other graphics that I know I'll need for the finished game. It means I've been ignoring you, my dear blog, in favour of these newer pleasures. But I've not forgotten you entirely. There's still so much work to do on the game that I know I'll be distracted for weeks to come but I intend to write more updates. Like all things, I'm hesitant to talk about it until it's done but I'll try.

Wednesday, March 19, 2014

A Drawing About Hammers

Chubbysm

Another Guardian Comment Bites The Dust

I left a comment over at The Guardian which has now been censored like so many others when a nobody dares question a celebrity. However, I don't see why my carefully chosen words can't find a home here and it gives me a chance to edit them a little to clarify my point. The comment was in response to this piece by Lily Cole.
I have more interesting things to do than hold any grudge against Lily Cole. Before I saw her Guardian article this afternoon, I was only dimly aware that she is a successful model with features that are possibly more striking than they are attractive. However, as a journalist, she can't really claim an equal degree of success. Would a real journalist offer such a gnarly piece of phrasing as 'arriving to New York' or misuse an apostrophe in 'it's' instead of 'its'? Yet, at the same time, what right do I have to complain? In a room containing only myself and Lily Cole, only 50% of us would be published journalists and it wouldn't be the side of the room with the whiskers and perpetual frown. Like many freelance writers, I have sent articles into The Guardian via 'Comment is Free' and I heard nothing every time until I eventually stopped trying. Rejections might have kept me going but silence eventually gnaws through the sinews connecting your brain with your soul and that frustrates me because I'm not, by nature, a quitter. I am, however, a realist and I see no reason to continue to flog a horse when it's lying bloating beside the road. Not when there are other ways of navigating what Hunter S Thompson might well have been describing when he talked of 'the proud highway'. Yet I'm not exactly a beginner when it comes to writing. I think I know how to phrase things quite well. I've had books published and even if I haven't had any commercial success, I'm not a complete stranger to the occasional good review. Even The Guardian itself has published reviews of my work and suggested that I'm not without wit. Yet try to turn that praise into income and I fail every time. I hear nothing even when I submit articles which others have said are good, thought provoking and sometimes pretty bloody funny. I know this comment will ultimately go to the place where comments go when they don't follow guidelines. The Guardian doesn't like anybody questioning their editorial choices or the abilities of their writers and I can hardly blame them. It's actually commendable that they have started to defend their writers from undeserved criticism given the levels of abuse that are sometimes tolerated 'below the line'. And I certainly don't take any pleasure in constantly criticising The Guardian yet publishing shambolic articles written by celebrities devalues the work of real journalists and freelance writers. The Guardian remains one of the last and best places where we could practice our art yet they prefer to give jobs to famous amateurs and dilettantes. I expected better.
Before a version of this comment was deleted, it received some good (and a few lame) replies. Some accused me (rather predictably) of 'sour grapes' but others were better than that and I penned this reply which I didn't have chance to publish. The debate had ended less than fifteen minutes after it had begun.
I'm smiling because some of the replies were just too damn reasonable to my bad tempered comment. I accept your points (and that made by R042). Perhaps it is just a case of 'sour grapes' but I was simply trying to voice a concern that everybody should have about the way that modern celebrity intrudes into areas which were once home to professionals. MancunianPsycho suggests I should 'write something more interesting' but that's just a stock reply voiced when anybody dare question the style or substance of an article. I do write many things and I submit many but never with any success. I accept that I'm probably just not interesting enough but there must surely be plenty of others that are. Hell, I know others that are a damn site more interesting and could provide websites details and email addresses. "I thought of the TV show, and indeed it's movies that inspired her" I accept that it could be read as 'it is movies that inspired her' but I maintain that it's also damn clunky. Again, I don't have a problem with Lily Cole. Actually, I can see some value in the article, though perhaps not enough to justify its publication. I'm really just saddened by the way that our culture seems vaguely at odds with the interests of the common man and woman. It really does appear that we have to have a 'celebrity name' before our views become important. There was an excellent piece in The Guardian just yesterday in which Joan Smith noted how the tabloid response to the sad death of L'Wren Scott almost ignored the deceased in their clamour to publish photos of Mick Jagger. Yet that was just a symptom of the very same problem evident in many of the broadsheets. We live in an age that is utterly at the mercy of the marketing people, in which you must have that hook or moment of fame on which to hang your opinions, otherwise you might as well not exist. The rest of us must content ourselves by expressing ourselves through cat memes or hoping for a celebrity retweet on Twitter.  


Tuesday, March 18, 2014

Stop the world etc.

First of all, just to keep up with the moronic zeitgeist, I thought I better post this video. It might well be the most nauseating thing I've seen this year. And when you consider some of the nauseating things I've seen this year, that's a real tribute to how truly horrendous it is. And I don't give a crap about postmodern irony or being in on the joke. My gag reflex doesn't recognise postmodern. I've said it before but that doesn't stop me wanting to say it again: I guess I'm just not one of life's 'nice' people. That's why The Guardian's current fixation on Jack Monroe (and porn and privacy and Russell Brand and internet memes) is wearing me down like The Times' obsession with Caitlin Moran wore me down to the point where I stopped reading that paper. I'm still looking for something better to read than The Guardian but it keeps returning to my good books by publishing something immensely good alongside the drivel that passes for 'Comment is Free' most days. I guess I'm getting resigned to the fact that the world out there just doesn't really reflect the interests in here (points to forehead). Apropos of nothing: I wish Google would hurry up and send me the magic piece of paper which authorises my Google account so I can access AdWords and then the Play store. My app is so finished that I've even gone to the trouble of adding 'skinning' options which are alternative sets of graphics to change the look of the entire thing. More apropos: I've developed a severe addiction to 'Fish 'n' chips', the classic nibble from Burton's biscuits. They call it a taste of childhood but I say it's the perfect treat when I'm sitting rewatching the first series of 'Prison Break'. Speaking of which, I keep a shortlist of actors who I think should really have made it big by now and Robert Knepper is still top of that list. Wish somebody would cast him in something truly heavyweight and let him truly flex his acting muscle. He should try lip syncing to Disney. Perhaps that's the only guaranteed way to success these days...

Saturday, March 15, 2014

Programming Android: Three Weeks On

As much as I hate to admit it, I think I've finished my app. It's a proper monstrosity of bad design, hastily drawn graphics and butchered code but in the space of less than a month I've gone from not knowing a thing about the Android SDK to being in the final stages of testing a functioning app that does everything I originally intended plus a little bit more. Three weeks ago I began this adventure by thinking: I wish I could find an app that does X,Y, and Z. Now I have an app that does X,Y, and quite a bit of the Z and it has probably saved me 69p had this app originally existed in the Play Store. I can't say that it's been an easy three weeks and I'm not sure I would have liked to have attempted this without some programming experience. Yet, had I been learning from scratch, I'm not sure Android is the worst place to begin to learning to program. It's certainly a friendlier developing environment than some I used when I started out many years ago. I remember the misery of coding on an old Vax in a cold university basement room when we all had to wear mittens to stop our fingers from freezing. And people wonder why it's taken me so long to come back to software engineering… Although I'm not exactly a new code monkey, I began not really knowing much Java and I'm not entirely comfortable with it now since it's clearly a language that's easy to learn but difficult to master. At a few points, I wanted to add features which just proved beyond my skillset. One required me to catch, buffer and then process MotionEvents (the data generated when the user touches the screen) but it led to a wasted two days and my utter defeat. Perhaps I'll try again with my next app... Things I know now but wish I'd known back then:
  • It's easy to use transparent PNG graphics inside a SurfaceView so long as you clear your bitmaps with the eraseColor(android.graphics.Color.TRANSPARENT) instead of filling your bitmap with white. Took me three days to figure that out.
  • The word 'Activity' in Android is almost synonymous with screen or process. Think of each functioning element in your program as individual Activities. So, if you're making a database program, you could have an activity for the screen where you add records and another activity for the screen for modifying records. If it's a game: one activity for the main menu, another for settings, one for the high score table, and another for the main game itself…
  • Learn about 'context'. I think it's the single most confusing and difficult element of the Android API. I'm not entirely sure what it is myself and I'm still not entirely sure how to 'get' it from different points in the code.
  • Learn to nest layouts right at the start. Setting up screens is a nightmare until you understand that you can, for example, drag a horizontal layout onto the screen and embed elements inside that. That layout can then be dragged into a vertical layout, making it really easy to arrange elements both vertically and horizontally on the screen.
  • Don't go looking for 'file open' dialogs. They don't exist natively in Android and, to be honest, I'm not entirely sure they are needed. It's really easy to throw data out to other apps, such as email, Evernote and Dropbox.
  • Be quite liberal debugging with Log.d("Activity1", "Loop7"). As your app runs, it throws up messages to a console on your PC so you can track the code and see where it stops, throws errors or is trapped in loops.
  • Saving preferences inside your app is unbelievably easy with the SharedPreferences object.
Except for those really ambitious things that were just beyond me, I can't say anything has been unbelievably difficult. The problem now it to stop myself from adding more features. I've got my widget working and I think that was the last big addition I'll make. In the last two days, I've added a ton of new functions. I've even done the unspectacular work of programming the settings page so that the app remembers the user's preferences and adjusts the internal workings accordingly. In a way, this part has pleased me the most since I've tried to make the whole thing flexible so anybody can use the app as they see fit. It needn't be used for the purposes I intended, which is probably good because I'm not sure anybody would want to use it for the purposes I intended. The next stage is when things get difficult. I have to test the app and make sure that it runs on devices that have different sized screens. Device fragmentation is probably the worst thing about programming for Android. There are so many devices out there with completely different capabilities and hardware. The chance that this app will run on all of them is slim to zero. However, I want to be sure that it can be used on the majority of current Android devices and that means either getting my hands on a range of test devices (impossible) or using an Android emulator on my PC. And that's where I have a problem… The Android emulator that comes with the Android Development Kit runs really slowly. However, you can install an Android kernel that's built with Intel code. If you have an Intel based PC, the Android emulator runs pretty quickly and you can run it in a variety of configurations so you effectively have every type of Android machine at your fingertips. Want to emulate a small phone running an earlier version of Android? You just run the emulator with all the settings turned down and you get to see what you app looks like running on a low spec phone. You see a problem and jump straight back into the code to fix it. It's a great way to test and bugfix your app if you have an Intel based machine. Only, I don't have an Intel based machine. My PC has an AMD Phenon II X6 and it completely incapable of emulating Android via the Intel kernel. There is one emulator called Bluestacks available for AMD machines but, as far as I know, it's not customizable, which means it's pretty useless for my purposes. There is an online Android emulator which can be set up to emulate different devices but I can't say that it runs particularly quickly and I know I don't intend to spend money testing an app which will never earn me a penny. It means I'll either have to beg to borrow a friend's PC or be happy just to test the app on my Samsung Note 10.1 (2014) edition running Jelly Bean and my old Galaxy S2 running Android 4.1.2. I have no idea what it would look like on a seven or eight inch tablet or how it might run on a bigger tablet even a year old. Ideally, I should buy a really cheap 7 inch Android tablet, such as the Tesco hudl, but it's an expensive way to test compatibility. Meanwhile, sometime this week, I hope to figure out how to upload my app to the Google store or I might not even bother. My app will never be the next Flappy Bird and given it might only be downloaded five or six times, I might simply stick the finished app on this site for anybody to try, if that sort of thing interests you. If it doesn't, I'll probably be back to cartooning and moaning about The Guardian ignoring my submissions until I come up with my next ridiculous plan.

Friday, March 14, 2014

David is now online...

Time. There's never enough of it and never enough to do all the things I intend to do in a single day. Something always has to suffer and it's usually the thing that's most pleasurable, such as writing a decent blog post, drawing a funny cartoon or taunting a loft insulation salesman with a hint about an under-lagged crawl space. Because I have so much to do, I wonder how people find the time to do the things that they spend their days doing, such as posting gormless updates to Twittermefacegrambook. I woke up early this morning to find another complaint waiting for me in my inbox. My on-the-other-side-of-the-world employer tells me that I need to provide instant feedback whenever he asks me a question. I've recently fallen into the habit of not loading Messenger when I'm at my desk. The truth is that I've simply not had time and I'd forgotten. Instant Messaging isn't part of my life and it never occurs to me to load that most monstrous piece of malevolent gropeware. Instead I rely on email, the now outmoded method of instant communication which just isn't instant enough. I suppose my 'forgetting' to load Messenger reveals my deeper neurosis about Instant Messaging which I loathe like a true Luddite. The mere thought of using IM (even the acronym chills my balls) on a daily basis makes me feel like Winston Smith walking into the Ministry of Truth. Every Instant Message is a sinkhole into which I see my privacy disappear. I particularly resent losing valuable time to long meandering conversations in which you're forced to mimic the trivial small talk of normal conversation instead of getting to the meat of the business as you would in an email. I despise the way IM informs other people when you're on the internet, as though it's their business. I hate having my train of thought broken every time the IM client tells me that somebody else is now online. 'As if I care!' I cry as the little boxes appear. 'As if I care!' Do I want my computer sending out messages to people to tell them that I'm 'available'? I'm never available to waste time or to engage in small talk. The problem with the world is that there's too much talk and too little actually meaningfully said. But that is Instant Messaging: a symptom of the cultural malaise that has taken over the world. It's a boredom born in a world where surface has taken over from depth, when every news story has to be accompanied by pictures or (preferably) an 'infographic'. When cat memes make their creators millions but authors struggle to get their novels published I think it's time to question if our time on this planet is being used wisely. The truth is: I don't want Instant Messaging in my life. I want Delayed Messaging in which a friend takes the time and effort to write me something long and meaningful, full of interesting things, and requiring effort on my behalf to read, internalize, and then respond. Yet the sad truth is that I have no option. We live in a new age where there are no set hours to jobs because jobs occupy every hour, where there's no separation between work and life because your life is your work, and where people tell us that we've never been so free yet all of us are increasingly connected, tied down, and always available to chat. 'Chat'. No other word more concisely symbolises the vapidity of our age.

Thursday, March 13, 2014

Blood Blister

My chair is fixed. I'm not so certain about my body. thumbIt took me a few hours yesterday to remove the old bolt from the seat. There was about half an inch of threaded end stuck in the hole and I spent about an hour trying to drill out the hard steel with an electric drill. That didn't work so I tried to cut a notch in the slightly exposed end of the bolt but the screwdriver wouldn't bite. Frustrated, I reached for a hammer and tried to knock it through. That's when I missed the chisel and hit my left hand. I cursed mightily and angrily tried again with the hammer. That's when I missed the chisel a second time and hit my left hand on the same tender spot. It hurt even more and where the hammer bounced off the bone, it went into my thumb, producing this delightful blood blister. I was about to give up but I remembered something my Dad had taught me or perhaps it was something I'd seen on one of the Discovery Channel documentaries such as Gold Rush. It suddenly struck me that I'd been doing it all wrong. The high powered electric drills were just spinning on top of the bolt. I reached for an old brace and bit and slowly started to turn it in the hole. Soon I could see small flakes of metal coming out and I could feel the drill biting. After about half an hour, I could see the drill beginning to protrude from the other side. I'd gone in slightly askew and half of the bolt was remaining so this time I reached triumphantly for the hammer to knock out the stuck fragment. It popped out easily, though not before I'd managed to hit my hand a third time. My cursing didn't last long. About half an hour later, the chair was reassembled with a new bolt and washers holding the back in place. I felt slightly elated. I'm not a handyman. In fact, people often laugh about my skills as a handyman, though the same people admit that I can hang wallpaper pretty well, put up shelves, rewire a plug, and do plenty of the other things that need doing. About the only thing I can't do is climb a ladder higher than twenty feet. I figure I'm too big and cumbersome to go climbing about on the roof. Anything lower than that and I'll give it a try. And that pretty much sums me up. I'll have a go at anything. I'm just not sure the result will ever be all that pretty. The bolt doesn't look great hanging from the chair but you only see if it you go looking for it. The point is it works and I preserver in these things because I like to believe we're not past the stage when a little effort produces a result. We throw things away too easily. Since I saved this PC monitor by soldering in some new capacitors a year or so ago, I feel like I have a duty to at least try to get things working again. I've saved my chair, saved some money, and have a blood blister I didn't have before. Today, I'll stick to my preferred form of engineering. I have new ideas to incorporate into my app. A few days away from it has given me a little more faith in the concept. I intend to learn how to create a widget to sit on my Android screen and integrate with the app. It should be fun and hopefully blood blister free.

Wednesday, March 12, 2014

Some Thoughts on Bob Crow

Hemingway wrote whilst standing up. He wasn't the only writer to do so. Perhaps it accounts for something special in his writing, his characteristic stocky phrases or the muscular pull of his lines. I don't write standing up but perhaps the next best thing is to write whilst sitting on an uncomfortably hard chair since my usual perch is currently in pieces in the back room alongside the remains of a broken drill which I'd destroyed trying to remove a hardened steel bolt that had sheared off in its hole. Yesterday was a hell of a day, a long run of blistering bad luck and ugly turns that ended in Manchester where I was forced to buy a new power drill. Even with the right tools, my chair is still unusable and work is now backing up. I have a website to build, a video to fix, and a cartoon to draw before tomorrow's deadline for the next issue of an LFC fanzine. Two paragraphs into the day and my back is already aching from the hard plastic sticking under my shoulder blades. Yesterday was also a bad day because it was the day I heard that Bob Crow had died. I suppose if it weren't such a tragedy that he died only 52 years old, I wouldn't actually write about Bob Crow except I had recently found myself warming to him. That's not to say I didn't find something comic in seeing a union leader enjoying the high life. In many respects, I viewed him like I view George Galloway, though perhaps with less overt comedy. Yet seeing Crow on 'Have I Got News For You' recently made me reassess my attitude towards these leftward firebrands. The same goes for Dr David Starkey on the right. It's easy to mistake everything they say for the worst things they say. Or sometimes it's hard to distinguish the sense from the way they expressed that sense. I do think it's a crazy world in which the driver of a largely automated Underground train is earning more than a university lecturer who contributes to world knowledge. It's that kind of detail which made it easy for the Tory commentators to mock Crow, as I saw Andrew Pierce doing on Sky News on Monday night. In that sense, Crow and Galloway have always been a blessing for the right. They were easy to lampoon and their worst foibles distracted from the very great sense they sometimes spoke about the rights of workers. It would be foolish to deny that Britain is a country ruled by a rich Eton elite yet populated by a majority of people too distracted by X Factor finals, mobile phones, and American ten pin bowling to actually care about that bias. To his credit, Crow did care, as I'm sure Galloway also cares. That's why I'll miss Crow. He was one of the few public figures to express an opinion which was precisely that. It wasn't a party line, a faecal crumb of marketing detritus put out by some central office. Right or wrong, he was one of the few actually happy to go on TV and express an opinion that he knew would alienate some. That's rare in politics as it's rare on TV, where the middle ground is worn flat by a million bland heels. But at this point I have to stop. I would write more but my back hurts. This chair gives spasm-inducing discomfort and there is one less person fighting for my rights as a worker.

Tuesday, March 11, 2014

Hey Bob! Here's More Self-Centred Waffling

An anonymous Bob, from nowhere.com, left a comment this morning accusing me of 'self-centred waffling'. It's always a little unsettling getting such an anonymous comment, though thankfully, in this case, Bob's IP address included what appears to be his real name (I'm guessing that his real name is 'Mark'), so I know it wasn't from a friend trying to tell me to quit. That said, I think Bob/Mark's observation is bang on the money. This is a blog and, like all blogs, self-centred waffling is its raison d'ĂȘtre. What would this site be if it wasn't an expression of my deluded hope that somebody might actually care what I think or what my cartoons might say? The truth is that the world generally doesn't give a fig. That is the world I recognise. My neighbour came around the other day to ask me to move my car. We've lived next door to them for ten years. I know all their names, their jobs, the names of their illegitimates. They didn't even know that we've never owned a car. Isn't modern Britain's Big Society just wonderful, Mr Cameron? The other part of Bob's criticism is easier to address. He asks 'what app ? no links no info' and that's also right. I'm damn cautious about talking about my app because some Android genius in India would easily knock it together in a spare lunch hour and market it to the world. I know how this game operates. Good ideas are few and far between and I think I'm sitting on a $100 idea. If I market it right, it might even earn me $120 which is about £70 in these God fearing times. I was in Chester on Saturday on the way with my sister to see her consultant. I was idling time browsing the small PC World next door to Nero and listening to a sales assistant explain how he was doing a computer course where they were being taught to write their own Android apps. There's nothing quite like listening to salesmen in PC World making idle boasts to ignorant customers to make you realise how you're actually achieved something barely worth celebrating. But I've said this before. Learning to write Android apps is easy. Mastering it is something else. I suppose I should also be grateful for Bob's aggressive comment for setting me right about this blog. I haven't blogged properly in two weeks but my excuse is that I've just lost the will to work. I suppose years of rejection have finally got to me. I've lost the enthusiasm to write, to draw, and even, I suppose, to live and breathe. I just begrudgingly face each day with the realisation that it will involve yet more crap and gruelling misery. My sister's treatment at the hands of the local GPs has reached the point where I'm considering seeking legal advice regarding medical negligence. This last week has been one of the worst and it seems that the closer the consultant actually gets to finding the cause of her problems, the problems actually gets worse yet are routinely laughed off by the local GP as 'a bug that's going around'. Last Thursday was very distressing and I needed help so I rang the local surgery for advice. They wouldn't send anybody to see her and they told me that the emergency doctor only attends to the elderly. They suggested we stick her in a taxi and go to the walk-in centre four miles away in another town… A shame we don't own a car, though that doesn't stop the neighbours for giving me grief about my parking… In the meantime, I continue to work on the app during the moments when I'm not sitting outside the doors of consultants and GPs, or building websites for people who tell me that 'desire for greatness is to be on the right track. But if we are on the right track, we'll get run over if we just sit there. Action is paramount for greatness.' If you do a search (I did), you'll know that it's a hackneyed phrase used by business gurus to sell their particular brand of bullshit. Is it unusual to get annoyed by people who are constantly upbeat and wanting me to work in a team? I occasionally do a little work for an American who quite the opposite and I love that. I miss being able to rib somebody and trade mock insults. It doesn't seem normal trying to be so smiley… And that, I think, is my problem. That's why Bob was probably annoyed with my self-centred waffling. As you can see, I do waffling quite well but I don't do smiley bullshit. In truth, the app isn't working how I hoped it would. It's not good enough to talk about. Nobody but me would probably want to use it like few people really read this blog. But what the hell. I enjoy self-centred waffling. I'll blog again. This has been cathartic. In the meantime, if anybody knows how to remove a snapped bolt from an office chair, I'd be very grateful. I sat in my favourite chair last night and it went 'thud' and the back fell off. I thought a bolt had simply come out, as they often do. Only this one had broken half-way down its length, due, I think, to the bloody awful blue locktite stuff some firms insist on sticking on bolts. It stops the bolts from falling out but always makes them sheer off instead. I now have to figure out a way of removing the piece of bolt stuck in the threaded hole so I don't have to buy another chair. Like I say: more crap and gruelling misery...