LEARNING OF THE OBJECT ORIENTED PARADIGM THROUGH INTERACTIVE VIDEO-GAMES DEVELOPMENT
D. Rodriguez-Losada, M. Hernando, R. Gonzalez, C. Platero, P. San Segundo, P.L. Castedo, L. Davila, S. Lopez
Universidad Politecnica de Madrid (SPAIN)
The Object Oriented Paradigm (OOP) is more than Object Oriented languages. Learning the syntax of a language as C++ or Java is a relatively easy task compared with the understanding of the principles of OO Modeling and Design (OOD), which require a high ability of abstract reasoning. Moreover, it is not enough to teach the artifacts of Computer Aided Software Engineering (CASE) as the Unified Modeling Language (UML) if those principles are not properly understood. We wanted to engage the students in a motivating framework, so both the principles of OOD are properly acquired and put in practice with CASE and programming tools.
We found the ideal framework in the development of videogames. Most students are familiar with (even attracted by) them. The existence of powerful yet simple 3D graphical libraries as OpenGL and the portable Window Manager (GLUT), makes very easy the development of quite attractive 3D applications, so the real effort can be done in the OOP. There are two types of games: those with physical simulations (first person shooters, car race, arcade games) and those with logical or reasoning (chess, 4 on a line, etc). Though the second type is interesting, physical systems can be more easily understood and modeled under OOP, because the software and design objects have an equivalent counterpart in the real world. Furthermore physical systems have the added benefit of involving kinematics, dynamics, math, and other disciplines very interesting for the engineering student.
At Universidad Politecnica de Madrid, we teach Industrial Informatics which covers both the topics of C++ programming and OOP, starting from a basic knowledge of C language. The subject is taught with 3 hours of C++ theory, 2 hours of OOP theory and 2 hours of practice per week, along a semester, plus a compulsory assignment to be accomplished by the students.
We decided to propose the development of a video-game to be carried out along the semester, by groups consisting of two students. Taking into account the required effort, we also decide to restructure the subject around this idea. The practical lessons have been completely modified, leading the student from one practical lesson to the next one in an incremental development of a typical arcade videogame: Pang, in which a player shoots to balls bouncing around the screen. Our focus is the OOP: the application is iteratively built following OOP principles: object creation and destruction, object interaction, relations between classes, GRASP and GOF software patterns, etc. CASE tools and UML are constantly used in this process, in order to support the ideas that motivate our final implementation. The theory and tutorial hours have been also affected: The tutorial time has highly increased, basically overwhelming our capacity. This fact also contributes to the actual understanding of the subject. The theory lessons find the support on the video-games development and practical lessons, making easier for the students to understand the abstract ideas explained in class.
We are convinced about the effectiveness of our approach. The motivation of the students has become clearly visible, both in the tutorial lessons and in the high quality of the developed games. The students’ grades have clearly improved, not only because of the contribution of the good grades of the game assignment, but also because the understanding of the concepts and the increase of hours dedicated to practical developments.