Lockdown Blog 3: Walking the Union Canal (the first mile)

For obvious reasons I can’t do my usual mix of day trips, weekends away, family holidays and so on this summer. So, while I have to admit that “making the best of a bad situation” doesn’t come easily to me, I’ve turned my attention to what I can do closer to home instead to try and preserve my sanity until things are a bit more normal. And one of my ideas was “Let’s walk the whole length of the Union Canal again”.

Lochrin Basin
Lochrin Basin at the eastern end of the Union Canal

I used to be a bit obsessed with canals and bridges and so on as a boy, and when I was about ten my mum (who liked to encourage this interest) suggested that we walk the whole of the canal (in sections, since 31 miles in one go would be a bit much!). In fact, we’d already tried to do something similar with the River Almond, but walking the canal would be a lot easier since it had a towpath all the way along. I was excited about this. I’d already visited a few locations along the canal and found them all interesting, so seeing the whole thing would be great.

We started the “Canal Expedition” as we called it at the Edinburgh end in the summer of 1989, which I can hardly believe is over 30 years go. We mostly walked sections of one or two miles at a time, though a few were longer, and our progress was very sporadic – if I remember rightly, we got about half way within a few months, but then didn’t do any more for several years, and it wasn’t until late 1994 that we triumphantly completed the final section, from Polmont to Falkirk.

Leamington Lift Bridge
Leamington Lift Bridge at some point in the 90s, before restoration

Once our strict lockdown ended and we were allowed to travel a bit for leisure again, I thought it would be interesting to do the same thing again now and see how much it’s changed 30 years on. I love the canal so obviously I have been back to it numerous times during the intervening decades, but this is the first time since then that I’ve actually set out to walk the whole thing from east to west. Right now, there’s still a 5 mile travel restriction in force in Scotland, so I’ll only be able to do the first few sections until this is relaxed, but the rest’ll give me something to look forward to. Anyway, enough of the preamble… on with the walk.

The first section I walked was from the Edinburgh terminus of the canal at Lochrin basin to Harrison Park, about a mile out from the city centre. It was exactly the same section we started with in 1989, but it’s changed a lot in the mean time. Back then it was still mostly unused and forgotten, the first few hundred yards surrounded by run down looking industrial buildings. It was also quite rare to see boats in this area – although the Edinburgh section of the canal was used sometimes by rowers and canoeists, there were no larger boats. Not surprising really, considering that at that time they would only have been able to sail a few miles before finding a road in their way (more on that later).

(Actually, I didn’t walk quite the same route this time; the first time around we started on Lothian Road, where the canal used to terminate at a large basin called Port Hopetoun before it was truncated to its present terminus in 1922. This time I didn’t bother with that and just started from Edinburgh Quay near Fountainbridge, since there’s nothing to see on Lothian Road other than a stone carving on one of the buildings commemorating the old port).

Boats moored near Viewforth
Boats moored near Viewforth

Today the area has been transformed. The canal was fully reopened in 2001 (though the link to the Forth and Clyde Canal wasn’t restored until the following year) and the newly created Edinburgh moorings are usually busy with colourful narrowboats, some privately owned and some community boats owned by organisations such as Re-Union. The old industrial buildings have been swept away and in their place are smart new blocks of housing, offices, bars and restaurants with open spaces allowing pedestrians and cyclists to enjoy the waterside. A lot of people were taking advantage of this opportunity at the same time as I was – I suspect it wouldn’t be so busy on a “normal” night with the pubs and restaurants open.

Further out, things start to feel a bit more closed in, with tenement blocks backing onto the canal on both sides. It opens up more again at Harrison Park, with the park itself on the north bank and larger suburban houses on the south. This area is definitely the prettiest part of the city section of canal with the picturesque church next to Harrison Road Bridge, the yellow boathouse at Ashley Terrace, and usually plenty of boats and wildlife on the water as well.

Ashley Terrace Boathouse
Ashley Terrace Boathouse at Harrison Park

The Union Canal has no locks except at its far western end near the Falkirk Wheel, so the most obvious canal features on this section are the bridges. There are five in total, all the same ones that were there when I first walked it, though the impressive Leamington Lift Bridge has been restored to full working order since then, and the metal bridges numbered 1, 2 and 3 have had a new coat of smart pale blue paint, having previously been quite drab looking. (Bonus geeky fact: if you’re wondering why the numbering doesn’t start at the first bridge, apparently the first few bridges at the Edinburgh end were originally built as little wooden drawbridges, and for some reason they had their own distinct numbering system, separate from the stone arched bridges used along the rest of the canal. So now you know).

I’ll hopefully be out again soon walking westwards from Harrison Park, so shouldn’t be too long until the next post.

Lockdown Blog 2: Training an AI to recognise the Simpsons

Introduction

I’ve been meaning to have a proper play around with modern artificial intelligence techniques for a while, and during lockdown with more time on my hands seemed like a good time to give it a go. So I trained a deep learning neural network to recognise characters from The Simpsons. (As you do).

This was actually my third foray into neural networks: I used one (not very successfully) for my final year university project way back in the mists of time, and I also experimented with training one to generate text last year. (Among other things, I fed it megabytes of text from my diary and got it to generate its own diary entries based on them, which was pretty hilarious if not particularly useful). But this was the first time I’ve attempted to use one in what’s probably their biggest application area, namely computer vision and image recognition.

I thought recognising Simpsons characters would be a good way to get started with this, for several reasons. Firstly, I really like the Simpsons (or at least I did until it all went downhill in the late 90s or so). Secondly, it was relatively easy to get hold of large amounts of Simpsons images for training and testing the network (more on that in a moment). And thirdly, because cartoon characters look so distinctive, it would be easier to get a computer to tell them apart than it would in the case of (for example) real people.

Before I go any further I’d like to give a shout out to the fantastic Practical Deep Learning For Coders course made by the developers of fast.ai. I watched all the course videos a few months ago and found them incredibly interesting and inspiring, possessing the rare combination of being instantly accessible but also going into the subject in great depth. As an illustration of what I mean, after the first half hour or so of the opening lecture you’re already up and running with training a classifier to tell different cat and dog breeds apart, while the second half of the videos delve right into the code, explaining it right down to a line-by-line analysis of the algorithms that make up a neural network. Highly, highly recommended for anyone who knows how to code and is at all interested in AI.

Preparing the data

The first step in building a deep learning model is getting together some data that you can use for training and testing the neural network. In my case, I needed as many images from The Simpsons as I could get hold of, and I also needed to “tag” them (or at least most of them) with the names of the characters that appeared in them.

I decided to write a Python script that would download random images from Frinkiac, which is basically a Simpsons screen grab search engine, often used for making memes and so on. I felt a bit bad as it probably wasn’t intended for this usage, but in my defence I was quite gentle with it – I left my script running over a period of days, grabbing a single image at a time and then sleeping for a while so as not to hammer the site’s bandwidth. By the end of this process I had a completely random selection of around 3,000 screen captures from the first 17 seasons of the show sitting on my hard drive.

The next step was to “tag” these with the names of the characters that appeared in them. You might wonder why I had to do this… after all, my aim was to get the computer to identify the characters automatically, not to have to do it myself, right? Well yes, but in order to train a neural network to perform this sort of recognition task, you need to give it “labelled” data – that is, you show it an image along with a label describing what’s in it, in quite a similar way to how you might train a person to recognise characters they weren’t previously familiar with, in fact. So you need the data to be labelled.

I wasn’t looking forward to this bit as I knew it would take quite a bit of time consuming manual work – I was going to have to look at every image myself and identify the characters present, then enter that information into the computer somehow. To ease the pain, I built a little web app to try and make this process as fast as possible. It showed me the images in turn, allowing me to tag each one and move onto the next one with the minimum of key presses, writing the image names and tags into a CSV file that I could use with the AI software later on. In all I think it took me maybe an hour to write the web app and about 2 hours to tag the images, which wasn’t as bad as I’d feared.

Initially I had planned to train the network to recognise all the named characters in the show, but I later realised I probably didn’t have enough data for this – some of the more minor characters only showed up a handful of times in my training images, not really enough to make the recognition reliable. So instead I decided to focus on just the four main characters: Homer, Marge, Bart and Lisa.

Training the model

Once I had the tagged training data ready, I turned my attention to actually training a neural network to recognise it. I used the same software used in the fast.ai course I mentioned above, namely fast.ai itself (which is built on PyTorch), with the code written in the form of a Jupyter Notebook for easy experimentation. I used a ResNet34, a classic architecture for image recognition, though I also tried using a larger ResNet50 to see if it worked any better (it didn’t). Training (on my GeForce 1050Ti) only took about 5 minutes, then I was able to play with the resulting model, testing it on images it hadn’t seen before.

Overall, I was reasonably happy with it, for a first attempt. It worked very well indeed (almost perfectly) for images that included a reasonably close shot of one of the characters’ faces. For example:

Prediction: 99.78% Bart
Prediction: 99.01% Marge
Prediction: 98.98% Lisa
Prediction: 99.99% Homer

(You may notice that the model doesn’t just give a straight yes or no prediction, but a percentage score indicating how confident it is that each character does appear in the image).

The model doesn’t work so well for more complicated situations such as characters being partially hidden, characters viewed from an unusual angle, characters wearing unusual clothing (especially clothing that covers up some of their distinctive features), characters far away in the distance so that they appear very small in the image, and so on. Below are some examples where it doesn’t make such a confident prediction, and my speculation as to why that might be.

Prediction: 35.4% Marge. The model thinks it’s more likely that Marge is in the image than any of the other characters (who all scored likelihoods of less than 10%), but still isn’t very confident, probably because she’s in a slightly unusual position and has her head turned away.

