A Few Portfolio Links

As part one of the long-term “putting myself out there a bit” plan, I’ve put together a mini portfolio site. It also means that the URL doesn’t give a 403 error too.

There isn’t much there but at least it’s something to point people to, and hopefully it’ll appear in Google at some point.

Posted in Other | Leave a comment

Build an HTML5 Game: Some Reviews

Build an HTML5 Game CoverI’ve found three decent reviews for my book “Build an HTML5 Game“, and especially pleasing is the fact that two of them seem to be from exactly the target audience i.e. developers with existing web skills who didn’t realise how easy it would be to use those skills to build a game.

First up, there’s Matthew Helmke’s review which you can read on his site:

I really enjoyed reading Build an HTML5 Game. The writing is clear and easy to follow, the examples are good, and the concepts provide a solid foundation on which you can build. This is not a comprehensive “everything you will ever need or want to know about game programming” sort of book, but rather a clean and enjoyable entry that helps you over the first hurdle of writing that first game. It then gives you ideas and tips to help you know what else is out there so you have a bit of a roadmap to continue learning as you figure out what sorts of games you want to create.

And then there’s a review on I Programmer:

The descriptions of all of the ideas are clear and easy to follow but only if you already know something about the technologies being used. This is not a book for trying to learn JavaScript or even HTML/CSS. It would make a good second level course on the techologies, but only if you were interested in building a game.

And finally this review by Sandra Henry-Stocker on IT World:

The starting point of Build an HTML5 Game: A Developer’s Guide with CSS and JavaScript is something that completely snuck up on me. In my time as a volunteer webmaster, I’d never considered taking my web skills much further than a church web site with just a tad of moving text and a slide show “walk” along the nature trail. The features of HTML5 that have made it a contender for game development were simply lost on me. With this book, the proverbial lights came on. And while I haven’t yet jumped in and tried to build my own game, I now understand what is required and might just give it a shot.

Fingers crossed that this helps the book sell, of course, but they’re great to see in their own right.

Posted in JavaScript, Programming | 4 Comments

Cycling London to Eastbourne

Board games by the sea!

For the spring London on Board event, and as part of training for the London Revolution ride in (gulp) two weeks, I decided that I’d cycle down to Eastbourne rather than take the train.

The route out

For the outgoing route, I went for this one, which, with the ride from Leyton to get to the start, was something like 85 miles (I think). I wish I had it exactly but unfortunately Strava crashed somewhere around Tower Bridge and I didn’t notice until I was about 30 miles from the end. So on the Strava plot it looks like I teleported.

The route was hilly, and long, but the weather was good. I left home just before 9am and was in Eastbourne by 5pm, and I think I stopped for about an hour total along the way. The route was definitely scenic and mostly quiet, though, although getting over Beachy Head at the end was a challenge I could have done without – more because of the traffic hurtling past than the hill itself.

The route back

For the journey back, I went mostly by a different route. I’m still not sure I shouldn’t have just left it for another day as it was raining when I set off which meant my phone shorted out for about 45 minutes and I was navigating by guesswork and trying to remember the route down, and wondering at what point I might just have to find a station and get on the train.

I also didn’t fancy the traffic around Beachy Head again and relied on Google’s directions to take me out of Eastbourne, which proved to be a mistake as I spent five miles or so bouncing along a muddy bridleway aka National Cycle Route 21. It was not the way I wanted to start an 80 mile ride. I’ve also learnt now that a hotel breakfast is not the way to fuel up for a long ride; I didn’t feel like any useful carbohydrate made it into my system for about the first four hours, so it was quite a slog. It did, however, mean I had some pace left in my legs when I got back into London.

The full journey, apart from the bit where the phone didn’t work, did make it onto Strava though and you can see it here, if you are interested in such things. Particular highlights would be rescuing a lamb that had its head trapped in a fence and having to walk through newly laid tarmac over a level crossing (that was closed as they were still laying the tarmac) with steam from the rain falling on it around me. I hope my cleats didn’t leave too big imprints in their nice new surface…

Other things

– Beachy Head road, as mentioned before, is not pleasant, although the downhill is rather fun
– Pains Hill and Titsey Hill are pains in the titseys. (Or actually legs, but that doesn’t really work.)
– The area around Biggin Hill is rather nice for riding in, if you can face the hills
– I really should have taken some photos
– Hills: why? Just why?

So would I do it again? I’m not sure, but only because I couldn’t take any games with me. The October meetup will likely be when the days are short so I’d have to leave earlier in both directions, so we’ll have to see how much I’m riding next spring.

The links again

