Latest Entries »

Well, we’ve made it to our three-quarter mark of Hong Kong – from here it’s a relatively short journey home, only 6,500 miles from Hung Hom station to London St. Pancras, via Beijing, Moscow and a host of other cities on the way. All of our travel writing is on the other blog, Without Wings, so I decided that I will take some time to write a few tech-centric ones which don’t really fit with the general travel writing audience and post them here…

First off, I’m warming up by writing about how I’ve been making use of my netbook while we’ve been going around. We’re travelling with an eeePC 901 running Ubuntu Natty. As you can see, it is starting to see some of the signs of battle damage, propped up by sellotape in a couple of places and some of its innards recently replaced to make it more useful when editing photos. It is pretty lightweight as far as netbooks go, but we’ve found it more than adequate for hosting an offline mirror of our blog (essential for writing anything when we’ve been at sea or on trains for days on end), email, looking up places to go and booking our onward journey while in the comfort of a hammock on a remote Thai island. I tried to do some coding on there as well but haven’t had time for much more than a bit of web development to improve parts of our blog.

Writing a blog offline…

This one was relatively easy to set up… I have set up the eeePC to have more or less the same web and database servers as our web host, and written a script that allows me to synchronise the files and update my local copy of the database whenever suitable. Our web host is making use of lighttpd, php and mysql for the database backend, so I just use rsync over ssh to copy over any new image files (or other files if I have updated any WordPress plugins), make a backup of the database, compress it and send it over. The script then extracts and applies the new database backup so that the site on the web and the site on my laptop should look and behave identically to the one on the internet.

Here’s the script that I’ve been using, in case any fellow travellers or WordPress enthusiasts can benefit from it.

Script to back up the mysql server (‘dobackups’):

mysqldump -u[username] -p[password] [database] | gzip -c --rsyncable > withoutwings.backup.gz

Script that retrieves a full copy of the site from the remote server and puts it on my laptop.

cd ~/Ubuntu\ One/mysqlbackups
echo Fetching backups from remote server...
echo To make this a little easier, enable public-key authentication on your account
# This script (dobackups) just dumps the backup of the database to a folder called mysqlbackups.
# Edit the script and replace your database details, replacing the 'withoutwings' parts as appropriate...
ssh mysqlbackups/dobackups
scp*.gz .
echo Unzipping backups from remote server...
gzip -fd *.gz
echo Sending backups to local mysql instance
mysql -u[username] -p[password] -D[database] < withoutwings.backup