Prediction: 54.23% Homer. The model thinks there’s a decent chance Homer is in this image, but isn’t very sure, probably because only the top of his face is visible in this one.

Prediction: 99.88% Lisa, 11.55% Bart. The model is very certain Lisa is here, but nowhere near as confident about Bart. I think this is probably because Bart is partially hidden behind Lisa and Maggie, while Lisa is fully visible.

Prediction: 97.23% Bart, 97.49% Homer, 88.81% Lisa, 68.79% Marge. This time the model correctly identifies that all four characters are in the image, but it’s significantly less certain about Marge than the others, probably because her face is obscured behind Bart.

Prediction: 87.75% Bart, 53.09% Homer, 94.77% Lisa, 39.25% Marge. In this shot, all the characters are present but not in their usual clothing. Bart and Lisa are recognised with a high degree of confidence, but the model is understandably not so confident about Homer, since only the top of his face and head is visible. Surprisingly, it’s even less confident about Marge, maybe because her trademark hair is mostly hidden from view.

Prediction: 98.25% Homer, 74.86% Marge. The model is a lot less confident about Marge than Homer, presumably because Homer’s glass is obscuring most of her face.

Prediction: 91.71% Homer, 93.39% Marge, 67.27% Lisa. Homer and Marge are recognised with more than 90% certainty as expected. Interestingly, the model also thinks that Lisa is probably here, I’m guessing because Maggie looks very similar to Lisa in some ways, notably her hair and eyes.

So that’s my model. I have no doubt at all that it could be done much better by someone with more expertise (or, for that matter, a better training data set), but as someone who started programming back in the days when it would have been unimaginable for a computer to do this, it’s amazingly cool to see it working even as well as it is.

Can I play with it?

More seriously, I’d like to find out how to make models like this available online for people to have a go of, but I’m not there yet. I’m new to all this and don’t want to end up overloading my web host, or running up a huge bill if I go down the cloud hosting route, so I’d definitely want to do some research or testing before attempting this.

Lockdown Blog 1

I haven’t posted on here in a while… I think it’s fair to say that, back in the now very innocent seeming days of mid-2019, I did not expect my next post to be written from a country in full lockdown, forbidden from leaving our homes except for a few very specific reasons. I don’t think anyone else saw it coming either.

As I write this, we’ve been in lockdown for just over a week, and I personally have been working from home for just over two weeks. I should acknowledge right from the start that I’m in a pretty fortunate position compared to a lot of people: no-one close to me seems to have got the virus yet, I have a pleasant and secure place to spend lockdown with people I love, and I’m relatively safe from the financial effects of all this as well. I fully support the lockdown and I know that people suffering from the virus and those on the front line of treating it are much worse off than I am.

That said, I also think it’s important to acknowledge that this is an unprecedented upheaval for almost all of us, and that it’s clearly going to affect everyone one way or another. So I think it’s completely legitimate to talk about how it might affect our mental health and what might be good coping strategies, even for those of us not on the front line.

Speaking for myself, a few weeks ago when it started to become clear what was about to happen, I was utterly dreading it. Probably not an uncommon reaction, but I had particular reason to be worried. As I’ve mentioned in previous posts, I’ve spent a lot of my life (almost the whole of the first 15 years of adulthood, in fact) living with clinical depression and anxiety. Eventually I managed to get this mostly under control, but the only way I ever found to keep the depression at bay was to keep doing lots of exciting things to keep my mood up: folk dancing, solo foreign travel, urban exploration, taking part in the Beltane Fire Festival, and so on.

I’ve pretty much spent the last several years making sure I always had a few of those things lined up to look forward to within the next few months, and it has made a massive difference: to put it bluntly, the difference between life feeling worth living, and… well… not worth living. So hearing the news that none of these activities were going to be possible for several months, quite likely not for the whole of this year, I didn’t know what I was going to do. I felt as if, after years of thinking I’d never be able to walk again, I’d finally learned to hobble around with the aid of crutches, only to now be told I wasn’t allowed to use the crutches for the next several months. And I really, REALLY didn’t want to go back to the way I used to live my life before I found the crutches.

After that initial panic was over with, though, I feel like I’ve settled into a new routine a bit better than expected. It actually reminds me a bit of two previous periods of my life, in some ways at least. One is the time 18 months ago when my son had just been born and I was off work on paternity leave. All the usual rules and day-to-day routine just went out the window and suddenly there was only one objective: to survive each new day as it came. I don’t mind admitting that I had some pretty dark thoughts at times during those early weeks, wondering whether I’d ever get a decent (or even adequate) night’s sleep again, wondering whether I’d ever get my life back, whether I’d ever be able to do the adult things I’d once so enjoyed again or whether I was destined to sacrifice everything for this tiny little new person for evermore. (In the end it was nowhere near as bad as I feared and, while some stuff obviously has changed, I was back to sleeping OK and back to doing most of my activities within a few months).

The other period this reminds me of is when I was a child myself, in the sense that my horizons seem to have suddenly and drastically shrunk back to nearly where they were back then. As a child, almost my whole life revolved around my home, my school a short walk away, and nearby places like the shops and the green spaces where we would walk our dog. Going anywhere further afield, like to visit extended family, go on holiday, go for a walk in the countryside or even go into the city centre felt like a rare special treat in comparison. As for going abroad, I’d never been at all.

After I became an adult, the world seemed to open up: the city centre became somewhere I would go every day for work and often for multiple nights out per week; I would go for frequent weekends away, sometimes as many as two or three in the same month; everywhere within an hour or two’s drive could be visited on a whim just by jumping in the car on a day off; and I would go abroad, either for work or pleasure, anything up to four or five times a year. That became the new normal for me. Now it’s abruptly reversed and I’m suddenly back in that closed, parochial world of childhood again, only even more so this time.

Whilst neither of those past experiences were quite like what’s happening now, I feel I did learn some stuff from them that might help in the present. I’m trying to view the current situation very much like I viewed the early days of fatherhood: focussing on surviving one day at a time, not worrying about anything bar the essentials, and trying to keep the faith that things will go back to normal eventually. I’m also trying to remember the habits that got me through spending so much time in or near the house back in my teens: enjoying music, TV, movies and video games, being creative, and looking forward to the fun stuff I can do in future when the opportunities arise. I’ll probably write some more entries about specific things I’m doing (I’ve already got a few ideas) over the coming days and weeks.

Of course, it’s a bit hard to look forward to fun stuff in the future when we have absolutely no idea how long this is all going to go on for. I find myself really hoping that the government are going to follow the “hammer and dance” strategy set out in this very informative article, because that would mean only a few weeks of strict lockdown, followed by relaxing some restrictions and applying some more targetted and intelligent measures instead. But it’s hard to tell from the briefings whether this is their intention, and I’m not qualified to judge whether it’s even a viable plan at all. So I’m trying to prepare myself for the possibility that we might be locked in for much longer than that.

