二维游戏碰撞检测算法的优化与应用.doc

  1. 1、本文档共38页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
四川大学锦江学院毕业论文 I 二维游戏碰撞检测算法的优化与应用 【摘 要】 本文首先对游戏的发展和常用二维游戏碰撞检测算法进行了概括与分析.然后讨论常用二维游戏碰撞检测算法的原理及其优点与缺点,例如:地图格子划分检测(将地图划分为N个小格子进行检测)、矩形检测(利用规则四边形的X、Y坐标进行检测)、圆形检测(利用类圆图形的圆心距离与半径之和的关系进行检测)、像素检测(利用物体碰撞部分像素深度进行检测)、四叉树检测(多个物体的碰撞检测)。 其次,采用在SAT(Separating Axis Theorem)的碰撞检测算法的基础之上,与其它碰撞检测算法进行比较,进而根据SAT的性质定理,将SAT应用在判断凸多边形的旋转碰撞检测。而基于SAT改进的碰撞检测算法,它比其它算法对于旋转凸多边形的碰撞检测而言更加的快速,并且应用的范围也相对广泛。 然后,在基于VC++6.0开发环境下,采用二维游戏开发技术,对SAT算法在旋转凸多边形的碰撞检测的应用测试的基础之上,进行计算机控制角色与玩家控制角色的碰撞检测。 最后,对文中所涉及到的碰撞检测算法在游戏应用中的优点与缺点,进行分析、比较、总结。 【关键词】 地图格子划分检测 矩形检测 圆形检测 像素检测 四叉树检测 SAT Two-Dimensional Games of Collision Detection Algorithm Optimization and Application 【Abstract】 Firstly, the development of the game and used Two-Dimensional Game of Collision Detection Algorithm is summarized and analyzed. And then discuss the commonly used Two-Dimensional Game of Collision Detection Algorithm to the principle and its advantages and disadvantages, for example: Map Detected (the map is divided into N small squares for testing), Rectangle Detection(using the rules of the quadrilateral X, Y coordinates of the test), Circle Detection (using class graph of the center circle radius and the distance and the relationship between the test),Pixel Detection (use of objects and collision detection part of the pixel depth), Quadtree Detection (multiple objects collision detection). Secondly, the use of the SAT (Separating Axis Theorem) the collision detection algorithm based on, and other collision detection algorithms were compared, and then according to the nature of SAT theorem, SAT application in determining the rotation of convex polygon collision detection. Improved SAT-based collision detection algorithm than other algorithms for the rotation in terms of convex polygon collision detection is more rapid, and relatively wide range of applications. Then, based on the VC++6.0 development environment, using two-dimensional game development technology, the SAT algorithm in rotating convex polygon collision detection

文档评论(0)

zhuliyan1314 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档