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

Technologies and frameworks


Apart from various languages, you can use additional technologies and frameworks. In case of Windows Phone 8, there are several technologies for developers, including Direct3D in the native development, which allows to implement complex 3D game worlds. Regarding frameworks, the .NET Framework is the most important platform, which is involved in managed development and cooperates with a few programming languages, including C#. What is interesting, even XAML can be understood as a kind of technology or framework, of course not just as a markup language, but as a part of the system for the UI design and presentation.

Direct3D

DirectX is a set of APIs that are used to create complex multimedia applications and games. It has a long history and is frequently used in the game development area to provide the player with complex 3D worlds. It supports many additional aspects of the game, including interaction with the user. The DirectX platform consists of many parts, such as Direct3D, Direct2D, DirectShow, DirectSound, and DirectCompute. One of the most important parts is the Direct3D. It can be used to create games on various platforms, including computers running the Microsoft Windows operating system, XBOX 360 consoles, as well as the Windows Phone 8 mobile phones. The current version of DirectX is 11.1. In case of the Windows Phone 8 devices, the supported feature level of Direct3D is 9_3.

According to http://msdn.microsoft.com/library/jj662930, the Windows Phone 8 projects support only some parts of the DirectX platform, for example, Direct2D is not supported. Regarding additional frameworks, WIC (Windows Imaging Component) is also unsupported. These omissions lead to some problems during game development, such as a necessity of using .dds file format for textures. However, an additional library, named DirectXTK (DirectX Tool Kit), is available. It simplifies performing several operations related to creating graphics for the DirectX platform, both in case of desktop and mobile projects. The possible applications of this library contain a mechanism of loading .dds files, drawing bitmaps, and rendering text. You will use its various possibilities while creating the exemplary game.

WCF

Another technology is WCF (Windows Communication Foundation). It is located in the managed part and makes it possible to create applications consistent with the SOA (Service Oriented Architecture) approach.

Such applications are composed from web services as parts of the solution that process requests and send responses to clients, which consume them. Using this approach, it is possible to improve interoperability, use devices with limited resources as clients, deploy a new version of a solution in an easier way (just by upgrading the web service), and exchange data between users.

WCF makes it possible to create web services and configure them. It supports various ways and channels of communication, as well as security mechanisms on different levels and asynchronous communication.

.NET Framework

The .NET Framework performs a role of CLR (Common Language Runtime) that executes code prepared in any supported language, including C#. As mentioned earlier, the .NET Framework platform has an important impact on development in this language, for instance, by introducing libraries (general and dedicated to specific technologies), supporting memory management (including the garbage collector), and implementation of some security mechanisms.

The platform provides developers with FCL (Framework Class Library), which contains a set of classes and interfaces allowing the developer to perform various operations using supported programming languages. These operations include creating the user interface, drawing 2D and 3D graphics, performing calculations using implemented algorithms, as well as reading data stored in XML and text files. Of course, a list of available features is significantly longer. Inside FCL, the BCL (Base Class Library) is located. It contains only a subset of basic features.

Similarly to C# language, the .NET Framework also has numbers that indicate its version. The newest version is the .NET Framework 4.5.