
游戏开发
宅教授
宅教授
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
我的游戏框架
一切初始化工作结束后即可进入游戏循环。 void GEroot::enterGameLoop() { GEprintf("enter game loop\n"); while(m_run) { renderOneFrame(); } } 很简单的代码吧! 再来看看renderOneFrame()的代码。 void GEroot::renderOneFrame()原创 2012-06-14 16:52:01 · 1310 阅读 · 0 评论 -
OpenGL实现CS死后的摄像机漫游方式
这里着重介绍对WASD键的响应动作。 因为这个比较简单,呵呵。 对视图矩阵中的 m[3][0] 进行加加减减就可以完成对AD键对应的动作。 对视图矩阵中的 m[3][2] 进行加加减减就可以完成对WS键对应的动作。 简单的写两句代码: // get the modelview matrix float mat[4][4]; glGetFloatv(GL_MODELVIE原创 2012-07-31 19:39:44 · 1036 阅读 · 0 评论 -
编译文本配置文件从而得到可直接在游戏中使用的数据结构
编译的过程可以借助我们一直使用的编译器。 以对话框配置文件为例: 所需数据结构: //type 宏定义 #define Dialog 0 #define Static 1 #define EditText 2 #define Button 3 #define CheckBox 4 #define RadioBotton 5 #define Image 6 #de原创 2012-07-31 19:00:36 · 648 阅读 · 0 评论