Germination X in HTML5 canvas

I’ve spent a couple of days on an experimental not-quite-working-yet port of Germination X to HTML5. Port is probably a slightly misleading word, as it’s actually running exactly the same HaXE code, it’s just compiled to Javascript rather than swf with a load of extra Javascript filling in the stuff needed to replace Flash. The game engine that Germination X is built on is now officially cross platform! It’s great to finally have a non-proprietary browser option for the game, and HTML5 is much faster now than when I first tried it, but it’s still got a long way to go. Problems I’ve noticed so far:

It’s still slow. I’m aware of the limitations and background to browser tech, but it’s depressing that it’s somehow problematic drawing a few hundreds of sprites in 2012 while my ancient Gameboy DS can manage quite fine thankyouverymuch 🙂

Tinting images is quite a basic thing to do in order to efficiently use images and save bandwidth and memory. Why do I have to loop through pixels in javascript to do this? This is the main cause of slowness in the HTML5 version of the game ATM, hopefully a simple bitmap cache will fix this. There are also some neat ways to do it with offscreen bitmaps and blendmode tricks, but they seem even slower.

Having to write your own mouse event detection for sprite down/up/over/out. I guess this is one of the biggest reasons for the explosion of HTML5 game engines. It’s quite non-trivial and un-fun to set up properly. Actually getting the real mouse coordinates is also quite hard to do.

On the plus side, it’s a breath of fresh air to get back the control of immediate mode – it seems historically that this tends to be the optimal approach, give us the render loop!

Now you’ve got this far – here is some accidental art which happened this morning, and which I’m particularly proud of:

Serious/educational games interview with Kara Frame

An interview with Kara Frame, who is studying Educational Technology at San Francisco State University.

Please tell us who you are, your role in designing games and why you became interested in “serious games”?

My background is in computer graphics programming for the games and film industries, but for the last 3 years I’ve been working for FoAM, an interdisciplinary research group who encourage me to work in a more generalist manner – working with people from different backgrounds and learning skills in wildly different areas.

I’ve also been heavily involved with software art and artistic projects that use games in different ways for quite a long time. For me, “art games” and “serious games” are both taking advantage of the way games allow players to take on different perspectives as they play – this makes them very powerful in terms of exploring ideas.

How does your approach to gaming make it unique from other similar games out there?

Germination X is designed to take its raw materials from the mass of online farming games, but builds around a world inspired by alternative agricultural methods (permaculture) to see how this changes the game experience.

We are also making use of a research AI system called FAtiMA, developed by the Lirec project which supports Germination X. FAtiMA models social relationships and emotions – we are exploring how using this kind of model effects player’s understanding of their relationships (with the AI characters, plants and each other) in a social game. Permaculture is mainly concerned with the relationships between plants, so it’s exciting to bring this all together.

What do you hope participants will come away learning or experiencing from your game?

I mainly want to inspire curiosity, when a game such as this represents a certain issue, I’d like players to come to their own conclusions – to explore it with them as equals rather than having some hidden “correct answer”. So the main thing is curiosity, which requires a certain depth, some mysteriousness. The best thing is when players tell me what is going on, because this means the game has allowed them to think creatively and openly.

What have been the challenges, obstacles at creating this game of your vision?

The thing I worry most about is consistency – that the world and the themes represented make sense, nothing breaks the player’s suspended disbelief. This is always the big issue, and in this game this has caused the most discussion and debate with people I’ve worked with.

What kinds of interactive assessment methods are you taking to making the goal of your games are likely to be reached?

With the help of the Mobile Life Centre (part of the Swedish Institute of Computer Science) we are setting up a series of focus group testing sessions which will give us feedback on the nature of the relationships in the game. Group discussions while playing, and responses to more leading questions at the end will be recorded.

Also, the game has been online and public since it’s first running version, and player’s actions are logged in a minimal way which allows me to immediately see the results of changes I make. This has been quite a huge discovery for me – the form of immediate feedback this makes possible. This open testing, in conjunction with it’s open source development, has meant I’ve been able to get quite a bit of feedback from brave early adopter players.

We have yet to enable this in Germination X, but in a previous game (Naked on Pluto) we have AI agents who ask players questions relating to the theme of the game (in that case privacy in social networks) which then get automatically posted to a blog external to the game. I think building in feedback this way, whether it’s about the issues or the game itself, is really important.

What do you see as the advantages/disadvantages of games in educational use?

I think games have vast educational potential – simply because from my perspective, most of what I consider learning happens via playing. I can only understand something properly if I can pick it up, shake it, take it to pieces and rebuild it in some way (whether that’s cars, Finnish language or linear algebra).

