an introducton to game programming with flash
TRANSCRIPT
An Introducton to Game Programming with Flash
4: Kinect
Kinect● Presented in 2009 (project Natal)
● Released in 2010
● The fastest-selling electronic gizmo of all tme● 8 million sold during first 60 days● 24 million sold so far*
● Over 120 games*
* Febuary 2013
Sensors
● RGB Camera● 640x480 px
● Depth sensors● IR● CMOS sensor● Automatc calibraton based on gameplay, furnitures etc.
● Mult-array microphone● Ambient noise suppression
Capabilites
● Full-body 3D moton capture● Tracking up to 6 people● 20 joints per player
● Facial recogniton
● Voice recogniton● Currently enabled in 11 countries
Drivers
● Kinect for Windows SDK● Windows● http://kinectforwindows.org/
● Open NI Framework● Windows● Mac● http://www.openni.org/● https://code.google.com/p/simple-openni/
AIR Kinect 2.0https://github.com/AS3NUI/airkinect-2-core
https://github.com/AS3NUI/airkinect-2-examples
Initalizaton & Settings
var kinect:Kinect = Kinect.getDevice();
var settings:KinectSettings = new KinectSettings(); settings.rgbEnabled = true; settings.skeletonEnabled = true; settings.skeletonSmoothing = 0.8; kinect.start(settings);
1
2
RGB Camera
var cameraBitmap:Bitmap = new Bitmap();addChild(cameraBitmap);
kinect.addEventListener(CameraImageEvent.RGB_IMAGE_UPDATE,
onCameraUpdate);
private function onCameraUpdate(event:CameraImageEvent): void { cameraBitmap.bitmapData = event.imageData; }
1
2
3
Skeleton Joint
kinect.addEventListener(UserEvent.USERS_ADDED, onUserAdded); private function onUserAdded(event:UserEvent):void {
var user:User = event.users[0];
var joint:SkeletonJoint = user.getJointByName(SkeletonJoint.HEAD);
var headPt:Point = joint.position.depthRelative; }
1
2
3
4
Jet&Giant
git clone git://github.com/krzysztof-o/epi-wdpg.git
Jet&Giant
Task 1Controlling Giant:● Giant's positon should be controlled using right hand
Task 2Shootng Giant:● Giant should shoot after rising one's hand