Forza Horizon 4 is really very British

This article is a repost promoting content originally published elsewhere. See more things Dan's reposted.

by an author

Forza Horizon 4

There is a phenomenon of culture that I’m not convinced has a name. Living in the UK, the vast, vast majority of the media I consume is from the US. And nearly always has been. While television was more localised, all my life the films and games (and indeed an awful lot of the TV) I’ve watched and played has not only come from America, but been set there, or created by people whose perception of life is based there. And, while we may share a decent proportion of a common language, we really are very different countries and indeed continents. The result of this being, the media I watch that comes from the US is in many senses alien, to the point where a film set in an American high school might as well be set on a spaceship for all the familiarity it will have to my own lived experiences.

Which makes playing Forza Horizon 4 a really bloody weird thing. It’s… it’s British. Which is causing my double-takes to do double-takes.

I’m not usually a fan of driving games, but this review of Forza Horizon 4 on Rock Paper Shotgun makes me want to give it a try. It sounds like the designers have worked incredibly hard to make the game feel genuinely-British without falling back on tired old tropes.

Steer! An Experimental Canvas/Websocket Game

As you may know, I’ve lately found an excuse to play with some new web technologies, and I’ve also taken the opportunity to try to gain a deeper understanding of some less bleeding-edge technologies that I think have some interesting potential. And so it was that, while I was staffing the Three Rings stall at last week’s NCVO conference, I made use of the time that the conference delegates were all off listening to a presentation to throw together a tech demo I call Steer!

Animated GIF from a video, showing a player using their mobile phone to steer a car on a desktop computer screen, all using the web browsers on both devices.
A player uses their mobile phone to steer a car on a desktop computer, using nothing more than a web browser.

As you can see from the GIF above, Steer! is a driving game. The track and your car are displayed in a web browser on a large screen, for example a desktop or laptop computer, television, or tablet, and your mobile phone is used to steer the car by tilting it to swerve around a gradually-narrowing weaving road. It’s pretty fun, but what really makes it interesting to me is the combination of moderately-new technologies I’ve woven together to make it possible, specifically:

  • The Device Orientation API, which enables a web application to detect the angle at which you’re holding your mobile phone
  • Websockets as a mechanism to send that data in near-real-time from the phone to the browser, via a web server: for the fastest, laziest possible development, I used Firebase for this, but I’m aware that I could probably get better performance by running a local server on the LAN shared by both devices
  • The Canvas API to draw the output to the screen

Infographic showing how Steer! works. Phone accelerometer determines orientation, pushes to Firebase (up to 60 times/sec), which pushes to browser (via Websocket), which updates screen.

The desktop browser does all of the real work: it takes the orientation of the device and uses that, and the car’s current speed, to determine how it’s position changes over the time that’s elapsed since the screen was last refreshed: we’re aiming for 60 frames a second, of course, but we don’t want the car to travel slower when the game is played on a slower computer, so we use requestAnimationFrame to get the fastest rate possible and calculate the time between renderings to work out how much of a change has occurred this ‘tick’. We leave the car’s sprite close to the bottom of the screen at all times but change how much it rotates from side to side, and we use it’s rotated to decide how much of its motion is lateral versus the amount that’s “along the track”. The latter value determines how much track we move down the screen “behind” it.

The track is generated very simply by the addition of three sine waves of different offset and frequency – a form of very basic procedural generation. Despite the predictability of mathematical curves, this results in a moderately organic-feeling road because the player only sees a fraction of the resulting curve at any given time: the illustration below shows how these three curves combine to make the resulting road. The difficulty is ramped up the further the player has travelled by increasing the amplitude of the resulting wave (i.e. making the curves gradually more-agressive) and by making the road itself gradually narrower. The same mathematics are used to determine whether the car is mostly on the tarmac or mostly on the grass and adjust its maximum speed accordingly.

Sum of sine waves as used to generate the track for Steer!

In order to help provide a visual sense of the player’s speed, I added dashed lines down the road (dividing it into three lanes to begin with and two later on) which zip past the car and provide a sense of acceleration, deceleration, overall speed, and the impact of turning ‘sideways’ (which of course reduces the forward momentum to nothing).

