Overview

To test the port out a bit more extensively I decided it’d be a good idea to try porting an existing game, at which point rzr suggested Those Funny Funguloids. So after a fair amount of hacking to make it compatible with my version of Ogre and to make the controls work reasonably on a touch screen device I have a playable version.

The aim of the game is to collect mushrooms (…IN SPACE), and bring them back to your base without running into any asteroids. Only mushrooms of the same colour as your base are added to your score and your base changes colour each level (but you can hang on to mushrooms between levels and score them later). The controls are fairly simple, touch the left side of the screen to turn left, the right side to turn right and the middle to start moving.

When I have a bit more time I’ll see about writing a little tutorial on making use of my modified version of Ogre3D to create 3D applications and games in a way that’s easy to distribute.

Download

Source

Overview

A while back a wrote a little game for the Nokia N9 and N950, mostly as a way to explore the QML Box2D bindings. However, whilst packaging up my StatusNet client I thought I might as well release this as well since it can be a fairly enjoyable distraction. Below is a short video demonstrating how it works, and at the end of the post you can find details on where to get hold of it.

Overview

StatusNet for MeeGo makes it possible for Nokia N9, N950 and similar phones to connect to StatusNet compatible microblogging services such as Identi.ca. It supports viewing statuses in the phone’s event feed alongside Twitter and Facebook updates, viewing conversations, posting new status updates and replying to other people.

Overview

StatusNet for MeeGo makes it possible for Nokia N9, N950 and similar phones to connect to StatusNet compatible microblogging services such as Identi.ca. It supports viewing statuses in the phone’s event feed alongside Twitter and Facebook updates, viewing conversations, posting new status updates and replying to other people.

Assuming no issues are encountered by testers I plan on submitting this version to the Apps For MeeGo repository, and later also the Nokia Ovi Store.

You’ll need to restart your phone before statuses start appearing in the events feed, although you’ll be able to use the main app straight away. Because of some changes in the dbus services its also necessary to restart your phone even if you’ve already installed version 0.1 (this won’t be needed after future updates though).

There’s one thing that my Nokia N950 has been lacking and that’s a StatusNet client, so I set about hacking one together. I love the way that the N9/N950 events feed displays messages from Twitter and Facebook, so my main focus so far has been to integrate with this. I’ve now got my client to a stage at which it covers most of my own needs so I thought I’d make an early release for others to play with.

Once I’ve extended it a little further I plan on submitting it to both Apps For Meego and the general Nokia Ovi Store, but for now you can download the Debian package directly here.

One thing to note is that you will need to restart your phone before events will start to appear (this is due to a limitation in the way the SyncFW framework loads plugins).

The client is written mostly in Python, with a little C++ for integrating with the events synchronisation framework. It makes use of the StatusNet module written for the command line StatusNet client IdentiCurse and the python-eventfeed module written by Thomas Perl.

I’ve just built some Box2D and Box2D-QML packages for Harmattan. The Box2D-QML package is especially interesting, this wraps the Box2D API as QObjects allowing them to be made use of directly from within QML. So you don’t need any extra C++ to handle physics simulation for simple games or similar. Here’s a short video of one of the demos running on an N950:

Last week I got the news that I’d been accepted into Nokia’s community device program and would be receiving a Nokia N950 so that I could help produce some nice open source MeeGo apps ready for the launch of the Nokia N9 later in the year. The device hasn’t arrived yet, but I’ve already started on the first of my projects which is to create a Libre.fm radio client. Most of the basic functionality now works including authentication, tuning to stations, playing, pausing and skipping back and forth through the playlist. I won’t be making a release until after I’ve had a chance to actually test it on the device itself, but the code is all in the GNU FM git repository. Here’s a quick video of it in action:

I’ve had a Kindle for a little while and really like it, but one of the areas it seems to be somewhat lacking in is the availability of translation dictionaries, as such I knocked up a quick script to convert TinyLex dictionaries from the Apertium project into indexed Kindle dictionaries. The most useful of these is probably the German – English dictionaries as these are very complete (over 160,000 entries).

