A mobile-device based serious gaming approach for teaching and learning Java programming

Most first year computer science students would find that learning object-oriented programming is hard. Serious games have ever been used as one approach to handle this problem. But most of them cannot be played with mobile devices. This obviously does not suit the era of mobile computing that intends to allow students to learn programming skills in anytime anywhere. To enhance mobile teaching and learning, a research project started over a year ago and aims to create a mobile device based serious gaming approach along with a serious game for enhancing mobile teaching and learning for Java programming. So far the project has completed a literature review for understanding existing work and identifying problems in this area, conducted a survey for eliciting students' requirements for mobile gaming approach, and then established a mobile-device based serious gaming approach with a developed prototype of the game. This paper introduces the project, presents its details and discusses its current results. It is expected that the presented project will be helpful and useful to bring more efficient approaches with new mobile games into teaching object-oriented programming and to enhance students' learning experiences.


INTRODUCTION
In the last few years usage of smartphones has rapidly increased and become more and more important to our daily life: check e-mails, surf in the Internet, chat with friends, play games, etc. Especially young students are using their smartphones as modern communication devices and for playing mobile games [1]. Since smartphones are mobile devices, they can be used in anytime anywhere, e.g. during idle times outside their university. In education, this means they also provide new opportunities for teaching and learning programming [2].
Our literature review (see Section 2) has found that existing programming learning approaches often use desktop computers and currently there is no approach provided for teaching and learning Java programming using smartphones, even though Java is one of the most popular object oriented programming language [3], [4] and often taught by universities for programming introduction.
A survey (see Section 3) conducted recently by us has explored the students' willing of having mobile games for learning Java programming with convenience. Both of the literature review and the survey encouraged us to set up a research project that aims to allow first year computer science students to learn Java during idle times by providing a mobile-device based serious gaming approach with a mobile game for teaching and learning Java programming. This includes identification of a suitable game scenario that would keep students motivated when learning object oriented concepts and the Java syntax with the game. The project also faces new challenges (e.g. small screen size, CPU power, etc.) for new mobile game development.
The first prototype (see Section 4) of the mobile game has been completed already so far to support the proposed mobile-device based serious gaming approach.
This paper is to present and discuss existing work in Section 2 and the survey in Section 3. The approach with a prototypical implementation will be introduced in Section 4. Current results of the project are discussed in section 5. Finally a conclusion and future work will be made and discussed in Section 6.

II. EXISTING WORK
Many programming teaching games have been already developed in recent years and some of them have already been tested successfully in classrooms (e.g. [5]- [7]). The authors categorize them into desktop game approaches, mobile device approaches and Java learning approaches, according to their specific focus.

A. Desktop game approaches
One of the first interactive programming learning games was Karel the robot [8] in the early 1980's. It provides a simple procedural programming language to control a robot on the screen. Jeroo [5] is similar to Karel the robot, but its object-oriented syntax is more close to C++ or Java, which allows an easier access to those languages. The NetLogo [9] framework was develop to teach undergraduate students object-oriented concepts with a simple syntax. As a feature, it provides a simple editor for creating its own levels. Alice [10] is a programming novice friendly language and does 978-1-4799-3922-0/14/$31.00 ©2014 IEEE have a puzzle piece based syntax, which is able to modify 3D objects in a 3D scene. Scratch [11] has similar features (code puzzle pieces), but it focuses on 2D objects. PlayLogo3D [12] game was developed for early programming education and is based on the LOGO programming language.

B. Mobile device approaches
E-Adventure [13] is an authoring tool for educational adventure games that supports desktop games and mobile games. Creators of games using the tool do not need knowledge in game development. This framework does not focus on learning programming. Any learning game can be produced using it. Nice-Game [14] is comparable to E-Adventure [13] and is a tool for educational content creation. Modern web techniques like HTML5 and CSS make it possible to play generated games using mobile device browsers. For example, E-Training DS [15] allows to design educational computer science games for mobile gaming devices. Instructors can choose a predefined set of minigames and adapt them for their own teaching purposes. As a special feature, a learning management system (e.g. Moodle) can be connected to each generated game to enable instructors or lecturers to design assessments and check students learning progress.

