The Swamp that was, a bicycle opera

Day one on a new project – with Kaffe Matthews, and a collaboration between FoAM & Timelab, “The Swamp that was” is an opera where bicycles become a way to hear stories of the past in the city of Ghent.

I’m picking up the software side of things from Wolfgang Hauptfleisch, which involves using BeagleBoards – low power self contained open hardware ARM computers, a good follow up to my experiments with the considerably more closed NDS and less general purpose Android.

This is my test BeagleBoard xM in a custom laser cut housing from Timelab.

The “swamp” system is based on lua scripts calling proteaAudio for realtime audio processing. Lua has a tiny footprint and is great as an embedded interpreter (despite indexing from 1 and other minor gripes). Everything seems to be up and running, and I’ve set up a project on gitorious with the sourcecode.

Some random things I’ve learned include: flags to speed up dd copying images to extremely slow usb SD memory cards:

sudo dd if=swamp0-1.img of=/dev/sde oflag=dsync bs=1M count=1024

List ip addresses of devices attached to your local router:

sudo arp-scan --interface=wlan0

I’m using the Ångström distribution on the beagle board, which uses opkg for package management – it took me a long time to figure out the best way to search for packages is simply:

opkg list | grep alsa

Drawing plant spirits in Brussels

Some pictures from the Germination X plant spirit drawing workshop, part of FoAM‘s contribution to Open House Brussels, a public invitation for people to visit the artistic groups and labs in the city.

The plant spirit drawing system has improved a bit from last year’s workshop at Pixelache Helsinki, being able to upload to the public server. It was great to see these spirits in the latest version (some of them are still frolicking in the game at the moment).

Next week: Plant spirit drawing & social network livecoding

The next few days are going to be hectic – a train powered scramble between cities for various activities.

Firstly I’m taking part in FoAM’s Open House event on Saturday in Brussels:

Enter a rarity cabinet of people and experiments: a lively display of human-plant hybrids, tasty table conversations, crisis-proof clothing and other curios in their natural habitat – the FoAM lab. Expect to experience a colourful collection of sketches and prototypes in various stages of completion, providing an insight into the collaborative and creative processes developed at FoAM.

My part is going to involve various experiments with Germination X, some playtesting and getting more feedback so I can evaluate the mandrake avatar changes. I’ve also rebuilt the code for “draw your own plant spirit” – this time we can directly upload people’s drawings to the public server for testing their spirit designs in the game.

The second event I’m taking part in is Baltan Laboratories The Tool Series #5: FaceSponge Workshop with Aymeric Mansoux in Eindhoven on Wednesday 23rd. We’ll be examining and exploring our real data on social networks, looking behind the interfaces and protocols we are supposed to see, with a top secret collaborative social network livecoding interface which has emerged from the Naked on Pluto project.

Germination X: Player characters

After another code sprint on Germination X, I’ve added player characters (avatars) to the game. Based on the falmouth focus group feedback this seemed one of the major things missing that players felt would improve the game.

The character design came from the Mandrake plant, which has been cropping up in groworld projects for some time – as a magical plant known to resemble human forms as it grows.

This change also allowed a much needed clean up and decluttering of the user interface for the game – as navigation now happens by moving your mandrake around by clicking on things. Your location is persistent, so when you log in you go back to the same place. All existing players in the game have been given mandrakes scattered around the world.

As the mandrakes represented a new type of entity in the world, able to move around, and linked to players – this was quite a lot of work, particularly in terms of updating the existing database. I had a lot of trouble doing this manually with MongoDB’s save command in the script interface. This seemed to be creating duplicate records (and creating very hard to track down bugs) that took a long time to find. The better approach seems to be to upgrade the database automatically in the game code, by checking a stored version number – and mapping over entries like this:

;; map over each player in the db
 (fn [player]
   (println "upgrading" (:name player) "to include tile and avatar")     
   ;; get a random tile in the world
   (let [tile (first (db-get-random-one :tiles {}))]
     (db-update! ;; update it, adding an avatar
      :tiles tile
      (merge tile {:entities
                   (cons (make-avatar
                          (:id player)
                          (:name player)
                          (make-vec2      ;; random position
                           (rand-int 5)   ;; in the tile
                           (rand-int 5))
                          (:layer player) ;; show the player's score on the avatar
                          (count (:flowered-plants player)))
                         (:entities tile))}))
     ;; add the tile location to the player
     ;; so we can find the avatar again
     (merge player {:tile (:pos tile)})))

This also means that the latest code will work with snapshots I’ve taken of the game world regardless of how old they are. This turns out to be really important – I can try some changes and rewind the whole world back to the same starting point, as well as testing code locally on a copy of the current public world version.