One thing that I find quite useful is setting the German -> English dictionary as my primary dictionary (instructions below) then opening the English -> German dictionary and searching for words (or vice versa), this way you can get an instant re-translation of any words suggested to you.

Installation

Download whichever dictionary you’re interested in from the list below.

Android 2.2 (Froyo) support – Previous versions didn’t work under Froyo due to the new streaming framework (libstagefright) not supporting HTTP redirection, so resolving the final URL is now handled by Libre Droid itself.

Ability to add custom tag stations – You’re no longer restricted to the preset tag stations so if you want to listen to female vocals, to finger picked guitar, to monkeys or anything else our music might be tagged with then you can create a dedicated station for it.

Support for playing a user’s loved station – All the music you’ve ever loved in one easy station.

Support for the community loved station – The Libre.fm community’s favourite music, this is a selection of all the music that’s ever been loved by any of our users with the most popular tracks playing most frequently.

New artwork.

Plus a few miscellaneous bug fixes.

To access it directly on your phone either scan the QR code below or click on it from within your phone’s browser. Alternatively you can simply search for “Libre Droid” in the Android Market.

Local map rendering and route finding with libchamplain, Spatialite and Open Street Map

This tutorial takes you through the steps necessary to build a simple application which is capable of displaying data from OpenStreetMap and find driving routes between two locations without the need for any network services.

Preparation

libchamplain – Provides clutter based mapping widgets. You’ll need version 0.7.1 or later for memphis support, when compiling add –enable-memphis to the ./configure parameters.

Spatialite – Provides OpenGIS compatible routing (and more) on top of SQLite. This needs to be version 2.4rc3 or later. You’ll also need the spatialite-tools package for importing OSM data

Next we’ll need to acquire some OSM data to work with, for this example we’ll be using a small area around Nantwich in the UK, which can be download here. Data for entire countries can be downloaded from CloudMade, or data from a smaller specific area can be obtained from the OpenStreetMap API.

This is a fairly standard champlain program except it uses the memphis renderer to create tile images locally instead of fetching them from an online tile server. In addition to nantwich.osm you’ll also need default-rules.xml, which defines the appearance of the map.

The resulting program will give us a small window that displays our map data without the need for an internet connection:

Creating routing data

Before we can performing any routing tasks we first need to import our OSM data into spatialite and create a routing network from it.

Automatic import

I’ve joined these stages together into a small script, available here: populate_spatialite.sh. It takes two parameters, the first being the OSM data to import and the second is the spatialite database to be created:

./populate_spatialite.sh nantwich.osm nantwich.sqlite

Finding and drawing a route

First we define a couple of new global variables for storing references to our route’s polygon, our Spatialite database, and our database’s filename:

The main part of this likely to need further explanation are the SQL queries being used. To find a route between locations a query can be performed on the Roads_Net virtual table, to see the sort of results this generates we can load the database into spatialite directly and try some queries.

spatialite nantwich.sqlite

This starts an sqlite session with the spatialite extensions already loaded, so we can just type out our query directly and see the results:

The first row gives us details about the entire route, each following row is a single step along that route including the name of the road we’re travelling on at the time. You’ll notice that the Geometry column appears to be empty, this column is actually accessed through a number of different functions, to get a plain text representation of the geometry for our route we can do:

From here the program could be easily extended to look up OSM IDs based on their street names (stored in the roads table), to find the nearest OSM ID to a GPS position or to display text based driving instructions, all with just a few SQL queries.

Complete listings

The full source code and data for this tutorial can be downloaded here: champlain-routing.tar.gz. The complete program includes some additional enhancements such as the ability to request routes based on street names (in a simple, but non-robust manner) and zoom level controls.

If you create anything based on this tutorial I’d be very interested to hear about it .