Long and mostly quiet London to Eastbourne route
Shorter but still quite quiet Eastbourne to London route
The route I actually took back

Posted in Cycling | Leave a comment

Build An HTML5 Game – Answers To Exercises

My Build An HTML5 Game book is finally on the way, and the website to go with it is live too.

As well as info about the book it serves three main purposes:

  1. A place to see and play the Bubble Shooter game developed in the book
  2. Assets such as images and sounds to make the game
  3. Solutions to the exercises at the end of each chapter in the book

The last are only suggested solutions and there’s a comment form below and I’m hoping others will be able to improve on my coding here.

Posted in JavaScript, Programming | Leave a comment

Build an HTML5 Game – 40% Early Access Discount

Build an HTML5 GameMy book Build an HTML5 Game in going to be out in a couple of months, and until around 4pm on January 31st 2015 you can get 40% off with the discount code BRIGHTANDEARLY if you buy it here: http://www.nostarch.com/html5game

The discount applies to ebooks or the physical copy too, although it’s only if you’re in the United States that I guess the physical version makes sense, until it’s more widely distributed sometime in March.

Build an HTML5 Game

Make your own game without learning any new languages! With just HTML, CSS, and JavaScript in your toolbox, you can create a truly cross-platform game, playable on both desktop and mobile browsers.

In Build an HTML5 Game, author Karl Bunyan shows you how to create browser-based games by walking you through an in-depth tutorial on building a classic favorite, the bubble shooter. Along the way, you’ll learn how to:

  • Send sprites zooming around the screen with JavaScript animations
  • Cause exploding effects with a jQuery plugin
  • Use hitboxes and a bit of geometry to detect collisions
  • Implement game logic to display levels and respond to player input
  • Convey changes in game state through animation and sound
  • Add flair to a game interface with CSS transitions and transformations
  • Gain pixel-level control over the game display with the canvas

Hit the ground running as you start programming the bubble shooter from the very first chapter. Exercises at the end of each chapter test your new skills by challenging you to dig into the bubble shooter’s code and modify the game.

You can create a complete game right now, with skills that you already have. Let Build an HTML5 Game teach you the basics, and then transfer that knowledge to create any game you can imagine.

Get 40% off with the discount code BRIGHTANDEARLY if here: http://www.nostarch.com/html5game

Posted in JavaScript, Programming | Leave a comment

Cafe Finder Website And App For Cyclists

Halfway Coffee - Cafes for CyclistsI’ve been out riding with the Lea Valley Cycling Club a few times now and the route planner, John, has a good stock of cafes in his head that we can use as drop-off points. The problem is, I’m not always going to be out with the club, and I’m not always out in a part of the country I know.

Now, I might be able to find just any cafe, but it seems that cafes that are welcoming to cyclists have a few special qualities: plenty of space to stash bikes, even if you won’t have a lock with you, generally out of town, and a good selection of high carb food and tea.

There seem to be a few websites that try to list cafes. Cake My Ride is pretty good and BikeHub claims to be, but I couldn’t really find much apart from route finding.

Anyway, of course I decided to build a website myself, and an app to go with it. It’s called Halfway Coffee and you can search for cafes by location or add a new one. The iOS app or Android app show you cafes that are nearby or let you add or rate one that you’re sitting at.

Will anyone apart from me use the app? Possibly, but probably not many. But at least I’ve got no excuse for not being able to find a good cafe stop in the future.

Posted in Cycling | Leave a comment

My Prudential Ride100 Experience

Ever since I had the confirmation that I’d gotten a place in the Ride 100 ballot I’d been viewing August 10th with a mixture of excitement and trepidation. Excitement, because it was going to be a great challenge, and trepidation due to the distance. I’d been building myself up since the beginning of the year, but given how exhausting even the lift from a 50 mile ride to a 60 mile one was, I wasn’t too sure about the idea of making 100 miles with anything less than complete exhaustion and, not to put too fine a point on it, severe bum-pain (not a technical term).

In the last months before the event, though, I’d put in a few much longer rides, including 94 miles about 10 days before the event. This put me in a much more positive frame of mind and “I think I might be able to do this” was being replaced by “I might actually enjoy doing this”. Trepidation started to recede and excitement came to the fore.

Then, with a week to go, trepidation was given a major boost: the remnants of Hurricane Bertha were going to be heading across the Atlantic and they might – only might – be hitting the UK on Sunday August 10th. Of course, this meant they were certain too, and indeed they did. Obsessive checking of every weather site in the days leading up to the event and trying to believe whichever forecast was the most forecast didn’t really help as they all trended downwards as the day approached. On the Saturday afternoon, the rain forecast from the Met Office was the picture below:

