| Published On : | October 15, 2009 12:00 AM PDT |
Rate |
|
|
Download this app from here. XNA Game Sample Application
Environment Note:
1) Installing Visual C# Express 2005 on a standalone machine.
Once you have completed the setup process, you can begin debugging this sample application by pressing F5, at which point the main form will load. Once this form is loaded, you will be able to more easily examine how the examples provided in this sample application operate. In this sample application, multi-threaded sections are highlighted in two areas: Figure 1 Single-threaded Loading of Textures
Updating: This inherent method is called each time the screen refreshes. To simulate multiple users entering the game, this application fabricates a large number of users being added and updated. In the updating section, each user's position and speed is updated. By multi-threading this section, users will experience better user interface responsiveness.
Exploring the Samples: To observe multi-threading functionality in action, open and run the application. The game is by default in multi-threaded mode. You can change the game into single-threaded mode by hitting the "I" key. To switch back into multi-threaded mode, you can hit the "M" key.
You also have control over the blue person and move them in any direction. Below is the key mapping to move the blue person:
"E" key = move up
You can also move the yellow person left and right. Below is the key mapping to move the yellow person:
Left arrow key = move left
If you want to simulate creating a new person, click the "N" key and that will create the orange person.
You can also simulate collisions. The purple moves around the screen randomly, but will bounce off of the blue person as well as the yellow and green person.
To exit the application, you can select the Debug | Stopping Debugging menu command in Visual C# Express or you can hit the "Esc" key in the game. Download this app from here. |
