My little girl loves playing with the XBox controller. In fact, she'll make a beeline for it as soon as she sees it and sit for ages twiddling the thumb-sticks and mashing the buttons. So I thought it'd be great to provide some visual accompaniment to the tactile experience of playing with the controller. Furthermore, I'd been looking for an excuse to play with Win2D as part of a UWP app and this felt like a perfect opportunity.
To this end, I cracked open Visual Studio, started a blank UWP app, added a nuget reference to Win2D and started coding. Using a CanvasAnimatedControl it was simple to use the Update callback to read the Gamepad input and then use the Draw callback to draw a series of sprites based on the values read.
All in, from not having used Win2D before, it took just a few hours to get a minimal app working with a variety of sprites and manipulation mechanisms. Flipping my XBox into developer mode allowed me to deploy the app directly to the Xbox and have a play. And I must say, I was very pleased with the result:
Lots of animals
Lots of colours
Big...
...or small
And monkeys!!!!
The real test came when I handed to the controller to my 14 month old baby girl. It took a few seconds for her to realise that what she did on the controller affected what was displayed on screen but then there was no stopping her. For three or four minutes (a record for her!!!) she sat still, mashing away on the controller and staring at the screen while I sat mesmerized by how quickly she picked it all up.
I'd call that a win!
Given this success, I made some final touches and submitted it to the store; specifically for XBox. To my amazement, it passed certification first time, within 24 hours of submission despite submitting it on a Sunday. And here it is:
Installing from the store and ready to entertain my little one whenever I need a break.