To create an XNA for WP7 project, you can see that the project files include Initialize (), LoadContent (), Update (), and Draw () from these main functions, we can see a basic architecture of XNA game development:
Loading: it is used to load all resources that ensure the normal operation of the game. This state is only run before the game starts in the system, that is, the game only runs once in its lifecycle.
Update: this status is driven by the set interval. During each interval, the status of each role in the game is recalculated, as well as the game score and various game logic. The default value is 30 frames per second. If the interval is too large, the game may fail to start.
Draw: this status is also driven by the set time interval, used to Draw various changes to the display settings.
For XNA resources, a Content project is created when a new project is created, and all resources (images, sounds, videos, fonts, 3D shapes, textures, etc.) are created) are loaded into this project and compiled. the XNA binary file in xnb format can be loaded into the game and called.
Supported resource formats:
Export Autodesk FBX format (. fbx)
Using DirectX Effect file format (. fx)
Invalid Font description specified in a. spritefont file
Gradient Texture file. The following types are supported:. bmp,. dds,. dib,. hdr,. jpg,. pfm,. png,. ppm, and. tga
Invalid Game audio specified in the Microsoft Cross-Platform Audio Creation Tool (XACT) format (. xap)
XNA games also require input to interact with the game, such as clicking on the screen and various sensors (such as Accelerometer. Related namespaces are:
Microsoft. Xna. Framework. Input: used for keyboard, buttons, and mouse Input. Only buttons (back and start) can be used on WP7 ).
Microsoft. Xna. Framework. Touch: Touch input. This includes gesture and touch location.
In addition, there is Content Pipeline, which is an important part of XNA. The material pipeline is used to input, compile, and load game resources, such as textures, 3D models, and sound files. It greatly reduces the amount of code that users can obtain images, 3D data, and coloring devices on their own in the game. The included dll:
Microsoft. Xna. Framework. Content. Pipeline
Microsoft. Xna. Framework. Content. Pipeline. Audio
Microsoft. Xna. Framework. Content. Pipeline. Graphics
Microsoft. Xna. Framework. Content. Pipeline. Processors
Microsoft. Xna. Framework. Content. Pipeline. Serialization. Compiler
Microsoft. Xna. Framework. Content. Pipeline. Serialization. Intermediate
Microsoft. Xna. Framework. Content. Pipeline. Tasks