CN103020443A - Method for map training - Google Patents
Method for map training Download PDFInfo
- Publication number
- CN103020443A CN103020443A CN201210522739XA CN201210522739A CN103020443A CN 103020443 A CN103020443 A CN 103020443A CN 201210522739X A CN201210522739X A CN 201210522739XA CN 201210522739 A CN201210522739 A CN 201210522739A CN 103020443 A CN103020443 A CN 103020443A
- Authority
- CN
- China
- Prior art keywords
- grid
- pathfinding
- algorithm
- line
- role
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Processing Or Creating Images (AREA)
Abstract
The invention discloses a method for map training, belonging to the technical field of computer graphics. The method particularly comprises the following steps that: on the basis of a map road searching system of a navigation grid, by the adoption of an off-line method, a pure A* algorithm grid with an off-line role capable of reaching is generated; and according to collided boxes of the role, the height limit of a reachable point and the like, the grid is generated off line, according to the off-line generated navigation grid information, the limit on the reachable position of the role in a game is maximally satisfied, meanwhile a road is searched by the navigation grid, the speed of road searching is accelerated, and the memory space storage of the grid is reduced.
Description
Technical field
The present invention relates to the computer graphics techniques field, more particularly, based on the map Pathfinding system of navigation grid.
Background technology
Along with the development of online game, often to realize that the leading role is mobile in virtual world.In the field of game pathfinding, the A* algorithm is a pathfinding algorithm relatively more commonly used.The A* algorithm is a kind of heuristic search, utilizes an each decision value of valuation functions assessment, determines to adopt first that scheme.
At present main method for searching mainly contains: A* algorithm and based on the A* algorithm of waypoint.
But above two kinds of methods have its shortcoming now.Because scene of game is larger, based on A* algorithm completely, be an expense of can not ignore its search time.Particularly in the higher online game of requirement of real-time, if be used for clicking position far away, adopt pure A* algorithm, will produce very large delay, this is that the user is unacceptable.And, the A* algorithm of employing waypoint pathfinding, one is, generates necessary waypoint and need to consume a large amount of time of the fine arts, time cost is very high; The 2nd, owing to adopting the waypoint pathfinding, easily a lot of roles of generation are crowded if waypoint is a large amount of, then can reduce again the efficient of pathfinding on single waypoint, and the limit quantity of waypoint is the number of grid that equals in the grid pathfinding.
Summary of the invention
Problem in view of prior art exists the objective of the invention is to provide a kind of efficient and rational pathfinding algorithm.
To achieve these goals, the technical solution adopted in the present invention is a kind of efficient and rational pathfinding algorithm, and its step is as follows:
1) adopts method under the line, generate the pure A* algorithm grid of off-line role Ke Da; This grid is the collision box according to the role, and the limitation in height of accessible point etc. carries out that off-line generates;
2) by the reached grid of art designing according to generation, be merged into needed navigation grid;
3) according to the connectivity that generates the navigation grid, be stored as the pathfinding grid file;
4) in game, at first load the pathfinding grid file;
5) when the user carries out pathfinding, at first adopt the A* algorithm based on grid; According to user's destination and position, at first determine grid and the purpose grid at place;
6) if be in the same navigation grid, then directly can reach;
7) if at different grids, then carry out the A* algorithm on the grid basis, draw the pathfinding gridding information of gained;
8) tabulate according to the pathfinding grid that draws the role is carried out determining of the final path of pathfinding.
The present invention generates the navigation gridding information by off-line, has satisfied to greatest extent in the game for the restriction of role Ke Da position, adopts simultaneously the pathfinding of navigation grid, has accelerated the speed of pathfinding, has reduced the memory headroom storage of grid.
Embodiment
A kind of efficient and rational pathfinding algorithm, its step is as follows:
1) adopts method under the line, generate the pure A* algorithm grid of off-line role Ke Da; This grid is the collision box according to the role, and the limitation in height of accessible point etc. carries out that off-line generates;
2) by the reached grid of art designing according to generation, be merged into needed navigation grid;
3) according to the connectivity that generates the navigation grid, be stored as the pathfinding grid file;
4) in game, at first load the pathfinding grid file;
5) when the user carries out pathfinding, at first adopt the A* algorithm based on grid; According to user's destination and position, at first determine grid and the purpose grid at place;
6) if be in the same navigation grid, then directly can reach;
7) if at different grids, then carry out the A* algorithm on the grid basis, draw the pathfinding gridding information of gained;
8) tabulate according to the pathfinding grid that draws the role is carried out determining of the final path of pathfinding.
Claims (1)
1. efficient and rational pathfinding algorithm, its step is as follows:
1) adopts method under the line, generate the pure A* algorithm grid of off-line role Ke Da; This grid is the collision box according to the role, and the limitation in height of accessible point etc. carries out that off-line generates;
2) by the reached grid of art designing according to generation, be merged into needed navigation grid;
3) according to the connectivity that generates the navigation grid, be stored as the pathfinding grid file;
4) in game, at first load the pathfinding grid file;
5) when the user carries out pathfinding, at first adopt the A* algorithm based on grid; According to user's destination and position, at first determine grid and the purpose grid at place;
6) if be in the same navigation grid, then directly can reach;
7) if at different grids, then carry out the A* algorithm on the grid basis, draw the pathfinding gridding information of gained;
8) tabulate according to the pathfinding grid that draws the role is carried out determining of the final path of pathfinding.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210522739XA CN103020443A (en) | 2012-12-08 | 2012-12-08 | Method for map training |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210522739XA CN103020443A (en) | 2012-12-08 | 2012-12-08 | Method for map training |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103020443A true CN103020443A (en) | 2013-04-03 |
Family
ID=47969041
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210522739XA Pending CN103020443A (en) | 2012-12-08 | 2012-12-08 | Method for map training |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103020443A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104199878A (en) * | 2014-08-21 | 2014-12-10 | 西安闻泰电子科技有限公司 | Game engine shortest path search method and game engine system |
CN104548597A (en) * | 2014-12-26 | 2015-04-29 | 北京像素软件科技股份有限公司 | Navigation grid automatic-generation method and navigation grid automatic-generation device |
CN104613976A (en) * | 2014-08-26 | 2015-05-13 | 腾讯科技(深圳)有限公司 | Path determination method and device |
CN105641929A (en) * | 2015-12-28 | 2016-06-08 | 北京像素软件科技股份有限公司 | Way finding method |
CN106075906A (en) * | 2016-06-03 | 2016-11-09 | 腾讯科技(深圳)有限公司 | The method for searching of a kind of simulated object, the building method of scene and the device of correspondence |
CN110812844A (en) * | 2019-11-06 | 2020-02-21 | 网易(杭州)网络有限公司 | Path finding method in game, terminal and readable storage medium |
CN112044074A (en) * | 2020-09-04 | 2020-12-08 | 网易(杭州)网络有限公司 | Method, device, storage medium and computer equipment for seeking path to non-player character |
CN112699208A (en) * | 2021-03-25 | 2021-04-23 | 腾讯科技(深圳)有限公司 | Map way finding method, device, equipment and medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2014639C (en) * | 1989-04-18 | 1999-05-11 | Yoshio Hosokawa | Apparatus for road path searching applicable to car navigation system and operation method thereof |
CN1996320A (en) * | 2006-01-04 | 2007-07-11 | 腾讯科技(深圳)有限公司 | Path-finding method for optimal path |
CN101241507A (en) * | 2008-01-17 | 2008-08-13 | 腾讯科技(深圳)有限公司 | Map road-seeking method and system |
CN101504776A (en) * | 2009-03-17 | 2009-08-12 | 北京像素软件科技股份有限公司 | 3D scene path finding method and apparatus |
CN102542608A (en) * | 2011-12-16 | 2012-07-04 | 大连兆阳软件科技有限公司 | Method for rendering terrain through offline optimization |
-
2012
- 2012-12-08 CN CN201210522739XA patent/CN103020443A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2014639C (en) * | 1989-04-18 | 1999-05-11 | Yoshio Hosokawa | Apparatus for road path searching applicable to car navigation system and operation method thereof |
CN1996320A (en) * | 2006-01-04 | 2007-07-11 | 腾讯科技(深圳)有限公司 | Path-finding method for optimal path |
CN101241507A (en) * | 2008-01-17 | 2008-08-13 | 腾讯科技(深圳)有限公司 | Map road-seeking method and system |
CN101504776A (en) * | 2009-03-17 | 2009-08-12 | 北京像素软件科技股份有限公司 | 3D scene path finding method and apparatus |
CN102542608A (en) * | 2011-12-16 | 2012-07-04 | 大连兆阳软件科技有限公司 | Method for rendering terrain through offline optimization |
Non-Patent Citations (1)
Title |
---|
靳旭栋: "游戏领域中启发式寻径算法的运用和优化", 《中国优秀硕士学位论文全文数据库-信息科学辑》 * |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104199878A (en) * | 2014-08-21 | 2014-12-10 | 西安闻泰电子科技有限公司 | Game engine shortest path search method and game engine system |
CN104613976B (en) * | 2014-08-26 | 2017-12-15 | 腾讯科技(深圳)有限公司 | Determine the method and device in path |
CN104613976A (en) * | 2014-08-26 | 2015-05-13 | 腾讯科技(深圳)有限公司 | Path determination method and device |
CN104548597A (en) * | 2014-12-26 | 2015-04-29 | 北京像素软件科技股份有限公司 | Navigation grid automatic-generation method and navigation grid automatic-generation device |
CN104548597B (en) * | 2014-12-26 | 2018-06-01 | 北京像素软件科技股份有限公司 | The automatic generation method and device of navigation grid |
CN105641929A (en) * | 2015-12-28 | 2016-06-08 | 北京像素软件科技股份有限公司 | Way finding method |
CN105641929B (en) * | 2015-12-28 | 2019-07-05 | 北京像素软件科技股份有限公司 | A kind of method for searching |
CN106075906A (en) * | 2016-06-03 | 2016-11-09 | 腾讯科技(深圳)有限公司 | The method for searching of a kind of simulated object, the building method of scene and the device of correspondence |
CN106075906B (en) * | 2016-06-03 | 2019-07-05 | 腾讯科技(深圳)有限公司 | The building method and corresponding device of a kind of method for searching of simulated object, scene |
CN110812844A (en) * | 2019-11-06 | 2020-02-21 | 网易(杭州)网络有限公司 | Path finding method in game, terminal and readable storage medium |
CN110812844B (en) * | 2019-11-06 | 2023-04-07 | 网易(杭州)网络有限公司 | Path finding method in game, terminal and readable storage medium |
CN112044074A (en) * | 2020-09-04 | 2020-12-08 | 网易(杭州)网络有限公司 | Method, device, storage medium and computer equipment for seeking path to non-player character |
CN112044074B (en) * | 2020-09-04 | 2024-06-11 | 网易(杭州)网络有限公司 | Method, device, storage medium and computer equipment for seeking path for non-player character |
CN112699208A (en) * | 2021-03-25 | 2021-04-23 | 腾讯科技(深圳)有限公司 | Map way finding method, device, equipment and medium |
CN112699208B (en) * | 2021-03-25 | 2021-06-25 | 腾讯科技(深圳)有限公司 | Map way finding method, device, equipment and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103020443A (en) | Method for map training | |
CN109839935B (en) | Multi-AGV path planning method and equipment | |
CN106582023B (en) | Game way finding method and device | |
CN108399218A (en) | Automatic driving vehicle positioning based on Walsh kernels shadow casting technique | |
CN102788584A (en) | Road grade data generating device and generating method, control device for vehicle and energy consumption amount predicting device for vehicle | |
WO2014173187A1 (en) | Systems and methods for path finding in maps | |
CN102855661B (en) | Large-scale forest scene quick generation method based on space similarity | |
CN103500516A (en) | High-efficiency trace replay method and system based on electronic map | |
CN107883971A (en) | The update method and device of navigation way | |
CN108177528B (en) | Pure electric automobile continual mileage evaluation method, system, equipment and storage medium | |
CN108876024A (en) | Path planning, path real-time optimization method and device, storage medium | |
CN111753424B (en) | Simulation method, simulation device, electronic equipment and storage medium | |
CN110070616A (en) | Memory, statistical data rendering method, device and equipment based on GIS platform | |
CN105550344A (en) | Grid and weight relation-based vector point element thinning method | |
CN104081160B (en) | Navigation system | |
CN109685109A (en) | A kind of base station label track classification method based on twin neural network | |
CN105469445A (en) | Step size changeable map generation method | |
CN103914877A (en) | Three-dimensional model multi-detail-level structure based on extension combination | |
CN104217580B (en) | Road network Semantic Modeling Method and system towards vehicle groups animation | |
CN102735251A (en) | Cloud computing based GPS navigation method and system | |
CN103500278A (en) | Path similarity typhoon analysis method based on shortest path algorithm | |
Ruan et al. | Map navigation system based on optimal Dijkstra algorithm | |
CN102208111A (en) | Group animation motion control system and method | |
CN103021258A (en) | Speed-optimized map way-finding algorithm | |
CN105426384A (en) | Proposed target location generation method and apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20130403 |