This isn’t meant to be a finished game: it’s an experimental prototype to help explore some technologies that I’d not had time to look seriously at before now. However, you’re welcome to take a copy – it’s all open source – and adapt or expand it. Particular ways in which it’d be fun to improve it might include:

  • Allowing the player more control, e.g. over their accelerator and brakes
  • Adding hazards (trees, lamp posts, and others cars) which must be avoided
  • Adding bonuses like speed boosts
  • Making it challenging, e.g. giving time limits to get through checkpoints
  • Day and night cycles (with headlights!)
  • Multiplayer capability, like a real race?
  • Smarter handling of multiple simultaneous users: right now they’d share control of the car (which is the major reason I haven’t given you a live online version to play with and you have to download it yourself!), but it’d be better if they could “queue” until it was their turn, or else each play in their own split-screen view or something
  • Improving the graphics with textures
  • Increasing the entropy of the curves used to generate the road, and perhaps adding pre-scripted scenery or points of interest on a mathematically-different procedural generation algorithm
  • Switching to a local LAN websocket server, allowing better performance than the dog-leg via Firebase
  • Greater compatibility: I haven’t tried it on an iPhone, but I gather than iOS devices report their orientation differently from Android ones… and I’ve done nothing to try to make Steer! handle more-unusual screen sizes and shapes
  • Anything else? (Don’t expect me to have time to enhance it, though: but if you do so, I’d love to hear about it!)

TIL that the first ever speeding fine was given to Walter Arnold of Kent, UK, in January 1896. His speed: 8mph in a 2mph zone. He was caught by a policeman on a bicycle.

This link was originally posted to /r/todayilearned. See more things from Dan's Reddit account.

Walter Arnold of East Peckham, Kent, had the dubious honour of being the first person in Great Britain to be successfully charged with speeding on 28 January 1896. Travelling at approximately 8mph/12.87kph, he had exceeded the 2mph/3.22kph speed limit for towns. Fined one shilling and costs, Arnold had been caught by a policeman who had given chase on a bicycle.

Wear Your Cycle Helmet

Today, my cycle helmet might have saved my life.

This morning, I was cycling to work along my usual route, National Cycle Network Route 51, on its final leg down Banbury Road to Parks Road. Here, the cycle route shares its path with a bus lane, and – on a warm, bright morning like this one, having a broad, flat lane is a great opportunity for a strong cyclist to make great time in a safe environment.

Bus/cycle lane heading South on Banbury Road.
Oxford’s multitudinous bus/cycle lanes are great for public transport and even better for cyclists: providing a safe, well-signposted space away from the majority of the main flow of traffic.

As I approached the bus stop, a spotted a car in the lane to my right, just ahead, slow down and turn on it’s indicator to turn left: it was heading for one of the driveways. But when the car began its maneuver, a split second later, I realised that the driver had not seen me. Perhaps she’d not checked her mirrors before turning? Or perhaps she’d only glanced (and seen no buses in the bus lane – just me and the second cyclist behind me)? Or perhaps she’d underestimated my speed, or dramatically overestimated her ability to get into the driveway before I reached her? In any case, she turned out to be wrong. I hit my brakes as sharply as I safely could, but it wasn’t enough to stop me from ploughing right into the side of her bonnet.

I’m not entirely sure what happened next. At the time, it felt like everything went into slow motion: a gentle flight through the air followed by a gradual landing on the other side, and that I’d be able to recall every single moment. But, probably as a result of the blow to my head (which as I’ve discovered before can have profound and confusing effects on memory), my memory of everything from a few seconds before the collision onwards is fuzzy and fragmented. But I spoke to the driver (a woman with dark hair), to the cyclist behind me (who was wearing a white t-shirt), and to a man who came out of a nearby building (who spoke with an accent – these details are the only things I can reliably remember about any of them), and based upon their descriptions – any my injuries – I’ve managed to piece together broadly what happened.

A penny farthing: the rider has tipped over the handlebars and ended up thoroughly upside-down.
There never was a graceful bicycle crash. Some, however, are less painful than others.

