- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
基本路径搜索和航点应用Basic Pathfinding and Waypoints At its most basic level, pathfinding is simply the process of moving the position of a game character from its initial location to a desired destination. 基本路径搜索是从初始位置移动到目标位置的过程。 基本路径搜索Basic pathfinding algorithm if(positionXdestinationX) positionX--; else if(positionXdestinationX) positionX++; if(positionYdestinationY) positionY--; else if(positionYdestinationY) positionY++; 限制条件Some limitations 障碍问题Problems with obstacles (1)随机运动避开障碍Random Movement Obstacle Avoidance Random movement can be a simple and effective method of obstacle avoidance. 随机运动能够简单而有效地解决避开障碍。 Random movement obstacle avoidance algorithm if player in line of sight { following straight path to player } else { move in random direction } (2)围绕障碍物的追踪Tracing Around Obstacles This method can be effective when attempting to find a path around large obstacles, such as a mountain range in a strategy or role-playing game. 解决围绕大障碍物寻找路径的问题。 基本追踪Basic tracing 存在的问题Problem with tracing Deciding when to stop tracing? 什么时候停止追踪? We need a way to determine when we should switch from the tracing state back to a simple pathfinding state. 如何从追踪状态转换为路径搜索状态? One way of accomplishing this is to calculate a line from the point the tracing starts to the desired destination. 解决方法-计算从追踪开始点到目标点的直线距离。 改进的追踪Improved tracing 改进的追踪Improved tracing Tracing the outskirts of the obstacle until the line connecting the starting point and desired destination is crossed ensures that the path doesn’t loop back to the staring point. 沿着障碍物外围追踪时,穿过障碍物连接开始点和目标点,防止追踪路径又回到起点。 视线追踪Tracing with line of sight 视线追踪Tracing with line of sight We follow the outskirts of the obstacle, but at each step we check to see if the destination is in the computer-controlled character’s line of sight. 每一步检测是否处在视线之内。 If so, we switch from a tracing state to a line-of-sight pathfinding state. 处在视线之内,路径搜索从追踪状态转换为视线搜索状态。 (3)标记路径搜索Breadcrumb Pathfinding Breadcrumb pathfinding can
您可能关注的文档
- 【点拨中考】2017年中考物理(全国版)总复习课件第二十五章-焦耳定律-(共24张PPT).ppt
- 【精品课件(一)】第2章第5节--焦耳定律.ppt
- 【语】2018-2019学年度部编人教版语文七年级(初一)上册课件:汉语语法之语素PPT优质.ppt
- 0华中科技大学土力学课件总论.ppt
- 01总论蛔鞭蛲钩虫.ppt
- 1.如何组织撰写基金申报书(汪晖).ppt
- 1高级人工智能课件-Introduction.ppt
- 2.5《焦耳定律》课件.ppt
- 2.糖及苷类课件1.ppt
- 2高级人工智能课件-Knowledge-representation-and-classical-reasoning.ppt
原创力文档


文档评论(0)