C. Java learning approaches
There have been games for Java learning using desktop computers. RoboCode [6] is played in the same way like Karel the robot [8]. RoboCode has a functionality that students can compete against each other. The project Code Spells [7] is a role-play game for teaching Java. Players move in a 3D world and have to solve missions with spells. These spells are expressed with Java. The role-play genre is also adapted by the Dream Coders [16] project where players are moving in a 2D world, which is incomplete in its game play. Through programming assignments players can improve playability and fun of the game. Another goal of this project is to provide a framework for adopting an existing assignment and integrate it into courses. Greenfoot [17] used a different approach by providing a framework and an environment to create simulation-like, interactive applications on a two-dimensional grid. Objects displayed on the plane can be browsed through a UML (Unified Modeling Language) class browser. Classes can be instantiated and displayed as game objects on the grid. However, the literature review has explored that the current serious games for learning Java were developed for non-mobile devices and cannot be played with mobile devices.

III. A SURVEY
In order to find out students' current problems and needs in learning Java programming, a survey was in particular conducted at the Stuttgart Media University in Germany this year with students who have already passed their Java introduction exam. The survey included two parts: (a) to find out how Java is currently taught and learned in classroom; (b) to know if and how students would use a mobile Java learning game to improve their Java programming skills.
More than 130 students have participated in the survey. The survey shows that 73% of them are male and 27% are female. 77% of them are in the age 21 -26. Over 51% of them are playing on their mobile devices up to five hours a week and 7% even play up to ten hours. 51% of them already had got experiences in programming before they started study with the university. 55% of the students said that they didn't have any problems with learning Java and reached a good mark in their Java exam. In contrary to this fact, the other 45% of the students had problems with learning Java in classrooms. When the participants were asked which learning activity were most useful for their learning, they ranked lab sessions on the top (46%), then helps from other students (41%), and finally online tutorials (33%). Regarding to the learning difficulty of learning object-oriented programming, more than 50% of the participants thought object oriented concepts most difficult to learn, then the logical flow (24%), then the problem domain understanding (25%). Regarding to how to learn Java in practice, the question allowed participants to choose more than one answer. Thus 69% of the participants chose 'learnt it alone' and 68% of them also chose 'by lab sessions'.
We asked our participants if they would have used a mobile Java learning game as an extension to their lab session if there existed one when they learnt Java. 40% answered yes, 40% answered 'I don't know' and the rest chose 'would have used it'. Nearly two thirds (62%) would use the game during idle times. 40% of the participants also said that they would use such a game at home. When students are asked how a Java learning game should look like, the opinions are half and half: 50% would like a game with a story world and 50% would like mini games. 79% of the participants thought practical exercises most important and 66% of them thought usability of the game also most important.
This survey has shown that nearly a half of them have had problems with learning Java in classrooms and students are willing to use their smartphones for learning Java programming at their own times.

IV. A MOBILE-DEVICE BASED SERIOUS GAMING APPROACH AND A MOBILE GAME PROTOTYPE
The finding of the literature review and the survey shows a lack of mobile games for teaching and learning Java programming and students would like to have such a game in their learning. Our research project has tackled this lack and tries to find a suitable game scenario that will be fun to play and also to impart programming knowledge to first year computer science students. It also has tried to build an approach with a mobile game for implementing the scenario. This game is not intending to replace existing lectures and lab sessions. Instead it will be an extension to them.
As theoretical foundation for our game we used D. Norman's "Dimensions of Instruction" [18] and the MDA approach [19] known from the game design theory. We want to engage students with a scenario that is suitable for our target group, motivating level design, a mobile optimized Java keyboard and the use of traditional game design elements like high scores and leader boards. Students will be able to check their effectiveness ("how much students learn" [18]) with an integrated code scoring function. As we see this new mobile approach as an extension to existing programming introduction methodologies, this is may be able to help to improve students' "depth of understanding" [18]. A subsequent user study will prove if our mobile approach is viable and helpful for first year computer science students. According to the MDA approach's aesthetics taxonomy [19] we wanted to create a game that has the following aesthetics goals: challenge (students have to code towers in the correct way), competition (compare each other with high scores and leader boards) and discovery (develop own solutions). Mechanics (components of the game) and dynamics (run-time behaviour of the game mechanics) of our game are described in the section below.
After talking to students and experts, the authors have selected a tower defense scenario for the approach and the mobile game as it is flexible enough to add suitable and short missions and also students have known it already. Figure 1 introduces a prototype of the game and its screens, which are explained in the following sub-sections.

