Learn wp7 XNA Game development together (II. XNA Game development architecture)

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.