Fear Of Missing Out (or in my case “Fear Of Already Having Missed Out”

I saw this fantastic article posted on a friend’s Facebook. I read it thinking that it might relate to my own experiences, and I wasn’t wrong.

I’ve suffered from the “fear of missing out” (or in my case maybe more accurately the “fear of having already missed out”) for most of my adult life. But before I delve into that, here’s a bit of background. Not because I want to moan about how hard my life’s been or elicit sympathy, just because what I want to say will make a lot more sense with that background.

You see, in my case the “fear of missing out” wasn’t entirely groundless. I did miss out on a lot of stuff in my late teens and early 20s, a time of life when everyone’s supposed to be out exploring the world, bonding with their peers and having amazing experiences. For me it wasn’t like that at all, in fact it was the lowest point of my life so far. By the time I left school and went to university, years of bullying (plus some other more complicated stuff that I won’t go into in this post) had left me with anxiety and depression that was almost crippling.

Throughout my entire time at university I had no close friends, no love life, in fact hardly any social life at all (at least to begin with). I would go in for my classes but afterwards I would come straight home to my bedroom in my parents’ house, certain that there was something terribly wrong with me but with no idea how to fix it, or even what it really was.

Thankfully, things did start to get gradually better. As I got more used to being around people, my social anxiety subsided slightly. I still wasn’t really up to forming meaningful relationships, but at least I got better at dealing with everyday situations without wanting to run away and hide. The depression was alleviated slightly as well, helped a bit by therapy and a bit more by experiencing some major successes in my life (namely getting my first job and passing my driving test).

I started to socialise with my new colleagues and soon I was going for nights out reasonably often and coping with them a lot better than I used to. I tried out various social groups outside work as well, finding some that suited me quite well. Eventually I finally got to the point where I started to form meaningful relationships, and I was also living on my own by that time.

At that point you might think that my problems were nearly solved. After all, I had overcome the depression and anxiety to the extent that I was able to live independently, work, socialise and have relationships. I was more or less functional in every major area of life. But my stupid dysfunctional brain had other ideas.

It really started when my first relationship ended very badly. Of course, there’s nothing particularly unusual about that; I think most people’s first relationships end quite badly. Relationships are actually quite hard work and not all as fun and glamourous as they’re made out to be. The problem was how I handled it. Instead of picking myself up, shrugging and moving on with my life, I became fixated on the idea that this had happened because I’d left it too late: I’d missed out on the experiences that most people had in their teens that taught them how to deal with relationships, and as a result I would never be able to have a proper, healthy relationship.

It wasn’t just in the field of relationships, either. I found myself obsessing over how I’d missed out on all the amazing social experiences most people have at high school and university, and I thoroughly convinced myself that nothing I could possibly do in the future would ever live up to that. Of course, even if that had actually been true, the rational response would have been to cut my losses, stop fixating on it, move on from it and get on with making the rest of my life as good as it could be, regardless of whether it was going to live up to what I’d previously missed out on or not. But I found myself unable to stop thinking about those lost years.

Thoughts like that are pretty debilitating. Although I continued to attempt to socialise in the present (after all, what else could I do?), constantly comparing it to an imagined past that I should have had was a pretty good way to kill any enjoyment I might otherwise have experienced, not to mention putting up a barrier that stopped me from really getting close to anyone. It’s hard to get enthusiastic about going out for drinks when all you can think about is all those amazing wild nights that everyone else was having as a student, and about how boring and tame your night is going to be compared to those. And it’s hard to feel a connection to anyone when you’ve written yourself off as damaged goods due to not having had the proper formative experiences that everyone else has.

I think a large part of the problem is that a lot of this stuff is so over-hyped in the media that the reality is almost certain to fall short. The ideas that (for example) teenagers and students are constantly bonding with each other and having wild parties, or that sex is unimaginably, mind-blowingly amazing are constantly rammed down our throats these days. So when various “firsts” for me (first time in a nightclub, first time having sex) left me feeling distinctly underwhelmed and thinking “is that it then?”, it was easy to assume that I must have somehow done them “wrong”. And instead of thinking that maybe those experiences just weren’t the be-all and end-all like I’d been led to believe, I convinced myself that they would have been if only I’d done them at the right age. They were only disappointing because I’d left them “too late”.

(Don’t get me wrong, I like going for nights out and I like having sex. There’s nothing inherently wrong with those things, and I’m not saying they aren’t enjoyable. It’s just that they’d both been built up to such ridiculous levels in my head that I was expecting them to be completely off the scale compared to everything else I’d experienced before. And they just weren’t).

As I became more and more frustrated with this feeling of having missed out, I started to go out of my way to try and have experiences more like the ones I was convinced I’d missed out on. I even contemplated a really major life change that I thought might help, though with hindsight I don’t think it would have and it’s probably for the best that I didn’t go through with it.

Looking back now, though, what interests me most is the complete lack of consideration I gave to whether I actually wanted those experiences for themselves or not… were they things that were important to me, things I thought I would get a lot of enjoyment from? Not really, no. They were really just things I wanted to tick off a list so that I wouldn’t have to feel as if I’d missed out on them anymore. To paraphrase Mark Manson’s article, I wasn’t motivated by the joy of experiencing something great. I was motivated by the fear of not experiencing something great.

If I’m brutally honest with myself, the idea of being a stereotypical young person who’s constantly out drinking and sleeping around didn’t really appeal to me when I actually was a teenager, which is probably why I didn’t make very much effort to live that lifestyle at the time. At that age I was actually happier working on my computing projects, going out for walks and having uneventful nights in with my handful of friends. Sure, I liked the idea of having a relationship at some point, but I wasn’t consumed by the idea and was happy enough on my own for the moment. It was only afterwards when I started to panic about having missed things that Everyone Else seemed to have done and bonded over that I started to obsess over it. And in fact, I started to feel much better as soon as I started to ask myself what I really wanted out of life, and realised that I wasn’t so far away from it after all.

Realistically, I doubt I’m the only one who didn’t do all that stuff at the “normal” age. In fact I know I’m not from various conversations over the years. More than that, everyone’s lives are different: there isn’t some gold standard Young Person Experience where you work your way through everything in some prescribed order, ticking off each life lesson at exactly the right stage in your development and moving cleanly onto the next one. That’s one of the reasons why it was so futile for me to fixate on trying to recapture this lost experience. I was chasing after something that simply doesn’t exist, something that never existed except in my own imagination.

If my life had panned out differently, maybe I would have ticked off some of those things at an earlier age, maybe closer to the average age. But I’d bet my bottom dollar that the main difference wouldn’t have been that they were materially better at that age; it would just have been that I would have learned sooner that those experiences rarely live up to the hype surrounding them.

Ultimately, if I missed out on anything, it wasn’t getting laid in Freshers Week and going out clubbing three times a week for the duration of my course. It was living in the moment and enjoying things as they come. And I’m starting to see that that can only be fixed by getting away from the whole mindset of having “missed out”.

Where have the political posts gone?

If you’re reading this, there’s a good chance you came to look at one of my political blog posts and got redirected to this one instead. Hi!

I’ve taken the political posts down. I’d been thinking about it for a while, and in the end it seemed the best option. The truth is, it wasn’t doing me any good to be spending as much time as I was thinking about things that make me angry and that I can’t realistically have any influence over, so I’m going to try and stop.

I know a lot of people won’t agree with this. They’ll see it as pathetic, even childish to bury my head in the sand instead of facing reality. They would probably argue that if I strongly believe in what I was saying, I should try to do something about it, try to change people’s minds, campaign for things to be better, etc. It’s true, people can sometimes make a positive difference that way… but I haven’t been making a difference. I’ve just been getting myself worked up into a state of anger and stress over the news almost daily and occasionally venting on here in a way that was unlikely to convert anyone to my point of view.

Even if I was to direct my anger towards something a little more constructive, I have to be realistic and balance the very small positive difference I might be able to make against the considerable personal cost. I’m not particularly good at campaigning or persuading people and I find that sort of thing mentally draining, not to mention that it would take a lot of time I just don’t have these days. On the other hand my family need me to be good at being a husband and father, my employer needs me to be good at writing software, and I need myself to be in good enough mental shape to cope and actually enjoy life sometimes. Spending half my energy getting wound up by the political situation jeopardises all of that. And if the worst should happen and things in this country are potentially going to get really bad in a way that affects me personally, I need to be on top form to deal with it as best I can.

And some people would no doubt say it’s pathetic that I can’t control my thoughts and emotions sufficiently to stop that stuff from bothering me so much. I disagree. What I’m doing now is taking control over those effects, the only way I know how. I’ve made no secret of the fact that my mental health isn’t the best and I make no apology for that.

My views on the issues I wrote about haven’t actually changed. I’ll still be voting against the stuff that pisses me off any time I get the chance. I just don’t want half my life to be consumed by unproductive thoughts about it anymore.

But why not leave the old political posts up for people to read and just don’t write any more of them? Several reasons, really. Firstly in cases like this I find it easier to draw a line in the sand and try to make a clean break with the past. If I left the posts up I might decide not to write any more now, but then change my mind next week and go straight back to my old ways again. Secondly, whenever new comments come in on the old posts and I get notified about them, it drags all of these issues back into my awareness again and I’d rather avoid that as much as possible.

Thirdly, contrary to how it may have sounded at times, I actually don’t want to alienate all the people who disagree with me and cause further division. Some of them are people I need to be able to get on with, even people I care about. Their views don’t make them bad people and it does no good at all to introduce unneeded tensions into my relations with them.

And finally, those posts were just not really in the spirit of what this blog was supposed to be about. When I started it back in 2011 I just wanted somewhere to post about things that I found fun or interesting, and to talk a bit about my ongoing recovery from anxiety and depression related problems. It was never meant to be dominated by angry, divisive political rants and I’m hoping to take it back to its roots in the coming months.

Thanks for reading and, whether you’re of the same political persuasion as me or not, peace be with you 🙂 .

Kilsyth to Falkirk Canal Walk

I didn’t have to wait as long between the last two walks as I had between the first two. We were keen to finish the canal now and, once the weather had started to get a bit better after winter, we arranged a date in late March 1995 to walk Kilsyth to Falkirk.

(Keen-eyed readers will note that technically that’s not the whole canal; it finishes in Grangemouth, not Falkirk. But I actually walked the section from Underwood Lock near Bonnybridge to Grangemouth only a few weeks before doing Kilsyth to Falkirk as part of a guided walk series, so I didn’t mind stopping a bit short with Ian and Chris. The last mile or so was filled in and culverted at that time anyway so there wasn’t a lot of canal stuff to see there).

I had mixed feelings as the day of the walk dawned. Of course I was looking forward to seeing more of the canal and spending another day with Ian and Chris, but I was a bit sad that this would be our last Forth and Clyde Canal walk, unless we decided to go back and do it again in the future which wouldn’t be quite the same. Also, what with this being a shorter walk and having already walked some of the route before, I decided it probably wouldn’t be as eventful as our first two walks, though I think I was wrong on that count in the end!

We’d done the second walk without a car or a dog, but both were now rejuvenated and were coming with us for the finale. I also had my own camera back again and planned to make up for the shortage of photos from the second walk by photographing practically everything on the third! As we sped along the M9 on our way to Falkirk (a novelty to me as my mother always preferred to take the back roads instead, leading me to think of places like Linlithgow and Falkirk as being much further away than they actually are), I was glad to see that it didn’t look as if it was going to rain this time. But then it hadn’t the second time either…

We had planned to leave the car at Falkirk Grahamston Station and get the train to Croy, then walk back. Unfortunately a broken down freight train was blocking the line so we decided we would have to get the bus instead. It was a while until the next one so we ended up in the same cafe as last time, but no chip butties were consumed this time. It was a bit too early in the morning for that.

It took so long for our drinks to arrive that we nearly missed the bus again, but soon we were safely seated up at the back, behind two teenage boys who were discussing the Simpsons. Ian decided that in the absence of chip butties he would have to start eating his packed lunch. I couldn’t really blame him; what with the train problems and the wait for the bus it was now a few hours since we’d left my house and we still hadn’t even seen the canal yet.

Kilsyth main street looked horribly familiar as the bus rounded the corner and pulled up at our stop. After last year’s experience we had no desire to look at it for any longer than necessary, so we turned away and headed down the side road that led to the canal. It seemed a much longer walk now than it had done last time, probably just because we were impatient to get on by this point. As we arrived at Auchinstarry Swing Bridge we saw that we weren’t the only people who’d given up our Saturday morning lie-ins to come to the canal: some canal society members were working on their boat, the Gipsy Princess, in the reedy basin next to the bridge.

Auchinstarry Bridge

After I’d taken photos of both the bridge and the boat, we (finally) set off eastwards. Although there was no rain, the wind was blowing in our faces, which was annoying. Chris said she’d planned all the walks so that the wind was likely to be on our backs, but it hadn’t worked today. I guess planning around the Scottish weather is never a very reliable proposition.

Gipsy Princess in her berth among the reeds. There’s a huge marina and The Boathouse restaurant here now

It didn’t take us long to reach the next bridge, at Craigmarloch. It wasn’t very much like I’d imagined. The books I’d read about the canal all made it sound like a really picturesque, significant place, I think mostly because the famous “Queen” pleasure steamers that used to sail out from Glasgow terminated here. But now, both the pavillion-type building used by the steamer passengers and the pretty little bascule bridge had gone, and Craigmarloch was just the point where a minor road crossed the canal on an anonymous concrete bridge. About the only mildly interesting thing left was the canal’s main water supply, which ran into it on the north side, the towpath crossing it on a little bridge.

Craigmarloch Bridge

Chris and I, having so far resisted the temptation to start on our packed lunches, were getting hungry by now, and since there was a little picnic site near the bridge, we decided to stop there and have our lunch. We had hoped to put a few more miles behind us first but the transport delays hadn’t been our fault and there was no point in walking along feeling hungry. While we ate we talked about the exams I had coming up at school, and Ian and Chris told me about what theirs had been like.

Beyond Craigmarloch, the canal widened out to maybe twice its normal width, and for a mile or two it cut dead straight across open country, looking quite impressive. This was Dullatur Bog which apparently gave the canal engineers a lot of headaches when they were trying to build through it. We saw some fishermen sitting in little tents on the grass verge away from the wind, their rods set up on the canal bank with some sort of electronic alarms that would trigger if a fish rose to the bait. This seemed pointless to us as we thought the point of fishing was to sit there holding your rod, but after we discussed it we came to the conclusion that the fishermen probably thought it was equally pointless for us to be walking along the canal.

Another thing I couldn’t understand was the rubbish. Even here, on one of the most remote stretches, people had dumped rubbish in the water, and there was even the remains of a television in the grass at the side of the towpath, which someone must have walked at least a mile from the nearest road in order to dump there.

The wide, straight, open section came to an end at Wyndford. The canal resumed its more usual proportions and finally curved again, and there were some trees around as well. There was also the first lock we’d seen all day, in fact the first one we’d passed since the Maryhill flight, way back on our first walk. There were more people fishing here, but unlike the ones we saw earlier they were doing it properly.

Wyndford Lock

Round another few bends was the A80, the main Glasgow to Stirling dual carriageway. The whole reason the canal was closed back in the 1960s was so that this road could be built across it without the expense of a huge lifting bridge, so it was kind of notorious among people who liked the canal. Fortunately we didn’t have to dodge 70mph traffic to continue our walk; there was a dingy little concrete underpass through the road embankment. Chris had described it to me before as being the kind of place where “there’s things in corners that you don’t look at”, but I didn’t think it was quite that bad. On the far side of the blockage, Ian and I both stood on the old metal swing bridge that used to carry the old A80 so that we could take photographs of the new one (not that it was particularly photogenic).

The notorious A80 obstruction

The old A80 swing bridge

As we walked on, we had to jump to the side quickly to avoid someone who was driving along the towpath to get to an old lock keeper’s cottage at the next lock. Like the Maryhill flight, these locks had been restored, and Ian couldn’t resist having a go of the new metal gates.

Lock 19 (with a blurry Ian, Chris and Ben)

“I’ve always wanted to do this”, he said as he heaved one of the lower gates open. “But I’ve never dared to on the Crinan Canal in case the lock keeper comes out and shouts at me”.

“Someone’ll probably come out of that house and shout at you in a minute!” said Chris.

I wanted to have a go too, so I closed the gate Ian had opened, while Chris stood there looking embarrassed. No-one came out and shouted at us, but we moved on all the same.

Lock 18, the one Ian and I played with. The photos from here onwards were taken by Ian, who had a proper camera and knew how to use it, so they’re a lot better than mine!

A few hundred yards further on was Underwood Lock, where I’d started my guided walk a few weeks earlier. So that was it: I’d seen the whole canal! We were starting to get hungry again after having our food so early in the walk, so we decided to go into the canal side pub in the old lock house and see if we could get a snack, or at least something to drink. It didn’t really have the homely-traditional-canal-pub vibe I’d been expecting and was actually quite a smart restaurant, with very tidy looking families enjoying their meals and looking surprised to see a bunch of scruffy walkers like us slouch in. After a few minutes of wandering around we couldn’t find any staff.

“They must have seen us coming and run away”, I said, as we gave up and returned to the towpath somewhat regretfully.

A little further on, on the far side of Bonnybridge (probably quite close to where the Falkirk Wheel is now in fact, though it was a pretty nondescript location back then), we decided to stop and have the remainder of our food and drink, not that there was much left by this time. This stop turned out to be the unexpected highlight of the day for me, although I’m not sure if Ian and Chris enjoyed it so much. We sat down on the bank of the canal with our legs dangling over the edge. The bank was pretty high at this point and several feet below was a narrow shelf of mud next to the canal itself. Ben looked wistfully down there, no doubt feeling thirsty and wishing he could drink from the cool water.

“I don’t think you can get down there, Ben”, began Ian, seeing what was about to happen, but it was too late. Ben took a flying leap over the bank and landed on the mud below with his head nearly in the water.

“Bloody hell, Ben!” said Chris.

“How’s he going to get back up?” I said, and then had a laughing fit.

Ben stuck down the bank

Ben seemed happy enough where he was for the moment, and at least it meant he could have a drink now, so we left him there while we had our drinks and snacks. At one point some people passed with a black labrador of their own, and that one jumped down next to Ben as well, so for a moment there were two of them down there! But the other dog, unlike Ben, was young and fit and managed to scramble back up the bank, leaving Ben well and truly stuck.

Chris readies herself for the rescue operation

Eventually, when we’d had enough and wanted to move on, Chris jumped down and hauled Ben back up the bank, while Ian took some action photos and I watched and laughed.

Up he comes!

Maybe it was the three cans of Irn Bru, or the constant wind that was blowing around my legs and making the canal water lap at the bank all day long, but I just could not stop needing to pee that day. I’m normally fine on long walks; I’m pretty sure I managed the Bowling to Glasgow walk fine with just a single toilet stop at the Clyde Shopping Centre, but for whatever reason this third walk was different. I found a secluded spot down an embankment near where Ben had his unexpected adventure, but no sooner had we resumed walking than I could feel the pressure starting to build again.

By the time we reached Falkirk and started to descend the lock flight towards Camelon Bridge, I was starting to look around anxiously for anywhere I could find a moment’s privacy, but there were houses and roads all around us now. It was just as well I knew this part of the canal quite well, having walked along it twice before, because right now I was too distracted by my bladder to take much of it in.

Me, Chris and Ben by lock 10, almost the very end of our Forth and Clyde Canal adventure

Finally, as we passed the little bridge over lock 8, I spied a wall with some trees behind it on the far side. That was good enough for me. I ran across the bridge and in between the wall and the trees, finally able to get some blessed relief. It was only after the urgent cries from my bladder subsided a little that I started to think: what is this place, anyway? It’s probably someone’s garden, isn’t it? But thankfully no-one seemed to notice me slinking sheepishly out again. (If you’re reading this now and it actually was your garden, all I can say is I’m sorry).

We left the canal about there. I probably would have insisted that we go right to the very end, even though it was just a crumbling weir surrounded by rusty fencing in a run down industrial area, but having already done that a few weeks ago I didn’t feel the need to inflict it on Ian and Chris now. Eventually we managed to find our way through the industrial estates of Falkirk to the Grahamston Station car park, where there was coffee for all of us waiting in a flask in the boot of the car (except for Ben who had the leftover milk). I’d only recently started drinking coffee, having decided that being wired on caffeine would be a good strategy for my upcoming exams.

 

So that was it. Three of the best days out of my life, which I’ll always remember fondly. Sadly we never did get around to doing any more walks together; both the Crinan Canal (which could be done in a single day, and indeed I did walk it in a single day on my own years later) and the West Highland Way were mentioned at various times, but we were never organised enough to actually do them. I did walk the central part of the Forth and Clyde Canal again with Ian about ten years after the initial walks, though; by that time it had reopened and was quite different from how I’d remembered it.

 

Glasgow to Kilsyth canal walk

At the end of my last post I mentioned that the Bowling to Glasgow walk was only the first of three and that I might write about the others when their 25 year anniversaries came around. But since I probably won’t remember to do that (the dates of the other two walks aren’t so deeply emblazoned onto my brain as the first is), and since I quite enjoyed writing the last post and a few people seemed to enjoy reading it, I decided to just write the next one now instead.

I think it was towards the end of our first walk that someone (probably Chris) mentioned the possibility of doing the rest of the canal at a later date. I was all in favour of this, of course, even though Chris hadn’t enjoyed the rest of the canal as much as the Bowling to Glasgow section when she and Ian had walked it before (she’d said that the middle section was quite long and boring, and by the time they reached the Falkirk end she was tired and just wanted to go home). It took us a while to get around to arranging the next part, and in the end it wasn’t until September of 1994 that we returned to the Forth and Clyde Canal.

Ian and Chris had walked the whole remainder of the canal in one go, a total distance of about 25 miles and more than double the length of our first walk! This time we weren’t being quite so ambitious and our plan was just to walk eastwards from Glasgow until we’d had enough, whenever that turned out to be. Apparently there were a few places along the way that were handy for public transport, so this seemed a good plan.

This walk was going to be different from the first in several ways. For one thing we wouldn’t have a dog with us: Ben had a bad toe and couldn’t manage such a long walk, so he was being left with my parents for the day. We wouldn’t have a car either; Ian and Chris’s was off the road so we would be completely reliant on buses and trains to get us to and from the canal. And I’d been researching the canal and poring over maps since our first walk, so I had a much better idea of what to expect this time.

(You might also be wondering why so few photos compared to last time. Well, my camera was still broken so I was borrowing my mum’s SLR, but I found it so complicated to use that I only ended up taking four photos all day, and two of those were identical ones of Firhill Bridge because I was worried the first one hadn’t worked properly!).

The day of the walk dawned, and Ian and Chris arrived bright and early to drop Ben off and pick me up. Ever the master of optimism and motivation, Ian’s first words to me were “You know, it’s highly unlikely that we’ll actually make it all the way today”. I showed him the Dextrosol tablets I was bringing to try and boost my energy, but he just said “Those’ll be handy if anyone suddenly starts suffering from low blood sugar levels”. The weather was looking pretty good as we walked to the bus stop, and I could feel the mounting sense of excitement that could only mean I was off to explore somewhere interesting. The Glasgow bus was just pulling up at the stop as we turned the corner and we had to run for it. Thankfully we made it, and Chris and I found three seats together up at the back while Ian paid for the tickets.

The journey through was uneventful and we talked about how much better for the environment it was to get the bus rather than driving through as we had done for our first walk. When we got to Glasgow the weather was still so nice that we decided to walk up the Glasgow branch of the canal instead of getting the bus up to Maryhill as we’d originally planned. After all, what’s an extra two miles on a walk that long? It meant that we were rejoining the canal at exactly the point we’d left it 8 months earlier, which made for some nice continuity, though it looked very different on a sunny morning from how it had on that cold November night. Eagerly we set off along the towpath, looking forward to a good day’s walking.

Firhill Bridge

I enjoyed seeing the Glasgow branch again, but of course I was most looking forward to seeing some new canal. We diverged from our previous path at Stockingfield Junction, where we had to go down and through a tiny tunnel-like aqueduct beneath the canal, then up a bank to get to the towpath on the mainline to the east. Although we were still very much in Glasgow, this part of the walk had a pleasantly rural feel to it, especially with the blackberries we were able to pick from some nearby brambles to keep us going. Chris pointed at a funny looking brick tower over to the north and said “I wonder what that is?”. None of us knew, but from looking at maps since I think it was probably the chimney of the nearby crematorium.

 

Unlike most of the Bowling to Glasgow section, the canal we were now following had recently been reopened, so the bridges were mostly high enough for boats to sail beneath, and for us to walk under. The first one was an old metal bridge at Lambhill, and just beyond it was an original canal stables block as well as some weird underground tunnel entrances (both of which I would probably have tried to get inside if I’d been a bit older). The houses to the north gave way to open countryside and there was a little picnic area by the nature reserve at Possil Loch. We decided to stop there for a snack. Chris shared out some biscuits she had made and I took a swig from my large bottle of Irn Bru (a must for walking, in my opinion).

While we were having our break, something unexpected happened: it started raining. I suppose we shouldn’t have been surprised, we were still in the west of Scotland after all, no matter how nice it had looked first thing. I put my jacket on and sheltered the biscuits underneath while Ian and Chris struggled into their waterproof trousers. Chris was amused that my first impulse had been to save the biscuits from getting wet, but said she would have done the same. There didn’t seem much point sitting around in the rain so we decided we might as well walk on.

This walk certainly had quite a different feel from the previous one. The Bowling to Glasgow stretch of canal had had a constant succession of bridges, locks and other canal features to look at, not to mention all the buildings of the surrounding town. On our second walk we didn’t pass a single lock (we were entirely on the canal’s “summit” reach), the bridges were much more spaced out (more than a mile between the ones at Lambhill and Bishopbriggs) and the surroundings were far more rural (currently we had a golf course to the south of us and open country to the north). But I wasn’t sure I agreed with Chris’s comment that it was actually boring; it was certainly quiet and peaceful, but I was enjoying the tranquillity and found some of the countryside quite pretty.

The next bridge was Farm Bridge, next to the Leisuredrome at Bishopbriggs. This was a slightly notorious bridge because it was only about 5 or 6 feet above the water which meant that bigger boats couldn’t go underneath it. It was supposed to be raised in the early 90s but the Glasgow Canal Project, which rebuilt all the other low bridges and culverts between Glasgow and Kirkintilloch, ran out of money before it got to Farm Bridge, leaving this annoying obstruction in the way. (Now, of course, it’s been replaced by the Millennium Link project along with all the other low bridges on the canal, and the new one has the full 10ft headroom).

But low bridge or no low bridge, I was glad to see that (a) there were trees by the canal after the bridge which would give us some shelter, and (b) the rain was easing off a bit anyway by this time. I found myself looking enviously at Ian and Chris’s waterproof trousers as I felt my own soaked trousers against my legs and made a mental note to definitely get some of my own before I next did a long walk.

The next little stretch, through the trees past Cadder, turned out to be really pretty. As the canal turned a corner, we climbed up onto a wooded bank and looked down over the valley (and yet more golf courses) below. The River Kelvin was down there, looking a lot smaller than it had been where we’d crossed it on the aqueduct at Maryhill the previous year. Apparently the bank we were standing on was probably part of the Antonine Wall. People think of the road building programmes of the 1960s and 70s as being pretty destructive as they bulldozed old buildings out of their path (and blocked canals), but things weren’t actually much better back in the canal age – the canal was cut right through the Antonine Wall here, and the navvies even quarried a nearby Roman fort to get stone to line the banks!

Blurry Glasgow Bridge

There were a couple more bridges to pass before we reached Kirkintilloch where we planned to stop for lunch. The second of these was quite interesting because it had recently been replaced with a modern concrete one so that boats could get under it again, and there were quite a few boats moored nearby. There was also a pub in a converted canal stables block (called, imaginatively enough, The Stables).  I took a photo but it came out blurry unfortunately. The rain kept going on and off, so at least it wasn’t raining constantly, but it never stayed dry for long enough at a time for my trousers to properly dry out.

It was at this point that the walk started to drag a bit. Kirkintilloch seemed further away than we’d expected and we were all starting to get a bit hungry by this time, which may account for the slightly bizarre conversation that ensued. It started off innocently enough, with Chris telling us about one of her plants (she had no idea what it was, but she suspected it might be an African Lily, so she asked an expert who said “well I don’t know what it is but it’s definitely not an African Lily”, so from then on Chris just referred to the plant as “not an African Lily”), but moved into the realms of the weird when Ian mentioned a filing cabinet that had mysteriously appeared in his office at work and told us his theory that it might in fact be an alien from another planet in disguise. After that the effects of the hunger set in even more deeply and we started talking about how anything might in fact be anything else, which at least passed the time until we rounded a corner and reached Townhead Bridge.

(Well, I say “bridge”, but at this point in time it was actually just an embankment blocking the canal, with a horrible silted up submerged culvert in the middle. It was to be another six years after our walk before there was an actual bridge there again).

Eagerly we climbed up the steps to the main road. We’d been planning to find a fish and chip shop and get something from there, but with the weather having turned unreliable we decided to sit in at the nearby shopping centre’s food court instead (they had fish and chips so we didn’t feel like we were missing out). For some reason we ended up having a bit of an argument about religion, with Ian and I saying it was mostly a negative thing that had caused a lot of wars and so on, while Chris said without it we might not have ended up so civilised. That was what I liked about spending time with Ian and Chris, you could talk to them about anything at all, from plants and filing cabinets right up to big things like the effects of religion on society. (And aliens disguised as filing cabinets).

As we returned to the canal with fuller stomachs, I was interested to see that there was a bridge I hadn’t known about next to Townhead “Bridge”. I’d made notes from the Forth and Clyde Canal guidebook in a library since the last walk and ended up memorising the table of bridges and locks in the back (not intentionally, I just found it so interesting that the information stuck in my head without me even having to try! I’m weird like that), but this new concrete flyover wasn’t on the list, so it must have been built after the guidebook was published. It looked a bit out of place, soaring overhead in a big sweeping curve to give lots of headroom over a disused, silted up canal that disappeared under an embankment only a few yards to the west, but I guess they were already planning ahead for the canal’s eventual reopening by the time this road was built.

Just beyond the new bridge (“Nicholson Bridge”, I believe it’s actually called) was a more interesting piece of infrastructure: the Luggie Aqueduct, the second biggest one on the canal after the Kelvin. We went down below to have a closer look. It was just a single arch, but unusually the Luggie Water which it had been built to cross wasn’t visible underneath – that had been culverted under the aqueduct so that a railway line could be built through the arch. The railway line had gone but the path in its place had been resurfaced with railway track patterns in the stone work. I took my fourth and final photo of the day, then we returned to the canal, where there was more rain waiting for us.

Luggie Aqueduct

Pretty soon we were out in the country again, following the canal through open fields, with very few features along the way. The next bridge, Twechar Bridge, was only a few miles east of Kirkintilloch but it seemed to take us ages to get to it. At times the towpath shared its course with a minor road which was harder on the feet and meant we had to be on the lookout for cars. Eventually we started to suspect that the village of Twechar was actually getting further away from us the more we walked towards it. Then it suddenly “appeared” in front of Chris as she tried to unobtrusively relieve herself. She came back to where Ian and I were waiting and reported that she had found it.

I was starting to flag by this time. We’d already walked about 14 miles, further than I’d ever walked in one go before, and although the scenery was pleasant enough, there wasn’t really enough canal infrastructure on this section to spur me on to keep going. So when Ian suggested we leave the canal at the next bridge (Auchinstarry) and make our way home from Kilsyth, I agreed. The next suitable stopping point was several miles further on and I wasn’t sure if I could manage that, Dextrosol or no Dextrosol.

Kilsyth wasn’t too far away, just a short walk to the north along a B road. When we reached the main street, Ian sprinted across the road in front of a huge lorry to ask a passer by what time the next Falkirk bus was due. (“I thought I was going to collect my insurance money there!” said Chris, grinning, as we followed Ian slightly more carefully). Apparently the bus was due soon after 5pm… that wasn’t too bad, it was nearly 5 already. We settled down on the bench in the bus shelter, glad to take the weight off our weary feet for a few minutes.

But it turned out to be a lot longer than a few minutes! 5pm came and went with no sign of the bus. By 5.30pm we were starting to get a little restless, but since it was 1994 and smartphones and bus trackers were yet to be invented, there wasn’t a lot we could do except continue to wait. By 6pm I was starting to wonder whether I would have to live out the rest of my life in this slightly grotty bus shelter, and whether the old woman who kept smiling out of the window of a nearby flat was laughing at us.

Finally at twenty past six or so, a bus trundled round the corner. As we heaved ourself onto it, not sure whether to be annoyed at the wait or glad it was here at last, Ian asked what had happened to the 5pm bus. Apparently it had broken down. So much for buses being better than cars.

We had to change buses at Falkirk bus station. We had half an hour or so before the Edinburgh bus was due, which meant there was time for Chris and I to make use of a funny looking automatic public loo (quite a novelty in those days), and then for us all to go to a nearby cafe while we waited. Chris and I just had hot drinks, but Ian was hungry and ordered a chip butty. I’d never heard of such a thing before and was quite amazed to find, when it arrived, that it was exactly like its name suggested. I decided I quite liked the look of it and half wished I’d ordered one myself.

Despite having had half an hour to spare, we still managed to nearly miss the Edinburgh bus. This was one of the more memorable bus journeys of my life; almost all the other passengers seemed to know each other and the driver and were chatting to each other the whole way, making us feel a bit like we were intruding on some private gathering. The only other person who didn’t appear to be part of this cosy little community was a middle aged man sitting near Ian, Chris and me. He spent most of the journey staring at us and laughing whenever one of us spoke. Luckily I was feeling pretty out of it after my long day and all the fresh air and exercise, so I was happy to just sit there and let it all wash over me. Even so it was a relief when we got off into the comparative sanity of my own neighbourhood.

Despite the rain and the travel difficulties, I think I actually enjoyed this walk the most out of the three. It was a nice picturesque stretch of canal and satisfying to walk so much of it in one go.

Bowling to Glasgow canal walk (with “vintage” photos)

When I checked the date this morning I realised it’s exactly 25 years since a day I’ll always look back on fondly. On Saturday 20th November 1993, I walked from Bowling to Glasgow along the Forth and Clyde Canal with my uncle and auntie, Ian and Chris. It was part of my 14th birthday present from them. I could also have chosen a geological expedition in the Pentlands, a meal out, or suggested something myself, all of which would have been fun, but it didn’t take me long to decide on the canal walk.

(I’ll just acknowledge right now that walking 12 miles along a derelict canal in the freezing cold wouldn’t have been most 14 year olds’ idea of fun, and also that most 39 year olds probably wouldn’t remember the exact date of said walk 25 years later. But then as you probably already know if you’re reading this blog, I’m not most people).

As soon as we’d arranged to do the walk, I couldn’t wait for the day to arrive. My mum and brother and I (well, mostly my mum and I, I think my brother was just dragged unwillingly along) had been walking the Union Canal in stages of a mile or two for a few years and had completed most of it by that time. I think we’d done all the way from Edinburgh to about Polmont and probably would have already finished the whole thing if I hadn’t broken my arm falling over a fence a few weeks earlier. I always enjoyed exploring each new section, seeing what it would be like… the forgotten mossy bridges, the overgrown reed-filled basins, the silted up culverts.

But this walk was going to be even better. For a start, we were walking a full 12 miles, further than I’d ever walked in one go before, and that meant a whole 12 miles of canal to explore rather than the usual one or two! Secondly, I barely knew the Forth and Clyde Canal at all so it would all be completely new to me. Thirdly, going right over to the other side of the country, especially to Glasgow, felt very adventurous to me back then. And fourthly, I always enjoyed spending time with Ian and Chris no matter what we were doing.

I’d got a new camera for my birthday so I was taking plenty of photos along the way. It wasn’t the best camera and I wasn’t the best photographer, but it’s still interesting to look back at what the canal was like in those days, as it’s changed quite a lot since then. So I’ve scanned the whole lot.

When Saturday 20th dawned, I was glad to see that it was perfect weather for walking – cold but clear, with no rain and little wind. Ian and Chris (and Ben, their very excitable black labrador, who was also coming with us) picked me up first thing in the morning and Ian drove us all through to Bowling on the Clyde, via the M8 and the Erskine Bridge. On the way through I looked with interest at the map they’d brought, trying to work out the route we were going to be walking. I liked maps and already had quite a few of my own, but I didn’t have that one yet.

Bowling basin

At Bowling we parked in the station car park (an ideal location as we planned to get the train back to Bowling at the end of the day) and found the canal quite easily. Although most of the canal had been closed for 30 years, the first part was still open so that boats from the Clyde could moor there, and there were lots of them in the terminal basin by the sea lock. The towpath that we would be following for the next 12 miles led invitingly off under a large disused railway bridge at the east end of the basin and, after I’d taken my first photo of the day, we were off!

Now that we’d actually started, the walk somehow felt even longer. Even the Erskine Bridge, which passed over the canal a mile or so ahead of us, looked a long way away to me now. The canal was very different to the one I was used to; unlike the Union Canal it was built to take sea going ships, so it was much wider, and the bridges were lift or swing bridges rather than stone arches. The first couple of miles of our walk had a pleasantly open and rural feel, the canal threading its way along the bank of the River Clyde next to a nature reserve and an overgrown disused railway line.

Dalmuir Bridge, where the drop lock is now

The character of the canal changed completely at Dalmuir, where it swung away from the river and was promptly blocked by the very busy Dumbarton Road. I didn’t know then that within a few short years the canal would be reopened, with Britain’s only “drop lock” installed here to take boats underneath the low road. At the time I was just glad to see that there was a pedestrian crossing to help us cross the busy road and get back onto the towpath again. The rural feel had gone completely and there were now houses on both sides.

By this time we were starting to get hungry, probably due to a combination of the cold and the exercise. Chris had originally suggested we have lunch at the Lock 27 pub, but that was still miles away. Thankfully the huge Clyde Shopping Centre was just beyond the next road crossing, so we left the canal there to go and find something to eat.

Clyde Shopping Centre

(Chris had told me before the walk that the canal went underneath a shopping centre at one point and I’d been looking forward to seeing that, but when we got there I found the reality of it a little disappointing. I’d pictured a huge building soaring high over the canal, with shoppers peering down at us from elevated walkways as we walked along beside it. In reality it was really just a covered footbridge across the canal, linking the two parts of the shopping centre on either side. But there was a cafe that served bacon and chips and I wasn’t complaining about that).

I wolfed down my lunch pretty quickly, then drew a rough map of what we’d walked so far while I waited for Ian and Chris to finish their coffee. I was enjoying myself immensely so far, and I knew that the longer and more interesting part of the walk was still to come – I couldn’t wait to get back to it! Once we’d retrieved Ben from where Chris had tied him up (someone had been feeding him dog biscuits but he obviously hadn’t liked the pink ones, which were still lying intact among the crumbs of the other colours), we returned to the towpath and to our walk. As we left the shopping centre behind I wondered what the huge “boat” was sitting on the far side of the canal – I later found out that it was a fish and chip shop!

Linnvale Bascule Bridge (and Ben)

The next section of canal through Clydebank mostly flowed through quite an open, green area – it was nicer than what I’d expected from Clydebank, at any rate! Some of the original little wooden lifting “bascule” bridges were still there, but the newer roads mostly just crossed on embankments, the water channelled into pipes or weirs underneath – there was no chance of getting a boat through this section any time soon.

Lock 35, with Ben and Chris

There were also quite a few locks, which I found interesting as I hadn’t seen many locks before, the Union Canal not having any, so I lagged behind with Ben and had a closer look at them while Ian and Chris walked on. The old wooden gates mostly looked in a pretty bad state, and had been cut down to the minimum size needed to hold back the water now that the canal was no longer in use.

Great Western Road infill

At one point we had to climb up an embankment and cross a busy dual carriageway, Great Western Road. On the other side the canal was piped for about half a mile so we had a little canal-less walk through some trees and then up through two dry, half-buried lock chambers that had been made into a little park. Ian was amused by a heritage sign that had been put up by British Waterways or some similar organisation that said “Forth and Clyde Canal” with “in culvert” in very small letters underneath, because there was no sign of any canal!

Temple Lift Bridge

After the canal re-appeared, we passed a few more dilapidated locks, but at least these ones had water in them. We were well into the suburbs of Glasgow now and the towpath was quite busy with local people walking their dogs or using the towpath as a shortcut. Lock 27, with its eponymous pub, was just past a huge metal lifting bridge carrying Bearsden Road at Temple. I think it was about 3pm by the time we got here, so I was glad we hadn’t waited this long to have lunch! We stopped for a little rest on a convenient bench and I loaded a new film into my camera, having finished the previous one.

Cleveden Road culvert

I was surprised to see that the next bridge looked from a distance as if it was arched, though too low for anything bigger than a canoe to get under it. As we got closer it turned out to actually be a modern corrugated iron culvert, so again we had a road to cross (you can see Chris putting Ben’s lead on ready for the road in the photo above).

Ian, Chris and Ben at the Kelvin Aqueduct

Now we were nearly at the part of the walk I’d been looking forward to the most: the Kelvin Aqueduct! After walking across the top and admiring the views down the river valley, we went down underneath it so I could take some photos of it from below. It wasn’t as long or as tall as the Union Canal’s three aqueducts, but it was impressively huge and solid. (I think it was actually easier to get decent photos of it back then that it is now – there were fewer trees in the way!).

View from Kelvin Aqueduct

I also took a photo of the view from the top. I remember noticing the bridge piers a little way downstream and wondering what they were for. Little did I know they used to carry a railway line into the Kelvindale Tunnel, which I would explore nearly 19 years later.

Maryhill Locks

Just beyond the aqueduct was the final lock flight of our day. It was also the steepest climb of the day since there were 5 locks in quick succession here. They were a bit different from the other ones I saw that day since they’d recently been restored to working order, with new metal gates and smart black and white paint. (They also might look familiar to Still Game fans!).

Stockingfield Junction

It was starting to get dark by this time, but I’d still been hoping to take a few more photos. Imagine my annoyance when my camera decided the film was finished and it was going to rewind it, after I’d taken this picture of Stockingfield Junction (where a 2 mile branch into Glasgow city centre meets the main canal). I’d just put in what was supposed to be a 24 exposure film and I’d only got 9 photos out of it. I was hoping it was just a freak film but it turned out to be a recurring problem with that camera.

Anyway, after we’d finished discussing the annoying behaviour of my camera, we turned our attention to the rest of the walk. Ian said that if I was tired we could leave the canal here and get the bus the rest of the way to the station, but I was still feeling fine and was happy to carry on walking. (As luck would have it, I then did start to feel really tired a few hundred yards further on, but I didn’t like to say anything at that point!).

The Glasgow branch turned out to be pretty interesting. There were no more locks, but there were a couple of bridges which had been rebuilt in a modern concrete Charles Rennie Mackintosh-inspired style in order to reopen this section of the canal. (Previously they’d been low bridges or culverts that would have been impossible to sail under). There were also several aqueducts over roads, as this part of the canal was high up on an embankment above the surrounding city.

We passed the Partick Thistle football stadium at Firhill. There was a match on, and some people were sitting up on the embankment so that they could see the pitch. Ian wanted to stay and watch the game but Chris and I, who had no interest in football, wouldn’t let him. We also passed a basin filled with colourful boats, the first boats we’d actually seen since Bowling (other than the fish and chip boat at Clydebank). It was now starting to get properly dark.

Finally, we rounded a corner and at the end of a cobbled wharf was… the end of the canal! It was weird to see it suddenly just stop after following it all day. We stood there a while getting our breath back and looking out over the lights of the city below us. We’d made it.

Now it was time for the next challenge: finding Queen Street Station so that we could catch a train back to Bowling where we’d left the car. Fortunately this was easy enough, and soon we were sitting on one of the low level platforms waiting for the train and eating what was left of the food we’d brought. (After that night I had quite a vivid memory of the low level platforms at Queen Street, though I hadn’t realised there was also a high level station, so I was quite perplexed when I got the train through from Edinburgh the following year and the station looked nothing like I remembered. It was years before I finally found myself in the low level part again and thought “Yes! This is the place I remember!”). When the train came, it only took a few minutes to cover the distance it had taken us all day to walk.

It had been a great day out and had more than lived up to my expectations, as evidenced by the fact I still remember it so well 25 years later! It ended up being the first of three walks, as I ended up walking the whole canal with Ian and Chris between 1993 and 1995. The other two walks were just as enjoyable so maybe I’ll write about them as well when their 25 year anniversaries come around… but for now, thanks for reading 🙂 .

In memory of Ian Ogilvy Morrison, 1950-2006.

 

Game Project part 6: My tools

Right now on the game project, I’m working on something that I think is going to be pretty cool once it’s done, but it’s going to take me a while to get it done, or even to get it to the point where it’s worth me writing about it here. So I thought I would break up this interlude by writing a bit about the tools I’m using to develop the game, in case anyone is interested. I’ve mentioned some of these already in passing but in this post I’ll try and flesh out the full picture a bit more, and also say a bit about why I chose the tools I did (since they probably seem an odd choice to a lot of people).

As I said before, I am writing the game in JavaScript so that it runs in a browser environment, using WebGL for the graphics. The major advantages of this approach are: 1. I don’t have to grapple with all the annoying differences between the various platforms I want to target (Windows, macOS and Linux to begin with), I can just target the web environment and the game will run on almost anything that has a browser; and 2. once the game’s finished, people won’t have to download and install the game in order to play it, they can just navigate to a web page. The major disadvantage is that the performance will be worse than “native” code in C++, but the game isn’t likely to be super demanding so this shouldn’t be too much of a problem in practice.

For testing the game while I develop it I’m mostly using Google Chrome, since that’s what I have on all my machines anyway. I’ll test it on other browsers (Firefox, Safari, etc.) at some point and check that everything works as it should, though I’m trying to steer clear of relying on obscure or browser-specific features as much as possible.

The only JavaScript library I’m currently relying on is glmatrix, a very useful library for doing the vector and matrix operations that are very common in 3D graphics applications. I’ve used it before and there seemed no point in re-inventing the wheel for something so basic and ubiquitous. Other than glmatrix I’m targeting the browser directly and writing all the code myself, though bits of it are adapted from my previous projects rather than being written from scratch for this game.

XAMPP running an Apache server on Windows

As well as a browser, it’s also necessary to have a web server installed for testing purposes, because the game expects to load its data files from a server via HTTP rather than from a local disk. So I have Apache, the most widely used web server in the world, installed on all my machines. On Linux I installed it through the normal package manager; on Windows and Mac I’ve installed XAMPP, which does a great job of packaging up Apache plus some other useful software and making it easy to install and use.

To edit the actual game code I’m using GNU Emacs. This is largely due to habit: Emacs has been my editor of choice for nearly 20 years now and its most useful shortcut keys are burned into my brain so deeply that I don’t even have to think about them anymore. It’s a pretty powerful editor and has some decent support for JavaScript, so it probably wouldn’t be a bad choice even if it wasn’t for my long history of using it for everything.

Editing the rendering code using GNU Emacs

I’m storing the code in a Fossil repository. I wrote a whole blog post about Fossil when I first discovered it, so I won’t say too much here. I still like its philosophy of storing all the code along with wiki pages and a bug tracker in a single compact file, while the Fossil executable itself is also a single file that can be dropped onto any system without going through a complex installation process. I probably wouldn’t use Fossil to co-ordinate a huge software project with multiple authors, but for a personal project like this one it’s ideal.

I’m using Fossil’s wiki facility to make notes as I go, covering things like the binary file formats used for models, and the exact process of authoring content for the game engine. Hopefully I’ll manage to keep this up going forwards as I know from past experience how useful it will be later on! I haven’t used the bug tracker system yet but I might later on if it becomes useful.

So that the code is automatically synchronised between all my machines, I keep the Fossil repository file in my Dropbox. I also keep many of the asset files in Dropbox, though I haven’t checked them into Fossil as it’s not really designed for working with large binary files, and putting them in there would just bloat the repository file and cause it to take longer to sync. I’ve used this workflow, for want of a better word, on various projects for the last few years and found it works pretty well for me.

Editing terrain in Blender

I think that pretty much covers the coding and testing side of things. The other major aspect to the game is creating the assets (3D models, landscapes, animations, textures, icons, and so on). My primary 3D software is Blender. As I said in the first post of this series, it’s free, it’s very powerful (people have made entire animated movies using it), it runs on almost anything, and it’s got a great community behind it. Its biggest downside is probably the steep learning curve, but since I’m already mostly over that after using it for my previous 3D dabblings, there was no reason not to use it for this.

I covered MakeHuman, which I’m using for the (you’ve guessed it) human models in some depth in part 2, so I won’t go into it further here.

Even when making 3D games, some 2D image editing is still usually required for preparing textures, making heads up displays, that kind of thing. Gimp has been my paint program of choice for years now. Apparently it’s got a horrible interface compared to Photoshop, but then I’ve never really used Photoshop so I guess you can’t miss what you’ve never had. In any case, Gimp has never let me down so far in terms of features. I’ve only used it once so far for this particular game, for tiling the ground textures into a single image (the “snap to grid” feature was very helpful here), but I’m sure I’ll be breaking it out again before too long. My other favourite image editor is Inkscape, which handles vector graphics rather than bitmapped. In the past I’ve found it great for designing icons and stuff like that.

Editing the terrain texture map in Gimp

I think that’s pretty much all my tools covered now. If you’ve been following along, you’ll notice that all of them are free to use and the majority are open source, which is no accident. I’m not a free software zealot who demands that all software must be freely licensed, but there are some good practical reasons why I much prefer using open source tools wherever possible.

Firstly, I don’t have to pay for them. I’m not a complete cheapskate, but at the same time I have a family to support now and better things to do with my limited money than pour it into (for example) Adobe’s pockets for a Photoshop subscription when Gimp meets my needs perfectly well.

Secondly, they tend to be cross-platform. That’s important for me because I regularly use all three major operating system platforms (Windows, Linux and macOS) so I much prefer tools that work on all three of them, as all of the tools I’ve described in this post do. I like it this way; it means I’m not locked into one particular platform and am free to switch whenever I want without having to throw away the time I’ve invested in learning this stuff and start from square one with a whole new suite of software. For example, last year it made sense for me to get a MacBook (I needed a Mac for a project and didn’t own a decent laptop at the time) and, even though I hadn’t used one since high school, I was able to install all my preferred free tools and get up and running with it very quickly.

Thirdly, they’re not going anywhere. With commercial software there’s always the worry that the company will go out of business or will discontinue their product after I’ve come to rely on it. Sure, I could continue using an old version (unless it’s a subscription service *shudder* ) but it might not keep working forever, or might keep me locked into an older operating system and unable to upgrade. That’s much less likely with open source, because even if the original developer disappears, someone else from the community can step up and take over maintenance. (I could even do it myself in some theoretical world where I have time for such things 😉 ).

So yeah. While I could probably make my game more rapidly if I switched to some expensive all-singing-all-dancing commercial Windows-only solution, I’m happy with the approach I’m taking, and it also fits well with my desire to understand everything and be able to tinker with the low level code if I want to. I hope you found this at least somewhat interesting or informative. Next time I’ll be back with a proper progress report to share with you.

 

Game Project part 5: Billboards, Culling and Depth Cuing: not just a load of random words…

… though you might be forgiven for thinking that at first 😉 . Why do so many things in computing have such weird names?

In my post about trees, I mentioned that having too many trees in the scene can make the game engine run pretty slowly, because each one contains a lot of polygons and vertices. This could be a problem for me because some of the areas of my game are going to be quite big and contain quite a lot of trees, and I want the game to perform reasonably well even on quite modest computers. So in this post I’m going to talk about some of the tricks that can be used to speed up the rendering of complex 3D scenes, which I’ve been spending a lot of time lately coding up for my game engine.

Culling

The first trick is a pretty simple one: don’t waste time drawing things that aren’t going to be visible in the final scene. This might seem obvious but in fact it’s quite a common approach in simple 3D graphics applications just to throw everything onto the screen and let the GPU (Graphics Processing Unit) sort out what’s visible and what isn’t. (My game engine as described in the earlier posts used this method). This still works fine because the GPU is smart enough not to try and draw anything that shouldn’t be there, but it’s inefficient because we’ve wasted time on processing objects and sending them to the GPU when we didn’t need to. It would be better if we could avoid as much of this work as possible.

This is where culling comes in. It refers to the process of removing items from the graphics pipeline as early as possible so as not to waste time on them. There are various methods of doing this, because there are various reasons why items might not be visible:

  1. They’re behind the viewer.
  2. They’re too far to the side to be visible.
  3. From the viewer’s point of view they’re completely hidden behind other objects.

The first two cases aren’t too hard to deal with. We can imagine the area of the world that’s visible to the viewer as a big sideways pyramid shape projecting out into 3D space (often called the view frustum), then we can immediately cull anything that falls completely outside of this pyramid, because it can’t be visible. The details of how this is done are quite complicated and involve projections and various different co-ordinate systems, but it’s reasonably efficient to do.

There are a couple of ways of making the clipping even more efficient:

  1. Instead of examining every vertex of an object to see if it’s in or out of the frustum, it’s common to work with the object’s bounding box instead. This is an imaginary cuboid that’s just big enough to contain all of the object’s 3D points within it. It’s much faster just to clip the 8 points of the bounding box against the frustum, and it still gives us nearly all same benefits as clipping the vertices individually.
  2. If you arrange your 3D scene in a hierarchical form (often called a scene graph), then you can cull large parts of the hierarchy with very little effort. For example, if your scene graph contains a node that represents a house, and various nodes within that that represent individual rooms, and various nodes in each room that represent the furniture, then you can start by clipping the top level “house” node against the frustum. If it’s outside, you can immediately cull all of the room nodes and furniture nodes lower down the hierarchy and not have to spend any more time dealing with them.

(The view frustum only extends a limited distance from the viewer, so it’s also common to cull things that are too far away from the viewer. However, if this distance is too short it can cause far away objects that should be visible to disappear from the scene).

The case where an object is hidden behind another object is a bit trickier to deal with, because there’s usually no easy way to tell for sure whether this is the case or not, and we don’t want to have to get into doing complicated calculations to try and work it out because the whole point of culling things in the first place was to try and avoid doing too many calculations! However, there are exceptions; indoor scenes are a bit more amenable to this sort of optimisation because (for example) if you’ve got a completely solid wall separating one room of a building from another, you know straight away that when the viewer is in the first room, nothing in the second room is ever going to be visible (and vice versa).

Depth Cuing

Sometimes, though, even when we’ve culled everything we realistically can, things still run too slowly. For example, imagine a 3D scene looking down from a hill over a big city spread out down below. There could be hundreds or even thousands of buildings and trees and other objects visible to the viewer, and we can’t just start removing them without the player noticing, but on the other hand it’s a hell of a lot of work for the computer to render them all. What can we do?

One other option is depth cuing. This involves using less detailed models for certain objects when they’re further away from the viewer. For example, I can instruct my tree generator code to use fewer vertices on the stems and trunks, and simpler shapes made up of fewer triangles for the leaves. This wouldn’t look good for trees close to the camera, because you’d notice the shapes looking less curved and more blocky, but for trees in the distance it’s not too bad.

MakeHuman can also use less detailed “proxy” meshes which would be an option for adding depth cuing to human models.

Full detail MakeHuman model (left), and with low resolution proxy mesh (right)

Ideally it’s better if we can generate the less detailed models of the objects automatically, but it’s also possible to make them manually in Blender if necessary.

Billboards

In 3D graphics terms, billboards are a bit like depth cuing taken to the extreme. In this case, instead of replacing a 3D model with a less detailed 3D model, we replace it with a flat rectangle with the object “painted” onto it via a texture – just like a billboard!

Obviously this is quite a drastic step and it only really looks acceptable for objects that are pretty far away from the camera, but the speed improvement can be dramatic. We’re going from having to render a tree model that might contain thousands of vertices and polygons to rendering a single flat surface composed of 4 points and two triangles!

In fact, older 3D games used to make extensive use of “billboard sprites” – all of the enemies and power-ups in Doom were drawn this way, as were the trees and some other things in Super Mario 64. The downsides are that they can look quite pixellated and blocky close up, and also that (unless the game creators included images of the objects from different angles) they look the same no matter what angle you view them from.

Creating texture images for every object that we might want to turn into a billboard would be a lot of work, and the resulting images would take up a lot of space as well. Fortunately, we don’t have to do this; WebGL is quite capable of creating the billboard images on-the-fly when they’re required, using a technique called render-to-texture. Basically, this means that instead of drawing a 3D scene directly onto the screen like normal, we draw it into an image stored on the GPU, and that image can then be used as a texture when drawing future scenes.

That little pixellated tree was my very first attempt at a billboard sprite!

This is an incredibly useful technique. As well as making billboards, it can also be used for implementing things like display screens and mirrors in games, and some 3D systems use it extensively for doing multiple rendering passes so that they can do clever stuff with lights and shading. I’d never used it myself before, but once I’d coded it up for generating the billboards, I was pleased that it seemed to work pretty well.

Up close, it’s pretty obvious which tree is the 3D model and which is the billboard…

… but from a bit of a distance the billboard looks a lot more convincing

One potential problem with both depth cuing and billboards is known as “pop in”. This is the effect you sometimes see when you’re walking forwards in a game and you see a sudden visible “jump” in the scenery coming towards you, because you’ve now got close enough to it that the billboard (or less accurate model) being used for speed has been replaced by the proper 3D model. It’s difficult to get rid of “pop in” altogether, because no matter how good the billboard is, it’s never going to look exactly the same as the original model, even from quite a distance; but we can minimise it by using as good a substitute as possible and by only using it for objects a long way from the viewer.

Phew! That was pretty long and quite technical this time, but I’m really pleased to have got all of this stuff into the game engine and working. (It’s swelled the engine code up to a much larger 3,751 lines, but it’ll be worth it). I’ve tried to make it all as general as possible – there’s a mechanism in the code now for any object in the game world to say to the engine, “Hey, you can replace me with a 256×256 pixel billboard once I’m 20 metres away from the camera!” or “Here’s a less detailed model you can use once I’m 10 metres away!”, so it should be useful for speeding up all sorts of things in the future. Hopefully next time I should be back doing something a bit more fun… I haven’t quite decided what yet, but it’ll probably involve adding more elements to the game world, so stay tuned for that.

But why now?

You might reasonably ask why I chose to do all this optimisation work so early on in the project. After all, there were plenty of more interesting (to most people anyway!) things I could have been working on instead, like adding streets and buildings to my town. Also, the general advice given to programmers is not to get caught up in optimising code too early, because it complicates the code and because you might end up wasting your time if it turns out it would have run fast enough anyway. I had three main reasons for disregarding this advice:

  1. I already knew from similar projects I’d done recently that I was going to need these optimisations or the engine would be nowhere near fast enough.
  2. I also expected that the billboarding was going to be (along with the skeletal animation) one of the trickiest things to code, so I wanted to get them both out of the way as early as possible, because if it turned out that they were beyond my coding ability or beyond what JavaScript could realistically cope with, I’d rather find that out now than when I’ve spent months perfecting the rest of the game only to find out I can’t actually finish it.
  3. In my experience it’s usually easier to build fast code from the start than it is to try and “retrofit” speed to slow code later on. Some optimisations require a certain code architecture to work properly, and it’s not ideal if you find you’ve already written 10,000 lines of code using a completely different architecture.

Anyway, I’m happy. It’s all working now and the coding difficulty should hopefully be mostly downhill from this point onwards.