A. Start screen
The start screen is used to start the game. It provides basic help functionalities and settings. It is planned to add a high score functionality to its next version so that students of a course can compare their games and scores with each other. This can motivate to solve all levels correctly.

B. Mission goals screen
The current goals to implement the tower are describe here. Students can also get hints to solve the level. For example, students have to implement a class where a simple tower is defined by Java code. In order to pass the level, they have to add and set default values to an integer and a string attribute.

C. Coding screen
This screen enables students to write their tower code on mobile phones. They will have the opportunity to check their code during writing, which is indicated by a red or respectively green button. Students can continue to the next screen only when the code has passed the check. A mobile optimized Java keyboard is provided on this screen that enables students to write their code word-by-word rather than character-by-character. The words displayed on the keyboard are the words only needed to solve the level.
The code check is divided into two phases (see figure 2): First, an integrated Java parser checks whether the syntax is correct. After that, the game checks if the entered code matches the current task. It is planned to integrate a better help system in the next version of the software, that is, if an error is found the game will provide more detailed help and possibly link to external learning resources on Internet.

D. Object instatiation screen
This screen allows students to instantiate the towers that have been written in the previous screen. A short introduction and help are shown when the screen is opened at the first time. The code would be checked, similarly to the previous screen, and analyzed with parameters. These parameters can be used e.g. to place towers on the game grid. An optimized mobile Java keyboard is also provided here.

E. Game screen
The game screen shows the enemy path, a grid and the instantiated towers. Enemies follow a track to an end point. When enemies cross the end point, the game is over. In order to prevent this, players have to place and code the towers cleverly. New towers can be added during playing the game. It will provide additional help functionality in this screen.

F. Level completed screen
This screen will be shown when a level was completed correctly. Only the achieved score is shown at the moment. This screen will be improved with a more advanced scoring system. For example, code quality and other factors will be rated separately.

V. DISCUSSION
The mobile-device based serious gaming approach and the implementation of a mobile game for the approach presented in the above section show the possibility of creating a mobile programming environment in which students can learn and improve their programming skills with Java. However, in order to make the game as a more useful tool for learning Java, several key points need to be considered.  The first important key point is level design, in particular, how a level should be designed in order to make it useful for learning Java. Some evidence could be found from the ACMs and IEEEs guidelines for teaching computer science [20]. Since the proposed game is optimized for mobile platforms, levels must be understandable and playable in a few minutes and not every existing tutorial is suitable for mobile learning. Therefore, it needs to consider how to make the Java code clearly arranged on small smartphone screens. During the level design, it also needs to use a limit amount of keywords so that a keyword can be mapped to a single button on a screen.
Another key point is game design in general. According to our initial user survey most students who attended a Java introduction course are aged between 21 and 26. This means that the design of the tower defense game must address the group of students under 30 years. It needs to be fun to play as well as useful for learning Java and object oriented concepts. In order to keep students motivated for using our proposed game for a whole term, it could be useful to add more interesting and useful things to the game (e.g. additional help functionality, a leader board to compare each other's success, an appropriate graphical representation, etc.).
In order to reach as many students as possible, the game needs to be portable to all relevant mobile platforms. Since each Java lecturer has its own style of teaching programming to their courses, an authoring tool for teaching contents is needed. This allows Java teachers to design their own levels, add additional materials for solving missions, and distribute these contents to their students automatically. A functionality for assessments as seen in [15] where lecturers are able to check students success should be also provided.

VI. CONCLUSION AND FUTURE WORK
This paper has introduced a research project that the authors attempt to enhance teaching and learning of Java programming using mobile devices. It has presented the results of the survey conducted with computer science students at the Stuttgart Media University, Germany, for this purpose. It then has discussed what the students want and expect from a mobile game for teaching and learning Java programming. It also has presented a mobile-device based serious gaming approach for teaching and learning Java programming and a prototype of a mobile game developed for the approach.
The next stage of the project is to test the prototype with students. Several user tests will be carried out for this: An AttrakDiff 2 [21] test will be done to measure students' user experience in terms of the games hedonistic and pragmatic qualities. Learning success will be tested by using a within subject user test with a multiple-choice questionnaire.
The project will develop at least three levels for the game, each of which will focus on one of specific Java topics such as data types, methods and inheritance will do this.
Then the project will develop and implement the authoring tool discussed in this paper for content creation and distribution. The tool will be tested by Java lecturers who will use the tool in their courses for evaluation and then for matching the tool with their specific needs for teaching Java.