Code Your Own Videogame: From CSPdWeek to CS For All

By Meg Clemens | 6/23/2017

Meg Clemens, @mbclemens, teaches math and computer science (CS) to grades 9 – 12 at Hugh C. Williams High School, @cantoncsd, in Canton, NY. She is a New York State Master Teacher, a National Board Certified Teacher in Adolescent and Young Adult Mathematics, and the author of four math books.

I am a math teacher with 26 years' experience teaching in a rural K-12 school district. Almost 15 years ago, in 2002, state budget cuts forced our school district to eliminate CS courses. It wasn't until 2016 when the state’s budget improved that I was once again able to teach CS. To prepare for the 2016-17 school year, I knew I needed updated professional development to teach CS again.

Sixteen years ago, I attended Teach Scheme at Brown University. I discovered that the same group was offering a CS curriculum, Bootstrap, which integrated math and CS. Coincidentally, I also found out that Infosys Foundation USA was underwriting CS Professional development at CSPd Week so I could travel to Colorado in July 2016 and attend for free. Since I had previously taught Scheme (a long time ago), I applied for Bootstrap: Reactive in July 2016 and was fortunate to attend.

CSPd Week was an immersive experience. I lived in the dorms at Colorado School of Mines, Golden, CO, with hundreds of other teachers and counselors from around the US taking different CS offerings. I learned all about Bootstrap: Algebra and how it can be integrated into a math class, giving all students a rigorous CS introduction. Bootstrap: Reactive is a full-blown CS class, and builds on that foundation.

At CSPdWeek, I made it a goal to eat meals with teachers that were not in my Bootstrap program so that I could talk with a wide variety of teachers about the other PD and courses being offered (I figured I might want to come back and learn more). I learned about AP CS Principles, the many ways to implement this course, and training available. I learned about Exploring CS and code.org and I joined Computer Science Teachers Association to stay current in CS education. I made new Facebook friends and followed new colleagues on Twitter and my CS network has been growing. Since I teach in a small rural HS, meeting new CS colleagues in person and then maintaining this network online has the best method for me.

For the 2016-17 school year, and based on what I learned at CSPdWeek, I offered a new CS course "Introduction to Computer Science: Games". This was a one semester class for grades 9– 12, no prerequisites required, that taught CS concepts and reinforced math concepts.

I adapted the program to merge both Bootstrap curriculums into a one semester standalone course for high school students of all abilities. This past year, I had ninth graders who took PreAlgebra alongside seniors who participated in the robotics club and plan to major in CS, as well as students in between who didn’t know what life might bring them but liked computers and thought CS might be important to their futures.

The culminating learning experience for each student was to design, code, and produce a video game. Students worked on the single player video game throughout the course, adding features to the game as they learn new concepts. Throughout the course, students used math ideas including order of operations, coordinates, domain, range, functions, and compositions of functions, distance formula, and Pythagorean Theorem in their game. Students also learned CS ideas starting with variables, conditionals, and going through to data structures. They developed test cases for every function, to not only test their code, but also to help them think through the algorithm with concrete examples before they wrote the function.

Students could choose their own theme, player, and background for their game along with a danger to avoid and a target to capture. Students coded in Pyret, a newly developed language to bridge students from languages like Scratch that use drag and drop blocks, to languages like Python, which are commonly used in introductory college CS courses. The Pyret development team was quick to answer any questions and take requests from my students for new features.

They presented their initial game to the class after ten weeks. The games were posted on the class website so their friends could play their game (and sign up for the course for next year). In the second ten weeks, students learned data structures so their game could be as interesting and complicated as they wanted. Students added levels with additional dangers, targets, backgrounds, and scoring rules. End of semester games were also presented to the class and posted on the website.

"Introduction to Computer Science: Games" was very successful, and all my students benefitted from the semester-long experience. Each student completed their own web-based video game and proudly told me of teaching their parents to play their games.

Bottom line: taking on teaching CS again through Bootstrap has been very exciting to me and not overwhelming thanks to CSPdWeek. I am pleased to share that in a couple of years, my high school plans to add a new CS course: AP CS Principles.