The problem is that this approach to learning doesn’t seem to fit very well with existing educational ideas. There seems a sense of the potential, but perhaps a lack of understanding of how to achieve this. I guess one problem is that people who do “get it” are perhaps put off by education, and so are not in the right place.

Where do you see the potential of digital games as a force for individual/community change in the future?

There is something about entering a game world that allows you to take on the perspectives of people you might not normally agree with, and understand the conclusions they reach. This was most clearly demonstrated by a workshop by Selena Savic at the Make Art chmod +x festival on a game prototype that examined the differences between the business strategies of super markets and local stall markets. The workshop was carried out on a bunch of mainly left leaning open source artists, all whom when playing the supermarket side took on all the monopolistic strategies they could with wild abandon! So I hope the potential of these kind of approaches might add to a shift in politics and decision making (on personal or community levels) away from restricted partisan modes of thought.

What advice would you give a novice game builder who is considering using or designing games to use in participatory agents of change?

If computers and programming are not a natural medium for you then start with drawing, models, bits of lego, make a board game, act it out with your body. It should be possible to get basically all the decisions made this way before touching a computer. Document everything, blog about it, get as much outside input as possible.

I see a lot of educational or serious games fail because they attempt to take an existing game and “bolt it on” to an issue – this rarely works. You have to take the game design seriously, and struggle with it to fit the theme or issue you are interested in. Everything in the game has to represent the theme consistently somehow.

Serious Play at FoAM

Last weekend it was the annual FoAM gathering to discuss long term ideas, some self reflection and consideration of external perceptions. We were guided on this mission by Simone Poutnik and Hendrik Tiesinga, members of FoAM and founders of Natural Innovation. They decided to trial a new method on us all, Lego Serious Play. Now, I’m a bit battle hardened when it comes to alternative business management strategies as I’ve been exposed to quite a few in various places over the years, but despite Lego’s high scoring buzzword bingo website, I can independently verify this approach as very much a success.

You start by building personal models that represent different aspects of the organisation in various states, and then work as a group to bring them together in different ways. This is done in a structured way, leading to certain questions at different stages of the process.

The core idea was to “think with your hands” and indeed the normal problem you get in these situations, a tricky question leading to an utterly blank mind, was removed as soon as you started searching for plastic bricks. Things seemed to build themselves in some way, the increasing scarcity of bricks requiring ever greater degrees of metaphor. The indirect method of having to explain your odd constructions (usually in quite an abstract way) said a lot more than I would have managed in a more traditional situation.

Naked on Pluto wins VIDA

It’s been busy in Elastic Versailles lately, last week it was announced that Naked on Pluto won the VIDA award, and the game was selected to appear at a series of Robots and Avatars shows next year. The VIDA award concerns art and artificial life:

The projects may be based on systems which emulate, imitate or speculate on the notion of life through current research and technology. These systems may involve attributes of agency and autonomy which display specific behaviour, are dynamic, react to their surroundings and evolve, and which question the frontiers between what is alive and what is not, between synthetic and organic life.

The game attempts to minimise differences between bots and players, while the bots also form a dynamic whole, cleaning and bringing the game world back to it’s original state while players attempt to disrupt the system. The game world of Elastic Versailles is also connected with the very real world of human relationships – it’s this connection that makes otherwise very simple games engaging, and the main reason for the rise of “social games”. In our case we are attempting to use this powerful medium in order to question strong assumptions about privacy that have arisen due to the homogeneous culture these systems have sprung from.

It will be interesting to see how much this publicity will increase the player assault on Elastic Versailles – we’ve seen a rise in visitor numbers but the game is challenging and requires a lot of collaboration by players. At the time of writing, only a few brave users have broken through to the outer reaches – the final quests have yet to be beaten.

We now have the challenge of presenting Naked on Pluto at a larger scale in various exhibition settings. The spaces we will create will need to be linked with the live game world in multiple ways, we have some ideas sketched out but there is much work to be done.


Free software projects are not products

One of the best things to happen if you are a free software developer is to see your code cropping up in other projects. Recently I’ve been helping Till Bovermann reuse the Betablocker DS virtual machine and integrate it into Supercollider, where it can be run at audio rate to create sound directly. The fact that the code was written to run on Gameboy means that Till’s also able to run 20 of them at audio rate at the same time.

In other news, the Fluxus editor is now being used as a way of livecoding Open Frameworks. This has a nice symmetry to it, as Fluxus uses some code from Open Frameworks for it’s camera input.

To me this highlights how thinking about free software in terms of being products (in a consumer capitalist sense) is an ill fit. This kind of cross pollination is really “the point” of free software, and would be, by necessity full of barriers if these projects were proprietary.