I hit the side of the car and flipped forward, throwing myself, some of the contents of my pannier bag, and my D-lock into the air. My handlebars knocked a dent into the bonnet of the car, and the lock landed elsewhere on it, but I flew clear over the car and flipped around in the air. I’m not sure how I landed, but it was probably on my back, because I struck the backs of my head, right shoulder, and elbow… but I must have rolled, because I also managed to scrape and graze the front of my legs.

I initially thought that I was fine (though I was clearly in shock), but I discovered about a quarter of an hour (or thereabouts: I’ve only been able to piece together a timeline in hindsight) that I was in more pain than I’d first thought, was feeling intermittently dizzy, and was unable to remember the details of the accident or even what day of the week it was. I asked for a taxi to be called for me and rode to the hospital, where they cleared me of anything seriously wrong (spinal injuries, serious concussion, broken bones, etc.) and sent me home for a day of lying down and mainlining NSAIDs.

A Kryptonite New York lock, like the one I use. It weighs about a ton but it's pretty-much bombproof.
A heavy D-lock like mine makes quite an impact when it’s catapulted into sheet metal.

Now it’s the early evening. I’m still far from entirely “with it”: I feel like my brain’s been rebooted into safe mode – I seem to be incapable of decent multi-tasking (for example: I can have a conversation with you, or can listen for my name being called by the doctor, but not both). I’ve got aching shoulders and arms and a bit of a limp. And I’ve been pretty much exhausted the whole day.

But here’s something: if I’m right about the angle I landed at, based on where I hurt the most, then it’s possible that my cycle helmet saved my life, today.

Wear your cycle helmet, folks.

Touring Scotland

While JTA was off breaking parts of his body (and showing off his injuries on Reddit) with Ruth on the second part of their honeymoon, the week before last, I too took some time off work in order to have a bit of a holiday. I’d originally hoped to get some cheap domestic skiing in, but the weather forecast showed that Scotland was going to consist of exactly two weather conditions, depending on where you were:

  • Snowy, but with 55mph winds.
  • Not snowy.
Scotland. Snowy, but with 55mph winds. It looks like this.

This kind-of put a dampener on my plans to get some snowsports done, but I’d already taken the time off work so I re-arranged my plans into a “make it up as you go along” tour of the highlands and lowlands of Scotland.

Highlights of my little tour included:

  • Renting an almost brand-new car, and – by the time I returned it – being responsible for more than half the miles on the odometer.
  • Visiting my family both on the way up and the way down – my dad injured his back while cycling around Italy this winter, and had originally hoped to join me in Scotland (perhaps to get some more training in for his upcoming trek to the North Pole). He couldn’t, as he was still recovering, but it was nice to drop by.
  • Being virtually the only guest at each of Glen Nevis and Glencoe youth hostels; getting an entire dormitory to myself at each.
Ben Nevis. It looks slightly less-hostile here than it did on the day of my ascent.
  • Exhilarating but exhausting trek up Ben Nevis. The freezing conditions, plus the incredible wind, meant that I spent the Tower Ridge stretch clinging to a steep ice slope against the push of a gale-force blizzard. Spectacular.
  • Ice climbing at Ice Factor. I’ve never done ice climbing before (y’know – scaling a glacier with crampons and ice axes), and it was spectacular. Also, very tiring, especially after just coming down off Ben Nevis a couple of hours earlier. I was pleased that not all of the rock climbing experience I’d had, over 15 years ago, was completely forgotten, and my stamina – if not my flexibility – was better than I expected.
A climber fights to free his axe from the wall.
  • Veggie haggis, tatties, neeps, and a dram of whisky on Burns Night, drying myself off by the open fire in a wonderful little pub.
  • A reasonably-gentle walk along the lochside at Fort William, in order to allow my knee – which I banged swinging into a wall of ice – to recover a litle.
  • Visiting the Falkirk Wheel, the world’s first and only rotating boat lift. Did you know that the wheel is apparently so efficient that it costs only £10 a day in electricity to run it?
