CN1940948A - Method and device for tracking in three-dimensional game scene - Google Patents

Method and device for tracking in three-dimensional game scene Download PDF

Info

Publication number
CN1940948A
CN1940948A CNA2005101077942A CN200510107794A CN1940948A CN 1940948 A CN1940948 A CN 1940948A CN A2005101077942 A CNA2005101077942 A CN A2005101077942A CN 200510107794 A CN200510107794 A CN 200510107794A CN 1940948 A CN1940948 A CN 1940948A
Authority
CN
China
Prior art keywords
path
destination
paths
list
memory module
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.)
Granted
Application number
CNA2005101077942A
Other languages
Chinese (zh)
Other versions
CN100410955C (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CNB2005101077942A priority Critical patent/CN100410955C/en
Publication of CN1940948A publication Critical patent/CN1940948A/en
Application granted granted Critical
Publication of CN100410955C publication Critical patent/CN100410955C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A method for realizing follow-up in two-dimensional game scene includes setting up path listing used to record path passed by object being followed-up, querying whether path is contained in said listing or not when said object whenever arrives a path, deleting all paths passed by object from said listing after said path if it is or otherwise recording paths passed by object in said listing according to early and late sequence an searching out a target path being able to be arrived by follow-up object as well as deleting all paths passed by object before target path. The follow-up device for realizing said method is also disclosed.

Description

Realization is followed in two-dimentional scene of game method and device
Technical field
The present invention relates to computing machine and communication technical field, relate in particular to a kind of realization is followed in two-dimentional scene of game method and device thereof.
Background technology
Since electronic game occurred, the following device in recreation was all being brought into play its irreplaceable effect always.Be mainly reflected in two aspects: on the one hand follow the player, specify certain target and by its motion track motion etc. for the more team member of utilization in the existing online game follows team leader, pet; Using on the other hand, also is non-role (None-Player Character) the pursuing and attacking player role that is applied as the most widely in the recreation simultaneously.As player A in the recreation " legend " to team member in the following, play of player B " dreamlike Journey to the West " to following of team leader etc.
Realize in the prior art that the scheme that intelligence follows is more, as two kinds of following schemes:
Scheme one, (or claim intelligence to follow, AI) movement locus of the simulation destination object (Target) of being followed reappears completely, as shown in Figure 1 to follow object.It realizes that mainly principle is: Target writes down the water chestnut lattice of each process in moving process, does not stop because can not exist in personage's moving process; Ai repeats to walk one time by the water chestnut lattice tabulation that Target moves.This scheme has the following disadvantages:
1, the performance of AI is too dull;
2, can't handle AI and the skimble-scamble situation of Target speed, in case the speed of Target greater than AI and constantly motion, its following distance will unconditional unrestricted the increase;
3, the water chestnut case system based on the oblique 45 degree maps of 2D realizes, is not suitable for the horizontal version of 2D reel game.
Scheme two, the movement locus of AI simulation Target reappears completely in the horizontal version of 2D reel game, as shown in Figure 2.Its main realization principle is: each bar movement locus of AI record Target; AI repeats to walk one time by the movement locus of record.Below this scheme exists not in:
1, the performance of AI can seem too mechanical, and every act and every move is all the same with Target;
2, can't handle AI and the skimble-scamble situation of Target speed, in case the speed of Target greater than AI and constantly motion, following distance will unconditional unrestricted the increase;
3, AI can't seek shortest path when going into action after Target moves a period of time earlier.
In a word, when realizing in the prior art that intelligence is followed, there is very flexible, and will makes problem such as the unlimited increase of following distance in the speed of Target during greater than the AI disunity.
Summary of the invention
The invention provides a kind of realization is followed in two-dimentional scene of game method and device thereof, realizes that to solve prior art there is very flexible in intelligence in following in online game, and follow object and destination object cause the unlimited increase of following distance when the speed disunity problem.
The invention provides following technical scheme:
A kind of method follow of in two-dimentional scene of game, realizing, set up be used to write down the destination object of being followed through the path list in path, and carry out following step:
Inquire about whether comprise this paths in the described path list when reaching a paths in that described destination object is every, if, then from described path list the deletion destination object in this path after all paths of process, otherwise according to target object is recorded in it in path list through the sequencing in path;
Begin to search for successively the path the described path list from the path at the current place of destination object, follow the destination path that object can arrive from path, current place with self-ability up to searching one; And
Control is followed object and is arrived described destination path from current path, and in the deletion path list destination object before this destination path all paths of process.
Wherein:
In described path list, according to target object is through path time journal path.
To the table tail, according to target object by the journal path after arriving first, makes the paths record that at every turn increases newly at the table tail through the path from gauge outfit.
In the deletion path list destination object before the destination path behind all paths of process, the position of mobile route in tabulation makes destination path arrive the heading of path list successively.
Determine whether and to arrive destination path from path, current place according to high jump ability of following object and long-jump ability.
When object the past path arrival destination path is followed in control, determine to enter the mode and the position of new route according to the ability of following object.
A kind of intelligent following device comprises:
Memory module, be used to write down the destination object of being followed the path of process;
Processing module, be used for inquiring about described memory module when reaching a paths and whether storing this paths in that described destination object is every, if, then from memory module the deletion destination object in this path after all paths of process, otherwise according to target object is saved in it in memory module through the sequencing in path;
Search module is used for beginning to search for successively from the path at the current place of destination object the path of described memory module, follows the destination path that object can arrive from path, current place with self-ability up to searching one;
Control module is used for control and follows object and arrive described destination path from path, current place, and delete destination object in the described memory module before this destination path all paths of process.
In described memory module, according to target object is through the time sequencing in path record path successively.
Adopt the present invention, follow the path that object AI can repeat destination object, and can select different paths, make that its performance is more flexible.
Owing to follow that object is always selected to arrive and follow, therefore during less than the speed of destination object, can not cause the unconfined increase of following distance in the speed of following object AI with the nearest path of destination object.
Description of drawings
Fig. 1, Fig. 2 are respectively the synoptic diagram that intelligence is followed in the prior art;
The process flow diagram of the processing path list when Fig. 3 A arrives a new route for destination object among the present invention;
Fig. 3 B utilizes path list to follow the process flow diagram of processing for following object among the present invention;
The path synoptic diagram that Fig. 4 moves for destination object of the present invention;
Fig. 5 is an intelligent following device synoptic diagram of the present invention.
Embodiment
In order to realize more flexibly that intelligence follows, the present invention set up and safeguard be used to write down the destination object (Target) of being followed the path list in path of process, follow object and utilize this path list to search to follow the path.
In described path list, according to target object arrange through the time sequencing in path.A kind of preferable mode is, from heading to the table tail, by through time in path by earlier to after order be arranged in order, promptly the current path that arrives of the destination object of Zeng Jiaing always is recorded in the afterbody of path list.
Consult shown in Fig. 3 A, as follows in the main processing procedure that destination object is every when reaching a new route:
Step 100, destination object are taken action between different paths, arrive a new route.
Whether comprise this new route in step 110, the query path tabulation, if then carry out step 120, otherwise carry out step 130.
Step 120, from described path list the deletion destination object in this path after all paths of process, promptly delete in the path list and begin when following destination object, can no longer repeat these roads even follow object to all paths the table tail from new road.
Step 130, according to target object is recorded in new route in the path list through the sequencing in path, promptly is recorded in the path list after the last item path.
Consult shown in Fig. 3 B, it is as follows to follow the main processing procedure that object utilizes path list to follow:
Step 200, from path list, get the path at the current place of destination object as destination path.
Step 210, judge and to follow the destination path whether object can arrive from path, current place with self-ability, if, then carry out step 230, otherwise, carry out step 220.
The self-ability of following object mainly is meant high jump and long-jump ability, according to high jump of following object and long-jump ability, can determine that this follows object and whether can arrive another paths from path, current place.
Step 220, by order from the table Caudad heading direction of path list, take off a paths and make destination path, and change step 210.
Step 230, from path list deletion all paths before the destination path, promptly delete destination object in the path list before destination path all paths of process, make following and can no longer repeat these paths.
In order to make full use of storage space, behind the path in the deletion path list, the position of mobile route in tabulation makes destination path arrive the heading of path list successively.
Step 240, control are followed object and are arrived described destination path from current path.
With path profile shown in Figure 4 is that example describes above-mentioned processing procedure:
Destination object moves arbitrarily in 5 paths of 1-5, follows object AI reference position on any paths of 1-5.
After moving after a while, destination object successively the path of process be: 1 → 2 → 4 → 5 → 3, then Ci Shi path list is:
Path list one
Path order Path number
1 1
2 2
3 4
4 5
5 3
After destination object moved to path 4 from path 3, path list was as follows:
Path list two
Path order Path number
1 1
2 2
3 4
If follow object this moment on path 3, then by searching route tabulation two, find can be from the path 3 to arrive paths 2 by the skip capability of self, at this moment, amended path list is as follows:
Path order Path number
1 2
2 4
Then, follow object and judge that according to the ability of self which place arriving path 2 from current path in which way follows, and the path of the process of repetition destination object that need not be mechanical.
Accordingly, a kind of intelligent following device as shown in Figure 5, this device comprises: memory module 500, processing module 510, search module 520 and control module 530, wherein:
Memory module 500 be used to write down the destination object of being followed the path of process, these paths object according to target through the time order and function series arrangement in path.
Processing module 510 has in logic annexation with memory module 500, is used for inquiring about described memory module 500 when reaching a paths and whether storing this paths in that described destination object is every; If, then from memory module 510 the deletion destination object in this path after all paths of process, otherwise according to target object is saved in this path in the memory module 500 through the sequencing in path.
Search module 520, has in logic annexation with memory module 500, be used for beginning to search for successively the path of described memory module 500 from the path at the current place of destination object, up to search one follow the destination path that object can arrive from path, current place with self-ability till.
Control module 530 has in logic annexation with memory module 500, be used for control and follow object and arrive described destination path from path, current place, and delete destination object in the described memory module 500 before this destination path all paths of process.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.

Claims (8)

1, a kind of method follow of realizing in two-dimentional scene of game is characterized in that, set up be used to write down the destination object of being followed through the path list in path, and carry out following step:
Inquire about whether comprise this paths in the described path list when reaching a paths in that described destination object is every, if, then from described path list the deletion destination object in this path after all paths of process, otherwise according to target object is recorded in it in path list through the sequencing in path;
Described when following that object is every to reach a paths, begin to search for successively the path the described path list from the path at the current place of destination object, follow the destination path that object can arrive from path, current place with self-ability up to searching one; And
Control is followed object and is arrived described destination path from current path, and deletes all paths of destination object process before this destination path in the path list.
2, the method for claim 1 is characterized in that, in described path list, according to target object is through the sequence of event path in path.
3, method as claimed in claim 2 is characterized in that, to the table tail, according to target object by the journal path after arriving first, makes the paths record that at every turn increases newly at the table tail through the path from gauge outfit.
4, method as claimed in claim 3 is characterized in that, in the deletion path list destination object before the destination path behind all paths of process, the position of mobile route in tabulation makes destination path arrive the heading of path list successively.
5, as each described method of claim 1 to 4, it is characterized in that, determine whether and to arrive destination path from path, current place according to high jump ability of following object and long-jump ability.
6, method as claimed in claim 5 is characterized in that, when object the past path arrival destination path is followed in control, determines to enter the mode and the position of new route according to the ability of following object.
7, a kind of intelligent following device is characterized in that, comprising:
Memory module, be used to write down the destination object of being followed the path of process;
Processing module, be used for inquiring about described memory module when reaching a paths and whether storing this paths in that described destination object is every, if, then from memory module the deletion destination object in this path after all paths of process, otherwise according to target object is saved in it in memory module through the sequencing in path;
Search module is used for beginning to search for successively from the path at the current place of destination object the path of described memory module, follows the destination path that object can arrive from path, current place with self-ability up to searching one;
Control module is used for control and follows object and arrive described destination path from path, current place, and delete destination object in the described memory module before this destination path all paths of process.
8, device as claimed in claim 7 is characterized in that, in described memory module, according to target object is through the time sequencing in path record path successively.
CNB2005101077942A 2005-09-30 2005-09-30 Method and device for tracking in three-dimensional game scene Active CN100410955C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005101077942A CN100410955C (en) 2005-09-30 2005-09-30 Method and device for tracking in three-dimensional game scene

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005101077942A CN100410955C (en) 2005-09-30 2005-09-30 Method and device for tracking in three-dimensional game scene

Publications (2)

Publication Number Publication Date
CN1940948A true CN1940948A (en) 2007-04-04
CN100410955C CN100410955C (en) 2008-08-13

Family

ID=37959123

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005101077942A Active CN100410955C (en) 2005-09-30 2005-09-30 Method and device for tracking in three-dimensional game scene

Country Status (1)

Country Link
CN (1) CN100410955C (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101742111B (en) * 2008-11-14 2013-05-08 国际商业机器公司 Method and device for recording incident in virtual world
CN104645616A (en) * 2015-03-16 2015-05-27 成都优聚软件有限责任公司 Method and system for setting moving path of game object in tower defence game
CN109843403A (en) * 2016-10-31 2019-06-04 喀普康有限公司 The control method of game system and game system
TWI664836B (en) * 2017-01-13 2019-07-01 大陸商騰訊科技(深圳)有限公司 Methord, device and server for controlling route search for simulated objects
CN110292773A (en) * 2019-07-04 2019-10-01 珠海西山居移动游戏科技有限公司 A kind of role movement follower method and device calculate equipment and storage medium
CN113827974A (en) * 2021-09-27 2021-12-24 网易(杭州)网络有限公司 AI role control method and device in game

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2481815C (en) * 1992-11-20 2008-11-18 Yuji Naka Display control method
US5513307A (en) * 1992-11-20 1996-04-30 Sega Of America, Inc. Video game with switchable collision graphics
JP2667656B2 (en) * 1995-09-12 1997-10-27 コナミ株式会社 Driving game machine
JP3515127B2 (en) * 1996-07-04 2004-04-05 株式会社セガ Image processing apparatus, game machine, image display method, and recording medium
JP3317956B2 (en) * 2000-04-14 2002-08-26 コナミ株式会社 GAME SYSTEM, GAME DEVICE, GAME DEVICE CONTROL METHOD, AND INFORMATION STORAGE MEDIUM
JP2004337256A (en) * 2003-05-13 2004-12-02 Konami Computer Entertainment Yokyo Inc Game apparatus, method for controlling game machine, and program
US8133115B2 (en) * 2003-10-22 2012-03-13 Sony Computer Entertainment America Llc System and method for recording and displaying a graphical path in a video game
EP1541208A1 (en) * 2003-10-22 2005-06-15 Sony Computer Entertainment America Inc. System and method for utilizing vectors in a video game
KR20050086035A (en) * 2004-02-24 2005-08-30 엔에이치엔(주) A method for growing a game character by using mastery mechanism and a system thereof

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101742111B (en) * 2008-11-14 2013-05-08 国际商业机器公司 Method and device for recording incident in virtual world
CN104645616A (en) * 2015-03-16 2015-05-27 成都优聚软件有限责任公司 Method and system for setting moving path of game object in tower defence game
CN109843403A (en) * 2016-10-31 2019-06-04 喀普康有限公司 The control method of game system and game system
CN109843403B (en) * 2016-10-31 2022-10-14 喀普康有限公司 Game system and control method of game system
TWI664836B (en) * 2017-01-13 2019-07-01 大陸商騰訊科技(深圳)有限公司 Methord, device and server for controlling route search for simulated objects
CN110292773A (en) * 2019-07-04 2019-10-01 珠海西山居移动游戏科技有限公司 A kind of role movement follower method and device calculate equipment and storage medium
CN110292773B (en) * 2019-07-04 2023-03-21 珠海西山居数字科技有限公司 Role movement following method and device, computing equipment and storage medium
CN113827974A (en) * 2021-09-27 2021-12-24 网易(杭州)网络有限公司 AI role control method and device in game

Also Published As

Publication number Publication date
CN100410955C (en) 2008-08-13

Similar Documents

Publication Publication Date Title
CN1940948A (en) Method and device for tracking in three-dimensional game scene
Sarlin et al. From coarse to fine: Robust hierarchical localization at large scale
CN106556406B (en) Multi-AGV scheduling method
EP2972751B1 (en) Method and apparatus to reduce access time in a data storage device using coded seeking
US9489388B2 (en) Computing system, host system and method for managing data
CN103164490B (en) A kind of efficient storage implementation method of not fixed-length data and device
CN101493330B (en) Map vector data rarefying method in network navigation of mobile phone
CN1797351A (en) Method for switching multiple operation systems of computer
US20140095772A1 (en) Computing system and method of managing data in the computing system
CN111338360B (en) Method and device for planning vehicle driving state
KR20140068228A (en) Beamforming for wireless communication
CN111923902A (en) Parking control method and device, electronic equipment and storage medium
CN112379697A (en) Trajectory planning method and device, trajectory planner, unmanned aerial vehicle and storage medium
CN104784934A (en) Method for moving game role
CN111958590A (en) Mechanical arm anti-collision method and system in complex three-dimensional environment
CN112372632A (en) Mechanical arm motion control method and device and computer readable storage medium
US10777218B2 (en) Disk-drive with efficient command reordering
CN113885554B (en) Distributed capture control method and system for unmanned aerial vehicle clusters
CN109636045B (en) Vehicle interception method for solving Thiessen polygon shortest path based on ant colony algorithm
CN103019963A (en) Cache mapping method and storage device
CN1191520C (en) TCAM high speed updating method supporting route compress
CN1578301A (en) Method and apparatus for editing a data stream
CN104133785A (en) Method for achieving cache coherency of double-control storage server with mixed catalogs
CN101237546A (en) High-speed audio and video magnitude storage method and device for vehicular environment
CN115066677A (en) Dynamic memory address encoding

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: TENCENT DIGITAL (SHENZHEN ) CO., LTD.

Free format text: FORMER OWNER: TENCENT TECHNOLOGY (SHENZHEN) CO., LTD.

Effective date: 20081017

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20081017

Address after: Room 105, temporary customs building, Dan Dao Avenue, Da Industry Zone, Longgang District, Guangdong, Shenzhen

Patentee after: Tencent, (Shenzhen) Inc.

Address before: Room 410, east 2, SEG Science Park, Zhenxing Road, Shenzhen, Guangdong, Futian District

Patentee before: Tengxun Sci-Tech (Shenzhen) Co., Ltd.