X hits on this document





18 / 102

Task 2 – First game screens and menus

Having laid the groundwork for adding screens in the previous task, we can now focus on actually drawing several kinds of screens with which the user may interact. The screens you will add in this task are relatively simple. They will introduce you to the use of resources and the ScreenManager class.

Resources are used by many games to present the game and enhance the game experience. Resources can be such as: images, textures, sounds, and so on. This lab provides you with a number of such resources to make the game development process easier.


Add the lab’s resources to the game resource project. All resources are located in the lab installation folder under Assets\Media. While it is possible to add the resources using the technique seen in the previous task, the resource files for this lab are prearranged in a directory tree structure that we would like to preserve and therefore we will use a different approach in order to add them to our project.


Navigate to the folder specified in the previous step using Windows Explorer, select all three folders and then drag & drop them into the CatapultGameContent project node in the solution explorer:

Figure 18

Adding the resource folders into the content project

Note:  This last drag & drop action is to be performed between applications, while the drag operation has to begin from and over the "Windows Explorer" application window and the concluding drop operation should be perform over the CatapultGameContent project node in the "Visual Studio" application window.

Most games use art in the form of models, meshes, sprites, textures, effects, terrains, animations, and so on. Such art assets can be created in many different ways and

Page | 18

Document info
Document views355
Page views355
Page last viewedFri Jan 20 07:00:16 UTC 2017