There were weather warnings in place regarding rain, flooding and wind. Perfect cycling conditions.

On the day, things didn’t look too bad. Rain had fallen overnight but, even lining up at the start, there were grey skies but not too much wind and only a hint of rain here and there.

One thing for sure: there were a lot of cyclists. The organisation involved in getting some 24,000 away was impressive, and I set off a bare 10 minutes after my allotted start time, although a couple of hours after the first fast riders had left.

As many had said it would, the ride started much faster than a casual ride in the country. I was overtaken by pretty much everyone as I stuck to somewhere between 15mph and 20mph, making as much as I could of sitting behind anyone going about the right speed and big enough to make a hole in the air for me to follow. The roads were wet so if they had mudguards it was even better.

Rain came and went, but the weather didn’t seem too bad. By the time we were in Richmond Park there’d been a few light showers but nothing to complain about. There was also a hundred yards of walking due to an accident that didn’t look very nice at all.

Once on the southwest side of London, however, the heavens really opened. The waterproof jacket held up for a while but nothing could keep that amount of water out, and soon my pedal strokes were accompanied by the feeling of water sloshing in the bottom of shoes. We kept going, of course, trying to avoid the rivers that were running across the road.

By about mile 35 the energy levels had dropped, though, and for about the next hour I didn’t hear a single rider speak a word. It was like we were all cycling our way across the river Styx and no-one was in the mood to talk. Also, I was dying for a wee by that point, and also hadn’t eaten as much over the past half an hour because I didn’t want whatever I consumed to be ninety percent rainwater. The top point at 40 miles were advertised by the marhalls (that must have been suffering at least as much as the riders) as “water and toilets; long queue for toilets” so I kept going. The next five miles of country lanes were strewn with men peeing in hedgerows.

Somehow, I managed to cycled up Newland’s Cornder, supposedly one of the three big-ish hills, without knowing that that’s what it was, and I was suddenly at the halfway point. I needed water refill, bladder emptying, and stomach filling, so I went into the “hub”, as they were called. Thankfully there were no queues, and after the water refill I ate my way through a ham sandwich whilst sheltering under a large tree that was keeping the worst of the horizontal rain off.

Fifteen minutes later I gave my gloves a good wring out and set off again. The rain had eased by now and was just rain rather than a waterfall, but the roads were often flooded to the point where the riders had to slow to a narrow filter to weave around lakes. The organisers had taken the decision to shorten the route to avoid the two steep hills – not because of the climbs, but because of the descents – which I don’t think anyone could disagree with, although it was disappointing that now the Ride 100 would only be the Ride 86 as there were 14 miles lopped off.

As a result, after some rolling hills and drying conditions, I found myself at mile 81 (which was really mile 67) rather quickly, and stopped for a last water refill. I ditched the rain jacket as well and took out the spare gloves that I’d wisely packed in the inside pocket for when conditions dried out. These were, of course, almost as soaked as the gloves I’d been wearing, but they were lighter material so they couldn’t hold so much water.

With only 19 miles to the finish, and having had the distance shortened, the last hour and a bit was a very pleasant fast ride into town. Again, I skipped from back wheel to back wheel, and by this point I was only being overtaken by 50% of the riders on the road rather than 100%, which made me feel better about a more moderate easy pace. The wind was strengthening too, but it was coming from behind so it was easy to keep close to a 20mph average, even with all the wet corners we had to slow down for. I don’t think I’ll ever forget the flooded tunnel beneath some railway tracks that many of the cyclists walked around. I cycled through, but at every pedal stroke my feet dipped into the water which was a good four or five inches deep.

The Mall appeared in next to no time and then it was time to dismount, collect a medal and then suffle through to the goody bag collection and out. At least I had the ride home to top the miles up, and I think I totalled 98 miles by the end of the day. I’ll just have to do the 100 miles some other time then.

Ride London Medal

Despite the atrocious conditions, I’d completely do the whole thing again, and now need to find another cycling target to aim for. Maybe something a bit shorter, but a bit faster… maybe.

Anyway, things that I learnt:

  • As many have said, riding in a big group is a lot faster than riding on your own. Solo training is much harder than the event, and the speed you can cruise at in a group makes travelling such a long distance very satisfying.
  • If you see someone doing something like this on a Brompton, it’s likely they’re extremely fit. I know I overtook some people who passed me early, but Brompton guy was off into the distance never to be seen again.
  • Starting off slow definitely pays off towards the end.
  • If you ever get the chance to cycle on closed roads, just do it

Now I just have to see if I can get in for 2015 somehow.

Posted in Cycling | Leave a comment