Games as a “Flavor” for CS1
http://research.microsoft.com/en-us/collaboration/papers/games_as_a_flavor_of_cs1.doc
by:
Jessica D. Bayliss
Rochester Institute of Technology
Sean Strout
Rochester Institute of Technology
Bayliss and Strout developed a cohesive CS1 course that provides traditional outcomes from within the context of games as an application area in both the lecture and lab components of the course.
This paper gave details concerning the course setup and the students that were selected to participate in this study. They allowed only beginning programming students and chose across all gender and ethnic minority lines. They had a good sample to conduct the study. The course was conducted over a summer semester (10 weeks) as a distance education course. In addition, the course was free and no credit hours were given. However, a placement test was given at the end of the course and if students passed this placement test, they would move to a CS2 course level in the fall at Rochester Institute of Technology. That would open 3-credit hours to another CS course in which the student may be interested.
Of course, like any other college, several students dropped out for a variety of reasons. Those that remained ended up with great rapport with their fellow students. The study began with 43 students and ended up with 37 at the end of the study. Feel free to read the study on the sample of students that took this introductory course.
I’d like to focus this blog entry on the elements that were introduced and the results of the use of games to introduce programming concepts.
The Course Elements
According to the authors, “Introductory programming sequences teach the core concepts of the computer science discipline: object-oriented programming, software engineering, data structures, and algorithms.”
Our introductory classes at SFC don’t go into this much material in this one course, however, I wanted to see what the results of this research indicated.
The authors chose games because games cut across cultural, racial, and gender boundaries.
In addition, the authors indicated that “in order to avoid the common split between the content of lectures and labs, we chose to integrate game material into both our labs and the lectures while still meeting traditional CS1 outcomes using Java as an introductory programming language. “
The authors did note that, “There is a large body of research supporting the idea students in a cohesive social group are more likely to succeed. The implication for using games as an application area in CS1 is that the course may attract those with similar interests outside of Computer Science. This in turn can foster greater success.”
SUGGESTIONS FOR COMBINING GAMES WITH CS1
The authors declared that, “The visual nature of games is convenient for instructors, as it is fairly easy to see how a particular syntactical construct may be used in a game and logical program errors may show up as amusing visual errors. As a simple example, students were very amused when their grid-based game characters started randomly jumping through walls due to incorrect programming of the character movement routine.”
Topics covered in CS1 Study at Rochester Institute of Technology:
Software engineering - game developers often operate under very harsh ship deadlines since most games must be released before Christmas in order to generate appropriate revenues. Game developers may go into “crunch time” shortly before the game is to be released and sometimes use agile development techniques such as pair programming in order to limit the number of bugs introduced into the end product during crunch time.
Ethics –
a) whether or not massively multiplayer games are addictive in a similar manner to gambling and what developers can do for those who play games too often.
b) individuals hack multiplayer games in order to gain unfair advantages over opponents and occasionally source code is stolen and distributed on-line.
c) certain game companies force their employees to remain in crunch time (sometimes working as many as 80 hours a week) when not close to ship dates. This has led the International Game Developers Association (IGDA) to issue a white paper that calls for a greater quality of life for game developers.
Programming - present a sampling of ideas from games that can be used within the context of a CS1 course.
a) Expressions: Role-playing games and collectible card games often involve complicated combat systems. They range from simply rolling one 10-sided die to determine damage to a player character to full blown combat systems that take character level, strength, agility, etc. into account.
b) Modulus: One can use the modulus operator wherever there is a repeated sequence that should repeat every n game clock ticks. Our favorite example has to do with a line of identical horses that all swish their tails in a metronome fashion at the same time. Prime numbers are better if horses should swish their tails fairly independently, since the tails will align at the least common multiples of two horses.
c) Conditionals: Game logic in many games consists of hierarchies of finite state machines. This is because state machines are easy to create and easy to test. Interactive fiction is a good example of a game concept that almost entirely relies on large numbers of conditional statements.
d) Iteration: A game loop keeps the game running in a cycle waiting for user input until the user wants to quit the game.
e) Arrays: Any 2D grid game works very well in studying arrays. As an additional feature, lots of loop practice is easy to fit in while studying arrays. Games with multiple players and/or opponents work well for arrays and can motivate the use of other linear data structures.
f) Objects, classes, and inheritance: Game characters are often inherited from an entity class that includes all kinds of character and game world objects
g) Efficiency: Many games need to distribute the load caused by multiple characters within a small distance from each other that are all trying to move and perform other functions. Given the shear size of many modern games, there are a lot of trade-offs in size and memory and game developers are very careful with how they use data structures.
With the exception of one student, those who made it to the end of the summer class ended up passing the placement exam and moved into CS2 the following fall semester. Many became friends and wanted to be roommates in the dorms the following school year. They did end up forming a cohesive bond with each other as the authors suggested at the beginning of this study.
The results did indicate that not all of our introductory courses should be taught with games as an application area – some people do not like games. Their campus was large enough that they could offer 2 different formats to the CS1 course, but many schools do not have that luxury.
However, the authors did indicate that, “the study has shown that a large percentage of students like learning about introductory programming concepts within the context of computer games.”
My conclusion:
I found this insight from the authors to be very thought-provoking. Our introduction to programming course is not quite as labor intensive as this study suggested. However, I can easily pick and choose the topics that are relevant to our curriculum and try out some of these ideas for games to introduce a programming concept.
I was curious about the use of prime numbers to have horse tails swish independently. What a curious thought! However, it appears that one would need a 3-D interactive program. Are we back to Alice? I just can’t see it happening to our curriculum.
Currently, COP1000 is a dual course in that UF and other universities will accept this course as a CS1 course in their curriculum so it’s imperative that the subject matter we teach is relevant AND the programming language we use is relevant. We currently use C++ and we teach the basic constructs as well as some data structures. I believe that as long as we stay in the C-based language area (C, C++, C#, Java, etc…) this course will transfer easily.
Alas, my quest continues to find the “perfect” environment, along with the “perfect” language and to find the answer about using games to introduce these “perfects” to attract students our CS curriculum.
Any ideas or suggestions would be appreciated.
Sunday, March 29, 2009
Subscribe to:
Post Comments (Atom)
Debbie,
ReplyDeleteI am finding myself living vicariously through you and your quest to find the perfect language and environment for teaching programming. I think one of the challenges is the bifurcation of programming logic and visual output--along with the premium that so many students today place on visual aspect of computer programs.
Remember when computer graphics consisted largely of what we could do with ASCII characters in a program? In my personal experience, it was much easier to learn programming when it was about developing text-based software. My first games were text-adventures, and I loved building my parsers to take and "understand" player input.
(I still remember that Infocom ad which was "We display our graphics where the sun don't shine," and there was a picture of the human brain.)
- Hap Aziz
Debbie,
ReplyDeleteI liked that there was so much social and interactive skills invloved between the students. This is an excellent example of an effective way to integrate these skills within teaching programming through games.
Kelly