CN104784934A - Method for moving game role - Google Patents

Method for moving game role Download PDF

Info

Publication number
CN104784934A
CN104784934A CN201510171901.1A CN201510171901A CN104784934A CN 104784934 A CN104784934 A CN 104784934A CN 201510171901 A CN201510171901 A CN 201510171901A CN 104784934 A CN104784934 A CN 104784934A
Authority
CN
China
Prior art keywords
point
pathfinding
path
game role
jump
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
Application number
CN201510171901.1A
Other languages
Chinese (zh)
Inventor
刘自明
何啸威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan You Jia Network Technology In Sky Co Ltd
Original Assignee
Sichuan You Jia Network Technology In Sky Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Sichuan You Jia Network Technology In Sky Co Ltd filed Critical Sichuan You Jia Network Technology In Sky Co Ltd
Priority to CN201510171901.1A priority Critical patent/CN104784934A/en
Publication of CN104784934A publication Critical patent/CN104784934A/en
Pending legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention provides a method for moving a game role. The method for moving the game role comprises the following steps: S1, receiving a path finding command, wherein the path finding command comprises an initial point and a target point; S2, according to the path finding command, determining whether two skipping points exist between the initial point and the target point in a current map, wherein the two skipping points have a skipping relation to each other, and dividing the current map into gridding path finding points, wherein the initial point and the target point belong to the path finding points; S3, if the two skipping points exist, searching for a first direct path from the initial point to a first skipping point which is the closest to the initial point in the current map, and meanwhile searching for a second direct path from the target point to a second skipping point which is the closest to the target point; S4, taking the first direct path and the second direct path as the shortest path finding path. By means of the method, the searching time for path finding can be shortened.

Description

Game role moving method
Technical field
The present invention relates to technical field of network information, particularly relate to a kind of game role moving method.
Background technology
When game user is played games, need direct game role to perform various action, comprise movement, fight etc.And movement is the elemental motion of game.In order to make game user spended time and energy go to find the target in game, automatic pathfinding is arisen at the historic moment, the target location that automatic pathfinding can make game role be automatically moved to game user to specify.
Traditional automatic seeking path method is all map is divided into latticed pathfinding point, after game user selected target point, searches for the shortest reachable path from starting point to impact point.This mode can find shortest path very soon when impact point is shorter apart from starting point, but when impact point distance starting point is larger, then require a great deal of time removal search, thus add the search time of pathfinding.
Summary of the invention
The technical problem that the present invention mainly solves is to provide a kind of game role moving method, can reduce the search time of pathfinding.
For solving the problems of the technologies described above, the technical scheme that the present invention adopts is: provide a kind of game role moving method, described game role moving method comprises: S1, and receive pathfinding instruction, described pathfinding instruction comprises starting point and impact point; S2, in current map, determine between described starting point and described impact point, whether to there is the jump-point that two have redirect relation each other according to described pathfinding instruction, described current map is divided into the pathfinding point of gridding, and described starting point, described impact point and described jump-point belong to described pathfinding point; S3, if there are described two jump-point, in described current map, search for the first direct path from described starting point to the first jump-point nearest with described starting point, search for the second direct path from described impact point to the second jump-point nearest with described impact point simultaneously; S4, using described first direct path and described second direct path as the shortest pathfinding path.
Preferably, before described step S1, described game role moving method also comprises: when game user generates pathfinding instruction during selected described impact point on described current map, and described starting point is the current residing pathfinding point of game role that described game user is handled.
The invention has the beneficial effects as follows: the situation being different from prior art, game role moving method of the present invention by determine between starting point and impact point exist two there is the jump-point of redirect relation each other after, search for direct path to nearest jump-point from starting point and impact point simultaneously, search data amount significantly reduces, thus can reduce the search time of pathfinding.
Accompanying drawing explanation
Fig. 1 is the schematic diagram of game role moving method embodiment of the present invention.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only a part of embodiment of the present invention, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
See Fig. 1, it is the schematic diagram of game role moving method embodiment of the present invention.The game role moving method of the embodiment of the present invention comprises the following steps:
S1: receive pathfinding instruction, pathfinding instruction comprises starting point and impact point.
Wherein, pathfinding instruction is triggered by game user.Specifically, in the present embodiment, before step S1, game role moving method also comprises: when game user generates pathfinding instruction during selected target point on current map, and starting point is the current residing pathfinding point of game role that game user is handled.
S2: determine whether there is the jump-point that two have redirect relation each other between starting point and impact point according to pathfinding instruction in current map, current map is divided into the pathfinding point of gridding, and starting point, impact point and jump-point belong to pathfinding point.
Wherein, map partitioning is the pathfinding point of gridding, and a pathfinding point is a grid, and all map scenes comprise ground, forest etc. and are filled in pathfinding point.
The jump-point each other with redirect relation can make game role without the need to the map between two jump-point moves, but moment redirect is moved.Transmission gate in jump-point such as scene of game.
S3: if there are two jump-point, search for the first direct path from starting point to the first jump-point nearest with starting point in current map, searches for the second direct path from impact point to the second jump-point nearest with impact point simultaneously.
Wherein, the mode of search direct path can be realized by A star algorithm, and A star algorithm belongs to the common practise of those of ordinary skill in the art, repeats no more herein.In search first direct path and the second direct path process, the pathfinding point traveled through is the half or following of the pathfinding point traveled through from starting point to impact point unidirectional search, thus significantly can reduce the data volume of search.
S4: using the first direct path and the second direct path as the shortest pathfinding path.
Wherein, after the shortest pathfinding path is determined, game role will start mobile according to the shortest pathfinding path, until arrive impact point.
By the way, the game role moving method of the embodiment of the present invention carries out bidirectional research in starting point and impact point to nearest jump-point between the two simultaneously, the pathfinding point traveled through in search procedure significantly reduces, thus can reduce the search time of pathfinding.
The foregoing is only embodiments of the invention; not thereby the scope of the claims of the present invention is limited; every utilize description of the present invention and accompanying drawing content to do equivalent structure or equivalent flow process conversion; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.

