Learning to Fly
This morning was different than other mornings. On an ordinary morning, we come in and Ned gives a lecture on the thing we probably read about the night before, performs a demo of how to use the new technology, and then outlines the direction for the app we are expected to build, but this was no ordinary morning. Instead, he just made a brief announcement in which he told us that he thought we were ready to do more of the research on our own, and we should practice figuring things out from the documentation since being good at doing so would give us a lot of power in the future. He said, make a Labyrinth style game where you use the device's motion detection to allow a person's movement of the phone to animate a ball into a hole. Put up walls to form a maze and figure out how to mathematically handle collision detection if it runs into those walls.
I mean, my pair partner and I looked at each other and then at the documentation and then at each other and just kind of gaped a little, not really having any idea how we were going to pull this off, but we kind of had no choice but to just start. We'd hardly even heard of CoreMotion (the library we had to use) let alone used it or read about it. Luckily, as Ned pointed out when he was walking around, CMMotionManager was a lot like the LocationManager we had already gotten comfortable using, so within an hour or two we had a ball rolling in response to your tilt of the screen and staying within the frame of the device.
After some technical difficulties, we got a little fancy and swapped the ball out for a weird black bird so he could land upon a stick instead of running into a wall. Essentially, we used the MotionManager to get data every 1/60 if a second to tell us how the phone was oriented in space, then took the data it returned to us about the roll, pitch and yaw of the device, and used it to change the animation's direction of motion. The hardest part for a lot of us was getting down our collision detection strategy, how to find out when the bird touched the wall, and what should it do once it touches it. It took us for a walk down geometry-memory lane, and we left at the end of the day with progress to be proud of.
Tomorrow we're going to explore the use of the GameKit library to allow you to play the game with two players at a time using a session that is instantiated via bluetooth or wifi. The tension's starting to rise a little more again as the countdown gets louder and closer: FOUR more days of regular lecture and assigned projects. Then it's off to make our own projects for the remaining two weeks. 18 days total until the end when we get released into the wild. We're all going to be amazed to see what could possibly come out of this. 2 more weeks and then it's HELLO WORLD.









