CN109587540A - A kind of control method of object, device, terminal and storage medium - Google Patents
A kind of control method of object, device, terminal and storage medium Download PDFInfo
- Publication number
- CN109587540A CN109587540A CN201811495129.9A CN201811495129A CN109587540A CN 109587540 A CN109587540 A CN 109587540A CN 201811495129 A CN201811495129 A CN 201811495129A CN 109587540 A CN109587540 A CN 109587540A
- Authority
- CN
- China
- Prior art keywords
- target object
- attribute
- behavior
- attribute value
- random
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/41—Structure of client; Structure of client peripherals
- H04N21/426—Internal components of the client ; Characteristics thereof
- H04N21/42684—Client identification by a unique number or address, e.g. serial number, MAC address, socket ID
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/431—Generation of visual interfaces for content selection or interaction; Content or additional data rendering
- H04N21/4312—Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/442—Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
- H04N21/44213—Monitoring of end-user related data
- H04N21/44218—Detecting physical presence or behaviour of the user, e.g. using sensors to detect if the user is leaving the room or changes his face expression during a TV program
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/83—Generation or processing of protective or descriptive data associated with content; Content structuring
- H04N21/835—Generation of protective data, e.g. certificates
- H04N21/8352—Generation of protective data, e.g. certificates involving content or source identification data, e.g. Unique Material Identifier [UMID]
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Social Psychology (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Human Computer Interaction (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Databases & Information Systems (AREA)
- Power Engineering (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The embodiment of the invention discloses a kind of control method of object, device, terminal and storage mediums.This method comprises: obtaining the initial attribute value of the setting attribute of each target object, the attribute that sets is the shared attribute of each target object;Based on preset random function, random data is generated respectively for each target object, and the initial attribute value of the setting attribute of corresponding target object is adjusted according to each random data of generation;The behavior operation of corresponding target object on the display screen is controlled according to each attribute value adjusted.The technical solution of the embodiment of the present invention, largely reduce each target object setting attribute it is identical a possibility that, so that each target object has different behavior operations on the display screen, solve the problems, such as that the concrete behavior of each target object caused by multiple target objects are easily clumped together is difficult to clearly appear from.
Description
Technical field
The present embodiments relate to computer field more particularly to a kind of control method of object, device, terminal and storages
Medium.
Background technique
In many application scenarios, show on screen it is possible that a variety of objects, and the quantity of every kind of object very may be used
It can more than one.So, when showing that multiple objects on screen flock together, especially when going between each object
When being interactive, it is difficult to clearly appear from the concrete behavior of each object.
For example, in the video playing scene with barrage, when a large amount of barrages of lasting appearance, it is likely that cause each barrage
Between it is overlapped so that user, which can not understand, learn the particular content of each barrage.For another example in live scene, when in short-term
It is interior when there are a large amount of a plurality of types of presents, it is likely that cause it is overlapped between present so that main broadcaster and other sights
Crowd, which can not clearly learn, is who spectators has given which present.
Summary of the invention
The embodiment of the invention provides a kind of control method of object, device, terminal and storage mediums, each in order to control
The behavior of object operates, and the concrete behavior of each object is clearly appeared from.
In a first aspect, may include: the embodiment of the invention provides a kind of control method of object
The initial attribute value of the setting attribute of each target object is obtained, the attribute that sets is the shared category of each target object
Property;
Based on preset random function, random data is generated respectively for each target object, according to each random number of generation
According to the initial attribute value for the setting attribute for adjusting corresponding target object;
The behavior operation of corresponding target object on the display screen is controlled according to each attribute value adjusted.
Optionally, each target object, which can be, belongs to same type of target object, in the setting for obtaining each target object
Before the essential attribute value of attribute, the method can also include:
The essential attribute value that the setting attribute of each target object is arranged is identical.
Optionally, random function can be achieved by the steps of the systematic function of random data:
Random seed is generated based on current time, and random data is generated according to random seed and preset threshold value.
Optionally, when the setting attribute in the above method includes behavior range, random data may include behavior range with
Machine data;When setting attribute includes movement speed, random data may include movement speed random data;Setting attribute includes just
When beginning display position, random data may include initial position random data.
Optionally, the method can also include:
For either objective object, the target of function lookup either objective object is searched based on preset goal behavior object
Object of action, and confirm whether the goal behavior object found has been matched with the behavior pair of itself based on preset mark position
As;
If goal behavior object has been matched with the object of action of itself, execution is returned based on preset goal behavior
Object searches the operation of the goal behavior object of function lookup either objective object, until finding the behavior for not being matched with itself
The goal behavior object of object.
Optionally, goal behavior object, which searches function, can be achieved by the steps of the target for searching either objective object
The function of object of action:
According to preset object priority sequence from other objects in addition to either objective object, either objective is searched
The goal behavior object of object.
Optionally, whether the goal behavior object found based on the confirmation of preset mark position has been matched with the behavior of itself
Object may include:
If the marker bit of the goal behavior object found is identity number, goal behavior object has been confirmed
It is matched with the object of action of itself.
Second aspect, the embodiment of the invention also provides a kind of control device of object, the apparatus may include:
Initial attribute value obtains module, the initial attribute value of the setting attribute for obtaining each target object, the setting
Attribute is the shared attribute of each target object;
Initial attribute value adjusts module, for generating random number respectively for each target object based on default random function
According to according to the initial attribute value of the setting attribute of the corresponding target object of each random data of generation adjustment;
Target object control module, for controlling corresponding target object on the display screen according to each attribute value adjusted
Behavior operation.
The third aspect, the embodiment of the invention also provides a kind of terminal, which may include:
One or more processors;
Memory, for storing one or more programs,
When one or more programs are executed by one or more processors, so that one or more processors realize the present invention
The control method of object provided by any embodiment.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer
Program, the computer program realize the control method of object provided by any embodiment of the invention when being executed by processor.
The technical solution of the embodiment of the present invention, the initial attribute value of the setting attribute by obtaining each target object, and base
In preset random function, random data is generated respectively for each target object to adjust the setting attribute of corresponding target object
Initial attribute value, so that the attribute value of the setting attribute of each target object has differences;It is controlled according to each attribute value adjusted
The behavior operation of corresponding target object on the display screen, so that the behavior operation of each target object has differences.Above-mentioned skill
Art scheme, largely reduce each target object setting attribute it is identical a possibility that so that each target object is being shown
It is operated on screen with different behaviors, efficiently solves each target pair caused by multiple target objects are easily clumped together
The concrete behavior of elephant is difficult to the problem of clearly appearing from.
Detailed description of the invention
Fig. 1 is the flow chart of the control method of one of the embodiment of the present invention one object;
Fig. 2 is the flow chart of the control method of one of the embodiment of the present invention two object;
Fig. 3 is the structural block diagram of the control device of one of the embodiment of the present invention three object;
Fig. 4 is the structural schematic diagram of one of the embodiment of the present invention four terminal.
Specific embodiment
Invention is further described in detail with reference to the accompanying drawings and examples.It is understood that described herein
Specific embodiment be used only for explaining the present invention rather than limiting the invention.It also should be noted that for the ease of
It describes, only the parts related to the present invention are shown rather than entire infrastructure in attached drawing.
Embodiment one
Fig. 1 is a kind of flow chart of the control method of the object provided in the embodiment of the present invention one.The present embodiment is applicable
In control object behavior operation the case where, be particularly suitable for control be easily clumped together each object behavior operation feelings
Condition.This method can be executed by the control device of object provided in an embodiment of the present invention, which can be by software and/or hard
The mode of part realizes that the device can integrate on various user terminals or server.Referring to Fig. 1, the side of the embodiment of the present invention
Method specifically comprises the following steps:
S110, the initial attribute value for setting attribute for obtaining each target object, the attribute that sets is each target object
Shared attribute.
Wherein, it is contemplated that in many application scenarios, show on screen it is possible that plurality of target object, and every kind
The quantity of target object is likely to more than one.It is understood that there may be shared attribute between various target objects,
There may be particular attributes;Further, belong between each target object of target object of the same race still that there may be shared
Attribute, it is also possible to which there are particular attributes.So, shared attribute can be the attribute that at least two target objects all have, can be with
It is the attribute that at least two target objects all have, is also possible to the attribute that all target objects all have.
Therefore, the initial attribute value of the available setting attribute for showing each target object on screen, wherein the setting
Attribute can be the shared attribute of each target object, and setting belongs to when the initial attribute value can be understood as target object initialization
The attribute value of property.It is understood that the setting attribute of each target object may include at least one attribute, illustratively,
Setting attribute can be behavior range, can be movement speed, can be initial display position, is also possible to above-mentioned any two kinds
The combination of attribute can also be the combination of above-mentioned three attribute, certainly, more can be between other attributes or other attributes
Combination.
S120, be based on preset random function, generate random data respectively for each target object, according to generation it is each with
Machine data point reuse corresponds to the initial attribute value of the setting attribute of target object.
Wherein, preset random function can be used for generating random data, then, it can be with needle based on preset random function
Random data is generated respectively to each target object, and may be identical between each random data, it is also possible to it is different.In other words,
Each random data can match with target object, therefore, according to each random data of generation it is adjustable with it is described with
The initial attribute value of the setting attribute of the corresponding target object of machine data.It is understood that for the first of those setting attributes
The identical target object of beginning attribute value, above-mentioned steps largely reduce the identical possibility of setting attribute of each target object
Property.When the attribute value difference of the setting attribute of each target object, can make each target object on the display screen has not
The problem of same behavior operates, and effectively prevents sameization.
A kind of optional technical solution, it is contemplated that the setting attribute of each target object may include at least one attribute,
The so described random data can be each attribute included by the setting attribute with target object and distinguish matched random data.It can
With understanding, when setting attribute includes behavior range, random data may include matched behavior range random number
According to;When setting attribute includes movement speed, random data may include matched movement speed random data;Work as setting
When attribute includes initial display position, random data may include matched initial position random data.Above-mentioned steps are set
Setting is advantageous in that, the random data of generation each attribute included by the setting attribute with target object can match respectively,
Each initial attribute value for being conducive to the setting attribute to target object is targetedly adjusted.
Wherein, the behavior range can be range that target object can attack, transportable range, can defend
Range etc.;The movement speed can be the speed that target object can walk, the speed that can be run, the speed that can be flown
Degree etc.;The initial display position can be position when target object generates, when being switched to by stealth mode display pattern
Position etc..
S130, the behavior operation of corresponding target object on the display screen is controlled according to each attribute value adjusted.
It wherein, can be according to adjusted after being adjusted according to initial attribute value of the random data to setting attribute
The behavior operation of each attribute value control target object on the display screen.Illustratively, when each attribute value adjusted is behavior
When range, movement speed and/or initial display position, target object behavior range on the display screen, movement can control
Speed and/or initial display position.
The technical solution of the embodiment of the present invention, the initial attribute value of the setting attribute by obtaining each target object, and base
In preset random function, random data is generated respectively for each target object to adjust the setting attribute of corresponding target object
Initial attribute value, so that the attribute value of the setting attribute of each target object has differences;It is controlled according to each attribute value adjusted
The behavior operation of corresponding target object on the display screen, so that the behavior operation of each target object has differences.Above-mentioned skill
Art scheme, largely reduce each target object setting attribute it is identical a possibility that so that each target object is being shown
It is operated on screen with different behaviors, efficiently solves each target pair caused by multiple target objects are easily clumped together
The concrete behavior of elephant is difficult to the problem of clearly appearing from.
A kind of optional technical solution, each target object are to belong to same type of target object, are obtaining each target pair
Before the initial attribute value of the setting attribute of elephant, the method can also include: the first of the setting attribute of each target object of setting
Beginning attribute value is identical.
Each target object that the present embodiment is related to can be a kind of target object, i.e., each target object belongs to same type
Target object.So, every for the ease of being managed collectively before obtaining the initial attribute value of setting attribute of each target object
Kind target object, can set identical numerical value for the initial attribute value of the setting attribute of each target object.Of course, it is possible to manage
Solution, although the initial attribute value of the setting attribute of every kind of target object is identical, also according to each random data of generation
It is the initial attribute value of the setting attribute of adjustable corresponding target object, so that belonging to each of same type of target object
The attribute value of the setting attribute of target object is still different, to solve the problems, such as that target object is easily clumped together.
A kind of optional technical solution, random function can be achieved by the steps of the systematic function of random data: base
Random seed is generated in current time, and random data is generated according to random seed and preset threshold value.
Wherein, random seed can be understood as a starting point, and the random seed may be considered the random function
An input parameter.Under normal conditions, random seed can be generated with current time, then as current time constantly occurs
Variation, random seed are also constantly changing.And the preset threshold value can be understood as the model of random data to be generated
It encloses, i.e., the maximum value and minimum value of random data to be generated, under different application scenarios, preset threshold value can not
Together.It, can be with calling system function such as rand function with life when so, using random seed and preset threshold value as input parameter
At random data.Above-mentioned steps setting is advantageous in that, using the random seed that current time generates as input parameter, can be made
Obtaining random data has variability;In addition, selecting different preset threshold values as input parameter according to the actual situation, can make
It obtains random data and is more in line with specific application scenarios.
The specific implementation process of above-mentioned steps in order to better understand, below with reference to specific example " soldier in combat system
Control method " control method of the object of the present embodiment is illustratively illustrated.
Illustratively, the target object being related in many combat systems can be soldier, during fight, enemy and we
Both sides camp may generate on a large amount of soldier to battlefield, and enemy and we soldier will do it short soldier's fight.So, in above-mentioned fight
In scene, show that being likely to occur a large amount of soldiers on screen flocks together the case where fighting, at this point, being difficult each soldier
Behavior operation clearly show.
It is understood that the soldier in combat system can be divided into multiple types according to attribute, function etc., such as fight
Fighter soldier, archer soldier, magic soldier, bomb soldier etc..And the setting attribute of the soldier of above-mentioned each type can be row
For range, movement speed, initial display position etc..Optionally, belong to same type of soldier for the ease of management, make it have
Certain identity, can be set belong to same type of soldier setting attribute initial attribute value it is identical.But there is phase
Soldier with setting attribute is easily clumped together, it is possible to generate random number respectively for same type of soldier is belonged to
According to according to the initial attribute value of the setting attribute of the corresponding soldier of each random data of generation adjustment.In this way, belong to inhomogeneity
The attribute value of the soldier of type is inevitable different, and the attribute value for belonging to same type of soldier also has differences.Further, according to tune
Each attribute value after whole controls the behavior operation of corresponding soldier on the display screen.
Illustratively, it is contemplated that soldier in scene of fighting would generally enemy soldier within the scope of housing choice behavior as behavior
Target, more specifically, soldier can select the enemy soldier in firing area as attack mesh when behavior range is firing area
Mark.It is understood that in order to avoid the firing area of all soldiers is identical, when so that an enemy soldier generating, Suo Youwo
Necromancer soldier can select the enemy soldier of forefront as target of attack, and towards the case where target of attack advance, can take
Following setting methods: the initial attribute value nFightRange for belonging to the firing area of different types of soldier is different;Belong to same
The initial attribute value nFightRange of the firing area of the soldier of type is identical, but divides for same type of soldier is belonged to
Different random data nRand is not generated to adjust the numerical value of firing area, so that the firing area of all soldiers is not
Together, certain sense straggly is generated, is flocked together to avoid soldier.Specifically, the magic soldier suitable for close combat attack
NFightRange can be 300 pixels, and nRand range can be [- 30,30];Archer soldier suitable for long-range attack
NFightRange can be 500 pixels, and nRand range can be [- 50,50];Fight soldier suitable for fight of fighting hand-to-hand
NFightRange can be 50 pixels, and nRand range can be [- 10,10].
It is understood that can also be using movement speed, the initial display position etc. of above method setting soldier.Cause
For a large amount of soldier may be generated in above-mentioned scene of fighting, our soldier castle can nearby generate at this end, Di Fangshi
Soldier can generate near enemy's castle.So, when the initial display position difference of each soldier, the attack mesh that begins look for
Mark will be different, to generate certain sense straggly.Alternatively, even if the initial display position of each soldier is identical, when each soldier's
Movement speed is not it is also possible to generate sense straggly between each soldier.Certainly, when each attribute of setting attribute cooperates
When, it can preferably show the concrete behavior operation of each soldier on display screen.
Embodiment two
Fig. 2 is a kind of flow chart of the control method of the object provided in the embodiment of the present invention two.The present embodiment is with above-mentioned
It is optimized based on embodiment one.In the present embodiment, the method can also include: and be based on for either objective object
Preset goal behavior object searches the goal behavior object of function lookup either objective object, and is confirmed based on preset mark position
Whether the goal behavior object found has been matched with the object of action of itself;If goal behavior object has been matched with certainly
The object of action of body then returns to the target line for executing and searching function lookup either objective object based on preset goal behavior object
For the operation of object, until finding the goal behavior object for not being matched with the object of action of itself.Correspondingly, as shown in Fig. 2,
The method of the present embodiment can specifically include following steps:
S210, the initial attribute value for setting attribute for obtaining each target object, the attribute that sets is each target object
Shared attribute.
S220, be based on preset random function, generate random data respectively for each target object, according to generation it is each with
Machine data point reuse corresponds to the initial attribute value of the setting attribute of target object.
S230, the behavior operation of corresponding target object on the display screen is controlled according to each attribute value adjusted.
S240, it is directed to either objective object, function lookup either objective object is searched based on preset goal behavior object
Goal behavior object.
Wherein, it is contemplated that in many application scenarios, target object needs are interacted with goal behavior object, and target
Object of action can be target object itself, can also be other objects in addition to target object.The preset target line
Searching function for object can be used for searching goal behavior object, can be and is searched based on default rule, then
There can be different rules under different application scenarios, to meet the needs of different.Therefore, it for either objective object, is based on
Preset goal behavior object, which searches function, can search the goal behavior object of either objective object.
S250, the behavior pair that itself whether has been matched with based on the goal behavior object that the confirmation of preset mark position is found
As returning to execution based on preset goal behavior object if goal behavior object has been matched with the object of action of itself
The operation of the goal behavior object of function lookup either objective object is searched, until finding the object of action for not being matched with itself
Goal behavior object.
Wherein, after searching function lookup to a goal behavior object based on preset goal behavior object, based on pre-
If the method for the object of action whether the goal behavior object that marker bit confirmation is found has been matched with itself, which may is that, works as mesh
After mark object matching has the object of action of itself, the displacement of bit can be carried out to marker bit, marker bit is updated to even number
Or odd number, to indicate that the corresponding target object of the marker bit has been matched with the object of action of itself.So, according to finding
The parity of marker bit of goal behavior object can be confirmed whether target object has been matched with the object of action of itself.
Whether a kind of optional technical solution, the goal behavior object found based on the confirmation of preset mark position are matched
There is the method for the object of action of itself to may also is that when the setting attribute of each target object includes identity number, and works as
When target object is matched with the object of action of itself, corresponding object of action can be set by the marker bit of target object
Identity number.It is, of course, understood that corresponding target can also be set by the marker bit of object of action
The identity number of object.It so, can be true when the marker bit of the goal behavior object found is identity number
Recognize the object of action that goal behavior object has been matched with itself.
Further, it if confirming that goal behavior object has been matched with the object of action of itself according to marker bit, returns
Receipt row searches the operation of the goal behavior object of function lookup either objective object based on preset goal behavior object, until
Find the goal behavior object for not being matched with the object of action of itself.
The technical solution of the embodiment of the present invention searches letter based on preset goal behavior object for either objective object
Number searches the goal behavior object of either objective object, so that the goal behavior object found is pair for meeting preset rules
As;It whether is matched with the object of action of itself, based on the goal behavior object that the confirmation of preset mark position is found to look into
Find the goal behavior object for not being matched with the object of action of itself.Above-mentioned technical proposal, by searching for itself is not matched with
The goal behavior object of object of action is solved with guaranteeing each target object and goal behavior object is one-to-one relationship
The concrete behavior of each target object is difficult to the problem of clearly appearing from caused by multiple target objects are easily clumped together.
A kind of optional technical solution, goal behavior object, which searches function, can be achieved by the steps of any mesh of lookup
Mark the function of the goal behavior object of object: according to preset object priority sequence from other in addition to either objective object
In object, the goal behavior object of either objective object is searched.
Wherein, goal behavior object can be other objects except either objective object, and preset object priority
Sequence can be priority orders of each goal behavior object relative to target object.Specifically, it is looked into according to goal behavior object
It looks for function that can determine first the goal behavior object of highest priority, and judges whether it has been matched with the behavior pair of itself
As: if its object of action for not being matched with itself, as the goal behavior object of target object;Conversely, then according to mesh
Mark object of action searches function and determines the goal behavior object of higher priority, and judges whether it has been matched with the row of itself
For object, and so on.
Under different application scenarios, preset object priority sequence can be different, such as can be according to goal behavior
Object determines object priority sequence compared to the distance of target object, can also be according to goal behavior object and target object
Restraint relationship determines object priority sequence.Above-mentioned steps setting is advantageous in that, can be determined according to different application scenarios
Preset object priority sequence, so that the goal behavior object found is while meeting user demand, it is acceptable effective
A possibility that reducing the aggregation of each target object.
The specific implementation process of above-mentioned steps in order to better understand, below using the specific example in embodiment one as base
Plinth continues illustratively to illustrate to the control method of the object of the present embodiment.
Illustratively, under above-mentioned scene of fighting, it is contemplated that our soldier can select enemy soldier as target of attack, be
Our soldier and enemy soldier is made to carry out one-to-one fight, and one-to-many or multi-to-multi the war not to flock together
Bucket, can take following methods:
It is described with the angle of our soldier, the setting attribute of each soldier may include marker bit (nTargetId) and body
Part identification number (Identity, ID), nTargetId is initialized as 0.It is not matched when our soldier finds in enemy soldier
After having the target of attack of attack soldier of itself, target of attack ID, target of attack can be set by our soldier nTargetId
NTargetId may be set to be our soldier ID.So, it can determine that the target of attack found is by nTargetId
Itself no matched attack soldier, can also determine which soldier matched attack soldier is.When our soldier's determination is attacked
After hitting target, other targets of attack will not be searched again, to realize the one-to-one fight of our soldier and target of attack.
In addition, preset object priority sequence may is that highest priority is the soldier for restraining type, higher priority
It is apart from nearest soldier, lower priority is preferential compared to other soldier's types of our soldier when apart from identical
Grade.Specifically, the soldier of each type can have the soldier of matched restraint type, such as the restraint class of magic soldier
The soldier of type can be fight soldier, then magic soldier can preferentially search fight soldier;When all fight soldiers all
After being matched with the attack soldier of itself, magic soldier can preferentially be searched apart from nearest soldier;When find apart from it is identical when
It, can be according to other soldier's classes compared to magic soldier after at least two are not matched with the target of attack of attack soldier of itself
The priority of type determines, such as in addition to the fight soldier for restraining type, bomb soldier, archer priority successively reduce.
So, searching function and preset mark position based on preset goal behavior object can find and be more in line with user
The target of attack of the attack soldier for not being matched with itself of demand, to guarantee our each soldier and target of attack is to correspond
Relationship.It is understood that if our soldier can not find be not matched with itself attack soldier target of attack when, can
The target of attack of the minimum number for the attack soldier for being matched with itself without attack, can also be attacked, to reduce as far as possible
A possibility that one-to-many or multi-to-multi.
Embodiment three
Fig. 3 is the structural block diagram of the control device for the object that the embodiment of the present invention three provides, and the device is above-mentioned for executing
The control method of object provided by any embodiment.The control method of the device and the object of the various embodiments described above belongs to same
A inventive concept, the detail content of not detailed description in the embodiment of the control device of object can be with reference to above-mentioned object
The embodiment of control method.Referring to Fig. 3, the apparatus may include: initial attribute value obtains module 310, the adjustment of initial attribute value
Module 320 and target object control module 330.
Wherein, initial attribute value obtains module 310, the initial attribute value of the setting attribute for obtaining each target object,
The attribute that sets is the shared attribute of each target object;
Initial attribute value adjusts module 320, for generating respectively for each target object random based on default random function
Data adjust the initial attribute value of the setting attribute of corresponding target object according to each random data of generation;
Target object control module 330, for controlling corresponding target object in display screen according to each attribute value adjusted
Behavior operation on curtain.
Optionally, each target object is to belong to same type of target object, and described device can also include:
Initial attribute value setup module is identical for the initial attribute value of setting attribute of each target object to be arranged.
Optionally, initial attribute value adjusts module 320, is achieved by the steps of the systematic function of random data: being based on
Current time generates random seed, and generates random data according to random seed and preset threshold value.
Optionally, initial attribute value obtains the setting attribute in module 310, when setting attribute includes behavior range, with
Machine data may include behavior range random data;When setting attribute includes movement speed, random data may include mobile speed
Spend random data;When setting attribute includes initial display position, random data may include initial position random data.
Optionally, on the basis of above-mentioned apparatus, which can also include:
Goal behavior object searching module is searched for being directed to either objective object based on preset goal behavior object
The goal behavior object of function lookup either objective object, and be based on the goal behavior object that the confirmation of preset mark position is found
The no object of action for being matched with itself;
Goal behavior object determining module, if being matched with the object of action of itself for goal behavior object,
The operation for executing the goal behavior object that function lookup either objective object is searched based on preset goal behavior object is returned to, directly
To finding the goal behavior object for not being matched with the object of action of itself.
Optionally, goal behavior object searching module is achieved by the steps of the target line for searching either objective object
For the function of object: according to preset object priority sequence from other objects in addition to either objective object, searching and appoint
The goal behavior object of one target object.
Optionally, goal behavior object searching module may include:
Object of action confirmation unit, if the marker bit of the goal behavior object for finding is identity number,
Then confirm that goal behavior object has been matched with the object of action of itself.
The control device for the object that the embodiment of the present invention three provides obtains module and initial attribute value by initial attribute value
The mutual cooperation for adjusting module, so that the attribute value of the setting attribute of each target object has differences;Target object control module
So that the behavior operation of each target object has differences.Above-mentioned apparatus largely reduces the setting attribute of each target object
A possibility that identical, efficiently solves multiple targets so that each target object has different behavior operations on the display screen
Object caused by being easily clumped together the concrete behavior of each target object be difficult to the problem of clearly appearing from.
Object provided by any embodiment of the invention can be performed in the control device of object provided by the embodiment of the present invention
Control method, have the corresponding functional module of execution method and beneficial effect.
It is worth noting that, in the embodiment of the control device of above-mentioned object, included each unit and module are
It is divided according to the functional logic, but is not limited to the above division, as long as corresponding functions can be realized;Separately
Outside, the specific name of each functional unit is also only for convenience of distinguishing each other, the protection scope being not intended to restrict the invention.
Example IV
Fig. 4 is a kind of structural schematic diagram for terminal that the embodiment of the present invention four provides, as shown in figure 4, the terminal includes depositing
Reservoir 410, processor 420, input unit 430 and output device 440.The quantity of processor 420 in terminal can be one
Or it is multiple, in Fig. 4 by taking a processor 420 as an example;Memory 410, processor 420, input unit 430 and output in terminal
Device 440 can be connected by bus or other means, in Fig. 4 for being connected by bus 450.
Memory 410 is used as a kind of computer readable storage medium, can be used for storing software program, journey can be performed in computer
Sequence and module, if the corresponding program instruction/module of the control method of the object in the embodiment of the present invention is (for example, the control of object
Initial attribute value in device processed obtains module 310, initial attribute value adjustment module 320 and target object control module 330).
Software program, instruction and module of the processor 420 by operation storage in store 410, thereby executing the various of terminal
The control method of above-mentioned object is realized in functional application and data processing.
Memory 410 can mainly include storing program area and storage data area, wherein storing program area can store operation system
Application program needed for system, at least one function;Storage data area, which can be stored, uses created data etc. according to terminal.This
Outside, memory 410 may include high-speed random access memory, can also include nonvolatile memory, for example, at least one
Disk memory, flush memory device or other non-volatile solid state memory parts.In some instances, memory 410 can be into one
Step includes the memory remotely located relative to processor 420, these remote memories can pass through network connection to equipment.On
The example for stating network includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
Input unit 430 can be used for receiving the number or character information of input, and generate with the user setting of device with
And the related key signals input of function control.Output device 440 may include that display screen etc. shows equipment.
Embodiment five
The embodiment of the present invention five provides a kind of storage medium comprising computer executable instructions, and the computer is executable
It instructs when being executed by computer processor for executing a kind of control method of object, may include:
The initial attribute value of the setting attribute of each target object is obtained, the attribute that sets is the shared category of each target object
Property;
Based on preset random function, random data is generated respectively for each target object, according to each random number of generation
According to the initial attribute value for the setting attribute for adjusting corresponding target object;
The behavior operation of corresponding target object on the display screen is controlled according to each attribute value adjusted.
Certainly, a kind of storage medium comprising computer executable instructions, computer provided by the embodiment of the present invention
The method operation that executable instruction is not limited to the described above, can also be performed the control of object provided by any embodiment of the invention
Relevant operation in method processed.
By the description above with respect to embodiment, it is apparent to those skilled in the art that, the present invention
It can be realized by software and required common hardware, naturally it is also possible to which by hardware realization, but in many cases, the former is more
Good embodiment.According to such understanding, what technical solution of the present invention substantially in other words contributed to the prior art
Part can be embodied in the form of software products, which can store in computer readable storage medium
In, floppy disk, read-only memory (Read-Only Memory, ROM), random access memory (Random such as computer
Access Memory, RAM), flash memory (FLASH), hard disk or CD etc., including some instructions are with so that a computer is set
Standby (can be personal computer, server or the network equipment etc.) executes method described in each embodiment of the present invention.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that
The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation,
It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention
It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also
It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.
Claims (10)
1. a kind of control method of object characterized by comprising
The initial attribute value of the setting attribute of each target object is obtained, the attribute that sets is the shared attribute of each target object;
Based on preset random function, random data is generated respectively for each target object, according to each random data tune of generation
The initial attribute value of the setting attribute of whole corresponding target object;
The behavior operation of corresponding target object on the display screen is controlled according to each attribute value adjusted.
2. the method according to claim 1, wherein each target object is to belong to same type of target pair
As, before obtaining the initial attribute value of setting attribute of each target object, the method also includes:
The initial attribute value that the setting attribute of each target object is arranged is identical.
3. the method according to claim 1, wherein the random function be achieved by the steps of it is described random
The systematic function of data:
Random seed is generated based on current time, and the random data is generated according to the random seed and preset threshold value.
4. according to the method described in claim 1, it is characterized by:
When the setting attribute includes behavior range, the random data includes behavior range random data;
When the setting attribute includes movement speed, the random data includes movement speed random data;
When the setting attribute includes initial display position, the random data includes initial position random data.
5. the method according to claim 1, wherein the method also includes:
For either objective object, the target of either objective object described in function lookup is searched based on preset goal behavior object
Object of action, and confirm whether the goal behavior object found has been matched with the behavior pair of itself based on preset mark position
As;
If the goal behavior object has been matched with the object of action of itself, execution is returned based on preset goal behavior
Object searches the operation of the goal behavior object of either objective object described in function lookup, is not matched with itself until finding
The goal behavior object of object of action.
6. according to the method described in claim 5, it is characterized in that, the goal behavior object searches function as follows
Realize the function of searching the goal behavior object of the either objective object:
According to preset object priority sequence from other objects in addition to the either objective object, search described any
The goal behavior object of target object.
7. according to the method described in claim 5, it is characterized in that, described confirm the target line found based on preset mark position
The object of action of itself whether has been matched with for object, comprising:
If the marker bit of the goal behavior object found is identity number, the goal behavior object has been confirmed
It is matched with the object of action of itself.
8. a kind of control device of object characterized by comprising
Initial attribute value obtains module, the initial attribute value of the setting attribute for obtaining each target object, the setting attribute
For the shared attribute of each target object;
Initial attribute value adjusts module, for being based on preset random function, generates respectively at random for each target object
Data adjust the initial attribute value of the setting attribute of corresponding target object according to each random data of generation;
Target object control module, for controlling the row of corresponding target object on the display screen according to each attribute value adjusted
For operation.
9. a kind of terminal, which is characterized in that the terminal includes:
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real
The now control method of the object as described in any in claim 1-7.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program
The control method of the object as described in any in claim 1-7 is realized when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811495129.9A CN109587540B (en) | 2018-12-07 | 2018-12-07 | Object control method, device, terminal and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811495129.9A CN109587540B (en) | 2018-12-07 | 2018-12-07 | Object control method, device, terminal and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109587540A true CN109587540A (en) | 2019-04-05 |
CN109587540B CN109587540B (en) | 2022-06-17 |
Family
ID=65928980
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811495129.9A Active CN109587540B (en) | 2018-12-07 | 2018-12-07 | Object control method, device, terminal and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109587540B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111530080A (en) * | 2020-04-26 | 2020-08-14 | 苏州沁游网络科技有限公司 | Behavior control method, device, equipment and storage medium of virtual object |
CN112973113A (en) * | 2021-03-31 | 2021-06-18 | 深圳市天天来玩科技有限公司 | Display method, system, device and computer storage medium for mobile unit |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006346024A (en) * | 2005-06-14 | 2006-12-28 | Samii Kk | Pachinko game machine |
CN105897770A (en) * | 2016-06-20 | 2016-08-24 | 武汉斗鱼网络科技有限公司 | Virtual gift display method and device based on live broadcasting |
CN107294844A (en) * | 2017-08-21 | 2017-10-24 | 武汉斗鱼网络科技有限公司 | Message display method and device |
CN107967116A (en) * | 2015-06-16 | 2018-04-27 | 深圳市腾讯计算机系统有限公司 | The method and apparatus of lock onto target, computer equipment in scene of game |
CN108121906A (en) * | 2016-11-28 | 2018-06-05 | 阿里巴巴集团控股有限公司 | A kind of verification method, device and computing device |
CN108310772A (en) * | 2018-01-22 | 2018-07-24 | 腾讯科技(深圳)有限公司 | The execution method and apparatus and storage medium of attack operation, electronic device |
CN108391154A (en) * | 2018-01-30 | 2018-08-10 | 广州虎牙信息科技有限公司 | Barrage display control method, storage medium and terminal |
-
2018
- 2018-12-07 CN CN201811495129.9A patent/CN109587540B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006346024A (en) * | 2005-06-14 | 2006-12-28 | Samii Kk | Pachinko game machine |
CN107967116A (en) * | 2015-06-16 | 2018-04-27 | 深圳市腾讯计算机系统有限公司 | The method and apparatus of lock onto target, computer equipment in scene of game |
CN105897770A (en) * | 2016-06-20 | 2016-08-24 | 武汉斗鱼网络科技有限公司 | Virtual gift display method and device based on live broadcasting |
CN108121906A (en) * | 2016-11-28 | 2018-06-05 | 阿里巴巴集团控股有限公司 | A kind of verification method, device and computing device |
CN107294844A (en) * | 2017-08-21 | 2017-10-24 | 武汉斗鱼网络科技有限公司 | Message display method and device |
CN108310772A (en) * | 2018-01-22 | 2018-07-24 | 腾讯科技(深圳)有限公司 | The execution method and apparatus and storage medium of attack operation, electronic device |
CN108391154A (en) * | 2018-01-30 | 2018-08-10 | 广州虎牙信息科技有限公司 | Barrage display control method, storage medium and terminal |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111530080A (en) * | 2020-04-26 | 2020-08-14 | 苏州沁游网络科技有限公司 | Behavior control method, device, equipment and storage medium of virtual object |
CN111530080B (en) * | 2020-04-26 | 2021-03-26 | 苏州沁游网络科技有限公司 | Behavior control method, device, equipment and storage medium of virtual object |
CN112973113A (en) * | 2021-03-31 | 2021-06-18 | 深圳市天天来玩科技有限公司 | Display method, system, device and computer storage medium for mobile unit |
Also Published As
Publication number | Publication date |
---|---|
CN109587540B (en) | 2022-06-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11185769B2 (en) | Management and broadcasting of live multiplayer video game activity | |
US20240042334A1 (en) | Ballistic trajectory display in a virtual environment | |
US9171191B2 (en) | Method for dynamic authentication between reader and tag, and device therefor | |
Mauve | How to keep a dead man from shooting | |
CN111111174B (en) | Operation method and device of virtual prop, storage medium and electronic device | |
CN109587540A (en) | A kind of control method of object, device, terminal and storage medium | |
CN111084986B (en) | Display control method, display control device, storage medium, and electronic device | |
US20230057421A1 (en) | Prop control method and apparatus, storage medium, and electronic device | |
US20220054935A1 (en) | Virtual prop control method and apparatus, storage medium, and electronic device | |
CN110975289B (en) | Shooting mode switching control method and device, storage medium and electronic device | |
CN112352413A (en) | Computer network protocol for low latency datagram response | |
CN109481939A (en) | The method of adjustment and device in region, storage medium, electronic device | |
CN110947176A (en) | Virtual object control method, bullet number recording method, device, and medium | |
CN115228086A (en) | Auxiliary aiming method and device in game, electronic equipment and storage medium | |
WO2020148663A1 (en) | Computer-implemented method, computer program and data processing system | |
US11260301B2 (en) | Non-transitory computer-readable medium and video game processing system | |
CN109073398B (en) | Map establishing method, positioning method, device, terminal and storage medium | |
CN111443838B (en) | Control method and device of virtual operation object, storage medium and electronic device | |
US11219825B2 (en) | Non-transitory computer-readable medium and video game processing system | |
KR102215146B1 (en) | Method, apparatus and computer program for providing interactive service using augmented reality and mixed reality | |
CN109254584A (en) | Role allocating method, device, computer equipment and storage medium based on multiple agent | |
CN113599822B (en) | Virtual prop control method and device, storage medium and electronic equipment | |
CN109600657B (en) | Object control method, device, terminal and storage medium | |
CN111068331B (en) | Animation configuration method and device of virtual prop, storage medium and electronic device | |
US11322038B2 (en) | Simulator and method for simulating a use of a missile |
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 |