CN111318017B - Virtual object control method, device, computer readable storage medium and apparatus - Google Patents

Virtual object control method, device, computer readable storage medium and apparatus Download PDF

Info

Publication number
CN111318017B
CN111318017B CN202010131983.8A CN202010131983A CN111318017B CN 111318017 B CN111318017 B CN 111318017B CN 202010131983 A CN202010131983 A CN 202010131983A CN 111318017 B CN111318017 B CN 111318017B
Authority
CN
China
Prior art keywords
virtual object
virtual
current behavior
activity
target point
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
Application number
CN202010131983.8A
Other languages
Chinese (zh)
Other versions
CN111318017A (en
Inventor
裴勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Tencent Information Technology Co Ltd
Original Assignee
Shenzhen Tencent Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Tencent Information Technology Co Ltd filed Critical Shenzhen Tencent Information Technology Co Ltd
Priority to CN202010131983.8A priority Critical patent/CN111318017B/en
Publication of CN111318017A publication Critical patent/CN111318017A/en
Application granted granted Critical
Publication of CN111318017B publication Critical patent/CN111318017B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/80Special adaptations for executing a specific game genre or game mode
    • A63F13/847Cooperative playing, e.g. requiring coordinated actions from several players to achieve a common goal
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The application relates to a virtual object control method, a device, a computer readable storage medium and equipment, wherein the method, the device and the computer readable storage medium acquire activity information of a first virtual object in a virtual activity scene; performing behavior pattern analysis processing based on the object state information to obtain a current behavior pattern of the first virtual object; determining a moving target point of the first virtual object according to the environment resource information and the current behavior mode; and controlling the first virtual object to move to the moving target point, and executing the action corresponding to the current behavior mode. When the generated first virtual object is controlled, the current behavior mode of the first virtual object is determined by combining the environment resource information and the object state information of the first virtual object, so that the moving position of the first virtual object is determined, different actions corresponding to the behavior mode are executed, the first virtual object can simulate the behavior of a real player better, and the artificial intelligence degree of the virtual object is improved.

Description

Virtual object control method, device, computer readable storage medium and apparatus
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a virtual object control method, apparatus, computer readable storage medium, and device.
Background
With the development of internet technology, the number of users in the game industry is increasing, and the variety of games is also increasing. Among them, a massively multiplayer online game (Multi-Player Online Game, MMOG) is a type of game that is liked by users. The playing method of the large-scale multiplayer online game mainly comprises that a plurality of players control the virtual roles of the players to perform specific activities in a certain virtual activity scene, and as the game needs to be performed by the plurality of players together, the players are matched with each other in game, namely a certain number of players need to be fully used for starting the game.
When the number of real players of the game is insufficient, a virtual player is generated by a server to play together with the real player, so that the real player can complete matching as soon as possible to play the game.
However, the virtual player generated in the prior art often only repeatedly performs one or more predetermined actions in the game, and cannot completely simulate the behavior of the real player, so that the degree of artificial intelligence is low.
Disclosure of Invention
In view of the foregoing, there is a need for a virtual object control method, apparatus, computer-readable storage medium, and device that facilitate improving the degree of artificial intelligence of a virtual object.
A virtual object control method, the method comprising:
acquiring activity information of a first virtual object in a virtual activity scene, wherein the activity information comprises environment resource information and object state information, and the first virtual object is a virtual object controlled by a computer;
performing behavior pattern analysis processing based on the object state information to obtain a current behavior pattern of the first virtual object;
determining a moving target point of the first virtual object according to the environment resource information and the current behavior mode;
and controlling the first virtual object to move to the moving target point, and executing the action corresponding to the current behavior mode.
A virtual object control apparatus, the apparatus comprising:
the system comprises an activity information acquisition module, a virtual activity information acquisition module and a virtual activity information processing module, wherein the activity information acquisition module is used for acquiring activity information of a first virtual object in a virtual activity scene, the activity information comprises environment resource information and object state information, and the first virtual object is a virtual object controlled by a computer;
the behavior mode determining module is used for carrying out behavior mode analysis processing based on the object state information to obtain the current behavior mode of the first virtual object;
The mobile target point determining module is used for determining a mobile target point of the first virtual object according to the environment resource information and the current behavior mode;
and the first virtual object control module is used for controlling the first virtual object to move to the moving target point and executing the action corresponding to the current behavior mode.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the above method.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the method described above when the processor executes the computer program.
The virtual object control method, the device, the computer readable storage medium and the equipment acquire the activity information of the first virtual object in the virtual activity scene, wherein the activity information comprises environment resource information and object state information, and the first virtual object is a virtual object controlled by a computer; performing behavior pattern analysis processing based on the object state information to obtain a current behavior pattern of the first virtual object; determining a moving target point of the first virtual object according to the environment resource information and the current behavior mode; and controlling the first virtual object to move to the moving target point, and executing the action corresponding to the current behavior mode.
When the generated first virtual object is controlled, the current behavior mode of the first virtual object is determined by combining the environment resource information and the object state information of the first virtual object, so that the moving position of the first virtual object is determined, different actions corresponding to the behavior mode are executed, the first virtual object can simulate the behavior of a real player better, and the artificial intelligence degree of the virtual object is improved.
Drawings
FIG. 1 is an application environment diagram of a virtual object control method in one embodiment;
FIG. 2 is a flow chart of a virtual object control method in one embodiment;
FIG. 3 is an interface diagram of a virtual activity scene in one embodiment;
FIG. 4 is a flow chart illustrating determining a moving target point of a first virtual object according to environmental resource information and a current behavior pattern in one embodiment;
FIG. 5 is a flow diagram of scoring a movable venue in one embodiment;
FIG. 6 is a schematic diagram showing the correspondence between key factors and score values in one embodiment;
FIG. 7 is another interface diagram of a virtual activity scene in one embodiment;
FIG. 8 is a flow chart of a virtual object control method according to another embodiment;
FIG. 9 is a further interface diagram of a virtual activity scene in one embodiment;
FIG. 10 is a block diagram of a virtual object control device in one embodiment;
FIG. 11 is a block diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
First, terms involved in the embodiments of the present application will be explained:
virtual activity scene: is a virtual activity scene that an application program displays (or provides) while running on a terminal. The virtual activity scene can be a simulation environment for the real world, a semi-simulation and semi-fictional environment, or a pure fictional environment. The virtual activity scene may be any one of a two-dimensional virtual activity scene, a 2.5-dimensional virtual activity scene, and a three-dimensional virtual activity scene, which is not limited in this application.
Virtual object: refers to movable objects in a virtual environment, which may be virtual characters, virtual animals, etc. The virtual object may be controlled by a user or a server.
Massive multiplayer online class game (Massive multi-Player Online Game, MMOG): the server of the game can provide a plurality of players with online games, the game provides a virtual world for users, the users can create virtual roles in the game, and the corresponding tasks of the activities are completed by controlling the virtual roles to perform the corresponding activities. Multiple virtual roles controlled by users can be formed into teams to jointly complete the same task or to fight against other teams.
Virtual prop: refers to props randomly or fixedly arranged in a virtual activity scene for collecting and using virtual objects, and for example, the virtual props can be armor, medicines and the like.
The method provided in the present application can be applied to a virtual reality application, a three-dimensional map program, a First-person shooting Game (FPS), a multiplayer online tactical competition Game (Multiplayer Online Battle Arena Games, MOBA), a Massive multiplayer online class Game (Massive multi-Player Online Game, MMOG), a Massive multiplayer online role Playing Game (Massive multi-Player Online Role-Playing Game, MMORPG), and the like, and the following embodiments are exemplified by the application in the Game.
FIG. 1 is an application environment diagram of a virtual object control method in one embodiment. The application environment comprises the following steps: a terminal 20, a server cluster 40, and a wireless or wired network 60.
The terminal 20 is connected to the server cluster 40 via a wireless or wired network 60. A client supporting a virtual reality or a multiplayer online role playing game is installed and operated in the terminal 20, and the client also has a function of connecting with other clients. The user uses the terminal 20 to control virtual characters located in the virtual environment to perform activities including, but not limited to: activities such as walking, running, rowing, swimming, attacking, and collecting virtual props.
Alternatively, the terminal 20 may be at least one of a smart phone, a game console, a desktop computer, a tablet computer, an electronic book reader, an MP3 (Moving Picture Experts Group Audio Layer III, MP 3) player, an MP4 (Moving Picture Experts Group Layer IV, MP 4) player, and a laptop portable computer, in particular.
The server cluster 40 includes at least one of a server, a plurality of servers, a cloud computing platform, and a virtualization center. The server cluster 40 is used to provide background services for applications supporting a three-dimensional virtual environment. Optionally, the server cluster 40 takes on primary computing work and the terminal 20 takes on secondary computing work; alternatively, the server cluster 40 takes on secondary computing work and the terminal 20 takes on primary computing work; alternatively, a distributed computing architecture is employed between the server cluster 40 and the terminals 20 for collaborative computing. In embodiments of the present application, server cluster 40 may generate a server-controlled virtual object that may play a game in conjunction with a user-controlled virtual object.
The wireless or wired network 60, which may be a metropolitan area network, a local area network, a fiber optic network, etc., and the wireless network may be a mobile communication network (e.g., 2G, 3G, 4G, 5G, etc.) or a wireless fidelity network (Wireless Fidelity, WIFI).
As shown in fig. 2, in one embodiment, a virtual object control method is provided. The present embodiment is mainly exemplified by the application of the method to the server cluster 40 in fig. 1. Referring to fig. 2, the virtual object control method specifically includes the steps of:
step S100, activity information of a first virtual object in a virtual activity scene is obtained, wherein the activity information comprises environment resource information and object state information.
The virtual activity scene may be a game scene of a massively multiplayer online game, for example, when the massively multiplayer online game is a first person shooting game, the virtual activity scene may be, for example, a sea island, a desert, a city, or the like. When the massively multiplayer online game is a competitive game, the virtual activity scene may be a map that is square or rectangular including a symmetric lower left diagonal region and an upper right diagonal region.
In addition, the first virtual object is a virtual object controlled by a computer, and the computer may be embodied in the form of a server cluster in fig. 1. In the virtual activity scene, a virtual object controlled by the real player is also included, and when the number of real players participating in the massive multiplayer online game is insufficient, a sufficient number of target virtual players can be generated by the server to play with the real players.
After the server generates the first virtual object, in order to better make the behavior action of the first virtual object in the game, the activity information of the first virtual object in the virtual activity scene needs to be acquired first. Specifically, the activity information includes environment resource information and object state information, where the environment resource information may be resource information within a preset range of a location where the first virtual object is located, and the object state information may be self state information of the first virtual object, and the like.
Step S200, performing behavior pattern analysis processing based on the object state information to obtain the current behavior pattern of the first virtual object.
Wherein the behavior pattern refers to that the first virtual object performs motivational and targeted game activities, such as attack, defense, and the like. After acquiring the object state information of the first virtual object, the server first determines a current behavior pattern of the first virtual object based on the object state information.
Optionally, the server performs behavior pattern analysis processing based on the object state information, and the obtaining the current behavior pattern of the first virtual object specifically includes: and when the generation time of the first virtual object is lower than the preset duration, determining the current behavior mode of the first virtual object as the collection virtual prop.
Since the first virtual object is generated by the server, when the generation time of the first virtual object is lower than the preset duration, the game can be considered to be in the primary stage, and the current behavior mode of the first virtual object can be determined to be the collection of virtual props, for example, when the game is a shooting game, the collection of virtual props can be specifically the collection of various virtual shooting props (such as virtual bullets, etc.), the collection of various protection props (such as helmets, clothes, etc.), the collection of reply props (such as medical bags, bandages, etc.), and the like.
Optionally, the server performs behavior pattern analysis processing based on the object state information, and the obtaining the current behavior pattern of the first virtual object specifically further includes: when only a second virtual object exists in the preset distance range of the first virtual object, determining that the current behavior mode of the first virtual object is a fight against the second virtual object, wherein the second virtual object is an opponent object of the first virtual object.
When a second virtual object exists in the preset distance range of the first virtual object, the second virtual object is a hostile object, and belongs to an object which needs to be destroyed by the first virtual object, the first virtual object can be considered to be in a state of encountering an enemy, and at the moment, the current behavior mode of the first virtual object can be determined to be fight against the second virtual object. For example, when a shooting-type game is used, the second virtual object may be attacked by the virtual shooting prop.
Optionally, the server performs behavior pattern analysis processing based on the object state information, and the obtaining the current behavior pattern of the first virtual object specifically further includes: when a second virtual object and a third virtual object exist in the preset distance range of the first virtual object at the same time, determining the current behavior mode of the first virtual object as a friend object for assisting the third virtual object to fight against the second virtual object, wherein the third virtual object is the first virtual object.
When the second virtual object and the third virtual object exist in the preset distance range of the first virtual object at the same time, the second virtual object is a hostile object, the object which is needed to be destroyed by the first virtual object, the third virtual object is a friend object, the object which is needed to be protected by the first virtual object, the first virtual object can be considered to be in the states of encountering friends and enemies, and the current behavior mode of the first virtual object can be determined to assist the third virtual object to fight with the second virtual object. For example, when the shooting game is a shooting game, the third virtual object and the second virtual object are assisted to fight, and/or when the life attribute value of the third virtual object is lower than a preset threshold value, the life attribute value of the third virtual object is replied by the replying class prop.
Optionally, the server performs behavior pattern analysis processing based on the object state information, and the obtaining the current behavior pattern of the first virtual object specifically further includes: when the life attribute value of the first virtual object is lower than a preset threshold value, determining that the current behavior mode of the first virtual object is far away from the second virtual object, and/or searching a shielding point for avoiding the attack of the second virtual object, and/or using the virtual prop to increase the life attribute value of the first virtual object.
When the life attribute value of the first virtual object is lower than a preset threshold value, the first virtual object can be considered to be in a life-threatening state, and at the moment, the current behavior mode of the first virtual object is determined to be far away from the second virtual object, namely, the first virtual object escapes to be separated from the attack range of the hostile object; and/or searching a shelter point for avoiding the attack of the second virtual object, namely searching a shelter to avoid the attack of the enemy object, so as to protect the security of the host; and/or, the virtual prop is used for increasing the life attribute value of the self, namely, the self safety is protected by replying the life attribute value of the self.
Step S300, determining a moving target point of the first virtual object according to the environment resource information and the current behavior mode.
After determining the current behavior mode of the first virtual object, the server further determines a moving target point of the first virtual object in combination with the environment resource information, wherein the moving target point is a target position point for moving when the first virtual object executes the action corresponding to the current behavior mode.
Specifically, as shown in fig. 3, in the virtual activity scene 31, when the current behavior pattern of the first virtual object 32a is to collect virtual props, a position point around the first virtual object where the virtual props exist may be taken as a movement target point, for example, a position point 33A in fig. 3 where the virtual props exist may be taken as a movement target point.
When the current behavior pattern of the first virtual object 32a is to combat the second virtual object 32B, a position point at which the first virtual object 32a can shoot to the second virtual object 32B may be taken as a moving target point or the like, for example, in fig. 3, a maximum shooting distance of the first virtual object 32a is L2, and a position point 33B at a distance L1 from the second virtual object 32B may be taken as a moving target point, wherein the distance L1 is less than or equal to the distance L2.
Step S400, the first virtual object is controlled to move to the moving target point, and the action corresponding to the current behavior mode is executed.
After determining the moving target point of the first virtual object, the server controls the first virtual object to move in position, namely to move to the moving target point determined by the server, and executes the action corresponding to the current behavior mode.
For example, when the current behavior mode of the first virtual object is that of collecting the virtual prop, the server controls the first virtual object to move to a moving target point where the virtual prop exists, and executes the action of receiving the virtual prop; when the current behavior mode of the first virtual object is that the first virtual object is in battle with the second virtual object, the server controls the first virtual object to move to a movement target point capable of shooting to the second virtual object and performs an action of shooting to the second virtual object.
The embodiment provides a virtual object control method, when a generated first virtual object is controlled, the current behavior mode of the first virtual object is determined by combining the environment resource information and the object state information of the first virtual object, so that the moving position of the first virtual object is determined, and different actions corresponding to the behavior mode are executed, so that the first virtual object can better simulate the behavior of a real player, and the artificial intelligence degree of the virtual object is improved.
In one embodiment, as shown in fig. 4, determining the movement target point of the first virtual object according to the environment resource information and the current behavior pattern includes step S320 and step S340.
Step S320, scoring each movable place of the first virtual object in the current behavior mode based on the environment resource information and the current behavior mode to obtain a score value of each movable place;
in step S340, the movable location with the highest score is determined as the moving target point.
Specifically, when determining the moving target point of the first virtual object, a scoring policy may be adopted, that is, each movable location of the first virtual object in the current behavior mode is scored according to a preset scoring standard, and the movable location with the highest score value is selected as the moving target point. The preset scoring standard may be scoring based on various factors, so that various factors can be combined to determine the optimal movable location as the moving target point. It will be appreciated that the scoring criteria may be different based on different game types.
For example, each movable place of the first virtual object in the current behavior mode includes five points P1, P2, P3, P4 and P5, after scoring the five points based on a preset scoring standard, the score values of the five points are respectively 30, 55, 70, 60 and 95, that is, the score value of the point P5 is highest, so that the point P5 can be determined to be the moving target point.
In one embodiment, step S320, scoring each movable location of the first virtual object in the current behavior mode based on the environmental resource information and the current behavior mode, and obtaining the score value of each movable location includes: and obtaining the score value of each movable place based on the key factors corresponding to each movable place and the corresponding relation between each key factor and the score value under different behavior modes.
Wherein the key factors refer to factors affecting the activity behavior of the first virtual object in the virtual activity scene, for example, when the game is a shooting game, the key factors include at least one of a shield point, a virtual prop, a first distance from the second virtual object, and a second distance from the third virtual object.
The shelter points comprise shelters and can be used for providing shelter for the first virtual object, so that attacks of the enemy object can be avoided. The virtual shooting props in the virtual props can help the first virtual object attack the hostile object, the protection props in the virtual props can help reduce the damage to the first virtual object, and the recovery props in the virtual props can help the first virtual object recover the life attribute values of the first virtual object or the friend object. The first distance from the second virtual object may help the first virtual object confirm whether the hostile object may be attacked. The second distance from the third virtual object may help the first virtual object confirm whether the friend object can be rescued.
Specifically, taking an example that the key factors simultaneously include a shield point, a virtual prop, a first distance from a second virtual object and a second distance from a third virtual object as key factors, a procedure of scoring the server is explained.
As shown in fig. 5, first, the server selects an arbitrary movable place(s) from a plurality of movable places, and samples the movable places, where the sampling contents include a shield point sampling, a virtual prop sampling, a first distance sampling, and a second distance sampling, so as to obtain a sampling result corresponding to the movable place, that is, whether the movable place includes a shield point and a virtual prop, and the movable place distributes distances from the second virtual object and the third virtual object.
And scoring based on the sampling result after the sampling result is obtained. For example, when the movable site includes a shield dot, then a score value for the shield dot may be added; when the movable place comprises the virtual prop, adding the score of the virtual prop; after the corresponding score values are obtained based on the first distance and the second distance respectively, all the score values are summarized, and then the score value of the movable place is obtained. It will be appreciated that in the scoring process described above, if the movable site does not include a corresponding key factor, for example, does not include a mask point, the corresponding score for the mask point is 0.
As shown in fig. 6, the correspondence between key factors and score values may be the same or different. Taking the scheme in this embodiment as an example, the key factor a in fig. 6 may be a shield point, the key factor B may be a virtual prop, the key factor C may be a first distance, and the key factor D may be a second distance. Alternatively, other types of key factors E, F, G may be included in the present embodiment.
It should be noted that, for different types of games, the key factors are not limited to the types provided in the present embodiment, but may be other types of factors, and are not limited herein.
According to the embodiment, the influence of each movable place on the activity behavior of the first virtual object can be fully considered by scoring each movable place based on the key factors corresponding to each movable place, the influence of the highest-scoring movable target point on the activity behavior of the first virtual object is also the greatest, and particularly, the method is more beneficial to collecting virtual props, protecting the safety of the first virtual object, attacking an opponent object or helping the opponent object, so that the position movement of the first virtual object is more intelligent.
In one embodiment, the virtual object control method further includes: when scoring each movable place based on the key factors corresponding to each movable place, the score values corresponding to the key factors may be adjusted based on the current behavior pattern of the first virtual object.
When the server marks each movable place, the server corresponds to different current behavior modes, and can consider that the 'emphasis point' of the current activity behavior of the first virtual object is different, and at the moment, the movement strategy of the first virtual object can be adjusted by adjusting the score value corresponding to the key factor.
Specifically, the adjusting the score value corresponding to the key factor specifically includes: and when the current behavior mode is to collect the virtual prop, increasing the score value corresponding to the virtual prop.
As shown in fig. 7, explanation is made by taking an example that the key factors only include the virtual prop and the shield point, the score value corresponding to the virtual prop is set to be 50, the score value corresponding to the shield point is set to be 50, the current movable place of the first virtual object includes M1 and M2, wherein the M1 point only includes the virtual prop, the M2 point only includes the shield point, if the score is given to the M1 point and the M2 point based on the setting, the score values of the two points are both 50, and the score of the M1 point and the score of the M2 point are the same, that is, the two points can be used as the moving target points. However, when the current behavior mode of the first virtual object is to collect virtual props, the "emphasis point" of the current active behavior of the first virtual object is more biased to how to collect more virtual props, and the apparent M1 point is more suitable as a moving target point, so that the first virtual object can go to the M1 point to collect virtual props, therefore, when the current behavior mode is to collect virtual props, the score value corresponding to the virtual props is increased, and the moving strategy of the first virtual object when collecting virtual props can be more intelligent.
Optionally, increasing the score value corresponding to the shield point and the first distance when the current behavior pattern is combat with the second virtual object; and when the current behavior mode is to assist the third virtual object to fight with the second virtual object, increasing score values corresponding to the shield point, the first distance and the second distance.
When the first virtual object is in a combat state, the 'emphasis point' of the current activity of the first virtual object is more biased to attack the hostile object and reduce the damage of the hostile object to the first virtual object, so that the movement strategy of the first virtual object when the hostile object is attacked can be more intelligent by increasing the score values corresponding to the shield points and the first distance.
In addition, if the friend unit needs to be rescued in the combat process, the "emphasis" of the current activity of the first virtual object may also be biased toward how to rescue the friend unit, so increasing the score value of the second distance may enable the movement strategy of the first virtual object in rescuing the friend object to be more intelligent.
In one embodiment, as shown in fig. 8, the virtual object control method further includes: step S500, monitoring whether a target event occurs in the virtual activity scene. When the target event is not monitored, controlling the first virtual object based on the processing flow of the steps S100 to S400; when the target event is detected, step S510 is executed to control the first virtual object to move to the target position corresponding to the target event. The target event is used for advancing the activity progress of the virtual activity scene, and the target position comprises a target point or a target area.
For example, for a live shooting type game, the game mode is that a plurality of players fight against each other until only one player or the same team of players remains, the game progress is determined to reach 100%, and the game of bureau is ended. In this type of game, multiple players gather virtual props on a map, and at this time, if most players keep unchanged in position, the players are hard to meet each other, the game time is long, and the pressure of the server is increased. At this time, by adding the target event in the virtual activity scene, for example, as shown in fig. 9, the map 91 is divided into the first area N1 and the second area N2, the player 92a in the first area N1 is in a normal state, the player 92b in the second area N2 can continuously decrease the life attribute value, and continuously narrow the range of the first area N1, so that the players can meet each other and then fight in a smaller and smaller area, and the game time can be ensured to be controlled within a reasonable range. At this time, the event of continuously shrinking the first region may be regarded as a key event. In this case, the target position corresponding to the key event is the first area, and at this time, the first virtual object may be controlled to go to the first area to avoid the decrease of the self life attribute value.
For another example, for a survival-type game, the play pattern is that the player fights against monsters until the prop of the rescue player appears in the play scene (e.g., a spacecraft, etc.). In such a game, when a prop of a rescue player appears, the player goes to the prop, specifically, for example, gets on a spacecraft, etc., and the game can be ended. Thus, the occurrence of the prop of the rescue player may be considered as a critical event, in which case the target position corresponding to the critical event is the location point where the prop of the rescue player is located, and at this time, the first virtual object may be controlled to go to the location point to end the game.
In this embodiment, when a target event for advancing the activity progress of the virtual activity scene is detected in the game, the response of the real player to the target event may be simulated by controlling the first virtual object to move to the target position corresponding to the target event, so that the intelligentization degree of the first virtual object may be further improved.
In one embodiment, the virtual object control method further includes: and when the residence time of the first virtual object at the current moving target point reaches the preset duration, re-determining a new moving target point, and controlling the first virtual object to move to the new moving target point until the life attribute value of the first virtual object is zero or the activity progress of the virtual activity scene reaches the preset progress.
The server may set a preset duration of stay of the first virtual object at the moving target point in the process of controlling the first virtual object to move, and when the stay time of the first virtual object at the current moving target point reaches the preset duration, determine a new moving target point again to move.
Optionally, for different behavior modes, the corresponding preset duration may be different, for example, when the current behavior mode of the first virtual object is that of collecting the virtual prop, after the server controls the first virtual object to go to the moving target point where the virtual prop exists, a certain time is required for collecting the virtual prop, so that the preset duration of stay may be set to be 3 seconds or the like; when the current behavior pattern of the first virtual object is to fight against the opponent, the preset duration of stay may be set to a short time, for example, 1 second, etc., so that the first virtual object may evade shooting of the opponent by constantly changing its own position.
In this embodiment, when the life attribute value of the first virtual object is zero, it is indicated that the first virtual object has been "destroyed" by the hostile object, and the first virtual object is in a "dead" state in the virtual activity scene, so that the server does not need to control the first virtual object any more.
In addition, when the activity progress of the virtual activity scene reaches the preset progress, for example, when the game progress is completed and the player wins the activity, at this time, the first virtual object does not need to perform activity again, so the server does not need to control the first virtual object again.
It should be understood that, under reasonable conditions, although the steps in the flowcharts referred to in the foregoing embodiments are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, and the order of execution of the sub-steps or stages is not necessarily sequential, but may be performed in rotation or alternately with at least a portion of the sub-steps or stages of other steps or other steps.
In one embodiment, as shown in fig. 10, there is provided a virtual object control apparatus, which mainly includes the following modules:
The activity information obtaining module 100 is configured to obtain activity information of a first virtual object in a virtual activity scene, where the activity information includes environment resource information and object state information, and the first virtual object is a virtual object controlled by a computer;
the behavior mode determining module 200 is configured to perform behavior mode analysis processing based on object state information to obtain a current behavior mode of the first virtual object;
the mobile target point determining module 300 is configured to determine a mobile target point of the first virtual object according to the environmental resource information and the current behavior mode;
the first virtual object control module 400 controls the first virtual object to move to the moving target point and execute the action corresponding to the current behavior mode.
The embodiment provides a virtual object control device, when a generated first virtual object is controlled, the current behavior mode of the first virtual object is determined by combining the environment resource information and the object state information of the first virtual object, so that the moving position of the first virtual object is determined, and different actions corresponding to the behavior mode are executed, so that the first virtual object can better simulate the behavior of a real player, and the artificial intelligence degree of the virtual object is improved.
In one embodiment, the behavior pattern determination module 200 is further configured to: when the generation time of the first virtual object is lower than the preset duration, determining that the current behavior mode of the first virtual object is the collection of virtual props; when only a second virtual object exists in the preset distance range of the first virtual object, determining that the current behavior mode of the first virtual object is a fight with the second virtual object, wherein the second virtual object is an opponent object of the first virtual object; when a second virtual object and a third virtual object exist in the preset distance range of the first virtual object at the same time, determining the current behavior mode of the first virtual object as a friend object for assisting the third virtual object to fight against the second virtual object, wherein the third virtual object is the first virtual object; when the life attribute value of the first virtual object is lower than a preset threshold value, determining that the current behavior mode of the first virtual object is far away from the second virtual object, and/or searching a shielding point for avoiding the attack of the second virtual object, and/or using the virtual prop to increase the life attribute value of the first virtual object.
In one embodiment, the mobile target point determination module 300 is further configured to: scoring each movable place of the first virtual object in the current behavior mode based on the environment resource information and the current behavior mode to obtain a score value of each movable place; and determining the movable place with the highest score value as a moving target point.
In one embodiment, the mobile target point determination module 300 is further configured to: obtaining score values of the movable places based on key factors corresponding to the movable places and corresponding relations between the key factors and the score values under different behavior modes; the key factors comprise at least one of a shield point, a virtual prop, a first distance from a second virtual object and a second distance from a third virtual object.
In one embodiment, the mobile target point determination module 300 is further configured to: and when the movable places are marked based on the key factors corresponding to the movable places, adjusting the score values corresponding to the key factors based on the current behavior mode of the first virtual object.
In one embodiment, the first virtual object control module 400 is further configured to: when a target event is monitored, the first virtual object is controlled to move to a target position corresponding to the target event, the target event is used for pushing the activity progress of the virtual activity scene, and the target position comprises a target point or a target area.
In one embodiment, the first virtual object control module 400 is further configured to: when the residence time of the first virtual object at the current moving target point reaches the preset duration, the first virtual object is controlled to move to the new moving target point determined by the moving target point determining module 300 again until the life attribute value of the first virtual object is zero or the activity progress of the virtual activity scene reaches the preset progress.
For specific limitations of the virtual object control apparatus, reference may be made to the above limitation of the virtual object control method, and no further description is given here. The respective modules in the above-described virtual object control apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
FIG. 11 illustrates an internal block diagram of a computer device in one embodiment. The computer device may in particular be the server cluster 40 in fig. 1. As shown in fig. 11, the computer device includes a processor, a memory, a network interface, an input device, and a display screen connected by a system bus. The memory includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system, and may also store a computer program that, when executed by a processor, causes the processor to implement a virtual object control method. The internal memory may also store a computer program that, when executed by the processor, causes the processor to perform the virtual object control method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 11 is merely a block diagram of a portion of the structure associated with the present application and is not limiting of the computer device to which the present application applies, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, the virtual object control apparatus provided herein may be implemented in the form of a computer program that is executable on a computer device as shown in fig. 11. The memory of the computer device may store therein various program modules constituting the virtual object control apparatus, such as an activity information acquisition module, a behavior pattern determination module, a moving target point determination module, and a first virtual object control module shown in fig. 10. The computer program constituted by the respective program modules causes the processor to execute the steps in the virtual object control method of the respective embodiments of the present application described in the present specification.
For example, the computer device shown in fig. 11 may obtain, by an activity information obtaining module in the virtual object control apparatus shown in fig. 10, activity information of a first virtual object in a virtual activity scene, the activity information including environment resource information and object state information, the first virtual object being a virtual object controlled by a computer; performing behavior pattern analysis processing based on object state information through a behavior pattern determining module to obtain a current behavior pattern of the first virtual object; determining a moving target point of the first virtual object by a moving target point determining module according to the environment resource information and the current behavior mode; and controlling the first virtual object to move to a moving target point through the first virtual object control module, and executing the action corresponding to the current behavior mode.
In one embodiment, a computer device is provided that includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the virtual object control method described above. The steps of the virtual object control method herein may be the steps in the virtual object control method of the above-described respective embodiments.
In one embodiment, a computer readable storage medium is provided, storing a computer program which, when executed by a processor, causes the processor to perform the steps of the virtual object control method described above. The steps of the virtual object control method herein may be the steps in the virtual object control method of the above-described respective embodiments.
Those skilled in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, where the program may be stored in a non-volatile computer readable storage medium, and where the program, when executed, may include processes in the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (14)

1. A virtual object control method, the method comprising:
acquiring activity information of a first virtual object in a virtual activity scene, wherein the activity information comprises environment resource information and object state information, and the first virtual object is a virtual object controlled by a computer;
performing behavior pattern analysis processing based on the object state information to obtain a current behavior pattern of the first virtual object;
Determining each movable place of the first virtual object in the current behavior mode, and acquiring key factors corresponding to each movable place based on the environment resource information; obtaining a score value of each movable place based on key factors corresponding to each movable place and the corresponding relation between each key factor and the score value under different behavior modes;
determining a movable place with the highest score value as a movable target point;
and controlling the first virtual object to move to the moving target point, and executing the action corresponding to the current behavior mode.
2. The method according to claim 1, wherein the performing behavior pattern analysis processing based on the object state information to obtain the current behavior pattern of the first virtual object includes:
when the generation time of the first virtual object is lower than a preset duration, determining that the current behavior mode of the first virtual object is to collect virtual props;
when only a second virtual object exists in the preset distance range of the first virtual object, determining that the current behavior mode of the first virtual object is a fight with the second virtual object, wherein the second virtual object is an opponent object of the first virtual object;
When a second virtual object and a third virtual object exist in the preset distance range of the first virtual object at the same time, determining the current behavior mode of the first virtual object as a friend object for assisting the third virtual object to fight against the second virtual object, wherein the third virtual object is the friend object of the first virtual object;
when the life attribute value of the first virtual object is lower than a preset threshold value, determining that the current behavior mode of the first virtual object is far away from the second virtual object, and/or searching a shielding point for avoiding the attack of the second virtual object, and/or increasing the life attribute value of the first virtual object by using a virtual prop.
3. The virtual object control method of claim 2, wherein the key factors include at least one of a shield point, a virtual prop, a first distance from the second virtual object, and a second distance from the third virtual object.
4. The virtual object control method according to claim 1, characterized in that the method further comprises:
and when each movable place is marked based on the key factors corresponding to each movable place, adjusting the score values corresponding to the key factors based on the current behavior mode of the first virtual object.
5. The virtual object control method according to claim 1, characterized in that the method further comprises:
when a target event is monitored, the first virtual object is controlled to move to a target position corresponding to the target event, the target event is used for pushing the activity progress of the virtual activity scene, and the target position comprises a target point or a target area.
6. The virtual object control method according to claim 1, characterized in that the method further comprises:
and when the residence time of the first virtual object at the current moving target point reaches the preset duration, re-determining a new moving target point, and controlling the first virtual object to move to the new moving target point until the life attribute value of the first virtual object is zero or the activity progress of the virtual activity scene reaches the preset progress.
7. A virtual object control apparatus, the apparatus comprising:
the system comprises an activity information acquisition module, a virtual activity information acquisition module and a virtual activity information processing module, wherein the activity information acquisition module is used for acquiring activity information of a first virtual object in a virtual activity scene, the activity information comprises environment resource information and object state information, and the first virtual object is a virtual object controlled by a computer;
The behavior mode determining module is used for carrying out behavior mode analysis processing based on the object state information to obtain the current behavior mode of the first virtual object;
the mobile target point determining module is used for determining each mobile place of the first virtual object in the current behavior mode, obtaining key factors corresponding to each mobile place based on the environment resource information, obtaining score values of each mobile place based on the key factors corresponding to each mobile place and the corresponding relation between each key factor and the score value in different behavior modes, and determining the mobile place with the highest score value as a mobile target point;
and the first virtual object control module is used for controlling the first virtual object to move to the moving target point and executing the action corresponding to the current behavior mode.
8. The virtual object control device according to claim 7, wherein the behavior pattern determining module is further configured to determine, when the generation time of the first virtual object is lower than a preset duration, that a current behavior pattern of the first virtual object is a collection virtual prop, determine, when only a second virtual object exists within a preset distance range of the first virtual object, that the current behavior pattern of the first virtual object is a fight against the second virtual object, that the second virtual object is an opponent to the first virtual object, determine, when both a second virtual object and a third virtual object exist within the preset distance range of the first virtual object, that the current behavior pattern of the first virtual object is a friend object assisting the third virtual object and the second virtual object, that the third virtual object is a friend object of the first virtual object, and determine, when a life attribute value of the first virtual object is lower than a preset threshold, that the current behavior pattern of the first virtual object is a fight against the second virtual object, and/or that a life attribute of the second virtual object is hidden from the first object is hidden from the second object is found, or that the life attribute of the first object is hidden from the second object is increased.
9. The virtual object control device of claim 8, wherein the key factors include at least one of a shield point, a virtual prop, a first distance from the second virtual object, and a second distance from the third virtual object.
10. The virtual object control apparatus according to claim 7, wherein the moving target point determination module is further configured to adjust, when each movable place is scored based on a key factor corresponding to each movable place, a score value corresponding to the key factor based on a current behavior pattern of the first virtual object.
11. The virtual object control device according to claim 7, wherein the first virtual object control module is further configured to control, when a target event is detected, the first virtual object to move to a target position corresponding to the target event, the target event being used to advance an activity progress of the virtual activity scene, the target position including a target point or a target area.
12. The virtual object control device according to claim 7, wherein the first virtual object control module is further configured to, when a residence time of the first virtual object at a current moving target point reaches a preset duration, redefine a new moving target point, and control the first virtual object to move to the new moving target point until a life attribute value of the first virtual object is zero or an activity progress of the virtual activity scene reaches a preset progress.
13. A computer readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of the method of any one of claims 1 to 6.
14. A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method of any of claims 1 to 6.
CN202010131983.8A 2020-02-29 2020-02-29 Virtual object control method, device, computer readable storage medium and apparatus Active CN111318017B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010131983.8A CN111318017B (en) 2020-02-29 2020-02-29 Virtual object control method, device, computer readable storage medium and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010131983.8A CN111318017B (en) 2020-02-29 2020-02-29 Virtual object control method, device, computer readable storage medium and apparatus

Publications (2)

Publication Number Publication Date
CN111318017A CN111318017A (en) 2020-06-23
CN111318017B true CN111318017B (en) 2023-06-13

Family

ID=71169097

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010131983.8A Active CN111318017B (en) 2020-02-29 2020-02-29 Virtual object control method, device, computer readable storage medium and apparatus

Country Status (1)

Country Link
CN (1) CN111318017B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112843669B (en) * 2021-01-28 2024-02-06 杭州电魂网络科技股份有限公司 Method and system for simulating physical gyro movement
CN113521742A (en) * 2021-05-24 2021-10-22 广州简悦信息科技有限公司 Virtual object moving method, device and storage medium
CN117654061A (en) * 2022-08-23 2024-03-08 腾讯科技(深圳)有限公司 Object control method, device, electronic apparatus, storage medium, and program product

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6110215A (en) * 1998-06-19 2000-08-29 Microsoft Corporation Heightened realism for computer-controlled units in real-time activity simulation
CN109313448A (en) * 2017-08-25 2019-02-05 深圳市得道健康管理有限公司 Artificial intelligence terminal and its behaviour control method
CN109313450A (en) * 2017-08-25 2019-02-05 深圳市得道健康管理有限公司 Artificial intelligence terminal and its behaviour control method
CN110538455A (en) * 2019-09-05 2019-12-06 腾讯科技(深圳)有限公司 Method, device, terminal and storage medium for controlling movement of virtual object

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109471712B (en) * 2018-11-21 2023-03-10 腾讯科技(深圳)有限公司 Scheduling method, device and equipment of virtual object in virtual environment
CN109529352B (en) * 2018-11-27 2023-03-28 腾讯科技(深圳)有限公司 Method, device and equipment for evaluating scheduling policy in virtual environment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6110215A (en) * 1998-06-19 2000-08-29 Microsoft Corporation Heightened realism for computer-controlled units in real-time activity simulation
CN109313448A (en) * 2017-08-25 2019-02-05 深圳市得道健康管理有限公司 Artificial intelligence terminal and its behaviour control method
CN109313450A (en) * 2017-08-25 2019-02-05 深圳市得道健康管理有限公司 Artificial intelligence terminal and its behaviour control method
CN110538455A (en) * 2019-09-05 2019-12-06 腾讯科技(深圳)有限公司 Method, device, terminal and storage medium for controlling movement of virtual object

Also Published As

Publication number Publication date
CN111318017A (en) 2020-06-23

Similar Documents

Publication Publication Date Title
CN111318017B (en) Virtual object control method, device, computer readable storage medium and apparatus
US10668388B2 (en) Collaborative diplomacy mechanics
WO2021213026A1 (en) Virtual object control method and apparatus, and device and storage medium
CN112691377B (en) Control method and device of virtual role, electronic equipment and storage medium
JP7427728B2 (en) Virtual object control method, device, computer device and program thereof
US20220379219A1 (en) Method and apparatus for controlling virtual object to restore attribute value, terminal, and storage medium
CN113134237A (en) Virtual reward resource distribution method and device, electronic equipment and storage medium
CN110339564B (en) Virtual object display method, device, terminal and storage medium in virtual environment
TWI804032B (en) Method for data processing in virtual scene, device, apparatus, storage medium and program product
CN110496394B (en) Method, device, equipment and medium for controlling NPC (neural network controller) based on artificial intelligence
CN113134233B (en) Control display method and device, computer equipment and storage medium
JP7394872B2 (en) Virtual object control method, device, equipment and computer program in virtual scene
KR20210150465A (en) Virtual character control method and apparatus, device, and storage medium
US20230330530A1 (en) Prop control method and apparatus in virtual scene, device, and storage medium
CN112691366A (en) Virtual item display method, device, equipment and medium
JP2024054230A (en) Method, apparatus, device, medium and computer program for displaying pre-order items
CN111450533B (en) Virtual object control method, device, terminal and storage medium in virtual scene
CN114082173A (en) Data processing method, data processing device, computer equipment and storage medium
WO2023024762A1 (en) Artificial intelligence object control method and apparatus, device, and storage medium
CN113769391B (en) Method, device, equipment and medium for acquiring skills in virtual environment
JP2023164787A (en) Picture display method and apparatus for virtual environment, and device and computer program
TWI821779B (en) Virtual object controlling method, device, computer apparatus, and storage medium
WO2022166492A1 (en) Information display method and apparatus, electronic device, computer-readable storage medium and computer program product
CN111389004A (en) Control method of virtual role, storage medium and processor
CN114225372B (en) Virtual object control method, device, terminal, storage medium and program product

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40024152

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant