Archive | Dev part 2 RSS feed for this section

Making connections. On Twitter.

25 May

To people who stumble upon this blog or read it out of curriosity about my projects and thoughts, you might find this post a little odd and full of self grandure. This post is part of my degree requirements that say I need to act in a professional manner and seek out contacts in relevant fields etc.

With that in mind, heres some contacts I’ve started making!

Well, what I’ve actually done is start conversations on twitter and show off my work, hey, they tend to repost the stuff and get it seen by others too so, woo!

First off, I’d like to thank Ian Lobb, a talented flash game designer from the UK. He’s done some cool flash games for big names and currently co hosts the fantastic creative coding pod cast. What will I have to do to get mentioned on such a podcast? Who knows! But the first step is to get myself known to guys like him.

Well, that just prompted me to write a look back over the whole tech stuff behind my project. I think that these thoughts of why I did certain things and chose the tech I chose would be quite interesting to read anyway. So I wrote a rather lengthy post, I tried to keep it informal and a nice read, but it may have been too much for some.

Well look at that, Iain retweed me, great stuff! My blog got stormed that day, I had like 40 readers! Holy crap! Never had so many readers in one day on my blog. Interestingly, people stuck around for a day or two as well since I still had pretty high numbers the day after.

Gary ( is just showing off with the 300 he got when creative review tweeted about him.

Iain was even very nice and gave me some tips for the future.

I also got some mentions from older friends, the tech editor at activetuts.

I even started talking all tech with another dev who has dabbled in mind controlled flash:

So great! I’ve started to get noticed by some pretty awesome and well known flash devs. So what about work? Did I start contacting people about jobs?

Of course I did. I decided that I’d like to start developing flash games right now and do the more techy stuff as a hobby/side project type thing. So, with that in mind, I applied for jobs at a few places.

One of them being preloaded. They are a pretty awesome company. They dont just do flash games, they make iPhone apps, make installations and all sorts of crazy extra stuff. They are most well known right now for their flash games, they’ve won baftas for them.

I’m expecting to hear back from them soon in regards to an internship.

But thats not all!

I’ve applied to be a flash dev at Nitrome, a pixel art obssessed flash game studio. They are looking for a flash dev and also iphone devs, which is where I think my edge is.

The nice people on twitter told me so! So let’s see how that pans out.

There’s also the job that Lee lined up for me at Carbon Studios. This, however fantastic an opportunity, I don’t think is just right for me yet. They want a flash dev to handle all their work, and since I’m still quite unexperienced in studio flash dev, I would like to work with a team of devs so I can learn new stuff and pick up best practices rather than potentially be making a lot of industry mistakes and fumbling around by myself.

But wait! Theres more!

I’ve also applied to be a speaker at Flash on the Beach for 3 mins during what they call the “elevator pitch session” This is where they get 20 new comers and let them have three mins of stage time to talk about whatever they want. I’ve applied to show off my brainwave reading skills and to show people what can be done with the tech.

Hopefully I’ll get that, it’s sounding promising so far. I got a reply email with a positive response but I’ll have to wait till the end of June to find out about that one.

I’m pretty interested about being perceived as professional and I’d like to be known within the flash dev community for deving this kind of hardware + software crazy combo stuff. So being able to talk about it in a pretty large flash conference where people come from all over the world to hear people speak would be fantastic.

Loads of companies come to this event too, including preloaded!

So yeah, I’ve been trying pretty hard to get this project noticed by those who matter and trying to get myself a cool job. Will have to see what the future holds I guess.

neurosky’s mindwave – I have one now

24 May

Today I took deliverance of my very own Neurosky branded Mindwave.

An affordable brain wave reading headset.

It was super easy to set up too, I managed to get it up and running with the flash example within minutes. Great stuff. Weirdly, I noticed that acts exactly the same way as an arduino when you plug it in. You get a little message that pops up saying something about a network device when you plug in the dongle just like the ardunio, it accesses it in just the same way, and you even have to use a socket port to get information around your comp. Except this time, it comes nicely wrapped up in neuroskys GUI along with a nice little bit of software that helps auto connecting.

To stop it draining battery life, the headset will only connect when you are running an app thats trying to access it. The supplied software then connects the headset and disconnects it once the app is shut down. NICE! I like that, seems very handy to me.

The head set is lovely and comfortable and works exactly the same way in flash as my previous hack did.

Infact, the example code that came with it looked pretty much identical to my own code, proud moment for me there. I code brainwave flash apps like the pro’s.

I even got it up and running with my own game within minutes, I just had to slightly edit their example file to be accessed by my game in the way that I use it.

But it all works, and pretty damn well too, a lot easier than having that stupid buzzing box and messy port forwarders knocking about.

Interestingly, the online documentation for the mindwave for hooking up an arduino to it involves soldering directly to the usb dongle. Very hackerish! This company is all about the user made hacks, they clearly love the damn stuff, makes their stuff more popular I guess.

Because the headset is so nice and lovely looking, I’m quite skeptical about putting it in an arcade style game where I wont be around all the time.

I think that, for the pro evening, I’ll have the new headset there to use and on other days, I’ll sub it with the old tech. I don’t want to break my lovely new toy.

A technical perspective of developing Spaced Out

23 May

So, I’ve talked a lot on here about the whole process of Spaced Out, all the technical stuff is covered but it is dotted around in various places.

For those of you who are new to this blog/project and wondering what the hell I’m talking about, Spaced Out is a mind controlled arcade game that I made as part of my final project at university. It’s a game all about a giraffe in space who gains mind powers and has to battle his way home through various enemies including David Bowie.

The game is created using Adobe Flash, and for input I use a brain wave reading headset and a kinect. And this is how I did it.

In reflection, I developed four separate interface systems to control my game. One of course being mind control, that one was set up within the first few weeks, and I had it running, and running reliably which is something that I’m always keen on developing.

But the others? Well I only chose one of those in the end, the Kinect of course. But first of all I had other motion controls, both of them a bit ropey.

Let’s discuss.

Brainwave reading was an obvious first choice for me, it was something that would allow me to control flash games through the power of thought, and that’s just crazy, even now 9 months after I started this project. (9 months, holy crap. It’s just flown by). I can show this project off to people and they look at me like I’m actually using magic.

And that’s why I chose mind control. Who wouldn’t want to make a game where the go “Are you kidding me? What?!” when you tell them that you just have to THINK to control the game.

That was the simplest choice I had to make during the project.

It’s pretty straight forward in terms of its technology and implementation too actually.

I use a star wars force trainer, which I took apart and found some pins inside. I read up online and found out that you could hook a micro controller up to two of those pins and read serial data out from them. A little bit more digging and I found that someone had written up some code for the arduino so that it could read the serial data in through that micro controller. This was perfect for me, I like arduino’s and I know how to implement them with Flash and control things in real time.

To get the data from Aduino into Flash, I use Tinkerproxy, the mac version of serialProxy which is just a bit of java code that takes the data from arduino and sends it out on a local socket which you can then tap into with a bunch of programs, such as Flash.

I then use some pretty standard code for getting the data into flash.

private var arduinoSocket:Socket = new Socket(“localhost”,5331);

That’s how I set up a basic socket in as3, and then I split the incoming string to split up all the data which I store in an array so I can have the Concentration data, the Relaxation data and the Signal data all streaming from the headset.

var arduinoOutput:String = arduinoSocket.readUTFBytes(arduinoSocket.bytesAvailable);

output = arduinoOutput.split(“&”,4);

This code isn’t anything special, it’s just some basic AS3 socket code that can read incoming data from an Arduino. It’s the barebones type stuff that gets things up and running and working quickly.

NOTE: I have three items of incoming data, but I split my string up into 4 chunks. Why? To stop an annoying bug that was rendering my array useless a lot of the time.

When streaming data over sockets from arduino to flash, you tend to get an invisible character turning up every now and again, usually a carriage return or something like that. It’s just something little that can throw my whole game out of balance.

In my arduino code, I just add on an extra character, and then in flash split the string up into 4, this protects my first three data chunks from getting malformed by this bug. Annoying when it happens, but a relatively simple fix.

Now, that’s pretty much it for my brainwave reading dabbling, now I shall move onto an interface method which took up half of my total dev time. Head tracking.

This, on reflection was a silly mistake really, I’m not really sure why I spent so much time trying to get this to work instead of finding other methods.

What I did was mount IR LED’s on top of the brainwave reading headset. Then, by using a wiimote, I could track the players head position. They could then move their head side to side and rotate it to control a cursor on screen. This is old hat for us IMer’s, we’ve done motion controls with wiimotes before. When it came out and it was found to be hackable, of course we used it! Full on cheap motion controls for our installations. Brilliant.

Well, this method kind of worked, if you sat in the exact right place under the mounted wiimote(s). But even then, shift a bit out of place and the whole control mechanism goes out the window. That’s not cool.

But, I did learn how to make a wiimote to flash connection package that worked a hell of a lot better than wiiFlashServer. On mac, wiiFlashServer can spend ages not connecting your wiimotes to your mac, sometimes it just wont work at all. It’s really weird.

I found out about a neat little program called osculator. Now, this is for Mac only, but if you are a flash developer, with a mac, playing around with wiimotes, I’ll let you in on how I made instant connecting, wiimote powered flash games. It’s bloody marvelous.

What I did was create an osculator file that moves all the necessary data to the right place. It moves the data from the localhost port to 9000. This was a little tricky to set up, so if you want to use my files, you can. I’ve added all my files for connecting wiimotes to flash, including my AS3 code to github.—Wiimote

Thats the link right there, feel free to download it and maybe improve it, but it’s a nice little stand alone class that you can plug into your games and access instantly.

Right now, that code just deals with the IR sensor input from the wiimotes, but it can be easily adapted to use button clicks instead if you prefer.

The code uses FLOSC to get the data from OSC into flash and parse it correctly, my code takes the OSC stream and makes it more human friendly.

Anyway, that’s one of my more exciting moments in coding to date, developing that little system.

Back to wiimote head tracking. It became a little problematic as I found that people didn’t sit down the same as others. Also, I would have had to build a huge cabinet to hold everything in. Not fun for me, lots of hard work there.

So, after some time I decided not to bother with head tracking. I thought it was time to move onto something that I personally found quite exciting. Eye tracking.

Now, I had seen these projects where people had created really cheap ways of eye tracking, and I thought that with a little jiggery pokery, I could get that info into flash and control things with my eyes.

Well, I did.

I built myself a little eye tracking system based on the design from the guys over at the graffiti research lab and used their code as a base to start on.

They had built their code to track eyes with in Open Frameworks. And this was my first foray into the OF world. It’s confusing at first since if you don’t link up your files correctly, (theres lots of files, I dont know where any of them are) you can’t compile.

So after a long while trying to figure all that out, I finally got it to work, and then from there it was only a matter of time before I had it sending out the data in a flash compatible way. Didn’t take too long actually, someone had written an OF to Flash plugin for OF, all I had to do was send over the data that I needed, the X and Y co ordinates of your eye.

And I did, and I had a game that you controlled by looking at the screen. Cool ay!

Apparently not to anyone apart from me, others found it cumbersome and not very interesting or exciting. There was no magic, everyone could see exactly how it was done so it didn’t excite anyone.

Now the Kinect, that brought up all kinds of excitement.

I had the eye tracking running for about 2 weeks before I decided to ditch it. That’s just the kind of world I live in. So the kinect it is.

This was to be my final choice for input. This is the one that I would be exhibiting with. Luckily I had it up and running with my game in less than a day.

Now, to do so I used a program called TUIOKinect a little program by the makers of the reactable that detects hand sized blobs with the kinects camera and then broadcasts it over your computer in a TUIO friendly manner.

Luckily for me, there is so native AS3 TUIO code that can harness the power of blobs. After implementing that, I hand control over my game by waving my hands around.

This proved to be a much more intuitive interface than the previous two, which is good because at this point, I had run out of ideas to rely on.

People are also still wowed by the kinect, they can just put out their arm, and there it is, they are controlling stuff on screen. That’s pretty cool right?

I would talk more about the TUIO as3 client but I simply dont know much about it, I got it working by sheer luck really, It slots in my code and stores all instances of blobs on screen as an array which I can access and create cursors for everything in that array, which is what I did. I’m not sure what’s going on past that, I’m not much of a TUIO man, I’ve dabbled in it before, trying to see how it would work and I had never got it up and running before, it’s not exactly the easiest of things to get running to be honest. So, if you want to learn more, have a look at their site

And that’s how I went about creating four different interfaces for my game.

The game itself is quite a simple one, it’s my first steps into the flash gaming world, and now I know that I’ve made plenty of obvious coding mistakes while creating it, but hey, now I know what to do. I can code cleaner now and I’ve learned a lot about keeping your code manageable. All through my own proud mistakes.

The game is essentially a little tower defence type game, you have a bunch of enemies held in an array that get animated towards the left hand side of the screen. The enemies are generated based upon your meditation levels. If you are relaxing over a certain amount, an enemy gets generated. Simple stuff. But, as I found out while testing, this wont work for everyone, some people just dont relax, so as a fail safe, I added in an enemy that gets generated every 5 seconds or so to keep the game going.

Then, I use simple hit test structure with the cursor (generated by the kinect sensed hands) and the enemy. When that hit test is triggered, I also check to see if you are concentrating over a certain level, if you are, then the enemies explode!

so the in game process goes Point > Think > Explode.

Simple stuff in terms of gameplay, but’s it’s one that people enjoy due to the physical and mental aspects of the game rather than the exciting gameplay mechanics.

Hey, I taught myself how to make flash games while making all the rest of that stuff, what do you want from me?

being truly indie, I also drew all my own graphics which is fun. I love drawing so it’s nice when I get down to drawing and art again, I have a very distinct style of photos + vector outlines. It does mean that it takes me some time to do just one character since I draw them by hand first, but hey, to me it’s worth it to get that visual style. It fits in well with the whole surreal aspect of my game to. Handy that.

So yeah, learn to embrace the ports and sockets, because you can make some pretty fun stuff when you start streaming data all over the place. Get a wiimote and try it out yourself.


My mum says I make good games.

2 May

I got my mum to play my game and I watched from the side lines to see how she played it and how it worked with her.

I admit, I had to prod her along occasionally, but in my deffense, she had to take her hearing aid out to put on the hat and thus couldn’t hear any of the in game instructions.

Also,  she never ever plays games. So she didn’t really understand certain aspects of the game since she had no prior knowledge or frame of reference for certain things.


I took notes as she played and this is what I got from it:

  • Mum gets it after a little bit of confusion with the hat.
  • Mainly with putting it on, but that was always an issue, hence the new “about the hat” board
  • Slowly got better at the game, although I don’t think she quite knows what’s going on. (hearing issue, unable to comprehend story)
  • Problem with audio on videos again, sometimes it drops out for no reason at all.
  • Couldn’t get to grips with enter name screen, although she couldn’t really see the cursor much on my tiny laptop screen from a distance. Perhaps linked.
  • After two deaths, she finished the game and placed 4th on my highscore list.
It’s one of those things that when you know how to do it, you just want to keep doing it.
She got the hang of it in the end which was good. She seemed to enjoy the whole game experience and the kinect + hat interface was really intuitive for her. She picked that up with in seconds.
Only thing was she didn’t seem to quite get the concentration bit for a minute or so, but then on the second try she was a dab hand at the game and understood how to blow things up, so that’s positive I guess.
Considering my mum get’s scared when my dad moves icons around on her computers desktop, I think I’ve done well here.

Things to hand out

2 May

I felt that having just some postcards to hand out wouldn’t be much.

So, since I had a pack of “clear” sticker paper left over, I made a bunch of stickers! Now everyone can take a Mr Space Giraffe or a Bowie and stick them on their computer or wherever they so choose.

See? Totally clear labels.

Well anyway, it’s important to me to have stuff to give out.

On the proper stickers, they also have my web address on them, just as a little extra promotion.

I’ve made four of every character, so I’ve got a good stack, but it’ll be first come first served really and they can take whichever character(s) they want.

Who knows where they’ll end up?

Adding little touches to podiums.

2 May

I added the game logo to my main podium. I fel that it needed that little extra branding touch to finish it all off and keep it linked in with the game.

You can also see the green rug in place.

Putting the logo on the podium gave me a rather large headache.

First of all, I ordered some “clear” stickers so that I could print on them and then stick it on and it would look fabulous. But no, the stickers I received were far from clear. Infact when put on the gloss black surface, they came out looking like frosted glass. Not cool.

So, what I had to settle for, was cutting out each individual letter and sticking them on by hand. A huge pain in the neck that was.

After I stuck them on, I realised that I had the S and the O on upside down, whoops.

But in the end, I think that it looks just the business. It looks like something you’d find in a museum I think. Along with the hat on the manikin head and the info board, I think I’ve got some cool stuff lined up for this grad show.

Men in Hats.

27 Apr

As my old giraffe hat was tired, too small, and wasn’t very pretty, I enlisted the help of my begrudging mother to help me make a new, fantastic giraffe hat.

My mum wasn’t impressed with this request.

Nevertheless, we pressed on.

I got some lovely fake fur online that sold fur in packs of two, one sheet brown, one sheet white. Not sure what I’m going to do with the white fur yet, perhaps make a fantastic winter cape with fur trimming.

The style for the new hat would be a direct copy of the old one, just everything would be bigger to address the main issue I found with the hat. It just didn’t fit anyone correctly.

With the old hat, when you put it on it never really covered the back of your head. It just kind of sat on top of your head looking like it was about to fall off.

I mean just look at adam wearing it, see how it barely fits his head? Now Adam doesn’t have an unusually large head, so this was a problem to me.

And it also became apparent that just about anyone who tried to put it on found it difficult to do so with the constraining nature of the old hat.

So, my mum, myself and my dad sat around cutting up fur and making each pannel from the old hat about an inch bigger on all sides. This seemed to work a treat and it all came together nicely.

To fit the headset inside, there are some simple tabs with velcro on them holding it in so it can be taken out easily if needed. The new hat also accomodates the headset more, having the fact that its main purpose is to hide the headset in mind when designing the gat this time.

Look at it now!

Under that hat, I am wearing the headset, and no one would know! Fantastic.

It does exactly the job I set out for it to do. Plus, it looks more like a giraffe this time. Vaguely. In the rough area of the zoo which holds giraffes.

Plus, you dont look at all foolish while wearing it, bonus.

Here’s a side by side of the old hat vs the new hat.

Quite a remarked change there. Mainly the horns, the horns are big now. That’s entirely on purpose, the old ones were tiny and stopped it looking more like a giraffe, now the are bloomin’ huuuuuge!

Then I got to thinking, how are people gonna know how to put on the hat and the contacts and everything. I mean, without me standing there explaining. I know, a visual sign!

I knew just the look I had in mind, a cut away diagram.

With the help of google, I found one that really gave me a visual style to homage.

I’m not entirely sure what’s going on here, but I just like the way that white band is used to signify a cutaway. It’s a nice little visual clue that suggests something is beneath the surface.

Also, there are images like this which are nice little illustrated diagrams. They look like instruction manuals and are very clear about what’s going on in the diagram. Also, numbering and lettering things for a more detailed explanation is nice.

So here’s my attempt.

I think it does a good job of looking visually interesting whilst also being informative.

I just needed to get across where the three contacts go, and that they must not be touching hair to work.

I think that pretty much covers it in that nice little diagram there dont you?

This will be on display next to the hat, instructing people how to wear it.

I will also have a little card saying “put on the hat” or some variety, just so its clear that the hat is there for people to wear it, not just look pretty.