This Codemakers activity is an excellent chance for kids to get out of their seats and interacting with the technology they’ve created. Have them design games in Scratch that will require body movement recognition to control the sprite’s movements.
- Kinect2Scratch allows data from the Microsoft Kinect controller be sent to Scratch, the programming language for kids from the MIT Media Laboratory.
- This means that anyone can write programs with motion control, use gestures, make kinetic games and generally leap about having fun.
- Motion controlled programs can make computer access more accessible to those with limited fine-motor skills. Letting the user trigger events with big motions instead of keyboard and mouse clicks.
- Accessible or universal design is design that considers the needs of all users and builds products/places that support everyone. Great examples of universal design are: door levers vs door knobs, curb cuts in the sidewalk for wheelchairs and strollers (not just shopping carts), wide-grip can openers, and large buttoned remote controls.
Please note that this activity requires some time for setup, but become very quick to replicate on multiple computers. Leave yourself plenty of time for troubleshooting, but know that this is a very engaging, worthwhile activity.
- Ensure that all youth have access to Scratch (either online or offline) on their computers.
- Participants will work in small groups so no more than 10-15 computers are needed for this activity.
- Ensure that you are comfortable introducing youth to Scratch. Consider reviewing the following videos as a refresher:
- Download Kinect2Scratch software so your PC recognizes the Kinect device and will link it to scratch: http://scratch.saorog.com/blog.php/index.php/download-kinect2scratch/ (note you will need to complete a form before download)
- Purchase kinects, look for the older version at EB Games stores (buying the used model should only cost $30) so that you get the version with built in power adapter, otherwise you will need to purchase the new Xbox Kinects for 360 and an additional adapter from Microsoft to connect Xbox Kinect to your PC. The adapters can be purchased online for $60: http://www.microsoftstore.com/store/msca/en_CA/pdp/Kinect-Adapter-for-Windows/productID.308878000
- If you have a Kinect for Windows (with its own power adapter), please download and install the latest Microsoft Kinect Runtimebefore installing Kinect2Scratch: http://www.microsoft.com/en-us/kinectforwindowsdev/Downloads.aspx
- If you have a Kinect for XBox 360 (with separate power cord), please download and install the Microsoft Kinect SDK before installing Kinect2Scatch. If unsure, install the SDK: http://www.microsoft.com/en-us/kinectforwindows/develop/developer-downloads.aspx
- Run Kinect2Scratch and Scratch.
- Start a new project (if you weren't already using Scratch, it will probably be a new project already)
- Click on Sensing
- Right click on <Slide Sensor Value> Block
- Select 'enable remove sensor connections' (see fig 1)
- If you want 3D and 2 Player mode, click Configure Skeleton and tick them on
- Click Launch Kinect, wait for video to appear
- Click Connect to Scratch
- Adjust your Kinect so that you can easily stand in front of your Kinect
- Stand in front of your Kinect, it must see your whole body
- You need lots of room, clear your furniture away!
- Only one person at a time (later add another)
- No direct sunlight!
- If the left hand video shows your shape in red, it has detected you
- Now go back to Scratch and follow the next section
Programming Kinect in Scratch
Assuming you followed the steps above:
- Click Sensing
- In the < sensor value> block, click on the small down arrow beside slider
- If you see a long list of values like this: head_x HandRight_y etc. then it is working perfectly d. Now write this small program to test (fig 2): i. When Green Flag Clicked ii. Forever 1. Go to X: mouse x Y: mouse y
- Run the program and move your mouse around the stage
- Does the Cat follow the mouse?
- Now the Kinect bit, replace both the mouse x and mouse y sensor blocks with HandRight_x and HandRight_y sensor blocks (fig 3).
- Now run the program, stand in front of your Kinect and wave your hand
- Review the Big Ideas with the group. Ask them about how they can make games they’re familiar with easier to use by using their whole body instead of just their hands to click and type.
- It’s recommended that you have on computer projected at the front so participants can follow along with you as you build a game, for those that need development support.
- Provide youth with access to game design samples for those that need some inspiration. Otherwise challenge participants to design their own games. Samples are available at: http://scratch.saorog.com/samples.html
- Have youth tour through other groups Scratch Kinect stations to test and try what their peers built.
- This is a great activity to feature during Open House or mentor events as this is a highly interactive activity for both youth and adults alike.
- Share your stories and creations on Twitter using #Codemakers or @ActuaCanada.
Modifications and Extensions
- Prepare the room ahead for participants;
- Keep groups to a 3 person maximum (1 for right sensor, 1 for left sensor, and 1 for scratch design);
- Give campers at least 1 hour to build in scratch, and 1 hour to play with the kinect;
- Have some participants follow along with instructions that are projected on a screen.
- Give participants control over setup of their kinect.