cd /var/www/
echo Fetching web files from remote server...
# Rsync brings in any new pictures/static files from the server to the local copy.
sudo rsync -avz .
echo Amending config files for local instance.
# This part changes all references to the web site to 'localhost'.
# The only part I haven't worked out yet is how to get the title image to switch too.
sudo sed -i 's/' wp-config.php
sudo sed -i 's/withoutwings//g' .htaccess
echo update wp_posts set post_content = replace\(post_content, \'\', \'http://localhost/\'\)\; | mysql -u[username] -p[password] -D[database]
echo update wp_posts set guid = replace\(guid, \'\', \'http://localhost/\'\)\; | mysql -u[username] -p[password] -D[database]
echo Done!

Staying in touch

When travelling around, has been quite useful having our own platform for getting on the internet, especially in places where certain sites are filtered or I’ve needed to reduce the chance of login details being hijacked by a nefarious net-cafĂ© owner. We’ve been making use of Torbrowser throughout the journey, which has the added benefit of protecting you from most snooping when connecting via an unsecured WiFi connection (incidentally, it turns out WiFi has now joined ‘Hello’ as one of those words universally understood, wherever you are on the planet).

This program encrypts and routes your connection through a series of other computers before making it appear to the outside world that you are based in some Belgian backwater, hopefully allowing you to access websites that would normally be blocked and also providing you with an additional layer of protection from snooping. In countries where your email, Facebook or YouTube are mysteriously absent, this is an extremely useful service and I would definitely recommend helping the project out. If you want to help this excellent project, the best way you can do it is to run a Tor Bridge from your home computer (impact on bandwidth is normally minimal – as far as I can tell, most people use the service to access the news and Wikipedia). This allows people who would otherwise not be able to get access to the network to make a connection. Torbrowser is a complete package, maintained by the Tor Project themselves, that contains all the software you need to browse the web via Tor or run your own bridge node. Make sure to check the signature when you have downloaded it, otherwise you have no way of knowing what your browser is doing behind your back!


When we were staying in Melbourne for a couple of months, I had quite an early wake-up every morning to walk to the offices of the Australian Wheat Board (I would definitely recommend Melbourne and Victoria more generally as a place for a working holiday!). As anyone who knows me reasonably well will attest, waking up earlier than 10 a.m. is not something that really comes naturally, and it takes a good few hours before my mind is up to full speed. As a result, if I need to get up early I often find myself in the awkward position of waking up even earlier and then quietly tapping away at some mindless game in an attempt to battle that mid-morning fuzzy head before I have the chance to make any real mistakes in my bleary-eyed state. Because our little netbook is so underpowered for modern gaming, I have spent the last year in a time warp, merrily playing through some classics from the collection at Good Old Games. In the near future I’ll put up some reviews of the most interesting ones. The short summary is that there’s quite a canon of classics that have inspired the genres we are still perfecting today – and actually the mechanics of most of these games haven’t changed very much in the last decade (notwithstanding the improvements in graphics and user interface since then).

South Pacific

Well, we made it to Australia at last. Most of our updates are available on Anna’s site and there is a Flickr page too. I didn’t have a lot of time when we were travelling across the US to write any code (except working the odd plugin into our blog), but now that I have installed lighttpd, PHP and MySQL on my little laptop I am perfectly able to work on blog stuff offline.

I have discovered two important things while coding on the high seas, which pre-internet coders will already understand well, that I think I will keep up after I return: one, there are few distractions and it’s very easy to stay focused on the task at hand if you leave the browser alone and/or have no internet access; two, it’s a royal pain if you’ve decided to work on some new functionality for your project but forgot to download all the manuals before you leave! Also, seasickness can be a problem in certain weather conditions…

It turns out I had forgotten more of the OpenGL detail than I realised and without any recourse to the usual repository of internet knowledge, the latest version of my octopus game now has input, and simple AI and the rough beginnings of a game mechanic now working, but it can’t even render the floor properly in 3d space (I think the issue is with the camera init code). Previously I was going to write my own isometric 2d renderer as a thought experiment, but I quickly realised that OpenGL would be well up to the task and would serve well if I ever want to scale up to full 3d when I am in once again equipped with a fast PC. Reinventing the wheel has never been my strong point. While we were at sea, I converted the entire project to Java (as demonstrated by Markus Persson of Minecraft fame, applets are an extremely good tool for packaging your game!) and am now using LWJGL after a brief look and rejection of JOGL, which is less rounded a package for this project.

My other project is updating Anna’s site with some custom trickery – we are looking at improving the site load times (cue Firebug and some javascript hacks) as well as a nice way to present our America articles that fits in with our existing WordPress infrastructure. I have started building a HTML5 Canvas-based map showing our route and linking it to the existing articles – I will make another update with pictures once it gets a bit further on!

Another unexpected development is my rediscovery of some old games that I never completed when I was younger. I have found the joy of ZDoom, ScummVM and DXX-Rebirth, all of which still run well on modern underpowered hardware (let’s not forget for a moment that most of these games originally ran comfortably on 100Mhz of horsepower, way below the output of our ‘little laptop’, so these source ports are relatively inefficient!). I think at some point in the future I will write a couple of reviews for these old games – they hold up surprisingly well against more recent games in the genre (which shows you how little we have progressed in 15 years)! Internet cafes are plentiful here but it’s quite hard to make it all the way to one to play something modern, given all the other stuff that needs doing round here…

Welcome to America

We arrived in New York this morning – after a very early start to see the Verrazamo bridge we saw Manhattan drift past and the sunrise over Brooklyn. It made me think back to all the travellers who have made a similar journey in the last three hundred years and how the sight must have appeared to them – after days and days of just open sea the land looked magical and the buildings very exciting and alien. America feels like a land of freedom and opportunity from this perspective (relative to the confines of a boat).

En route we saw some dolphins and whales and had a better time than I expected. There was plenty of time for contemplation and reflection, and I was able to make a decent start on my next game project. Anna is covering more on this in her blog, Without Wings.

It doesn’t look like much at the moment (thanks to my “programmer art” skills) but my aim is to create a simple game where you play a Victorian in a mechanical octopus suit who is trying to mine gold/save the princess/whatever (as always in this kind of game, the backstory evolves organically once you’ve worked out the all-important gameplay). So far I have a grid with various terrain types, destructible tiles, actors that can move/fly around and follow simple lists of waypoints, and select/control functions now working. The game is going to mirror some of Dungeon Keeper’s gameplay with some new game elements and win conditions. The game would probably work quite well in multiplayer, but I need to get the engine basics up and running first before I split out any functions to client/server. The final version will be isometric 3d, but for the purposes of getting the engine up and running I’m currently using a 2d renderer with an isometric view built into the sprites (my little laptop is not very fast at all). The advantage to this approach is that it should be relatively easy to port this game to mobile platforms, should the need become apparent – when I get access to a machine with some larger horsepower I can write a 3d renderer, physics code etc. relatively easily without having to change the game code too much. At the moment I am using C# and the Tao framework to bind to SDL, but I have been running into performance issues already (more optimisation to be done, of course). I think it should be easy to port the infant game over into a java environment with some simple find/replace operations if the need arises.

First Post

Well, I suppose I’d better write something about why I’ve started this blog… In just over 8 days, I will be setting off on a very interesting journey – to try and travel around the world without catching a single flight. I am doing this both to raise awareness about low-carbon, sustainable travel and to prove to myself that it can be done. My girlfriend is going to be running a blog which is going to cover the ethical and philosophical dimensions of the trip – this one is more for the practical side of things though there will certainly be some crossover between the two!

On top of the obvious challenges along the way, I am also going to be writing a number of software projects – the big hurdle being that for most of the time I expect to have infrequent internet access. For the modern software developer this is quite unusual (this rules out most of the google APIs and web services, for example!) so I am going to try and write about some of the tricks I discover along the way.

While travelling I am going to be bringing my tiny laptop (an eeePC 901, running Ubuntu Natty for ease of use), a single rucksack which has a small satellite backpack attached (great for long train journeys, our primary mode of transport) as well as a bag full of extras dubbed "The Mule".