Claims (2)

1. a game role moving method, is characterized in that, described game role moving method comprises:
S1, receive pathfinding instruction, described pathfinding instruction comprises starting point and impact point;
S2, in current map, determine between described starting point and described impact point, whether to there is the jump-point that two have redirect relation each other according to described pathfinding instruction, described current map is divided into the pathfinding point of gridding, and described starting point, described impact point and described jump-point belong to described pathfinding point;
S3, if there are described two jump-point, in described current map, search for the first direct path from described starting point to the first jump-point nearest with described starting point, search for the second direct path from described impact point to the second jump-point nearest with described impact point simultaneously;
S4, using described first direct path and described second direct path as the shortest pathfinding path.
2. game role moving method according to claim 1, is characterized in that, before described step S1, described game role moving method also comprises:
When game user generates pathfinding instruction during selected described impact point on described current map, described starting point is the current residing pathfinding point of game role that described game user is handled.
CN201510171901.1A 2015-04-13 2015-04-13 Method for moving game role Pending CN104784934A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510171901.1A CN104784934A (en) 2015-04-13 2015-04-13 Method for moving game role

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510171901.1A CN104784934A (en) 2015-04-13 2015-04-13 Method for moving game role

Publications (1)

Publication Number Publication Date
CN104784934A true CN104784934A (en) 2015-07-22

Family

ID=53550404

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510171901.1A Pending CN104784934A (en) 2015-04-13 2015-04-13 Method for moving game role

Country Status (1)

