为解决当前游戏开发中跨平台比较麻烦的问题,开发了一款多平台三维空战游戏。为提高碰撞检测速度,使用了立方体包围盒技术,并进一步优化为梯形台包围盒。在粒子系统中使用椭圆体来表现粒子,一个椭圆体上有上百个粒子,直径较小的椭圆体直接用点来代替。为了使游戏也可在手机平台上运行,经算法比较,减少粒子颜色至64色。同时从多线程、模型优化等方面对系统进行了优化。系统包括图形用户界面、物理模块、粒子系统模块等,最后被移植到Windows,Web,Mac,Mac Dashboard等多个平台。实验表明,该游戏运行流畅,达到设计要求。
In order to solve the current more troublesome problems in game cross-platform developing,a multi platform 3D air war game is developed. In order to improve the speed of collision detection,the cube bounding box technology is used,and further optimized for trapezoidal bounding box. Particles are realized using ellipsoids. There are hundreds of particles on the ellipsoid,and the smaller ellipsoid is replaced with dots directly. In order to make the game can also be used on mobile phone platform,the particle color is reduced to 64 colors. The system has been optimized using the multithreading and optimized model. The system includes a graphical user interface, physical module,particle system module etc. The system have been transplanted to the platform of Windows,Web,Mac,Mac Dashboard etc. The operation of the system is fluent,and meets the design requirements.