• No results found

10.4 Game Implementation

10.4.3 Implementation Phases

As mentioned before, the implementation was performed during a set of phases that built upon each other in order to implement the final prototype. This section describes the most important aspects and experiences during each of these phases that took place during the game development.

Phase One: Redesign Game Elements

In this phase the main goal was the redesign of some of the game elements in the game.

This was done due the feedback got from testing participants of the previous prototype and the recommendations gotten from Cyberlab about having better graphic elements with better and smoother animations.

Chapter 10. Game Prototype 73

Figure 10.15: a) First Prototype: Pistons were a single texture. B)Current Prototype: The pistons are composed of two parts.

The elements that were found to fall under this category were the pistons, the con-veyor band, and the item containers. The solution for this was separating each element into sub-elements in order to perform the animations in only those parts that required movement. With this it was possible to have a better control of the apparent speed of the conveyor band, and the movement of the pistons. An example of this design can be seen in Figure 10.15 in which it can be seen the contrast of the design of the piston in the first prototype and the current prototype.

Moreover, new functionality had to be added to the Arcade Mode in order to add more diversity of items that could be recycled, hence presenting an extra challenge and at the same time, communicate to the players that the different recycling wastes can be presented in many forms.

A problem detected in this phase was that the item containers were too unrealistic because the items seemed to go over them and suddenly disappear. I decided to manage the con-tainers in a fashion similar to the pistons and decompose them in two parts, the back and the front part of the container and made sure that during the animation of the items going through them, the back part was always behind the item and the front part over the item.

Phase Two: Messages, Localization and Sounds

The work performed in this phase of the development aimed for a better presentation of the session information and gameplay messages. Moreover, it was decided as well to in-clude the game statistics at the end of each session in the game over screen. It was as well decided that the introduction of sounds into the game should take place in order to present a more attractive game to the players.

In this phase I also discussed with Cyberlab the need to have the game in Norwegian be-cause it would be tested with young kids who could feel more comfortable with a game interface presented in their own language. The decision taken was to introduce localization into the game instead of just performing a translation of the game. This was done through the implementation of the Localization Subsystem and the modification of the configura-tion file, which this time would include a file for each desired language.

The most important experience in this phase for me was the localization of the game. It took a few hours to find all the strings in the game and put every one of them in a resource file. This is the most effective approach of managing strings and I would recommend doing

74 10.4. Game Implementation

this in future systems development.

Phase Three: From a Single to a Multiplayer Game

After discussing with Cyberlab the possibilities of making a game more engaging and mo-tivating, it was decided that it would fit to have a two player mode in the game. The first multiplayer game mode to be introduced was the cooperation mode in which the game would present a screen similar to the Arcade Mode but it would allow the input from two different players.

The decision of having a second player in the game caused that some aspects of the ar-chitecture and design had to be modified. For instance the KinectController module had to be able to detect the second player and decide that the player on the left would be the first player. Moreover, it was necessary to give each piston a controlling player in order to avoid having both players controlling all of them.

The main problem detected in this phase was that it was quite difficult to figure out which of the persons detected were the ones being tracked as players by the device. In order for this I had to refer to documentation of the Kinect SDK in order to realize that the players closest to the camera were the ones being tracked. Moreover, I had to analyze the code in a white box fashion in order to ensure that player one was always the player closets to the camera and on the left.

The main experiences here were related to developing game concepts that would make the cooperation mode more entertaining and not just a copy of the Arcade Mode but with two players. The decisions taken were the introduction of the randomize pistons and swap control concepts that would require the players to have better communication and react to the changes in the game.

Phase Four: Redesigning the Game Logic

This phase consisted in introducing a new game mode into the game, the Versus Mode.

This is a two player mode that requires having two sets of independent game elements that

Chapter 10. Game Prototype 75

would change according to the actions of the player controlling them.

The main challenge here was redesigning the architecture and transferring the ownership of gameplay elements from the screen to a player. This change created that the Player module became bigger and the screens smaller, it also made easier the management of the game logic by avoiding doing additional checks for deciding which player was the owner of a certain game element.

Figure 10.16: Gameplay during a Versus Mode session.

Due to the introduction of a second set of elements in the screen I also designed a series of methods imbued into the game elements controllers that would re-scale and re-position the elements in the screen.

Experiences left by this phase were that thanks to an iterative methodology it was possible to undertake such a big redesign that would have had bigger repercussions in a more rigid methodology such as waterfall.

Phase Five: Building a more Robust Kinect Interaction

The work performed in this phase was not too extensive but it was quite important in order to provide a better game experience. The work consisted in designing a game screen that would appear when Kinect was being used and at least one of the players in the game stopped being tracked by the Kinect device. The solution was the WaitingForPlayersS-creen which pauses the game and only restarts once the player or players are being tracked again correctly.

The experience in this phase is related to circumstances that were not thought of before-hand. In this case I detected the need for such a screen when I was testing the application and observed that the game crashed when one of the players went out of the range of vision of the Kinect device.

76 10.4. Game Implementation