Direct2D随笔3——构建游戏基础结构
2014-07-27 10:10
274 查看
using System; using System.Windows.Forms; using System.Collections.Generic; namespace NewGame1 { enum GameStatu { gameRunning, //0 gamePause, //1 gameMenu, //2 gameLoading, //3 gameStart, //4 gameTest, //5 }; public partial class WinMain : Form { TimeController timeController; DirectRender2D directRender2D; ulong gameFrame; int counter_FPS; public WinMain () { InitializeComponent(); InitiallizeGameSystem(); } protected void InitiallizeGameSystem () { timeController = new TimeController(GameLoop); directRender2D = new DirectRender2D(this); } void GameLoop (double ElapsedTime) { //GameUpdate.... directRender2D.Begin(); directRender2D.renderClear(new Color4(0, 0, 0, 255)); directRender2D.End(); ++gameFrame; ++counter_FPS; } private void countFPS (object sender, EventArgs e) { if (counter_FPS > 65) this.Text = "[High fps]"; else this.Text = "[" + counter_FPS + "fps]"; counter_FPS = 0; } } }
整理出来就是这样,第5篇我大概会说一说如何render出几何图形。
另外,游戏的输入还是一个很重要的内容,第4篇我会大概的说一说的。
相关文章推荐
- Direct2D随笔1——构建D2D环境
- 非典型2D游戏引擎 Orx 源码阅读笔记(1) 总体结构
- 在emacs中用gdb调试学习算法与数据结构基础(1)_猜价格游戏
- 2d游戏基本结构设计
- 【Unity 3D】学习笔记二十:基础2D游戏界面
- 游戏的基础结构
- SharePoint构建强大的调查基础结构
- Unity4.x 2D游戏开发基础教程第1章Unity及其组成的介绍
- Direct 3D和XNA游戏开发基础(C#语言版)(奋斗的小鸟)_PDF 电子书
- SurfaceView(2D游戏基础)
- Direct2D随笔4——GameInput
- HGE 2D游戏引擎基础
- bada 2D游戏编程之三——游戏的基本结构
- bada 2D游戏编程之三――游戏的基本结构
- unity3d构建2d游戏框架与IOS项目导出
- 正交投影的DIRECT2D绘图基础部分
- 非典型2D游戏引擎 Orx 源码阅读笔记(2) 基础模块与模块管理模块
- DirectX&Direct 3D 游戏开发之3D图形的数学基础
- Cocoa2d-X学习笔记第三篇:基础数据结构
- 游戏的基础结构。