Book Image

Windows Phone 8 Game Development

By : Marcin Jamro
Book Image

Windows Phone 8 Game Development

By: Marcin Jamro

Overview of this book

<p>Currently almost everyone has a mobile phone that is used not only for calling, texting, and browsing the Internet, but also as an entertainment and social platform. Developers can create advanced 3D games with outstanding functionality that allow the player to enjoy the game directly on the mobile phone and cooperate with other players via the Internet!<br /><br />Windows Phone 8 Game Development is a practical, hands-on guide that will show you how to create a 3D game for the Windows Phone 8 platform. From setting up the environment to publishing your game, you will first learn how to implement 3D and 2D graphics with Direct3D, XAML, C++, and C#. We will then look at the game logic, steering with sensors, detecting collisions, as well as using maps, geolocation, augmented reality, social networks, and web services to share data between players. Featuring many code examples, images, and diagrams you should find the content both engaging and easy to understand.</p>
Table of Contents (22 chapters)
Windows Phone 8 Game Development
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Preface
Index

First steps


The developers use various IDEs (Integrated Development Environments) for software creation, depending on programming languages, technologies, the number of people participating in the project, integration with source control management systems, and even continuous integration servers. Many different languages and technologies result in several IDEs being currently available for developers. Apart from IDEs, some additional tools (such as emulators, profilers, or configuration managers) are useful during development and can help to remove possible errors from the software.

Software Development Kit

For programming applications and games for the Windows Phone 8 platform, a specialized SDK (Software Development Kit) is available. It is called Windows Phone SDK 8.0 and contains several tools that form a complete environment for mobile development, including:

  • IDE—Microsoft Visual Studio Express 2012 for Windows Phone

  • Emulators for the Windows Phone 7 and 8 platforms

  • Many useful applications, for example, for registering the phone

  • SDKs for additional technologies

To install the SDK, you need to download the installer from the site http://www.microsoft.com/download/details.aspx?id=35471. To use the IDE, together with emulators, the PC has to run under the 64-bit Windows 8 operating system in Professional edition or greater, with the Hyper-V enabled. What is more, the processor has to support the hardware-assisted virtualization, the Second Level Address Translation (SLAT), and the hardware-based Data Execution Prevention (DEP). More details and additional requirements are presented at http://msdn.microsoft.com/library/ff626524.

Integrated Development Environment

Windows Phone 8 applications can be developed using various versions of Microsoft Visual Studio 2012 IDE, including:

  • Ultimate, Premium, and Professional—supporting a lot of features useful during creation of projects combining various technologies

  • Express versions—dedicated to a specific technology and containing a limited subset of features (in comparison with the versions mentioned earlier)

For creating the game described in this book, the Microsoft Visual Studio Express 2012 for Windows Phone is used. It is available for free, and often is sufficient for development of simple projects. After SDK installation, a shortcut to the IDE should be available in the Start menu.

Tip

If you already have another version of Microsoft Visual Studio 2012 (for example, the Ultimate one), you can also use it to create applications for Windows Phone 8. During installation of the Windows Phone SDK 8.0, some add-ons will be configured automatically.

The Microsoft Visual Studio Express 2012 for Windows Phone has to be registered online. A suitable website is opened after selecting the Register Product option from the Help menu. You need to log in to the Microsoft account and then fill an online form. Then, the product key is generated and shown on the website, as well as sent to the e-mail address. After pasting it to the window in the IDE, the software should be successfully registered and the message Product Key Applied should be displayed.

Developer account registration

An installation of the SDK is not sufficient for publishing created applications and games in the Windows Phone Store. For performing this operation, as well as for testing the software on a phone, the developer account is required. A process of its creation is quite simple and is described at the website http://dev.windowsphone.com/en-us/join.

After the successful registration, you can log in to the Windows Phone Dev Center and display the Dashboard, where a lot of useful information is presented. It includes account data, information about registered phones, and some reports. In case of publishing paid applications, it is also important to complete the tax profile and provide other required information, according to messages available on the website with the account summary.

Phone registration

After the successful creation of the developer account, it is useful to register the mobile phone, which will be used later during development. This makes it possible to test the created application or game also on a real device, and is really important before publishing the project to the store.

Note

For each developer account, three devices can be registered.

To register the Windows Phone 8 device, you should perform the following steps:

  1. Connect it to the computer via a USB cable and unlock the screen. Then, the phone should be automatically recognized by the operating system.

  2. Enable cellular data transmission or configure Wi-Fi connection on the phone.

  3. Run the Windows Phone Developer Registration tool (installed with the SDK) on the developer machine (for example, from the Start menu).

  4. Ensure that the tool presents a status Identified Windows Phone 8 device. Click on the Register button to unlock the phone.

  5. Click on the Register button, and type the credentials for the Microsoft account on the site that is opened in a new window.

After a few seconds, the status should be changed to Congratulations! You have successfully unlocked your Windows Phone. Now you can see information about the phone at Dashboard in the Windows Phone Dev Center. Apart from displaying data of registered phones, you can also remove some phones and check dates of their registrations.