Showing posts with label Unity programming. Show all posts
Showing posts with label Unity programming. Show all posts

Friday, 6 June 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, 2 June 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.

Friday, 30 May 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.