All I Ever Needed to Know About Programming I Learned From Re-writing Classic Arcade Games Katrin Becker J. R. Parker Overview The Challenge of reaching students. „ What we usually do in 1st year. „ Games and Students „ Effective Learning „ Games and Pedagogy „ Why Arcade Games „ What can we teach with games? „ Dialing Down & Ramping Up „ FuturePlay 2005 2 The Challenge Enrollments in CS are down. „ Demand for CS professionals is changing. „ ‹ Need More breadth (applications, media). ‹ Outsourcing. How to fill demand for programmers? „ How to attract CS Majors? „ FuturePlay 2005 3 The Usual „ Typical progression: ‹ Uniform, incremental steps ‹ Mathematical sequencing of content ‹ Teach programming step-wise,  From little to big;  From simple (sorting lists)...to complex (sorting big lists)  From boring to…. FuturePlay 2005 Still boring 4 Games and Students CS students are gamers „ Games got many students interested in CS „ Students get games „ ‹ Usually better than “widgets” FuturePlay 2005 5 Effective learning happens when… Students care about the problems they need to solve „ Students understand the problems they need to solve „ We take prior learning into account (start from where the students are) „ FuturePlay 2005 6 Are Games all this? „ Students care about games „ Students understand how the games are supposed to work „ Prior knowledge for students includes games literacy. FuturePlay 2005 7 Games and Pedagogy „ Gameplay is tied to programming: ‹ Complex gameplay == complex (and more) algorithms „ Games are highly visual: ‹ On-screen behavior maps onto algorithms in-program ‹ We can watch the algorithms as they execute „ Program testing techniques are understood and accepted ‹ Game cheats ‹ Try it and see….(game attitude) FuturePlay 2005 8 But… „ Games are frivolous… ‹ Our goal is to implement the game, not just play it. „ Games are graphics intensive… ‹ This doesn’t need to be (enter, the arcade). „ Games are primarily event-driven, and that’s only one aspect of programming…. ‹ Most games can be modified to be turn-based. FuturePlay 2005 9 What’s So Special About Arcade Games? 1. Familiarity „ Build something they have actually used (How many freshman have managed enough employees to require a program to keep track of them?) Go from experiencing the magic.. to being the magician. FuturePlay 2005 10 What’s So Special About Arcade Games? 2. Age „ Built when computers were limited & effects were crude. „ „ „ Program complexity was low Graphics were simple Audio was insignificant (almost) FuturePlay 2005 11 What’s So Special About Arcade Games? 3. Lots of implementations exist. „ Working examples are useful when writing a new program. „ Is this a liability? What about cheating? „ Pick a 1st year programming problem for which no solution exists. Anywhere. Just try. FuturePlay 2005 12 So Many Concepts So Many Games Action Shooters Collision detection „ Distance calculations „ Asteroids! Missile Command Defender FuturePlay 2005 13 So Many Concepts So Many Games Maze Puzzles Path finding „ Chasing (tracking) „ 2D „ Pac-Man Ms. Pac-Man Centipede FuturePlay 2005 14 So Many Concepts So Many Games Puzzles 2D geometry „ Packing algorithms „ Win-state detection „ Condition checking „ Tetris Q*Bert FuturePlay 2005 15 So Many Concepts So Many Games Bouncing Real-time in a simple environment „ Collision detection „ Simple physics „ Blocks Breakout! Pong FuturePlay 2005 16 So Many Concepts So Many Games Side Scrollers / Level Games Physics „ Inventory & asset management „ AI „ Mario Bros. Donkey Kong Pitfall Joust FuturePlay 2005 17 So Many Concepts So Many Games Racing & Driving Physics „ AI „ Collision Detection „ Graphics „ User interfaces „ Audio Indy 500 „ …. Street Racer „ FuturePlay 2005 18 So Many Concepts So Many Games Text Based Parsing „ AI „ Zork FuturePlay 2005 19 Adding and Removing Complexity Ramping Up: Dialing Down: „ Can add to even simple games „ Can simplify (3D, real-time, full-color, sound,…) gameplay without „ Concentrate on one aspect – loosing appeal increase quality / complexity for „ Can do ASCII games greater challenge (graphics for „ Provide plug-ins for Donkey Kong; physics in driving tougher bits game; parsing in Zork) „ Staged (i.e. Csolution does this; Bsolution does this; and A-solution does that) FuturePlay 2005 20 Summary Classic Arcade Games are ideal: „ Complexity at a level novices can master. „ “Special Effects” (graphics, sound, etc.) demands are modest without having to change the original game. „ They are examples of programs with which most students are familiar. „ Many working examples exist and are freely available. „ Complexity and challenge can be easily adjusted to meet requirements for novices and experienced programmers alike. FuturePlay 2005 21 Thanks. FuturePlay 2005 22 Image credits „ „ „ „ „ „ „ „ „ „ „ Attaxx: http://www.pressibus.org/ataxx/gen/gbintro.html Breakout: http://freespace.virgin.net/james.handlon/earlygamingmemoriespart2.htm Q*Bert: http://www.gamespot.com Lunar Lander: http://gnm5.tripod.com/Lunar_lander.htm Joust: http://www.glitchnyc.com/cgi-bin/blosxom.cgi/technology/games/index.phblox Zork: Infocom, Inc. Zork I: The Great Underground Empire. Cambridge, MA: 1981. Street Racer: http://www.vgmuseum.com/pics5/streetracer.html Pitfall: http://www.geocities.com/xinet2004/segagenesis.htm VideoGameCritic.net (multiple images, especially Atari 2600 Games, and Intellivision) GameSpot MobyGames FuturePlay 2005 23