It’s good to do something different.

Body v Bugs
Just back from Sheffield and KrebsFest for which I developed a simulation-like game where bugs multiply and phagocytes (aka white blood cells) attempt to eat them up. The action was projected large against the wall of the University’s Firth Court and actually controlled by the assembled masses waving red or green glow-sticks.

It certainly made a change to my usual projects.

A good bit was the simulation itself. I really enjoy creating simple rule sets for my game characters and just letting them make their own way within their environment and they don’t get much simpler than bacteria. I was using Unity to develop the game and it’s object orientated approach fitted nicely with the concept of independent cells. So I created a basic bacteria that could reproduce itself a limited number of times and provided a variable that dictated the rate of this reproduction. Once I set it up and ‘infected’ my screen it was fascinating to see the bacteria grow just as I’d always imagined they did, their number growing exponentially until they filled the screen and my machine slowed to a crawl. Excellent stuff.

Another interesting part of the project was the crowd input. I hadn’t done anything like this before and searching the internet it seemed that very few had. I found an old page summarising some techniques that proved it was possible but that was all. The original idea was to give out red or green LEDs to the audience but in the end we decided to use readily available glow-sticks instead.

The crowd was filmed with a reasonable quality, off-the-shelf, HD webcam and I processed the real time stream removing everything but the pixels associated with the glow-sticks. The number and flux of these pixels provided the input level. The red glow sticks increase the reproductive rate of the bacteria, the green increased the number and eating speed of the phagocytes. That was all I needed.

Compared with LEDs the light from glow-sticks is quite dirty, each stick emitting a lot of different frequencies whose distribution changes over time. What I checked for was a range of colour component ratios and whilst these ratios failed to hold in extremis, (a newly cracked stick would appear almost white), in practice they remained true. I’d hoped to produce a self-calibrating system but in the end I went the empirical route, taking snap-shots of the sticks with the webcam at various times and distances. From these I could work out the ratio ranges I needed.

To keep the simulation working at full speed I used one computer exclusively for the image processing and only transmitted the normalised results to the other machine running the game.

At the event we found that people actually picked more green sticks than red sticks, I don’t know why, but they did it consistently. Happily I’d put in place a calibration button that would simply balance the difference at the start of a session. I also had a couple of other (sneaky cheat) buttons that could increase either the red or green input just in case it all went to shit! Thankfully it didn’t.

The actual sessions were great fun, and whilst the game was only a small part of the overall festival, it was the one activity where families and friends could work together. The audience were fantastic and waved their glow-sticks with massive enthusiasm and believe me it gets quite tiring over 10 or so minutes.

The rain stayed off until the final few minutes of the last session and it seems everybody had an excellent time, not just myself.

Friday evening finished splendidly with fish, chips and beer across the road at the University Arms. I met some great people and must thank Simon Foster for suggesting I do it, Nate, Greg and Vanessa from Public Engagement, Steve Poole and his projector and Jo Boon for providing me food, water and shelter during my many stop-overs.

Cheers,
John

Share This:

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *