CN107185242B - More unit method for searching and device - Google Patents
More unit method for searching and device Download PDFInfo
- Publication number
- CN107185242B CN107185242B CN201710288007.1A CN201710288007A CN107185242B CN 107185242 B CN107185242 B CN 107185242B CN 201710288007 A CN201710288007 A CN 201710288007A CN 107185242 B CN107185242 B CN 107185242B
- Authority
- CN
- China
- Prior art keywords
- unit
- guide
- barrier
- pathfinding
- group
- 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.)
- Active
Links
Classifications
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/55—Controlling game characters or game objects based on the game progress
- A63F13/56—Computing the motion of game characters with respect to other game characters, game objects or elements of the game scene, e.g. for simulating the behaviour of a group of virtual soldiers or for path finding
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention discloses a kind of more unit method for searching and devices, belong to field of computer technology.The method includes:Automatic pathfinding is carried out to unit group, generates the pathfinding guide moved along the destination path in map;The unit group includes n unit, and n is the integer more than 1;Controlling the unit in the unit group follows the pathfinding guide to move;Unit in the unit group between the barrier in the map at a distance from when being less than pre-determined distance, generate evacuation guide, control the unit in the unit group and follow the evacuation guide around barrier movement.Solve in the related technology respectively to each unit carry out pathfinding when, the less efficient problem of pathfinding;Achieve the effect that pathfinding efficiency can be improved.
Description
Technical field
The present embodiments relate to field of computer technology, more particularly to a kind of more unit method for searching and device.
Background technology
Would generally include multiple lists transportable in map in role-play interaction class application program, in application program
Position.For example, may include multiple transportable soldiers etc. in map.
In relevant programme, in order to enable each unit can reach specified position, terminal can to each unit respectively into
The automatic pathfinding of row, and control each unit along automatic seeking rood to path move.
When the quantity of unit is more, the pathfinding of terminal is less efficient in said program.
Invention content
In order to solve the problems in the existing technology, an embodiment of the present invention provides a kind of more unit method for searching and dresses
It sets.Technical solution is as follows:
According to a first aspect of the embodiments of the present invention, a kind of more unit method for searching are provided, this method includes:
Automatic pathfinding is carried out to unit group, generates the pathfinding guide moved along the destination path in map;The list
Position group includes n unit, and n is the integer more than 1, and the pathfinding guide is for determining in map from starting point to end point
Between mobile route;
Controlling the unit in the unit group follows the pathfinding guide to move;
Unit in the unit group between the barrier in the map at a distance from when being less than pre-determined distance, it is raw
At evacuation guide, controls the unit in the unit group and the evacuation guide is followed to be moved around the barrier.
According to a second aspect of the embodiments of the present invention, a kind of more unit path-seeking devices are provided, which includes:
Generation module, for carrying out automatic pathfinding to unit group, generation is sought along what the destination path in map moved
Road direction is led;The unit group includes n unit, and n is the integer more than 1, the pathfinding guide for determine in map from
Starting point is to the mobile route between end point;
Control module follows the pathfinding guide to move for controlling the unit in the unit group;
Mobile module, for the unit in the unit group between the barrier in the map at a distance from be less than
When pre-determined distance, evacuation guide is generated, the unit in the unit group is controlled and the evacuation guide is followed to bypass the obstacle
Object moves.
The advantageous effect that technical solution provided in an embodiment of the present invention is brought is:
By by n unit group as a unit, generating the pathfinding guide of the unit group, in control unit group
Unit follow pathfinding guide to move, and the unit in unit group between the barrier in map at a distance from be less than it is default
Apart from when, generate evacuation guide, the unit in control unit group follows evacuation guide cut-through object movement;Namely pass through by
Multiple units carry out automatic pathfinding as a whole, so only between barrier at a distance from it is smaller when generate evacuation to
Lead, solve in the related technology respectively to each unit carry out pathfinding when, the less efficient problem of pathfinding;Having reached can improve
The effect of pathfinding efficiency.
Description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those of ordinary skill in the art, without creative efforts, other are can also be obtained according to these attached drawings
Attached drawing.
Fig. 1 is the flow chart of more unit method for searching provided by one embodiment of the present invention;
Fig. 2 is the signal of the position of the pathfinding guide determined in more unit method for searching provided by one embodiment of the present invention
Figure;
Fig. 3 is the moving direction after being collided with barrier in more unit method for searching provided by one embodiment of the present invention
Schematic diagram;
Fig. 4 is various possible after being collided with barrier in more unit method for searching provided by one embodiment of the present invention
The schematic diagram of scene;
Fig. 5 is various possible after being collided with barrier in more unit method for searching provided by one embodiment of the present invention
Another schematic diagram of scene;
Fig. 6 is the signal of the position of the dispersion guide determined in more unit method for searching provided by one embodiment of the present invention
Figure;
Fig. 7, which is that one kind of dispersion guide movement in more unit method for searching provided by one embodiment of the present invention is possible, to be shown
It is intended to;
Fig. 8 is the moving rail of each unit of j unit in more unit method for searching provided by one embodiment of the present invention
The schematic diagram of mark;
Fig. 9 is the schematic diagram of more unit path-seeking devices provided by one embodiment of the present invention;
Figure 10 is the schematic diagram of terminal provided by one embodiment of the present invention.
Specific implementation mode
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention
Formula is described in further detail.
In order to make it easy to understand, doing simple introduction to term involved in each embodiment first.
Unit:The transportable object in the map at interface.For example, in map, unit refers to that can move
Strange beast or personage etc..
Guide:Object for guiding at least one unit movement.Under normal conditions, guide is virtual, in map simultaneously
It will not show the guide.
In following each embodiments, n unit in map is seen as an entirety (namely unit group), to list
Position group carries out pathfinding, generates the pathfinding guide moved along destination path, and the n unit then controlled in unit group follows
Pathfinding guide is moved, and n is the integer more than or equal to 2, and destination path is to be moved between end point from the starting point in map
Path, starting point are according to the position of the location determination of each unit in unit group, and end point is preset position in map
It sets.Since pathfinding guide has already passed through a pathfinding, pathfinding guide can't encounter barrier in moving process, however
Due to that can have certain distance between n unit and between n unit and pathfinding guide, follow pathfinding in n unit
During guide is moved, some or certain several units in n unit may encounter barrier.At this point, in order to enable
Unit can be generated with cut-through object, terminal evacuation guide, and control the unit in unit group follow evacuation guide around
Cross barrier movement.
Above-mentioned n described unit is each unit that movement law is consistent in map.Optionally, which can be with
For all units in map, or the fractional unit being distributed according to a certain rule in map, for example, n unit is ground
The unit that array distribution and array move in figure, the present embodiment do not limit this.
Referring to FIG. 1, it illustrates the method flow diagrams of more unit method for searching provided by one embodiment of the present invention, such as
Shown in Fig. 1, which may include:
Step 101, automatic pathfinding is carried out to unit group, generate the pathfinding moved along the destination path in map to
It leads;Unit group includes n unit, and n is the integer more than 1.
All there are one corresponding positions in map for each unit, and terminal can be according to each unit in unit group
Position determines the initial position of pathfinding guide, generates from starting point to the destination path between end point, and then obtain from first
The pathfinding guide that beginning position is started, moved along the destination path of generation with pre-set velocity.Wherein, starting point is the initial of generation
Position, end point are preset position or the user customized position in map in system, are not limited this;It is default
Speed is that the speed of acquiescence or user-defined speed, the present embodiment also do not limit this.
Terminal includes according to the step of initial position of the location determination pathfinding guide of each unit:Calculate each unit
The weighted average of position, using the position after obtained weighted average as the initial position of the pathfinding guide.For example, please referring to figure
2, it is assumed that the position of n unit as shown, the position for the pathfinding guide that then terminal determines can be 21 in figure shown in
Position.Certainly, in actual implementation, terminal can also seek the position of centre of gravity of the position of each unit or orthocenter position as this
The initial position that road direction is led, the present embodiment do not limit its calculation.
Terminal is generated from starting point to the step of destination path between end point:Terminal is in determining initial position
On the basis of according to preset pathfinding algorithm obtain the destination path.Wherein, preset pathfinding algorithm be ASTAR (A stars) algorithms or
Grid pathfinding algorithm, the present embodiment do not limit this.
Step 102, the unit in control unit group follows pathfinding guide to move.
N unit is during following pathfinding guide to move, the movement speed of n unit and the mobile speed of pathfinding guide
Spend identical, and the relative position between n unit and pathfinding guide remains unchanged.
Step 103, if unit group when the distance between unit and barrier in unit group is less than the pre-determined distance
I unit in group is moved towards the side of barrier, then generates the dispersion guide corresponding to i unit, is controlled i unit and is protected
The constant movement of relative distance with dispersion guide is held, i is the integer less than or equal to n.
Dispersion guide refers to for guiding i unit around the guide of the barrier of collision.
Barrier refers to the object for the movement for hindering unit being arranged in map.In actual implementation, the barrier
Can be the static motionless object in position, for example, barrier can be that mountain, river, building or other any positions are static
Motionless object;Can also be that position can be with the object of dynamic change, for example, the monster that barrier can be as unit of in advance figure
Beast, enemy army etc..Also, the barrier in map can there are one, it is possibility to have at least two, the present embodiment does not do this
It limits.
In the present embodiment, the distance between unit and barrier in unit group refer to unit group less than pre-determined distance
In any unit and the distance between barrier be less than pre-determined distance.Wherein, pre-determined distance can be to be preset in system
Distance, or user-defined numerical value, and under normal conditions, the pre-determined distance are the smaller numerical value of numerical value, than
Such as can be 0.It is following unless otherwise specified, with pre-determined distance 0 namely to collide and illustrate.
Moving direction of the unit after being collided with barrier in unit group, the angle with unit and barrier collision
It is related.Optionally, unit is moved with after barrier collision towards unit and the tangential direction of barrier.For example, please referring to figure
3, it is assumed that with the position of collision of two units of barrier collision and barrier as shown, then wherein unit 31 in unit group
It is moved towards the upside 34 of barrier 32, and unit 33 is moved towards the downside 35 of barrier 32.
The side of barrier refers to the side of all barriers of unit group collision.For example, what if unit group collided
Barrier is one, then the side of barrier is certain side of a barrier;And if the barrier of unit group collision
It is at least two, then the side of barrier is the side of at least two barrier, also will at least two barrier work
For an entirety, the side of barrier is the side of the entirety.
In actual implementation, may include following several situations according to actual collision scene.
The first, only includes the unit moved towards barrier side.For example, referring to FIG. 4, it illustrates a kind of possibility
Collision schematic diagram.As shown in (1) figure in Fig. 4, after the unit in unit group is collided with barrier, in unit group
All units towards barrier upside move.Wherein, each figure in Fig. 4 is barrier with filling, unfilled to be
For unit.
Second, while including the unit moved towards barrier both sides.Wherein, the unit moved towards barrier both sides
Number can be identical or different, the present embodiment does not limit this.For example, referring to FIG. 6, it illustrates another kinds can
The collision schematic diagram of energy.As shown in (2) figure in Fig. 4, it is assumed that the unit in unit group has 4, then is collided with barrier
Later, wherein 2 units are moved to the upside of barrier, 3 units are moved to the downside of barrier.
The third, only includes towards unit mobile among two barriers.For example, (3) figure in please referring to Fig.4,
Show a kind of possible collision schematic diagram.
4th kind, while including the unit moved towards barrier side and the unit towards movement among barrier.
(4) figure in please referring to Fig.4, it illustrates a kind of possible collision schematic diagrames at this time.
5th kind, while including the unit moved towards barrier both sides and the unit towards movement among barrier.
(5) figure in please referring to Fig.4, it illustrates a kind of possible collision schematic diagrames at this time.
Certainly in actual implementation, may include court towards in the unit of barrier centre movement according to the distribution of barrier
Can also include mobile among each two barrier in 3 barriers of direction simultaneously to the intermediate mobile unit of two units
Unit, for example, referring to FIG. 5, it illustrates a kind of possible collision schematic diagrames.
Based on above-mentioned collision scene, dispersion guide can there are one, it is possibility to have two.For example, it is above-mentioned the first and
In 4th kind of scene, disperse there are one guides, and at second and in the 5th kind of scene, disperses there are two guides, the present embodiment
Number to disperseing guide does not limit.
I unit keeps constant with the relative position of dispersion guide during following dispersion guide movement.
Step 104, if when the distance between unit and barrier in unit group are less than pre-determined distance in unit group
J unit towards the intermediate mobile of two barriers in barrier, then generate the guide of gathering corresponding to j unit, control
J unit processed follows to gather to be gathered to the centre for being oriented to two barriers, and j is the positive integer less than or equal to n.
It refers to the guide that the centre for guiding j unit towards two barriers of collision is gathered to gather guide, this is poly-
Holding together guide follows pathfinding to move.
J unit can be carried out part and overlapped by terminal, so that j unit after overlapping can be to two barriers
Centre gather.Optionally, if there are gaps, terminal can also remove gap between two neighboring unit in j unit, into
And so that j unit is gathered to the centre of two barriers, in actual implementation, if after removal gap, j unit still can not
Gather from the centre of two barriers, then terminal can carry out j unit partly overlapping, and the present embodiment does not limit this
It is fixed.The present embodiment makes j unit gather to the centre of two barriers by the way of overlapping, ensure that each unit
Normal display.In actual implementation, terminal can also carry out Scaling to j unit, and the present embodiment does not limit this.
In conclusion more unit method for searching provided in this embodiment, by by n unit group as a unit,
The pathfinding guide of the unit group is generated, the unit in control unit group follows pathfinding guide to move, and in unit group
Unit and map in the distance between barrier when being less than pre-determined distance, evacuation guide is generated, in control unit group
Unit follows evacuation guide cut-through object movement;Namely by the way that multiple units are carried out automatic pathfinding as a whole, into
And only between barrier at a distance from it is smaller when generate evacuation guide, solve in the related technology respectively to each unit into
When row pathfinding, the less efficient problem of pathfinding;Achieve the effect that pathfinding efficiency can be improved.
In step 103, generate i unit corresponding to dispersion guide the step of may include:
First, the first position of guide is disperseed according to the location determination of i unit.
For example, in conjunction with Fig. 6, terminal can be obtained according to the location determination of the unit 61 and 62 moved towards the upside of barrier
To the first position of dispersion guide 66, obtained according to the location determination of the unit 63,64 and 65 moved towards the downside of barrier
Disperse the first position of guide 67.
Determined in this step first position method of determination and above-described embodiment in the position of pathfinding guide is determined in step 101
The method of determination set is similar, and details are not described herein.
Second, initial position is generated for first position and according to the dispersion guide that default move mode moves, and presets movement
Mode include centered on barrier, target value be that the distance moved on preset direction in radius and unit interval is pre-
If distance, target value is the distance between the barrier of first position and collision, and preset direction is the mobile side of pathfinding guide
To pre-determined distance is the distance that pathfinding guide is moved in unit interval on preset direction.
Terminal determines after obtaining the first position of dispersion guide, and terminal can calculate the first position and the dispersion guide
The distance between the barrier that i corresponding unit is collided, using the distance as target value R.
In order to ensure each unit can it is synchronous with pathfinding guide move forward, dispersion guide in unit interval
It is identical that the distance S moved on the moving direction of pathfinding guide and pathfinding guide move distance S in the direction of movement, namely dispersion
Movement speed of the guide on the moving direction of pathfinding guide is identical as the movement speed of pathfinding guide.For example, referring to FIG. 7,
Dispersion guide can move according to move mode shown in figure.
The distance moved on preset direction in unit interval due to dispersion guide and pathfinding guide are in preset direction
The distance of upper movement is identical, and therefore, each unit in unit group can reach end point simultaneously.
At step 104, it generates corresponding to j unit and may include the step of gathering guide:
First, the second position of guide is gathered according to the location determination of j unit.
The step of this step is with the position for determining pathfinding guide in above-described embodiment is similar, and details are not described herein.Also,
In the present embodiment, if all units in j=n namely unit group are mobile to two barriers centres, at this point, determining
The location of pathfinding guide overlaps when the obtained second position is collided with the unit in unit group with barrier, the present embodiment
Details are not described herein.
Second, generate initial position be the second position and follow pathfinding guide move gather guide.
The movement speed for gathering guide is consistent with the movement speed of pathfinding guide, does not limit this.
Correspondingly, in step 104, j unit of control, which follows, gathers the step of gathering to the centre for being oriented to two barriers
May include:
First, for each unit in j unit, according to the projection of the position of unit and unit in target link
The motion track of location determination unit, target link are the line of two barriers.
Projected position of the unit in target link refers to that j unit connects after overlapping and being moved to target link in target
Position in line.In the present embodiment, j unit is moved at target link simultaneously.
Optionally, terminal determines that unit includes in the step of projected position in target link:Terminal calculates target link
Total length, j is calculated according to the distance between the size of each unit and two neighboring unit in total length, j unit
The position of unit each unit when being distributed in target link simultaneously.For example, j=4 assumes that total length is a diameter of of 10, unit
The distance between 5 and two neighboring unit are 0, then 4 units overlap 2/3, for example, asking two-by-two after reaching target link
With reference to figure 8, it illustrates a kind of possible distribution modes.
After determination obtains position of each unit in target link, terminal can be by the position of unit and determination
The line of projected position of the obtained unit in target link is obtained as motion track, such as Fig. 8 it illustrates determination
The schematic diagram of motion track.
It should be noted that above-mentioned only with j unit after reaching target link, it is distributed in entire target link and is
Example, optionally, j unit can also only occupy the portion in target link, and the present embodiment does not limit this.
Second, control unit moves along track movement.
Optionally, this step may include:
(1), it calculates to gather guide and be moved to and gathers the guide time required in the projected position in target link.
Optionally, gather projected position of the guide in target link refer to gather guide follow pathfinding guide move after
The location of when being moved to target link.In actual implementation, which can be the center of target link, this
Embodiment does not limit this.
Optionally, terminal can calculate the distance between the second position and projected position, calculate the distance and pre-set velocity
Ratio, using the ratio being calculated as the time.Wherein, pre-set velocity refers to the speed of pathfinding guide movement.
(2), the movement speed of unit is determined according to the length of motion track and time.
The ratio for calculating the length and the time determined of motion track, using the ratio as the movement speed of the unit.Its
In, since the length of the motion track corresponding to not commensurate may be different, and determine that the obtained time is identical, it is thus determined that
The movement speed of the not commensurate arrived may be different.
(3), control unit moves along track movement with movement speed.
Due to each unit in j unit according to the speed follower of above-mentioned determination gather guide movement, gather guide with
It is moved with pathfinding guide, therefore, each unit can reach end point simultaneously.
In above-mentioned each embodiment, after unit group follows evacuation guide cut-through object, in unit group
Each unit is restored to the distribution followed before evacuation guide and pathfinding guide is followed to continue to move to.
It refers to that the unit in unit group bypasses that unit group described in the present embodiment, which follows evacuation guide cut-through object,
The direction of advance of barrier and evacuation guide is consistent with the direction of advance of pathfinding guide.For example, in dispersion i unit of guide led
After cut-through object, i unit can continue that pathfinding guide is followed to move.For another example, it is followed in j unit and gathers guide and arrive
Up to after target link, j unit can restore the formation to before gathering and continue that pathfinding guide is followed to move.
Referring to FIG. 9, it illustrates the structural schematic diagrams of more unit path-seeking devices provided by one embodiment of the present invention, such as
Shown in Fig. 9, which may include:Generation module 910, control module 920 and mobile module 930.
Generation module 910, for carrying out automatic pathfinding to unit group, what generation was moved along the destination path in map
Pathfinding guide;The unit group includes n unit, and n is the integer more than 1, and the pathfinding guide is for determining in map
From starting point to the mobile route between end point;
Control module 920 follows the pathfinding guide to move for controlling the unit in the unit group;
Mobile module 930, for unit in the unit group between the barrier in the map at a distance from
When less than pre-determined distance, evacuation guide is generated, the unit in the unit group is controlled and follows the evacuation guide around described
Barrier moves.
In conclusion more unit path-seeking devices provided in this embodiment, by by n unit group as a unit,
The pathfinding guide of the unit group is generated, the unit in control unit group follows pathfinding guide to move, and in unit group
Unit and map in the distance between barrier when being less than pre-determined distance, evacuation guide is generated, in control unit group
Unit follows evacuation guide cut-through object movement;Namely by the way that multiple units are carried out automatic pathfinding as a whole, into
And only between barrier at a distance from it is smaller when generate evacuation guide, solve in the related technology respectively to each unit into
When row pathfinding, the less efficient problem of pathfinding;Achieve the effect that pathfinding efficiency can be improved
Based on more unit path-seeking devices that above-described embodiment provides, optionally, the mobile module 930 is additionally operable to:
If the distance between unit and the barrier in the unit group are less than the list when pre-determined distance
I unit in the group of position is moved towards the side of the barrier, then generates the dispersion guide corresponding to the i unit,
The constant movement of relative distance of the i unit holding and the dispersion guide is controlled, i is the integer less than or equal to n;
If the distance between unit and the barrier in the unit group are less than the list when pre-determined distance
It is right then to generate the j unit institute towards the intermediate mobile of two barriers in the barrier for j unit in the group of position
That answers gathers guide, control the j unit follow it is described gather gather to the centre for being oriented to described two barriers, j is small
In the positive integer equal to n.
Optionally, the mobile module 930, is additionally operable to:
According to the first position for disperseing guide described in the location determination of the i unit;
Generation initial position is described pre- for the first position and according to the dispersion guide that default move mode moves
If move mode include centered on the barrier, target value be to be moved on preset direction in radius and unit interval
Distance be pre-determined distance, the target value is the distance between the barrier of the first position and collision, described default
Direction is the moving direction of the pathfinding guide, and the pre-determined distance is for the pathfinding guide in institute in the unit interval
State the distance moved on preset direction.
Optionally, the mobile module 930, is additionally operable to:
According to the second position for gathering guide described in the location determination of the j unit;
Initial position is generated to be the second position and the described of pathfinding guide movement is followed to gather guide.
Optionally, the mobile module 930, is additionally operable to:
For each unit in the j unit, according to the position of the unit and the unit in target link
On projected position determine that the motion track of the unit, the target link are the line of described two barriers;
The unit is controlled to move along the motion track.
Optionally, the mobile module 930, is additionally operable to:
Gather guide described in calculating and is moved to that described to gather guide required in the projected position in the target link
Time;
The movement speed of the unit is determined according to the length of the motion track and the time;
The unit is controlled to move along the motion track with the movement speed.
Optionally, described device further includes:
Recovery module, after following the evacuation guide to bypass the barrier in the unit group, the list
Each unit in the group of position is restored to the distribution followed before the evacuation guide and the pathfinding guide is followed to continue to move to.
It should be noted that:More unit path-seeking devices that above-described embodiment provides, only with the division of above-mentioned each function module
It is illustrated, in practical application, can be completed, i.e., will by different function modules as needed and by above-mentioned function distribution
The internal structure of server is divided into different function modules, to complete all or part of the functions described above.On in addition,
The more unit path-seeking devices and more unit method for searching embodiments for stating embodiment offer belong to same design, implement process
Embodiment of the method is referred to, which is not described herein again.
The embodiment of the present invention additionally provides a kind of computer readable storage medium, which can be
Computer readable storage medium included in memory;Can also be individualism, it can without the computer in supplying terminal
Read storage medium.The computer-readable recording medium storage there are one either more than one program this or more than one
Program is used for executing above-mentioned more unit method for searching by one or more than one processor.
Figure 10 may include radio frequency it illustrates the block diagram of terminal 1000 provided by one embodiment of the present invention, the terminal
(RF, Radio Frequency) circuit 1001, include one or more computer readable storage mediums memory
1002, input unit 1003, display unit 1004, sensor 1005, voicefrequency circuit 1006, Wireless Fidelity (WiFi, Wireless
Fidelity) module 1007, include there are one or more than one processing core processor 1008 and the portions such as power supply 1009
Part.It will be understood by those skilled in the art that the restriction of the not structure paired terminal of terminal structure shown in Figure 10, may include ratio
More or fewer components are illustrated, certain components or different components arrangement are either combined.Wherein:
RF circuits 1001 can be used for receiving and sending messages or communication process in, signal sends and receivees, particularly, by base station
After downlink information receives, one or the processing of more than one processor 1008 are transferred to;In addition, the data for being related to uplink are sent to
Base station.In general, RF circuits 1001 include but not limited to antenna, at least one amplifier, tuner, one or more oscillator,
Subscriber identity module (SIM, Subscriber Identity Module) card, transceiver, coupler, low-noise amplifier
(LNA, Low Noise Amplifier), duplexer etc..In addition, RF circuits 1001 can also by radio communication with network and
Other equipment communicates.The wireless communication can use any communication standard or agreement, including but not limited to global system for mobile telecommunications
System (GSM, Global System of Mobile communication), general packet radio service (GPRS, General
Packet Radio Service), CDMA (CDMA, Code Division Multiple Access), wideband code division it is more
Location (WCDMA, Wideband Code Division Multiple Access), long term evolution (LTE, Long Term
Evolution), Email, short message service (SMS, Short Messaging Service) etc..
Memory 1002 can be used for storing software program and module, and processor 1008 is stored in memory by operation
1002 software program and module, to perform various functions application and data processing.Memory 1002 can include mainly
Storing program area and storage data field, wherein storing program area can storage program area, the application journey needed at least one function
Sequence (such as sound-playing function, image player function etc.) etc.;Storage data field can be stored to be created according to using for terminal
Data (such as audio data, phone directory etc.) etc..In addition, memory 1002 may include high-speed random access memory, may be used also
To include nonvolatile memory, for example, at least a disk memory, flush memory device or other volatile solid-states
Part.Correspondingly, memory 1002 can also include Memory Controller, to provide processor 1008 and input unit 1003 to depositing
The access of reservoir 1002.
Input unit 1003 can be used for receiving the number or character information of input, and generate and user setting and function
Control related keyboard, mouse, operating lever, optics or the input of trace ball signal.Specifically, in a specific embodiment
In, input unit 1003 may include touch sensitive surface and other input equipments.Touch sensitive surface, also referred to as touch display screen or tactile
Control plate, collect user on it or neighbouring touch operation (such as user using any suitable object such as finger, stylus or
Operation of the attachment on touch sensitive surface or near touch sensitive surface), and corresponding connection dress is driven according to preset formula
It sets.Optionally, touch sensitive surface may include both touch detecting apparatus and touch controller.Wherein, touch detecting apparatus is examined
The touch orientation of user is surveyed, and detects the signal that touch operation is brought, transmits a signal to touch controller;Touch controller from
Touch information is received on touch detecting apparatus, and is converted into contact coordinate, then gives processor 1008, and can reception processing
Order that device 1008 is sent simultaneously is executed.Furthermore, it is possible to more using resistance-type, condenser type, infrared ray and surface acoustic wave etc.
Type realizes touch sensitive surface.In addition to touch sensitive surface, input unit 1003 can also include other input equipments.Specifically,
His input equipment can include but is not limited to physical keyboard, function key (such as volume control button, switch key etc.), track
It is one or more in ball, mouse, operating lever etc..
Display unit 1004 can be used for showing information input by user or be supplied to user information and terminal it is each
Kind graphical user interface, these graphical user interface can be made of figure, text, icon, video and its arbitrary combination.It is aobvious
Show that unit 1004 may include display panel, optionally, liquid crystal display (LCD, Liquid Crystal may be used
Display), the forms such as Organic Light Emitting Diode (OLED, Organic Light-Emitting Diode) configure display surface
Plate.Further, touch sensitive surface can cover display panel, when touch sensitive surface detects on it or after neighbouring touch operation,
Processor 1008 is sent to determine the type of touch event, is followed by subsequent processing device 1008 according to the type of touch event in display surface
Corresponding visual output is provided on plate.Although in Fig. 10, touch sensitive surface with display panel is come as two independent components
It realizes input and input function, but in some embodiments it is possible to touch sensitive surface and display panel is integrated and realizes and inputs
And output function.
Terminal may also include at least one sensor 1005, such as optical sensor, motion sensor and other sensors.
Specifically, optical sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can be according to ambient light
Light and shade adjust the brightness of display panel, proximity sensor can close display panel and/or the back of the body when terminal is moved in one's ear
Light.As a kind of motion sensor, gravity accelerometer can detect in all directions (generally three axis) acceleration
Size can detect that size and the direction of gravity when static, can be used to identify mobile phone posture application (such as horizontal/vertical screen switching,
Dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;It can also configure as terminal
The other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, details are not described herein.
Voicefrequency circuit 1006, loud speaker, microphone can provide the audio interface between user and terminal.Voicefrequency circuit 1006
The transformed electric signal of the audio data received can be transferred to loud speaker, voice signal output is converted to by loud speaker;Separately
On the one hand, the voice signal of collection is converted to electric signal by microphone, and audio data is converted to after being received by voicefrequency circuit 1006,
Again by after the processing of audio data output processor 1008, through RF circuits 1001 to be sent to such as another terminal, or by audio
Data export to memory 1002 to be further processed.Voicefrequency circuit 1006 is also possible that earphone jack, to provide peripheral hardware
The communication of earphone and terminal.
WiFi belongs to short range wireless transmission technology, and terminal can help user's transceiver electronics postal by WiFi module 1007
Part, browsing webpage and access streaming video etc., it has provided wireless broadband internet to the user and has accessed.Although Figure 10 is shown
WiFi module 1007, but it is understood that, and it is not belonging to must be configured into for terminal, it can not change as needed completely
Become in the range of the essence of invention and omits.
Processor 1008 is the control centre of terminal, using the various pieces of various interfaces and connection whole mobile phone,
By running or execute the software program and/or module that are stored in memory 1002, and calls and be stored in memory 1002
Interior data execute the various functions and processing data of terminal, to carry out integral monitoring to mobile phone.Optionally, processor
1008 may include one or more processing cores;Preferably, processor 1008 can integrate application processor and modulation /demodulation processing
Device, wherein the main processing operation system of application processor, user interface and application program etc., modem processor is mainly located
Reason wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 1008.
Terminal further includes the power supply 1010 (such as battery) powered to all parts, it is preferred that power supply can pass through power supply
Management system and processor 1008 are logically contiguous, to realize management charging, electric discharge and power consumption pipe by power-supply management system
The functions such as reason.Power supply 1010 can also include one or more direct current or AC power, recharging system, power failure
The random components such as detection circuit, power supply changeover device or inverter, power supply status indicator.
Although being not shown, terminal can also include camera, bluetooth module etc., and details are not described herein.Specifically in this implementation
In example, the processor 1008 in terminal can run the one or more program instruction being stored in memory 1002, from
And realize the terminal provided in above-mentioned each embodiment of the method.
It should be understood that it is used in the present context, unless context clearly supports exception, singulative " one
It is a " (" a ", " an ", " the ") be intended to also include plural form.It is to be further understood that "and/or" used herein is
Finger includes one or the arbitrary and all possible combinations of more than one project listed in association.
The embodiments of the present invention are for illustration only, can not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that realizing that all or part of step of above-described embodiment can pass through hardware
It completes, relevant hardware can also be instructed to complete by program, the program can be stored in a kind of computer-readable
In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all the present invention spirit and
Within principle, any modification, equivalent replacement, improvement and so on should all be included in the protection scope of the present invention.
Claims (14)
1. a kind of more unit method for searching, which is characterized in that the method includes:
Automatic pathfinding is carried out to unit group, generates the pathfinding guide moved along the destination path in map;The unit group
Group includes n unit, and n is the integer more than 1;
Controlling the unit in the unit group follows the pathfinding guide to move;
Unit in the unit group between the barrier in the map at a distance from when being less than pre-determined distance, generation is kept away
It allows guide, controls the unit in the unit group and the evacuation guide is followed to be moved around the barrier.
2. according to the method described in claim 1, it is characterized in that, generation evacuation guide, controls in the unit group
Unit follow the evacuation guide around the barrier move, including:
If the distance between unit and the barrier in the unit group are less than the unit group when pre-determined distance
I unit in group is moved towards the side of the barrier, then generates the dispersion guide corresponding to the i unit, is controlled
It is the integer less than or equal to n that the i unit, which keeps the constant movement of relative distance with the dispersion guide, i,;
If the distance between unit and the barrier in the unit group are less than the unit group when pre-determined distance
J unit in group is then generated towards the intermediate mobile of two barriers in the barrier corresponding to the j unit
Gather guide, control the j unit follow it is described gather gather to the centre for being oriented to described two barriers, j be less than etc.
In the positive integer of n.
3. according to the method described in claim 2, it is characterized in that, the dispersion guide generated corresponding to the i unit,
Including:
According to the first position for disperseing guide described in the location determination of the i unit;
Initial position is generated for the first position and according to the dispersion guide that default move mode moves, the default shifting
Flowing mode include centered on the barrier, target value be moved on preset direction in radius and unit interval away from
From for pre-determined distance, the target value is the distance between the barrier of the first position and collision, the preset direction
For the moving direction of the pathfinding guide, the pre-determined distance is for the pathfinding guide described pre- in the unit interval
The distance moved on set direction.
4. according to the method described in claim 2, it is characterized in that, described generate gathers guide corresponding to the j unit,
Including:
According to the second position for gathering guide described in the location determination of the j unit;
Initial position is generated to be the second position and the described of pathfinding guide movement is followed to gather guide.
5. according to the method described in claim 2, it is characterized in that, the control j unit follow described in gather guide
Gather to the centre of described two barriers, including:
For each unit in the j unit, according to the position of the unit and the unit in target link
Projected position determines that the motion track of the unit, the target link are the line of described two barriers;
The unit is controlled to move along the motion track.
6. according to the method described in claim 5, it is characterized in that, the control unit is moved along the motion track
It is dynamic, including:
Gather guide described in calculating and be moved to and described gathers the guide time required in the projected position in the target link;
The movement speed of the unit is determined according to the length of the motion track and the time;
The unit is controlled to move along the motion track with the movement speed.
7. method according to any one of claims 1 to 6, which is characterized in that the method further includes:
After the unit group follows the evacuation guide to bypass the barrier, each unit in the unit group
Restore to the distribution followed before the evacuation guide and the pathfinding guide is followed to continue to move to.
8. a kind of more unit path-seeking devices, which is characterized in that described device includes:
Generation module, for carrying out automatic pathfinding to unit group, generate the pathfinding moved along the destination path in map to
It leads;The unit group includes n unit, and n is the integer more than 1;
Control module follows the pathfinding guide to move for controlling the unit in the unit group;
Mobile module, for unit in the unit group between the barrier in the map at a distance from be less than it is default
Apart from when, generate evacuation guide, control the unit in the unit group follow the evacuation guide around the barrier shifting
It is dynamic.
9. device according to claim 8, which is characterized in that the mobile module is additionally operable to:
If the distance between unit and the barrier in the unit group are less than the unit group when pre-determined distance
I unit in group is moved towards the side of the barrier, then generates the dispersion guide corresponding to the i unit, is controlled
It is the integer less than or equal to n that the i unit, which keeps the constant movement of relative distance with the dispersion guide, i,;
If the distance between unit and the barrier in the unit group are less than the unit group when pre-determined distance
J unit in group is then generated towards the intermediate mobile of two barriers in the barrier corresponding to the j unit
Gather guide, control the j unit follow it is described gather gather to the centre for being oriented to described two barriers, j be less than etc.
In the positive integer of n.
10. device according to claim 9, which is characterized in that the mobile module is additionally operable to:
According to the first position for disperseing guide described in the location determination of the i unit;
Initial position is generated for the first position and according to the dispersion guide that default move mode moves, the default shifting
Flowing mode include centered on the barrier, target value be moved on preset direction in radius and unit interval away from
From for pre-determined distance, the target value is the distance between the barrier of the first position and collision, the preset direction
For the moving direction of the pathfinding guide, the pre-determined distance is for the pathfinding guide described pre- in the unit interval
The distance moved on set direction.
11. device according to claim 9, which is characterized in that the mobile module is additionally operable to:
According to the second position for gathering guide described in the location determination of the j unit;
Initial position is generated to be the second position and the described of pathfinding guide movement is followed to gather guide.
12. device according to claim 9, which is characterized in that the mobile module is additionally operable to:
For each unit in the j unit, according to the position of the unit and the unit in target link
Projected position determines that the motion track of the unit, the target link are the line of described two barriers;
The unit is controlled to move along the motion track.
13. device according to claim 12, which is characterized in that the mobile module is additionally operable to:
Gather guide described in calculating and be moved to and described gathers the guide time required in the projected position in the target link;
The movement speed of the unit is determined according to the length of the motion track and the time;
The unit is controlled to move along the motion track with the movement speed.
14. according to any device of claim 8 to 13, which is characterized in that described device further includes:
Recovery module, after following the evacuation guide to bypass the barrier in the unit group, the unit group
Each unit in group is restored to the distribution followed before the evacuation guide and the pathfinding guide is followed to continue to move to.
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710288007.1A CN107185242B (en) | 2017-04-27 | 2017-04-27 | More unit method for searching and device |
PCT/CN2018/071882 WO2018130135A1 (en) | 2017-01-13 | 2018-01-09 | Method and device for controlling way-finding of simulation object, and server |
TW107101326A TWI664836B (en) | 2017-01-13 | 2018-01-12 | Methord, device and server for controlling route search for simulated objects |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710288007.1A CN107185242B (en) | 2017-04-27 | 2017-04-27 | More unit method for searching and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107185242A CN107185242A (en) | 2017-09-22 |
CN107185242B true CN107185242B (en) | 2018-09-04 |
Family
ID=59872558
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710288007.1A Active CN107185242B (en) | 2017-01-13 | 2017-04-27 | More unit method for searching and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107185242B (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018130135A1 (en) * | 2017-01-13 | 2018-07-19 | 腾讯科技(深圳)有限公司 | Method and device for controlling way-finding of simulation object, and server |
CN107754305A (en) * | 2017-10-13 | 2018-03-06 | 网易(杭州)网络有限公司 | Information processing method and device, storage medium, electronic equipment |
CN107744663B (en) * | 2017-10-19 | 2020-10-13 | 阿里巴巴(中国)有限公司 | Path finding method and device for artificial intelligence AI unit |
CN108939547B (en) * | 2018-07-04 | 2019-06-21 | 苏州玩友时代科技股份有限公司 | A kind of optimal path acquisition methods, device, equipment and storage medium |
US11511191B2 (en) | 2020-08-05 | 2022-11-29 | Shanghai Lilith Technology Corporation | Interactive control system and method for game objects, server and computer-readable storage medium |
CN113426103A (en) * | 2021-07-05 | 2021-09-24 | 网易(杭州)网络有限公司 | Virtual character movement control method and device, electronic equipment and storage medium |
CN113827974A (en) * | 2021-09-27 | 2021-12-24 | 网易(杭州)网络有限公司 | AI role control method and device in game |
CN114440882B (en) * | 2022-02-07 | 2023-10-31 | 电子科技大学 | Multi-intelligent home mobile device and collaborative road-finding anti-collision method thereof |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103893969A (en) * | 2014-04-15 | 2014-07-02 | 广州博冠信息科技有限公司 | Way-finding method and device in game |
CN105031921A (en) * | 2015-02-15 | 2015-11-11 | 北京乐动卓越信息技术有限公司 | Anticollision method and system in game object disordered mobile process |
CN105498209A (en) * | 2015-11-30 | 2016-04-20 | 厦门飞信网络科技有限公司 | Map generation method and device preventing barrier locus superposition |
WO2016153260A1 (en) * | 2015-03-23 | 2016-09-29 | 김진영 | Touch-based timing game device and 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 |
CN106582023A (en) * | 2016-12-01 | 2017-04-26 | 北京像素软件科技股份有限公司 | Game path-searching method and apparatus |
-
2017
- 2017-04-27 CN CN201710288007.1A patent/CN107185242B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103893969A (en) * | 2014-04-15 | 2014-07-02 | 广州博冠信息科技有限公司 | Way-finding method and device in game |
CN105031921A (en) * | 2015-02-15 | 2015-11-11 | 北京乐动卓越信息技术有限公司 | Anticollision method and system in game object disordered mobile process |
WO2016153260A1 (en) * | 2015-03-23 | 2016-09-29 | 김진영 | Touch-based timing game device and method |
CN105498209A (en) * | 2015-11-30 | 2016-04-20 | 厦门飞信网络科技有限公司 | Map generation method and device preventing barrier locus superposition |
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 |
CN106582023A (en) * | 2016-12-01 | 2017-04-26 | 北京像素软件科技股份有限公司 | Game path-searching method and apparatus |
Also Published As
Publication number | Publication date |
---|---|
CN107185242A (en) | 2017-09-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107185242B (en) | More unit method for searching and device | |
CN104065982B (en) | The method and apparatus of live streaming media | |
CN109011575B (en) | A kind of automatic method for searching, device and equipment | |
CN103458305B (en) | Video broadcasting method, device, terminal unit server | |
CN104764458B (en) | A kind of method and apparatus for exporting navigation way information | |
CN104035951B (en) | Show the method for map, device and terminal | |
CN104869468A (en) | Method and apparatus for displaying screen information | |
CN104967910A (en) | Multimedia play progress control method and apparatus | |
CN104807466A (en) | Map information display method and map information display apparatus | |
CN104199596B (en) | scene interface switching method and device | |
CN105740291A (en) | Map interface display method and device | |
CN105363201A (en) | Prompt information display method and prompt information display device | |
CN104679509A (en) | Graph rendering method and device | |
CN108072368B (en) | Navigation method and device | |
CN105046059A (en) | Game movement trajectory determination method and apparatus | |
CN103544056B (en) | Method, device and the terminal device of control task speed | |
WO2015007232A1 (en) | Method, device and mobile terminal for checking message | |
CN104618854A (en) | Method, terminal and server for sharing location information | |
CN104346368A (en) | Indoor scene switch displaying method and device and mobile terminal | |
CN106506321A (en) | One population message treatment method and terminal device | |
CN103475914A (en) | Video playing method, video playing device, terminal equipment and server | |
CN108939547B (en) | A kind of optimal path acquisition methods, device, equipment and storage medium | |
CN104360307A (en) | Positioning method and positioning device | |
CN105526944B (en) | Information cuing method and device | |
CN104134043B (en) | Content is hidden, separates method, device and the terminal hidden |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |