Windows Phone 7 XNA游戏开发必知
2010-09-20 17:48
495 查看
XNA Game Studio 4.0 is a game development product that Microsoft built on top of Microsoft Visual Studio 2010 and includes in the Windows Phone Developer Tools, giving game developers the power and simplicity of the C# language and the .NET libraries. XNA Game Studio 4.0 includes the XNA Framework and XNA Framework Content Pipeline:
XNA Framework – A collection of application programming interfaces (APIs) that greatly simplifies common game development tasks, such as graphical rendering and timing, audio playback, input processing, and more
XNA Framework Content Pipeline –An easy and flexible way to import three-dimensional (3D) models, textures, sounds, and other assets into your game
XNA Game Studio基础:
While this game will be composed of a single game screen, other games could be composed of several screens, each representing a different level. You can create multiple levels by reusing game screens while slightly altering the game logic.
一个游戏通常有三种状态:
Loading:系统读取资源,初始化与游戏相关的变量,处理其他必须的预备工作,此状态一般只在游戏生命周期中发生一次,更复杂的游戏也许需要在更多的关卡或舞台初始化时分步进行。
Update :系统更新游戏世界状态,包括计算角色实体新位置,更新它们的位置和动作,重新计算分数,处理其他相关的游戏逻辑,这些更新在游戏引擎为活动状态时经常发生。
Draw :系统将Update状态里计算出来的改变绘制到输出图形设备上,绘制在游戏引擎为活动态时经常发生。
在XNA框架中,更新和绘制舞台的频率在PC 或 Xbox 360®上是60次每秒(60帧), 在Zune®, Zune HD, 或 Windows Phone 7 设备上是最多30帧。
GameplayScreen and Game Classes
Technically, the game’s update and drawing logic is contained in the GameplayScreen class. However, the GameplayScreen does not directly handle all of the work, as some of the work is the responsibility of the relevant game classes.
Let us review some of the game classes and their intended purpose:
◦ Player: The player class represents the two players participating in the game and is responsible for drawing each player’s associated catapult on the screen. Two different sub-classes of the Player class actually represent each of the players. The Human class represents the human player and contains additional logic for handling input and providing visual feedback; the AI class represents the computer player and contains additional logic for automatically aiming and firing at the opposing human player.
◦ Catapult: The catapult class encapsulates all the drawing and logic related to one of the catapults in the game. The class keeps track of its associated catapult’s state and animates it according to that state.This class wil be used for both player and AI
◦ Projectile: This class represents a projectile fired by one of the catapults. It is responsible for rendering the projectile and updating its position, but not for determining whether the projectile has hit anything, because this is the job of the Catapult class.
◦ Animation: This helper class displays animations.
◦ AudioManager: This helper class plays sounds.
XNA Framework – A collection of application programming interfaces (APIs) that greatly simplifies common game development tasks, such as graphical rendering and timing, audio playback, input processing, and more
XNA Framework Content Pipeline –An easy and flexible way to import three-dimensional (3D) models, textures, sounds, and other assets into your game
XNA Game Studio基础:
While this game will be composed of a single game screen, other games could be composed of several screens, each representing a different level. You can create multiple levels by reusing game screens while slightly altering the game logic.
一个游戏通常有三种状态:
Loading:系统读取资源,初始化与游戏相关的变量,处理其他必须的预备工作,此状态一般只在游戏生命周期中发生一次,更复杂的游戏也许需要在更多的关卡或舞台初始化时分步进行。
Update :系统更新游戏世界状态,包括计算角色实体新位置,更新它们的位置和动作,重新计算分数,处理其他相关的游戏逻辑,这些更新在游戏引擎为活动状态时经常发生。
Draw :系统将Update状态里计算出来的改变绘制到输出图形设备上,绘制在游戏引擎为活动态时经常发生。
在XNA框架中,更新和绘制舞台的频率在PC 或 Xbox 360®上是60次每秒(60帧), 在Zune®, Zune HD, 或 Windows Phone 7 设备上是最多30帧。
GameplayScreen and Game Classes
Technically, the game’s update and drawing logic is contained in the GameplayScreen class. However, the GameplayScreen does not directly handle all of the work, as some of the work is the responsibility of the relevant game classes.
Let us review some of the game classes and their intended purpose:
◦ Player: The player class represents the two players participating in the game and is responsible for drawing each player’s associated catapult on the screen. Two different sub-classes of the Player class actually represent each of the players. The Human class represents the human player and contains additional logic for handling input and providing visual feedback; the AI class represents the computer player and contains additional logic for automatically aiming and firing at the opposing human player.
◦ Catapult: The catapult class encapsulates all the drawing and logic related to one of the catapults in the game. The class keeps track of its associated catapult’s state and animates it according to that state.This class wil be used for both player and AI
◦ Projectile: This class represents a projectile fired by one of the catapults. It is responsible for rendering the projectile and updating its position, but not for determining whether the projectile has hit anything, because this is the job of the Catapult class.
◦ Animation: This helper class displays animations.
◦ AudioManager: This helper class plays sounds.
相关文章推荐
- XNA 播放声音和音乐,Windows Phone 游戏开发
- Windows Phone XNA 4.0 3D游戏开发
- 使用XNA为Windows phone 7开发简单拼图游戏
- XNA 4.0 环境搭建和 Hello World,Windows Phone 游戏开发
- Windows Phone 7 XNA开发之关于游戏组件 推荐
- XNA 通过图片播放动画,Windows Phone 游戏开发
- XNA 4.0 环境搭建和 Hello World,Windows Phone 游戏开发
- Windows Phone 7 XNA4 游戏开发全面速查资料
- 使用XNA为Windows phone 7开发简单拼图游戏
- windows phone xna游戏视频展示 及 xna开发书籍下载
- XNA 如何使用字体绘制文字,Windows Phone 游戏开发
- Windows phone 7 高级编程——使用visual stdio 、silverlight与XNA进行应用和游戏开发
- XNA那些事(六)--WINDOWS PHONE 游戏开发中的3D摄像机
- XNA那些事(六)--WINDOWS PHONE 游戏开发中的3D摄像机
- XNA Game 类方法执行顺序和移动的图片,Windows Phone 游戏开发
- Windows Phone XNA 4.0 3D游戏开发
- Windows Phone 7的XNA游戏开发系列教程
- Windows Phone XNA 4.0 3D游戏开发
- 10月16日俱乐部活动(XNA游戏开发介绍)
- xna 3D游戏开发(1)