A hex map of England!

I’ve been using (and testing) my new hex-map library. Here’s a map of England.

Hex map of England

It was generated by a little program that uses NASA’s SRTM data as input. The light brown hills are just high ground, but the dark brown hexes are both high and hilly – my program samples the elevation, and calls a hex hilly when the elevation’s standard deviation rises above a set limit. The rivers are drawn by selecting sample locations and then finding an optimal route to the sea. The routing is done with something like Dijkstra’s algorithm – it mostly wants to go downhill, but will jump over small rises if necessary to get to the sea.

The rivers look plausible, but there are quite a few problems, if you look closely. For example the Welsh headwaters of the Severn flow North into the Mersey on this map, but in real life they turn South.

Anyway, the map looks pretty good. It’s certainly good enough to form the playing surface for my online game (don’t ask). Writing the program was way more interesting than generating maps by hand. I only found a single bug in libhex, which is heartening.

Comments (5)

libhex v0.1.0

I’ve just uploaded the first draft version of libhex, my library for manipulating and drawing hexagonal grids. It’s available in C++, Python and JavaScript.

[docs, source, examples: C++, Python, SVG]

Read the rest of this entry »

Comments (2)

Bonnersfield Lane

Bonnersfield Lane is a quiet, unmetalled, ancient country lane – right in the centre of suburban Harrow. What a delightful surprise! Read the rest of this entry »

Comments

Open Street Maps

For the past few days I’ve been playing with the Open Street Maps application. It’s a Wiki-like mapping system, that allows you to edit the map. I’m very pleased with the work I’ve done on the area near my house.

Why bother? Well, I wanted to give someone directions from the station. Google maps’ version has the station in the wrong place, and adds confusing little roads that aren’t actually there. Google’s map would just send my friend off in the wrong direction, so I started looking for something better. I tried the Open Street Map, but sadly all of the street names in my area were missing.

Well, with Open Street Maps I can just fix that myself. I did. And I added a bunch of nearby footpaths. And I corrected some mistakes that I found in the nearby town-centre. It was easy and fun. And now I have a good map that I can use to show my friends where my house is.

Comments (1)

Text Editors

I’ve just been trying out TextMate on my Mac. Verdict: It’s too clever by half. Read the rest of this entry »

Comments

Petrol costs me US$ 8.00 per US gallon

I can’t remember why, now, but I just worked out what the price of petrol is in the US… 40p per litre. That made me lol – I honestly can’t remember paying so little. When I first started driving and paying for my own fuel, I paid about 42p – that was about 1992. Read the rest of this entry »

Comments

New Image Car Hifi in Harrow: Avoid

“New Image” is a car audio shop at 537 Pinner Rd, North Harrow. I suggest you avoid them, and shop elsewhere. I just bought a car stereo from them, but after wasting my morning they’ve removed it and I’m back to square one. Read the rest of this entry »

Comments (2)

Greenland Ice Melting Faster?

The Guardian reports that the Greenland Ice Sheet is melting with unprecedented speed. Oh dear!

Comments

Facebook’s UI is appalling!

I’ve signed up because a colleague wanted to use it as an example for some work I’m doing. So far, the UI is just grim. Here’s a list of issues as I find them…

  • Why on earth do they need my date of birth? What are they going to do with this information? They don’t explain why they need it, and they don’t give me the option of not answering. Consequently, I lied.
  • Search by High School/College/whatever. Clicking on a link opens a new window!! Is this the 20th Century? Am I using Netscape Navigator 3.0? No!
  • Search by High School asks me what country I live in, with options like ‘England’, ‘Scotland’ and ‘Wales’. Hello? What happened to the United Kingdom? Did these US wankers just decree its dissolution? That pisses me off.
  • Having searched for my former “High School” (or as we call it “school”) classmates, what happens? It doesn’t work – I just get plonked straight back where I started: “Find your friends on Facebook.” I’m using the latest stable Safari – what “Web 2.0″ developers don’t bother to test on a Mac?
  • OK, let’s see if we have better luck with “College” (or as we call it “university”)…
  • …No let’s talk about that localisation first. They’ve gone to all the trouble of cutting my country up into dozens of little parts (right down to ‘Isle of Man’ and ‘Channel Isles’) but they can’t be bothered to make a localised version of the site? Hang on let me check… Right, I’ve changed “country” to “England” in my profile, and now it says England is my “Hometown” (note, that’s oneword), but it still hasn’t changed any of the UI option accordingly. I’ve tried other countries, but as far as I can tell, you can have Facebook in any language as long as it’s US English.

Don’t I have anything nice to say? Well, some of the UI features are quite nice.

  • Some of the search boxes have auto-completion, which works smoothly and well. Not all of them though, which seems odd.
  • The “Add a Friend” dialogue pops up inside the page, and then fades away once you’re done. Nice.
  • The draggable profile elements is nice, but over-sold. The two-column layout seems fixed – all I can do is choose the order of (some of the) elements.
  • The search filters don’t seem to work very well. I’m looking for my friend John Smith (not his real name) but there are a million of those, so I filtered on “male” and “ages 24-35″. Result? No hits! Not one! I suspect that SQL query needs looking at…
  • I take it back, the searching is rubbish. I’ve just searched my friend Paul Scott (actually his real name). The vast majority of hits are people called “Paul Scott ?Something?”. Why on earth do they think I’d type in someone’s first and middle names??? And I can’t even filter by COUNTRY!

Comments (4)

IBM ScrollPoint Pro Mouse

I have one of these mice and I love it. Instead of a scrollwheel, it has a little “joystick” just behind the middle button. And what’s more, it lights up blue!

Anyway, I keep having to set up my xorg.conf file for it, and I always have to puzzle out the correct configuration. (Yes my hard drive failed and I’m having to rebuild my whole machine.) Well, here it is:

Read the rest of this entry »

Comments

Sponsors