Learning is a game. At least it can be at Mobile Makers. During Week Two, students worked together to build Pong, the classic—we’re talking 1970s—Atari game that pits a small square ball against a ferocious rectangular paddle. Okay, not as exciting as today’s highly designed games, but it presented plenty of learning opportunities for our Makers. And it led to some exciting results in the subsequent weekend challenge to build the next-gen game, Breakout.
Here’s how student Andrew Webb described the weekend challenge in his blog:
"Breakout. If you’re unfamiliar, it’s a very fitting project because the original game was first coded by Steves Wozniak and Jobs. It’s a simple little game that even if you didn’t recognize by name, you’ll recognize by looking at it:
"The premise—and, indeed, the code—is exceedingly derivative of that of Pong, but it has the potential to go deeper, adding lives, different level configurations, different “hardness” to the blocks, power ups, traps, increasing speed, and more. I remember playing for hours on end as a kid on our family Macintosh PowerPC."
Students are given weekend projects throughout the iOS bootcamp, where they're challenged to build a minimal viable product (MVP), and then they’re given stretch goals, such as making the ball change color when it strikes the bounce wall. Accomplishing that much is sufficient for each Maker’s progress, but a few students added their own stretch goals, even building other games that built off the core assignment.
Take a look at how some of our Makers went beyond the assignment.
Following the weekend’s work, Kagan Riedel took the driver’s seat to demonstrate his Breakout solution and talk through his code. (Read about Kagan’s first 10 days here.) Building on the MVP, Kagan added a row of blocks for the ball to knock out, with more rows building as the level increased, and he made the ball change colors randomly with each bounce. What really wowed the group, though, was that he added color randomization to the paddle and to the rows of blocks as well as to the ball, so they were all constantly changing colors throughout the game, giving it a bright and vibrant texture.
Other students were inspired to build more complex games, too.
A published author, Steve Compton has a master of liberal arts from the University of Chicago and a master of arts in literature from Northwestern University, but he is just evolving into coding. Steve said arriving at Space Invaders was a natural evolution, too.
"I thought the bouncing action in Breakout was kind of boring, and that it would be fun to be able to shoot, so I put in the shooting property. When I was playing it, I saw a resonance with Space Invaders, and I tried to not build Space Invaders. I had the targets moving side to side but they went off the screen, so you couldn’t eliminate them, which is the point of the game.
"I started improvising and realized this was probably the same process that whoever made Space Invaders went through—from Pong to Breakout, then shooting, then realizing that the only remaining action was for the objects to move down the field, and you either eliminate them and win, or they reach you and you die. So I did end up building Space Invaders!
"I’m learning stuff every day, but this was the first day we worked with visuals and games. I spent three days coding these games, and that was fun for me, moving from abstract coding to playing."
Andrew Webb, who has a passion for gaming and game development, set his Breakout game in the Mario universe.
Although he was an English major at Colgate University, he was offered the role of graphic designer at Coyote Logistics and eventually became a freelance designer. “But I didn’t like that I was spending 85 percent of my time client-scouting and getting payments, and only 15 percent actually working.” So he took a job as chief puppy cuddler at the Bow Wow Lounge, a boarding center for Chicago dogs. "That was fantastic,” he said, "but it was not a long-term solution."
"A big reason I wanted to move in to the mobile app market is that I’ll be making my own programs, and the App Store does a lot of the marketing and all of the billing for me.” His goal is to work at a dev shop, building his own gaming apps on the side.
“The challenge made me nostalgic for other classic games, but I didn’t recall the art and sounds from Breakout; they were simplistic. Mario was iconic in that way, so I chose it."
"I learned a whole lot this time around,” he wrote in his blog post. "I have embedded fonts, sound effects, music, and images, to the tune of 39 supporting files. And it’s beautiful, and it works.”
By copying graphics and music from Mario games and embedding these media assets in his app, Andrew took the challenge beyond the stretch assignments. Of course, none of these apps are intended for the App Store, they’re simply practice apps for building skills; students know that they need to license or create their own graphics for the “real” thing. But Andrew found that, "with code nearly identical to a lot of others in the class, my product looks a lot more finished. I don’t mean that to be boastful—it impressed even me, coming from a design background, that using professional-quality media makes a big difference. The biggest thing I learned was that functionality and appearance are both important in the end-user experience."
Arriving from Vienna, Austria with considerable experience as a software engineer, Josef Hilbert also went beyond the stretch challenge. “In Breakout, the angle that the ball bounces is based on a rectangle striking another rectangle. I wanted to explore making a game where a round ball struck a curved surface, and I thought of a pinball machine.”
Josef’s father had a pinball machine, so he already had a good understanding about what the app should feel like. Unlike in Breakout, where the ball will continue moving forever, gravity is part of the ball’s movement in pinball. So Josef turned to SpriteKit. “Don (chief facilitator Don Bora) explained that SpriteKit uses the same UI dynamics that we had been implementing in Breakout, and that it’s the state-of-the-art engine for writing games for iOS 7, including the physics engine that defines an object’s hardness, gravity and acceleration.”
Searching the Internet is an important skill for an iOS developer, which proved true for Josef. One of the difficulties he encountered was how to know where the physical bodies are on the screen, as you’re coding, and he found a SpriteKit physics-body debugger that enabled him to pinpoint where the objects appeared. “That helped me implement it much more quickly, not only for the position of the ball, but it was important for the paddle locations and the lane for launching the ball, too.” In fact, he built the app in just one day.
The importance of the bootcamp, he said, is that it familiarizes him with the available frameworks and capabilities of iOS. “In the end, it’s all about making good decisions along a path, and being able to implement things or to know if I need to take another route. Knowing that will set me up for successful projects in the future. At this stage, it’s all fun for me.”
Read More About The iOS Bootcamp:
Want to build cool, complex apps? Get the whole story here.