The problem is that it’s very hard for us to see outside of these ideas when they are so ingrained in our world and our thinking. It’s sometimes valuable to try and outline these assumptions, and become more aware of them.

The popularity in terms of raw market share is an interesting metric for a free software project as it has a kind of irrelevance or is even an obstruction when users are not supporting the project somehow. In the same way, the definition of “user” and “developer” seem a hangover from the same kind of producer/consumer thinking we are interested in finding the edges of.

What we want to know is what kind of people are using the project, are they curious, will they fiddle with things, do they blog about the work they are doing, can they translate the documentation? Most of all, will they increase the energy surrounding the work? People that do that are precious.

If we want a good metric of a project’s success in terms of cross pollination, perhaps we can borrow from scientific methods – where citations are a major metric for how influential a paper, individual or group is. Is there a way of tracking the movement of code and ideas in free software?

Why open licences?

I was recently asked by Wendy Van Wynsberghe from constant to explain how and why I use open licences for a lecture she’s doing on the subject. Like a lot of seemingly straightforward questions – it took me quite a while to work out the answers. With her permission, I thought it might be worth posting here.

So how do you use free & open licenses in your work?

I consider myself a software artist – so I am concerned with the process of creating software (via the combination of code and other digital assets). All the software I write is covered by the GPL licence, which means that all derivatives of it (created by me or anyone else) have to also be published as open source. I use similar licences for videos, images and written documents I produce as well.


Firstly, most of my work is publicly funded (either via arts grants or science research funding) so this is a moral issue for me – why should tax money be spent on work which is then removed from public access?

Secondly, and perhaps more interesting, is that the use of open licencing changes the way you go about your work in some fundamental ways.

For example, making your working method open immediately makes your work accessible to your peers, encouraging comment and collaboration at all stages. This for me is one of the most important lessons art can learn from the scientific method.

The initial fear that someone may steal “all your good ideas” is actually less likely if they are published and disseminated widely, as the danger for anyone wanting to borrow without attribution is that they will be found out all the easier.

This is not an absolute position. The embryonic stages of an idea for me need to be carried out and understood to a certain level away from such a public view. However it seems that the earlier you can open the working process for the idea, the faster it will develop and in more interesting directions.


At it’s height Farmville attracted 60 million players per month. This makes it the most played computer game in history, and not without good reason – I enjoyed playing it too. What continues to fascinate me beyond the appeal of the game itself is the worldview it presents regarding plants (and also domesticated animals) and food production in general. In order to appeal to such a wide range of players there have to be strict restrictions on how they treat issues such as death, disease and slaughter.

FarmVille creators Zynga explain how it works in a single slide

For example, horses are cultivated for the harvesting of their hair, when pigs are “100% ready” you get truffles. There is no death allowed anywhere, everyone is clearly vegetarian, there is never bad weather, crop failure or insect infestation. The game has come under some criticism for these and other issues. What I find interesting is that despite the restrictions on awkward issues, the logical conclusion of the way the game works leads to animals crammed in to the smallest area possible, and the winning strategy for plants is to create a vast monocultures of the most lucrative crop.

This clearly is “just a computer game” albeit one that 60 million people play regularly, but computer games can be used to create and explore worlds at the limits of our imagination – so what does it tell us if this is the way we need to portray the world for people to have fun? How does this happen? It the only way possible?

One aim for the Germination X project is to explore these questions.

Naked on Pluto vs Mozilla

We had some trouble following a submission of Naked on Pluto to the Mozilla Game On competition. Aymeric describes the full story here, and it looks like a case of satire mistaken as the real thing, but it’s just a shame that we needed to go public with a blog post before we received any replies from Mozilla to our numerous emails.


I also wanted to write something about FaceBook as so far we have had zero problems with them over Naked on Pluto, a FaceBook game designed to confront the concept of online social networks.

This could be for two reasons, firstly FaceBook could be a place that welcomes strange and awkward software art and games even if they are a bit critical and have an odd sense of humour (although evidently they can’t be as confrontational as the web2.0 suicide machine).

The other, much more likely possibility is that with the sheer number of applications and games they haven’t even noticed we exist – which in itself makes the space, if not free, slightly “loose”.

Clojure frustrations

One of the nice things about Clojure is that it comes with a huge set of data structures, all of which can be handled using normal Lisp commands. However things are not as simple as they first seem, and it’s a bit of a dark art as there is limited information online. I’ve just spent a day or so on a frustrating voyage of discovery, so I post this here in the hope of saving someone some time in the future.

Lisp generally allows you to read and write data very simply, there is no need to use a separate parser as you store information in lists – the same as the code, for which you already have a parser.