The Falkirk Wheel. Photo by Sean Mack.
  • Live comedy and music in Edinburgh. Also, meeting fabulous strangers and hanging out with them drinking whisky and singing along to bawdy Scottish folk songs until past midnight.
  • Returning to Edinburgh Central Youth Hostel to find it full of Spanish sports fans. Sharing pizza with them, and conversations in broken English.
  • Visiting the Wallace Monument and learning all of the bits of 13th Century Scottish history that they don’t teach you in Braveheart. It’s far cooler, yet much much bloodier, than you’d be made to believe.
The Wallace Monument, photographed by Finlay McWalter.
  • Geocache-maintenance expedition with Kit, along with the opportunity to dress up in invisibility jackets and hang about near roundabouts and road signs.
  • Chinese buffet with Kit & Fi, two of my favourite people to go to a Chinese buffet with. Surprisingly impressive selection of veggie-friendly foods, which is something I look for, these days.

All in all, a delightful little tour, particularly impressive considering that it was launched into with the minimum possible amount of planning.

Zip-A-De-Do-Car, Zip-A-De-Day

Recently, I wrote about the fact that I’m driving to and from Aylesbury once a week in order to study there. I passed my driving test a year and a half ago, but, of course, I don’t actually own a car. What I’ve been doing is using a car sharing company called Zipcar (technically, Streetcar, when I started, but the latter is merging into the former).

Golf "Eulalia", one of the Oxford Streetcar/Zipcar vehicles, seen here parked at Aylesbury College.

There are two varieties of car sharing clubs. These are:

  • Ones like Zipcar, which are companies with a large fleet of vehicles, pre-vetting of customers, and “live”/”on-demand” booking.
  • Ones like WhipCar, which act as portals to allow members of the public to borrow one another’s privately-owned cars.

I haven’t had the chance to try the latter variety yet, although there are a number in my area. The important things are the things that both types have in common, and that is distinctfrom most traditional car rental companies:

  • They keep their fleets spread out in disparate locations, meaning that you don’t have to “go somewhere” to pick up a car.
  • They make heavy use of the Internet, mobile apps, and – in the case of the corporate varieties – remotely-managed engine computers and RFID technology, to give their members access to vehicles.
  • As a result of the above, they cater in particular to people who want to borrow a car occasionally, conveniently, but only perhaps for a few hours at a time.
