The book focuses mainly on practical aspects of game development, which are dedicated to the Windows Phone 8 platform. During the following chapters, a process of game creation is presented with the usage of many screenshots, listings of code, and detailed descriptions to make understanding of the content easier.

Currently, you have a configured development environment, consisting of the IDE and a set of emulators. You should also possess a developer account and a registered device. It means that everything required for beginning development is ready, and you can start creating the game! Its objective, screens, and architecture are described in this section.

The game contains an unlimited number of levels, but with consecutive ones the difficulty increases, which is visible by an increased speed and a higher number of asteroids. The user has a limited number of rockets, but can get more by achieving a specified number of points. By default, after every 100,000 points, an additional rocket is obtained by the user. When the rocket crashes with an asteroid, the rocket is broken, and the user needs to use another one. The game ends when the player runs out of rockets.

The game is named Space Aim 3D and its main objective is to steer the space rocket to reach the target planet. The user needs to rotate the phone to indicate a direction of the rocket to avoid asteroids. The game presents 3D graphics and displays a world from a perspective of the rocket, as shown in the following screenshot (on the right). On reaching the planet, a level number is increased. While the rocket passes asteroids, the user gets points.

Screens

The game uses a set of screens (also referred as pages) which can be opened only in a specific order. The screens are shown in the following figure as circles with names inside. They are connected through arrows presenting ways how the user can change the currently active screen. For instance, the player can navigate from the Menu screen to the Help one, and return in exactly the same way. The more complex example involves the Game page. In this case, the player can navigate from the Menu to Game, but returning is possible only through Pause or Result screens.

Pages are divided into the native and managed part. As presented in the previous figure, the Game, Pause, and Result screens are implemented using the native development approach. The rest of pages are included in the managed part of the project.

The main page is named Menu and is launched just after starting the application. From this screen, it is possible to run the game (after clicking on Play!), and navigate to Map, World, Ranks, Settings, Web, and Help pages, as shown in the following figure (on the left). The microphone icon will be used to start a process of navigating to another screen, based on the speech recognition result. A background of the page is prepared as an image representing space.

The Game page is shown while playing, and displays the game world from the perspective of the space rocket. The view includes asteroids and the target planet. By using 3D graphics, these objects are getting bigger while the rocket is coming closer. Some additional information (a number of the current level and remaining rockets, as well as a score) is displayed at the bottom, as presented in the preceding figure (on the right).

It is possible to pause the game while in play. In such a case, the additional screen (Pause) is displayed, as shown in the following figure (on the left). Then, the user can easily resume the game, restart it from the first level, as well as return to the main menu. As mentioned earlier, the game ends when the user runs out of rockets. In this case, a special screen, named Result, is presented. It contains information about the score and level, as well as buttons navigating to the main menu and restarting the game, as indicated in the following figure (on the right). What is more, the player can send the result, thus it can be taken into consideration while calculating the overall top scores.

Apart from the previously described screens, the application is equipped with a few other pages, including Map, which is presented in the following sketch (on the left). It shows the current location, as well as positions of other players in the vicinity using GPS data. The Map page also allows launching navigation to the last location of another player. GPS coordinates, together with player names, are processed by the dedicated web service located at an external server. By default, sending current location data is disabled, thus other players do not see your indicator on the map. However, when it is enabled, the current location of the player can be seen by anyone.

The World screen performs a similar role to the Map one. However, it presents data in the augmented reality, thus special indicators represent location of other players in the 3D world, as shown in the following figure (on the right). In the background, you can see the image from the camera. What is important, a size of indicator depends on a distance to the player, thus it is bigger while the player is closer. The World page supports launching navigation to another player, as well.

The Ranks screen is presented in the following figure (on the left) and shows the top scores from the game, divided into three categories:

Local - Only from the single device

Last 24h - Achieved by anyone, but with time limitation (24 hours)

Overall - Achieved by anyone, without time restrictions

Only the ten best results in each category are shown, with a player name and score. By default, all results are stored only locally. To send them to the global score, the player should click on the Send result button in the Result page.

The next screen, called Settings, makes it possible to adjust game preferences, divided into two groups, related to the user and to the game, as visible in the following figure (on the right). The first one allows you to specify the player name and open the website with the privacy policy.

The other is used to select a suitable music volume, enable or disable vibrations, as well as indicate whether sending the current GPS location is enabled.

The Web page supports operations regarding the social networks, as well as obtaining the last information from RSS feed, and opening the project website. On the left of the Web page, two groups are available (Facebook & Twitter and Rate), as presented in the following figure (on the left). The first one makes it possible to publish an update on the Facebook wall and tweet about the Space Aim 3D game. The other just allows the player to rate the game.

The last screen of the game (Help) is shown in the following figure (on the right), and contains some information about the game aim, steering, and contact details. They can be read by the user in case of any problem with the game or just after its installation. In the Contact group, the player can open the project website and its Facebook profile, as well as send an e-mail to the author.