Category Archives: lirec

A week in Stockholm

The Mobile Life Centre in Stockholm is an interdisciplinary lab that does serious research on unserious activities and comprises computer scientists, interaction designers, sociologists, psychologists and game designers. They are also part of SICS, and are partners with FoAM on the Lirec project. Last week I was lucky enough to work with them for 5 days focused on Germination X.

The main objective was to start designing a user study to discover people’s feelings about their relationships in the game. We started off with a talk and a workshop, inviting the other researchers to help us decide the best ways of doing this – using interviews, online questionnaires, in game surveys or raw data from the game.

The skills you need to design something like this (in order to get the best chance at finding answers to questions you are interested in), of course requires a totally different way of thinking compared to actually designing a game in the first place – it was very inspiring to be part of the process, and see first hand their work on other parts of the Lirec project, such as the ActDresses concept for end user programming of robots.

It was also great to meet the group at the Mobile Life Centre who are working on pervasive gaming who had lots of ideas and directions for the study, as well as for the game itself.

Germination X: Game design in pieces

The current focus for Germination X is encouraging collaboration between players, with the subjects of pemaculture and companion planting deeply interwoven into the gameplay. It’s important to avoid the normal problems with “educational games” where the subject matter is bolted onto some existing game. This is rarely a successful strategy.

Firstly players now are grouped into different roles based on the permaculture layers represented in the game:

As players progress they get a chance to take on different roles as they can only pick fruit from plants from the layer they belong to. This means that even experienced players require the help of new players to provide nutrients for their plants.

Another big decision was to separate the “social elements” of the design from the things you need in order to progress through the game. Part of the idea is to remove situations like this:

I forget which game the screenshot was originally from (I think a city building facebook game), but it had absolutely no connection with the themes of the game. Relationships seem generally to be treated like resources in most of these games – the main motivation being to increase virality. I’d like to leave things a little more open to interpretation (partly so we can explore further possibilities a little more).

There are quite a few things classified as “social activity” in the game, but none of them are a direct requirement to progress, no meanings are “hardwired” with rewards or punishments – e.g. the meaning of passing different fruits to other players, or the ability to plant detrimental as well as beneficial plants. The idea is to create a situation where collaboration is important but not formulaic – the game provides a basic need for people to help each other, a couple of ways to do it and some ways for them to initially connect with each other – mainly though the plant spirits:

Germination X: player progression and surprises

Slowly Germination X gets less like a prototype and more like a full game, lots of new stuff this week – as this is the first online release of the work done over the past month.

Players can now pass items of fruit to each other or spirits as gifts (by dragging fruit over messages and dropping them). There is some limited player development with some small surprises to prolong the gameplay a bit (spot the new plants). There is now a new mechanism to introduce players to the game and get feedback from them and also navigation to quickly locate plants – click on a message to teleport to the plant it concerns.

Still lots of rough edges, hopefully I will be able to smooth some of them out next week at the Mobile Life Centre in Stockholm. We have also now moved the game to it’s own dedicated server, and completed the transition to mongodb.

Run your own Germination X server

We are in the process of moving the Germination X game to a new server, which gives me the chance to properly document the steps required to set it up – this is based on a clean Debian Squeeze 6.0.1 box on Linode.

Step 1: Get the source and Clojure installed