For example if you have a text file called data.txt containing ‘(“one” “two (“three” 4) 5) all you need to do is call (define d (load “data.txt”)) and it gets parsed for you from it’s text form: (first d) returns “one”. This is more efficient than using another kind of format such as XML which you’d need to run a separate chunk of code for.

One of the clojure data types I decided to use was StructMaps, which you define like this (defstruct mystructfieldone :fieldtwo :fieldthree) : and gets created like this:
(struct mystruct 1 2 “three”) => {:fieldone 1, :fieldtwo 2, :fieldthree “three”}

Clojure also comes with some handy io calls, so you can save the StructMap with (spit (struct mystruct 1 2 “three”) “data.txt”) and you get a file created containing {:fieldone 1, :fieldtwo 2, :fieldthree “three”}. This can be read back in simply by using (read-string (slurp “data.txt”)).

The catch is that the result of read-string is a different type to the object we saved:
(type (read-string (slurp “data.txt”))) => clojure.lang.PersistentArrayMap whereas: (type (struct mystruct 1 2 “three”)) => clojure.lang.PersistentStructMap. Presumably the reader interprets the curly braces as a different type. Annoying, but I then got reading about print-dup, which provides more serialisation information for recreating the data:

(print-dup (struct mystruct 1 2 “three”) *out*) => #=(clojure.lang.PersistentStructMap/create {:fieldone 1, :fieldtwo 2, :fieldthree “three”})nil

This seems to output code that should be able to recreate the StructMap. However, to actually write and read this from disk, we have to call it a bit differently:

(use ‘

(defn serialise [data-structure filename]
        ( filename)
        (binding [*print-dup* true] (prn data-structure))))

(defn deserialise [filename]
    (with-open [r ( ( filename))]
        (read r)))

At this point I was getting a bit frustrated, but felt I was close. Unfortunately, deserialising the file created – I got this message:

java.lang.IllegalArgumentException: No matching method found: create (NO_SOURCE_FILE:1)

Great, so the clojure.lang.PersistentStructMap/create doesn’t actually exist? More searching revealed that this is indeed the case, and is not going to be fixed in the short or medium term. Perhaps we can bump down a level and use some serialisation stuff from java – some googling provided these replacements:

(defn serialise [o filename]
    (with-open [outp (-> ( filename)]
        (.writeObject outp o)))

(defn deserialise [filename]
    (with-open [inp (-> ( filename)]
        (.readObject inp)))

These seem to do the trick: (type (deserialise “data.txt”)) => clojure.lang.PersistentStructMap. However data.txt is now a (relatively) large binary file, and not human readable. Not a showstopper, but all the same, not very Lisp like. I’ve been aware all this time that the documentation suggests using Records instead of StructMaps, so I assume these will work better – you create and use them in a similar way:

(defrecord myrecord [fieldone fieldtwo fieldthree])
(myrecord. 1 2 “three”) => #:user.myrecord{:fieldone 1, :fieldtwo 2, :fieldthree “three”}

However, they exhibit all the same problems as ArrayMaps when it comes to serialisation – and although they do work with the last method, they exhibit a further problem. If I change the definition of myrecord and then stream in the file, I get this: user.myrecord; local class incompatible: stream classdesc serialVersionUID = -791607609539721003, local class serialVersionUID = 4065564404893761810 (NO_SOURCE_FILE:1)

The problem here is that I need to be able to change my structures and then convert older saved data using versioning. I can do this with StructMaps as they are not statically typed, so I can write code to check them on load and modify them to the current version (this was used a lot on NoP to keep the game running all the time with the same data while changing the fundamental types). I think a lot of my problems stem from coming from Scheme, so I’m not really aware of the “Java way”.

The other approach is to just abandon looking for an existing solution and go back to writing per-object versioned serialisation/deserialisation parsing like I do in C++.

Germination X – the next steps

Lina and I have begun work on the next iteration of Germination X which will be more playable than the demos we’ve been working on up till now. We are developing the look and building some of the underlying technology we need for the Pixelache event in March, lots more of this to come, but I’ve begun using the Lirec wiki to start to organise and document things.

The first part I’m looking at is getting characters drawn on paper into a multiplayer game instantly using various computer vision algorithms. This will be used in of one of our workshops at Pixelache, but we also want to prototype characters quickly and easily ourselves. Something which was lacking with the first groworld games, and I tried to address during Naked on Pluto was the effectiveness of making games shapeable by everyone involved in a project. Programming time and effort spent on this kind of accessibility seems to buy you a lot more time throughout a project even if it’s not actually seen or used by players in the end.