POSTED 07.11.2011 @ 18:16

Tanks Alot!

The Kinect. A Christmas present I have had for months and never had the living space to utilise it. Damn American living rooms. Yes, the latest happenings of the Gameplay module is to hook up Kinect hand tracking to our previously created tanks, controlling and firing our way to victory. It uses a very dirty method of bringing in data from Kinect into Processing… into a Text Document! This text Document is then read by a custom written class which interprets the X/Y position of the users hands into something we can utilise on the game. As there was only 6 Kinect devices in the session we got into groups and devised a set of control schemes which allowed us to control the tank as effeciently as possible. 20 IF statements later we were doing different hand gestures to accelerate, decelerate, steer and fire our tank. I wouldnt ever advise this control scheme for a game of this calibre, but it was really awesome to see how you can hack hardware peripherals such as the Kinect into Flash and control our creations.

So, my tank didnt quite look like the picture above, it pretty much looks like last weeks tank except a different control scheme. Hmmph. I’d post an actual picture but there is no real point! The session the week after however was pretty exciting. AI is an area I would like to dabble in more, and this weeks session allowed me to do exactly that. Our task was to create another Tank on the stage which was controlled by the computer. Sounds difficult right? Nah. It’s not. Making it actually think clever is a whole new kettle of fish though. Coded into the tank was a ping/radar service which allowed the tank to scan around it and find near opponents. My tank basically applies a hassle strategy where it finds the target, and if the target is too far away it chases after them. If the target gets too close for comfort and to be caught in crossfire, the tank reverses away from the subject, whilst still aiming and shooting at them as much as possible. Next week we get to bring in our tanks and hopefully pitch them up against one another, I was going to be really cheeky and extend the tank class to include rockets, laser beams, shields and other things but then… you get the idea.

Watch this space and I will hopefully be able to present this to you in the next blog post.