Country Link
CN (1) CN104784934A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106582023A (en) * 2016-12-01 2017-04-26 北京像素软件科技股份有限公司 Game path-searching method and apparatus
CN108815850A (en) * 2018-06-15 2018-11-16 腾讯科技(深圳)有限公司 A kind of method and client controlling simulated object pathfinding
CN108939547A (en) * 2018-07-04 2018-12-07 苏州玩友时代科技股份有限公司 A kind of optimal path acquisition methods, device, equipment and storage medium
CN110721472A (en) * 2019-10-08 2020-01-24 上海莉莉丝科技股份有限公司 Path finding method, device, equipment and recording medium
CN111177291A (en) * 2019-12-23 2020-05-19 腾讯科技(深圳)有限公司 Object moving method, device, equipment and medium
CN111760268A (en) * 2020-07-06 2020-10-13 网易(杭州)网络有限公司 Path finding control method and device in game

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103893969A (en) * 2014-04-15 2014-07-02 广州博冠信息科技有限公司 Way-finding method and device in game
CN104156459A (en) * 2014-08-20 2014-11-19 焦点科技股份有限公司 Efficient path-finding method and system based on the same cost grids
CN104199878A (en) * 2014-08-21 2014-12-10 西安闻泰电子科技有限公司 Game engine shortest path search method and game engine system
CN104267963A (en) * 2014-10-10 2015-01-07 重庆邮电大学 Cross-platform online role playing game client engine and creation method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103893969A (en) * 2014-04-15 2014-07-02 广州博冠信息科技有限公司 Way-finding method and device in game
CN104156459A (en) * 2014-08-20 2014-11-19 焦点科技股份有限公司 Efficient path-finding method and system based on the same cost grids
CN104199878A (en) * 2014-08-21 2014-12-10 西安闻泰电子科技有限公司 Game engine shortest path search method and game engine system
CN104267963A (en) * 2014-10-10 2015-01-07 重庆邮电大学 Cross-platform online role playing game client engine and creation method thereof

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106582023A (en) * 2016-12-01 2017-04-26 北京像素软件科技股份有限公司 Game path-searching method and apparatus
CN106582023B (en) * 2016-12-01 2020-06-02 北京像素软件科技股份有限公司 Game way finding method and device
CN108815850A (en) * 2018-06-15 2018-11-16 腾讯科技(深圳)有限公司 A kind of method and client controlling simulated object pathfinding
CN108939547A (en) * 2018-07-04 2018-12-07 苏州玩友时代科技股份有限公司 A kind of optimal path acquisition methods, device, equipment and storage medium
CN108939547B (en) * 2018-07-04 2019-06-21 苏州玩友时代科技股份有限公司 A kind of optimal path acquisition methods, device, equipment and storage medium
CN110721472A (en) * 2019-10-08 2020-01-24 上海莉莉丝科技股份有限公司 Path finding method, device, equipment and recording medium
CN111177291A (en) * 2019-12-23 2020-05-19 腾讯科技(深圳)有限公司 Object moving method, device, equipment and medium
CN111177291B (en) * 2019-12-23 2021-12-14 腾讯科技(深圳)有限公司 Object moving method, device, equipment and medium
CN111760268A (en) * 2020-07-06 2020-10-13 网易(杭州)网络有限公司 Path finding control method and device in game

Similar Documents

Publication Publication Date Title
CN104784934A (en) Method for moving game role
CN104784932A (en) Path finding method for game role
CN104759097A (en) Automatic way-finding method in game
CN104740875A (en) Guiding method for game role move
CN106371445B (en) A kind of unmanned vehicle planning control method based on topological map
CN104548598B (en) A kind of method of pathfinding in virtual reality scenario
RU2014102596A (en) IMPROVEMENT OF EFFICIENCY AND ACCURACY OF GEOZONING ON THE BASIS OF A USER HISTORY
CN110755848B (en) Path finding method in game, terminal and readable storage medium
CN106582023B (en) Game way finding method and device
KR102069981B1 (en) Navigation reference point determination and navigation method and apparatus, and storage medium
CN103714234B (en) Method and equipment for determining moving paths of objects in games
CN105279207B (en) A kind of user's recommended method, device and system
CN104156459A (en) Efficient path-finding method and system based on the same cost grids
MX2014005906A (en) Method and server for searching for nearby user in social network.
CN104740876A (en) Pointing method for game role moving direction
CN104199878A (en) Game engine shortest path search method and game engine system
CN102778229A (en) Mobile Agent path planning method based on improved ant colony algorithm under unknown environment
CN104598621A (en) Track compression method based on sliding window
CN106408124A (en) Moving path hybrid forecasting method oriented to data sparse environment
CN104759098A (en) Game way-finding method
CN103439726B (en) Rapid K shortest path planning method applied to GPS
CN105320134A (en) Path planning method for robot to independently build indoor map
CN106774425A (en) A kind of method and system of unmanned plane during flying navigation
CN106574842A (en) Navigation system
CN104751001A (en) Shortest path searching method for game

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20150722

RJ01 Rejection of invention patent application after publication