BeerTracker

March 6th, 2010

Have you ever wondered: “where’s the nearest place can I get a drink?” N900 users, look no further! Although as yet unfinished, BeerTracker aims to solve this debacle by providing a quick and feature-frugal map to your closest pubs in the style of the Aliens motion tracker.

BeerTracker on the N900

BeerTracker on the N900

BeerTracker is being developed in C++ with OpenGL ES 2.0 and GLSL, which has been something of a learning curve for me. This has, however, improved my understanding of matrix and vector algebra to no end, as well as learning quite a bit about the OpenGL pipeline. The original concept for BeerTracker was to use the Maemo liblocation API (i.e., GPS and network positioning) in harmony with data from a Google Maps search. I’m currently implementing the GPS positioning code, but the source for the pubs’ locations might need a rethink as Google seem only to be exposing the API to web applications. For now, I’m planning to use pre-defined latitude and longitudes as a proof-of-concept.

Watch this space.

NTFS Symbolic Link on MPD

February 21st, 2010

Since my recently-acquired N900 has an MPD client application, I thought I’d finally get around to setting up MPD on my desktop; remote control through WiFi! On the desktop, my music collection is stored on an NTFS drive which I then link to my home directory ($HOME/Music). When setting up MPD, I decided to go through the ‘mpd’ user route; i.e. running the daemon for multiple users: this seemed to make the most sense for handling remote connections. I then linked the music collection directory to /var/lib/mpd/music and had MPD update:
$ mpc update
volume: n/a repeat: off random: off single: off consume: off

No luck. MPD wasn’t finding any of my tracks and the output wasn’t exactly helpful. After some googling and reading through forum threads I decided that it was probably a permissions problem. Of course! Ubuntu mounts my NTFS partition with the ‘plugdev’ group:
# usermod -aG plugdev mpd
Fixed!

GameCentral: Meeting the Pros

January 29th, 2010

I arrived at the Jug and Jester about 10 minutes late (thanks, reliable bus service), whereupon the handing out of free beer tokens commenced and hence the drinking of free beer. After fetching my free beer — you have to get your priorities right — I got talking to a variety of people, including some animation students from Birmingham University, the organiser and some guys from Airplay, who are behind several published games and even received a BAFTA nomination for their first mobile game! Surprisingly, though, out of around 20 – 30 people, there weren’t any other student programmers there. Are we really that rare?

After a while Neil, from Blitz Arcade, took to the stage and gave a short introductory talk. We were going to listen to four different studios, all of which are enrolled in the Blitz 1Up program, which, through their connections to digital distribution sites such as Steam and Direct2Drive, along with in-house resources, aims to give a helping hand to struggling indie games developers. Aside from Airplay, we saw Remode who followed the dream and started their own studio upon graduation and their game ‘Mole Control’, which is a remix of Minesweeper with added cute, furry animals; Binary Tweed (Deejay), who’s also following the dream after quitting his desk-job and porting his XBLA title ‘Clover’, which is this really cool Dizzy-inspired platform puzzler, to PC; and Regolith Games with their game ‘KrissX’.

Once the talks had finished, we had the chance to try out the games for ourselves, get another beer and network some more. I got chatting to a designer from Blitz who’s involved with the open days, and he imparted several pieces of advice, but most importantly: make a game! Games studios want people who have developed a game from start to finish. All of the studios were simply baffled that universities don’t encourage this in their modules. Of course, this seemed like the perfect opportunity to show them what I’ve been working on, Laika.

Laika in its current state

Laika in its current state

After me babbling on about how it’s not at all revolutionary and that I pretty much spent three days solid developing it in a mad dash before the Blitz open-day hand-in, a few people got to playing it and more watched. To my surprise, it seemed to be generally well received! They seemed to appreciate that I hadn’t tried to be an artist; in fact, I think the exact words were ‘programmer art is great’. I even got some useful criticism and advice about the boss.

Unfortunately, by this time it was getting late in the evening and soon everybody decided that they’d rather be at home with their loved ones so I set off myself to the bus stop, which turned out to be just outside the pub.

Hello, world

January 19th, 2010

Well, that’s it. Saving a few tweaks where I haven’t edited the CSS and possibly a slightly less bland background, the new blog design is finished. I’ll be blogging primarily about my geekier interests, such as coding and other hacking, and I’m hoping for two things in return:

  1. To build a small online portfolio and presence;
  2. To build a small reader-base or at least generate some traffic.

Can anyone ask for any more? Well, probably.

Nice Curves

October 8th, 2009

During a lecture on the history of computer graphics, I decided that I needed to understand the way that bezier curves work. Since I’ve done a lot of work recently with pygame (see: Propellor & Ratchet Games) I decided to quickly hack together something to help me visualise it.

bezier.py as attached

bezier.py as attached

Thus, with a quick visit to Wikipedia for the algorithm and a quick debug, I had a bezier curve drawn in pygame. The next job was to provide some sort of interactivity. Tying one of the points to the mouse position was a start, but left a lot to be desired. I’d seen editable bezier curves (such as in Inkscape) draw the control points, so I decided to follow suit.

Pygame’s pygame.draw.rect function requires a pygame.Rect object to be passed, so I decided to convert the bezier curve’s control points into pygame.Rect objects. This is also handy for detecting mouse collisions using the pygame.Rect.collidepoint function.

The final code (as attached) has been commented and cleaned up. Hopefully it provides a good view of how handy the pygame.Rect object can be in addition to a simple example of a pygame application. (Hint: click-and-drag the grey squares to modify the curve.)

Note: I have also developed the code further using OOP to allow several curves to link and unlink control points dynamically; if it reaches a usable/readable state you might expect to see it posted here.