sudo apt-get install subversion
svn co
cp lein /usr/bin; sudo chmod +x /usr/bin/lein
sudo apt-get install default-jdk
cd GerminationX/oak
lein deps (automatically installs all the clojure dependancies)
cp fatjars/* lib/ (installs the FAtiMA precompiled jars)

Step 2: Install mongodb (used to store the game world)

sudo apt-key adv –keyserver –recv 7F0CEB10
add: “deb dist 10gen” to /etc/apt/sources.list
sudo apt-get update
sudo apt-get install mongodb-10gen

Once the server is running, you can browse the database (players and tiles containing plants) using the “mongo” console, the database is called “oak”.

Step 3: Start the server

Configure core.clj to build a new world (see comments in source) and test by running as normal user (WARNING: this is not secure!!! – only for testing!!!)


This will start the game server printing output to stderr/stdout, and after a while the three plant spirit FAtiMA processes. Wait a moment then check port 8001 – the game should be running. Once checked, comment out world building in core.clj and kill the 4 java processes.

Step 4: Locking down the game server

For reasons of security the game server should be run as a user with very restricted permissions – this means if someone finds a way to run commands via the process in some way, they wouldn’t be able to do much to the server except access some game data. The standard user for this is called “www-data”.

sudo chown www-data:www-data public
sudo chown www-data:www-data public/log.txt
sudo ./ start
Check port 8001

Check the server is running with “sudo ./ status” or stop it with “sudo ./ stop”. This code was based on a similar script for Naked on Pluto, thanks to Aymeric! The game logs it’s stdout/stderr output in /var/log/oak-server-8001.log while some in-game logging currently goes to public/log.txt (so it can be visible from a browser).

We are also running the game via apache using a reverse proxy, (again based on the setup used for NoP) this gives us an added layer of protection/load management etc.

Germination X – designing for cooperation

Over the last week I’ve been designing and implementing a lot more game mechanics for Germination X which are needed for an upcoming visit to the Mobile Life Lab in Stockholm. The more interesting ones involve some direct player – player interaction. The thing I’m trying to balance is keeping the central design simple (what you have to do), but adding just enough for it to be taken further by players (how you do it). One important part of this is emphasising cooperation without making it mandatory – something I think is a mistake to do, and leaving the way that people interact online as open to interpretation as possible. Tale of Tale’s Endless Forest is a good reference point here.

The focus is adding a kind of “levelup” system for players to progress through the game in a longer term way than currently, along with some surprises. Also adding a way for players to send fruit they pick to other players as gifts, or to the plant spirits as a kind of “offering”.

The other major change is updating the game to use MongoDB to store all it’s data. I’m using congomongo as the Clojure wrapper, and it’s been fairly simple to integrate with the existing game code as I can replace normal Clojure functions like reduce with versions that iterate over records in the database. These can also be written to load data and work on it in chunks, to keep the memory overhead fixed:

(defn db-reduce
  "run f on each item in the collection, return the result"
  [f ret coll]
  (loop [skip 0 ret ret]
    (let [limit 200 ; limit to loading 200 records at a time
          items (fetch coll :limit limit :skip skip)] ; do the fetch
      (if (not (empty? items)) ; are there any items?
        (recur (+ skip limit) ; do the next chunk
               (reduce f ret items)) ; reduce f over the items

Lirec meeting in Bamberg

Last week was another Lirec meeting in Bamberg, where I was able to present an in depth description of how Germination X works. I also had the chance to talk with SICS/mobile life lab (one of the other project partners) about how we can take the game forward with the aim to provide some studies for how people relate to Lirec’s companion/characters/plant spirits – and hopefully also other players.

The game’s main mechanics are as follows:

Germination X is similar to other farming games except for the third factor – that plants may get ill if their ecosystem cannot provide them with what they need. The other thing that makes Germination X unique in the socal games space is of course the addition of the plant spirits.

Each spirit represents a group of plants – the more specific permaculture term is a “layer”, as the groups represent the layers of a forest, from the root level (called rhizosphere) all the way up to the canopy trees.

Note: dandelions are more correctly part of the herbaceous layer, but we are taking artistic licence here, and lending it to the ground cover spirit for the moment.

In the FAtiMA rules for the game, the spirits have relationships defined for each of the plants in their group, and relationships defined between themselves. This allows us to use the way FAtiMA models emotions to get some nice results, for example if a player plants an apple tree the Tree Spirit may experience “Joy”. However, the Ground Cover Spirit doesn’t like the Tree Spirit as it’s plants shade it’s clover and dandelions too much – this action will cause it to express “Resentment”. Such processes, so the theory goes, create more understandable and believable characters.

Emotional Colour Map

This is the emotional colour map for Germination X. It’s a 22 by 8 sized image, with 8 colours for each OCC emotion (those we haven’t done yet are white).


It’s primarily based on a set of colours Lina has been working on. She found it useful to group the emotions into positive and negative sets. Something I think is significant is that these colours were made with the colours of the plants and the general feel of the game in mind. I think the problems I found with this exercise was a lack of context – perhaps thinking too abstractly about this is a bad idea.

It’s great to see this work being picked up by the Life project by Evan Raskobb at Space Studios – looking forward to seeing more of where they go with this.

GX – messages, colours and continuous worlds

A big update for Germination X today.

The main new stuff includes:

The process of moving around the world is now more continuous, as the land is split into sub-tiles that are loaded 9 at a time. When you move out of the central tile the 3 at the back are discarded while the 3 at the front are loading. Spirits can also “see” into the tiles surrounding their current one, and so can navigate the entire world slowly, but independently.

Spirit emotional colours – both in their character design and in their messages. I’ll post more fully about this later.

The messaging system has been rewritten and now forms the major information source from the spirits. It’s probably a little too much right now, and some thought is needed on effective ways to communicate some of these things. All the spirit’s messages are triggered by actions driven by the FAtiMA agent. Here is an example of what happens when a “praise” action is received for an object:

(defn spirit-praise [spirit plant]
  (modify :log
          (fn [log]
             ; we can't exactly be sure why the fatima agent
             ; has triggered the praise action, but we can make
             ; an educated guess by looking at the plant
             ; if it's not the same type as the spirit
             (if (not (= (:name spirit)
                         (layer->spirit-name (:layer plant))))
               ; we're happy as it's providing a benefit to our plant
               (make-praise-msg 'spirit_helper_praise spirit plant)
               ; it's the same type
                (= (:state plant) 'grow-a)
                ; we're happy because a new plant is growing
                (make-praise-msg 'spirit_growing_praise spirit plant)

                (= (:state plant) 'fruit-a)
                ; our plant is flowering (first phase of fruiting)
                (make-praise-msg 'spirit_flowering_praise spirit plant)
                (= (:state plant) 'fruit-c)
                ; our plant is fruiting (last phase)
                (make-praise-msg 'spirit_fruiting_praise spirit plant)

                ; i give up!
                :else (make-praise-msg 'spirit_general_praise spirit plant)))))

The Haxe client then reads the messages which consist of these codes and a host of other information (eg. the spirit’s current emotional state and the players involved) and builds the text for display.

New plant spirits and dandelions

A large part of the recent work on Germination X has been finalising the character design for the plant spirits. We need something which can exhibit some connection with the permaculture plant layer the spirit represents along with a way to express emotions with the restrictions of the browser platform. This is an image from Lina’s concept art – many more of which are online here.

After a few iterations we have some ready to use in the game, the colours will be driven by their emotions (more on that later on). These are the ground cover (mulching), tree and shrub layer spirits:

Along with this, all the artwork in the game has been updated, taking Lina’s latest versions and also increasing the resolution. I also had a chance to work on a new dandelion from Lina’s uncoloured version, here are all of the different variations, with growth, autumn and illness stages.