The sensor on the top of the dashboard allows the car to be locked and unlocked with your RFID card (assuming that you've made a booking).

For me, at least, it’s far cheaper than owning a car – I only make one journey a week, and sometimes not even that. It’s far more convenient for that journey, for me, than public transport (which would involve travelling at awkward times and a longer journey duration). If I were using my own car, I’d have to park it in Oxford city centre on Mondays in order to make my journey possible (which is as challenging as it is expensive). Paying by the half-hour makes it convenient for short hops, and the ability to book, pick up, and return the car without staff intervention means that it doesn’t matter if it’s midnight or a bank holiday or anything: if I ever need access to a car or van in a hurry, there’s almost always one available for me to just “swipe into”.

And it’s far simpler than a conventional car rental company… at least, once you’ve gone through the telephone set-up process: a three-way phone call between you, the DVLA, and the car hire company. If I want a car, I pop up the website or pull out my phone, find a nearby one that’s free when I want it, and go drive.

As you can probably see, this is the iPhone version of the app. The Android one is virtually identical.

The cars are all new and well-kept, and the pricing is reasonable: you get a daily mileage allowance (now 40 miles, which is pretty ideal for me, as my round trip journey is barely more than that), and then pay a mileage rate thereafter (if you need to fuel up, there’s a fuel card in the car). Paying by the mile, rather than the litre, has the unfortunate side-effect of failing to encourage eco-driving, but other than that it’s a sensible policy which allows you to accurately anticipate your costs.

It’s been great, so far. I’ve been doing it for a few months and I’ve only had one niggle: I was on my way to college, as usual, when Zipcar called me to let me know that the previous person booking my car was running late. I’d never had this happen before: I’d never even been lined up back-to-back with another user before; it actually seems to be quite rare. In any case, Zipcar found me another car, which I declined (it was on the wrong side of town, and by the time I’d cycled back to it and driven across to this side again, I might as well have waited). In the end, the other user was fined, and I was given a discount in excess of the “missed” time, which I spent on a tin of biscuits to share with my classmates by way of apology for turning up late and disrupting the lesson. I’ve had a few difficulties with their website, especially when they first started taking over Streetcar’s fleets, but they’ve been pretty good about fixing them promptly.

So there we go: a nod of approval for Zipcar from me. So if you’re based in London (where there’s loads of them), Brighton, Bristol, Oxford, Cambridge,  or – soon – Maidstone, Guildford, or Edinburgh, and occasionally have need for an on-demand car, look into them. And if you sign up using this link or the shiny button below, we’ll each get £25 of free driving credit. Bonus!

Join Zipcar and get £25 in free driving!

Back To School

Next week is half-term. Why does that matter? Because I’m back in education.

Since last month, I’ve been a student again. Not full-time (I’m not falling for that one again), of course, but I currently spend my Monday evenings studying towards a Certificate in Counselling Skills at Aylesbury College.

Aylesbury College. It's actually quite an attractive building, except in the rain.

It’s actually a qualification I’ve been looking at for several years, but it’s only recently that I’ve lived somewhere even remotely close to somewhere that it’s taught: while there’s a lot of counselling theory that can be learned by distance learning, there’s naturally a lot of hands-on counselling practice that demands a classroom or clinical setting, and for that… you really do need to be within reach of a suitable school.

Not that Aylesbury‘s exactly on my doorstep. It’s not even in the same county as me (it’s just barely over the border, in fact, into Buckinghamshire). And this can make things a little challenging: whereas many of my classmates walk or cycle in, I have a special little dance that I have to do every Monday, in order to make my study possible.

I arrive at work early, so that I can get out of the door by 4:30pm. I then leap onto my bike and pedal furiously through Oxford’s crowded afternoon streets to the East side of the city. There, I lock my bike up and hop into a borrowed car (more about that in another blog post), pick my way out between the growing pre-rush-hour traffic, sprawling 20mph zones, and deathwish cyclists, and hammer along the A418 in order to get to class for its 6pm start.

This is the M40. I don't get to go on this. But that dual carriageway you see going over the top of it? That's one of the few stretches of decent road on my weekly commute to Buckinghamshire.

Three hours of theory and roleplay later (as well as a break to eat a packet sandwich), I’m back on the road. It annoys me more than a little that now that I’m not in a hurry, the roads are usually clear and empty, but it’s a good excuse to crank up the volume on Jack FM and enjoy the ride back through the villages of East Oxfordshire. Back in Oxford, I pick up my bike and cycle home: I’m usually back before 10:30. It’s quite a long day, really.

So what’s it all for? Well: ultimately, if I stick with it, it leads to a Certificate in Counselling, then to a Diploma in Counselling. If you take that and couple it with a stack of distance learning modules, it adds up to… well, this Foundation Degree in Counselling, perhaps.

But that’s not what you wanted to know: what you wanted to know was, “What are you doing, Dan? What’s wrong with the degree and career you’ve already got?”

Well firstly, of course, learning doesn’t have to be about qualifications. This is a field that I’ve been interested in for longer than I’ve been blogging. Plus: I’m sure that my various pieces of emotional support work, like my work with Oxford Friend, will benefit from the experience and learning that I bring to it.

But also, it’s about the idea I’ve always had that a good mid-life crisis ought to benefit from planning: it’s too important to leave to chance. And I’ve been thinking that a career switch might be a great mid-life crisis. The social sciences are fun, and while counselling might not be exactly what I’m looking for, there’s some doors opened by studying it. With less than a decade before I’m 40, and with part-time study being an ever-so-slow way to get things done, I’d better pull my finger out.

Doubtless, I’ll have more to say about my course as it progresses, but for now, I’m just glad that it’s half-term week, which means I get a week in which I don’t spend my Monday running around like a headless chicken… and I get twice as long to finish my homework.

Roadspotters

Recently, I learned that the roads in Great Britain are numbered in accordance with a scheme first imagined about ninety years ago, and, as it evolved, these road numbers were grouped into radial zones around London (except for Scotland, whose road numbering only joined the scheme later). I’d often noticed the “clusters” of similarly-numbered roads (living in Aberystwyth, you soon notice that all the A and B roads start with a 4, and I soon noticed that the very same A44 that starts in Aberystwyth seems to have followed me to my home here in Oxford).

Road Numbering Zones of the United Kingdom

Who’d have thought that there was such a plan to it. If you’re aware of any of the many roads which are in the “wrong” zone, you’d be forgiven for not seeing the pattern earlier, though. However, seeing all of this attempt at adding order to what was a chaotic system for the long period between the Romans leaving and the mid-20th century makes me wonder one thing: are there “roadspotters”?

There exist trainspotters, who pursue the more-than-a-little-bit-nerdy hobby of traveling around and looking at different locomotives, marking down their numbers in notepads and crossing them off in reference books. Does the same phenomena exist within road networks?

It turns out that it does; or some close approximation of it does, anyway. One gentleman, for example, writes about “recovering” road signs formerly of the A6144(M), which – until 2006 – was the UK’s only single-carriageway motorway. A site calling itself The Motorway Archive has a thoroughly-researched article on the construction history of the M74/A74(M) from Glasgow to Carlisle. Another website – and one that I’m embarrassed to admit that I’d visited on a number of previous occasions – reviews every motorway service area in Britain. And, perhaps geekiest of all, the Society for All British and Irish Road Enthusiasts (SABRE) maintains a club, meetups, and a thoroughly-researched wiki of everything you never wanted to know about the roads of the British Isles.

From what started as a quick question about British road numbering, I find myself learning about a hobby that’s perhaps even geekier than trainspotting. Thanks, Internet.

Roadworthy

This afternoon, I passed my driving test. This was my second attempt, and I pretty much kicked arse, scoring 2 minor faults (one for undue hesitiation as I pulled out from a roadworks stop on the way up Penglais Hill, and the second for insufficient use of mirrors at some point while moving out of the roundabout near Morrisons). So there we have it: I’m legally allowed on the roads.

All of the best drivers pass on their second attempts. Or so my dad tells me. Why yes, he did pass on his second attempt: why do you ask?

I have so many other things I’m overdue to blog about, but that’ll do, for now. Time for a beer.

A Great Driver, In Theory

Took and passed my driving theory test this lunchtime. 50/50 (pass mark 44) on the multiple choice bit, and 66/75 (pass mark, again, 44) on the silly little hazard perception video, which’ll do.

Not one question about stopping distances, meaning that I’ve committed to memory that most useless of information (I mean, am I really going to spot a child running into the road and start counting the car-lengths between me and him to work out if I need to start braking yet?) for no reason whatsoever. It feels like they’re all stuck in my head, now, so I may have to knock up a quick computer quiz to ask me those “missing” questions so I can release them again.

So yeah; there we are. Suppose I ought to have a practical test sometime.

Speed Camera Clocks Motorist At 406mph

[this post was damaged during a server failure on 11 July 2004; it was recovered on 13 October 2018]

As this article [The Sun] shows, a man was caught speeding in Cheshire this week at 406mph.

Quite impressive, I thought, as he was driving a Peugot 406, who’s maximum speed is listed as being 129mph.

I suppose it stands to reason that we Brits, the nation who currently hold the land speed record of 766mph [CNN], would be the first people to have a speed safety camera pick one of us up at over half the speed of sound. And such a clear picture, too…

Despite the obvious mistake, a spokesperson for Cheshire Safety Camera Partnership has stated that they will still be taking legal action.

Banned From Driving For Life, Before He’d Even Passed His Test

[this post was lost during a server failure on Sunday 11th July 2004; it was recovered on 21st March 2012]

As this news story from the BBC relates, a certain Alan Shirkey from Aberdeen was this week given a life ban on driving, as well as a £300 fine and a year’s probation.

He’d started learning to drive over a decade ago, but then stopped. Then, on the day in question – 10 years after he’d last been in a car and with only a provisional license – he drove (without L-plates or supervision, and with no insurance whatsoever) towards Perth. He stopped to fill his car up at a petrol station, and then left without paying. Realising his mistake, he began to reverse back down the dual carriageway, colliding with several cars as he went, and injuring several people. When he was arrested, he refused to give a urine sample.

And they only fined him £300?!?