What you need for this book
You only need two pieces of software to get started with this book:
- Windows 8
- Visual Studio 2012 (or higher)
Visual Studio 2012 is Microsoft's development environment, and is used for all forms of Windows development, from desktop to store. There are a few editions of Visual Studio with different prices; however, a free version, named Visual Studio 2012 Express Edition, can be downloaded from:
http://www.microsoft.com/visualstudio/eng/downloads#express-win8
If you have access to higher editions of Visual Studio 2012, you can use those as well, and most functions should be in the same place.
Note
This book has been written for Visual Studio 2012 and is correct at the time of writing. Future versions of Visual Studio as well as Windows 8 may be different.
NuGet and DirectXTK
NuGet is a development package manager. If you've used package managers in POSIX environments, you'll recognise the concept, only here it's for third-party libraries. NuGet officially supports C# and C++, and will quickly become an essential tool in your Windows development toolbox.
NuGet is integrated into all versions of Visual Studio from 2012 onwards, and adding a "package" to your project is as easy as right-clicking on your project in the Solution Explorer and selecting Manage NuGet Packages. From there you can search for packages and easily install them to your project with a single click. Any dependencies will be automatically installed, and if required your project will be configured to support the new library.
MSDN
The final resource that you might want to have access to is MSDN (www.msdn.com). MSDN (Microsoft Developer Network) is the one-stop shop for documentation on all Microsoft technology. This book will contain links to MSDN pages with documentation with for further reading. If you have any questions or need to know the details on an API, make this your first stop.
Languages and other resources
Although most of the book will be developed using standard C++11, some parts will require the use of the new C++ Component Extensions (C++/CX) from Microsoft. Alongside that we will avoid going into detail about the new WinRT platform outside of the APIs you need to develop your game, so if you want to learn more about these technologies, read through the quick summary that follows, and take a look at the provided reference links for further reading.
WinRT
WinRT is the new API layer used by Windows Store applications to replace Win32. This new API provides a cleaner and easier way to work with the operating system, and also enables cross-language library development using WinRT Components.
Note
When developing a Windows Store application, you do not need to include any headers; they are all automatically included during compile tile to save you the trouble.
For a detailed look at the WinRT type system and how it works, visit:
http://blogs.microsoft.co.il/blogs/sasha/archive/2011/09/17/under-the-covers-of-winrt-using-c.aspx
Components
WinRT Components allow you to share code between the three Windows Store languages: C++, C#, and JavaScript. All public code in a component must use the ref class
from C++/CX. This is because the component needs to ensure it can communicate with the other languages, which do not support pointers and other C++ specific concepts. If you want to use plain C++ within the component, you need to specify the visibility as internal
.
We will look at creating a WinRT component later in the book. However, for more information, visit:
http://msdn.microsoft.com/en-us/library/windows/apps/hh441569
Threading
WinRT uses a new threading model based on the concept of asynchronous development using futures and continuations. This means that instead of creating background code in a traditional manner, you can specify code to run asynchronously, and then append the code that "continues" after the original code finishes. This is done using Tasks, which represent code that runs asynchronously, and at some point in the future may return an object (or value).
For more information on the threading and async model used in WinRT, visit:
C++ Component Extensions
C++ Component Extensions are a set of keywords that Microsoft has added to C++ to make it easier to work with WinRT and COM. These extensions simply enhance the language. They are required for the WinRT APIs, but can be avoided everywhere else if desired.
For more information on C++/CX, including a language reference, visit:
http://msdn.microsoft.com/en-us/library/windows/apps/hh699871