Method, device, equipment and program product for displaying object action in virtual scene
By receiving object control commands and obtaining the target behavior tree, and determining actions based on the virtual object's state information, the problem of poor operability and insufficient flexibility caused by fixed actions of virtual objects is solved, thus improving operability and flexibility in the game.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-04
- Publication Date
- 2026-03-27
AI Technical Summary
In existing technologies, virtual objects in multiplayer tactical games perform combat according to pre-set fixed actions, resulting in poor player operability, insufficient flexibility, and increased computer overhead.
By receiving object control commands, obtaining the target behavior tree, determining the target action of the virtual object in the virtual game based on the virtual object's state information, displaying multiple virtual objects to execute animations, and realizing the target cooperation mode.
It improves the controllability and operability of virtual objects, reduces the need for players to manually adjust the actions of virtual objects, and enhances the gaming experience.
Smart Images

Figure CN115671722B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of virtual environments, and in particular to a method, apparatus, device, and program product for displaying object actions in a virtual scene. Background Technology
[0002] With the rapid development of computer technology and the diversification of terminals, video games have become increasingly popular. Among them, tactical action games are a popular type of game. Virtual scenes are displayed on the terminal, and players can control virtual objects in the virtual scene to fight against virtual objects controlled by other users. During the battle, players can use tactical strategies to win the game.
[0003] In related technologies, players control multiple virtual objects to engage in combat by inputting action commands. Each virtual object performs a single form of combat according to the fixed actions preset by the server. For example, when a player issues the "charge" command, the group of soldiers will hold virtual weapons in a fixed posture and advance towards the target in a pre-set charging posture.
[0004] However, in the aforementioned technologies, when multiple virtual objects fight together according to pre-set fixed actions, players need to adjust the combat actions of the virtual objects multiple times to meet the combat requirements, resulting in poor game operability, excessively long match times, increased computer overhead, and the display of fixed actions makes the virtual objects appear less flexible. Summary of the Invention
[0005] This application provides a method, apparatus, device, and program product for displaying object actions in a virtual scene, which improves the flexibility of displaying virtual object actions. The technical solution is as follows:
[0006] On the one hand, a method for displaying object actions in a virtual scene is provided, the method comprising:
[0007] Displays a master virtual object and a group of virtual objects in a virtual scene, wherein the group of virtual objects is used to cooperate with the master virtual object in the virtual scene to conduct virtual games, and the group of virtual objects includes multiple virtual objects;
[0008] Receive object control instructions, the object control instructions being used to instruct the virtual object group to participate in the virtual game in a target cooperation mode;
[0009] Obtain the target behavior tree corresponding to the target cooperation mode from multiple behavior trees. The target behavior tree includes behavior subtrees corresponding to the multiple virtual objects respectively. The behavior subtrees are used to indicate multiple candidate game actions of the multiple virtual objects in the process of executing the target cooperation mode.
[0010] determine, based on state information respectively corresponding to the plurality of virtual objects, target actions respectively corresponding to the plurality of virtual objects from behavior sub-trees respectively corresponding to the plurality of virtual objects, the state information being used to indicate states of the plurality of virtual objects when the virtual object group is playing the virtual game, wherein the plurality of virtual objects include a first virtual object and a second virtual object corresponding to different target actions;
[0011] display, in the virtual scene, animations of the plurality of virtual objects respectively performing the target actions.
[0012] In another aspect, a virtual object control apparatus is provided, and the apparatus includes:
[0013] a display module configured to display a master virtual object and a virtual object group in a virtual scene, wherein the virtual object group is configured to play a virtual game with the master virtual object in the virtual scene, and the virtual object group includes a plurality of virtual objects;
[0014] a receiving module configured to receive an object control instruction, the object control instruction being used to instruct the virtual object group to participate in the virtual game in a target cooperation mode;
[0015] an obtaining module configured to obtain, from a plurality of behavior trees, a target behavior tree corresponding to the target cooperation mode, wherein the target behavior tree includes behavior sub-trees respectively corresponding to the plurality of virtual objects, and the behavior sub-trees are used to indicate a plurality of candidate game actions of the plurality of virtual objects in a process of performing the target cooperation mode;
[0016] a determining module configured to determine, based on state information respectively corresponding to the plurality of virtual objects, target actions respectively corresponding to the plurality of virtual objects from behavior sub-trees respectively corresponding to the plurality of virtual objects, the state information being used to indicate states of the plurality of virtual objects when the virtual object group is playing the virtual game, wherein the plurality of virtual objects include a first virtual object and a second virtual object corresponding to different target actions;
[0017] The display module is further configured to display, in the virtual scene, animations of the plurality of virtual objects respectively performing the target actions.
[0018] In another aspect, a computer device is provided, and the device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement a display method of object actions in a virtual scene according to any of the embodiments of the present application.
[0019] In another aspect, a computer-readable storage medium is provided, and the computer-readable storage medium stores at least one program code. The program code is loaded and executed by a processor to implement the method for displaying actions of objects in a virtual scene according to any of the embodiments of the present application.
[0020] In another aspect, a computer program product or computer program is provided, and the computer program product or computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method for displaying actions of objects in a virtual scene according to any of the embodiments described above.
[0021] The technical solutions provided in the present application have at least the following beneficial effects:
[0022] When the object control instruction indicating that the virtual object group plays the virtual game in the target cooperation mode is received, the target behavior tree corresponding to the target cooperation mode is obtained from the plurality of behavior trees, and the target action corresponding to the virtual object is determined from the behavior sub-tree in the target behavior tree according to the state information of each virtual object in the virtual object group, so that the animation of the virtual object performing the target action is displayed. That is, the target behavior tree of the target cooperation mode in which the virtual object group participates in the virtual game is determined through the object control instruction, and the candidate game action is selected as the target action for the game from the behavior sub-tree of the target behavior tree according to the state information of each virtual object, so that the action performed by the virtual object in the game process is adapted to the object control instruction input by the player, and different actions are performed by different virtual objects under different states, which avoids manual adjustment of the game action of each virtual object by the player, improves the flexibility of virtual object control, and improves the operability of the player in the game process. BRIEF DESCRIPTION OF DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0024] Figure 1 is a structural block diagram of an electronic device provided by an exemplary embodiment of the present application;
[0025] Figure 2 is a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application;
[0026] Figure 3is a flow chart of a display method of object action in a virtual scene provided by an example embodiment of the present application;
[0027] Figure 4 is a flow chart of a display method of object action in a virtual scene provided by another example embodiment of the present application;
[0028] Figure 5 is a flow chart of a display method of object action in a virtual scene provided by another example embodiment of the present application;
[0029] Figure 6 is a schematic diagram of a behavior tree provided by an example embodiment of the present application;
[0030] Figure 7 is a schematic diagram of a behavior tree determination manner provided by an example embodiment of the present application;
[0031] Figure 8 is a flow chart of a display method of object action in a virtual scene provided by another example embodiment of the present application;
[0032] Figure 9 is a schematic diagram of a game animation provided by an example embodiment of the present application;
[0033] Figure 10 is a block diagram of a control device of a virtual object provided by an example embodiment of the present application;
[0034] Figure 11 is a structural diagram of a control device of a virtual object provided by another example embodiment of the present application;
[0035] Figure 12 is a structural block diagram of a terminal provided by an example embodiment of the present application. DETAILED DESCRIPTION
[0036] In order to make the objects, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the drawings.
[0037] First, the terms involved in the embodiments of the present application are briefly introduced:
[0038] Virtual environment: a virtual environment displayed (or provided) by an application when running on a terminal. The virtual environment can be a simulation environment of the real world, or a semi-simulation semi-fictional environment, or a purely fictional environment. The virtual environment can be any one of a two-dimensional virtual environment, a 2.5-dimensional virtual environment and a three-dimensional virtual environment, which is not limited by the present application. The following embodiments are exemplarily described with the virtual environment being a three-dimensional virtual environment.
[0039] Virtual object: refers to an active object in a virtual environment. The active object can be a virtual chess piece, a virtual character, a virtual animal, an animation character, etc., such as a displayed character, an animal, a plant, an oil drum, a wall, a stone, etc. in a three-dimensional virtual environment. Alternatively, the virtual object is a three-dimensional model created based on animation skeleton technology. Each virtual object has its own shape and volume in the three-dimensional virtual environment, and occupies a part of the space in the three-dimensional virtual environment.
[0040] In the embodiments of the present application, the user-controllable virtual object includes a master virtual object and a slave virtual object, and a plurality of slave virtual objects controlled by the user can form a virtual object group. For example, the master virtual object controlled by the user is a general, and the slave virtual object is an archer, and a plurality of archers form an archer team.
[0041] Virtual battle: refers to a game match in which at least two virtual objects fight in a virtual environment. Alternatively, the virtual battle is a single match in which at least two virtual objects fight. In some embodiments, the virtual battle includes virtual objects of at least two camps, and the virtual objects of different camps win the virtual battle by achieving a specified battle target in the virtual battle. For example, the virtual objects of the first camp need to defend the attack of the virtual objects of the second camp in a specified area within a limited time, and the virtual objects of the second camp need to attack the specified area within a limited time and occupy a specified point in the specified area within a limited time.
[0042] Figure 1 A structural block diagram of an electronic device provided by an exemplary embodiment of the present application is shown. The electronic device 100 includes an operating system 110 and an application program 111.
[0043] The operating system 110 is basic software that provides safe access to computer hardware for the application program 111.
[0044] The application program 111 is an application program supporting a virtual environment. Alternatively, the application program 111 is an application program supporting a three-dimensional virtual environment. The application program 111 can be any one of a virtual reality application program, a three-dimensional map program, a self-walking chess game, a puzzle game, a third-person shooting game (TPS), a first-person shooting game (FPS), a multiplayer online battle arena game (MOBA), and a multiplayer gun battle survival game. The application program 111 can be a single-player version application program, such as a single-player version three-dimensional game program, or a network online version application program.
[0045] In some optional embodiments, the method of the present application can be implemented by a terminal alone, or by a server alone, or by a terminal and a server together.
[0046] When implemented by a terminal alone or by a server alone, taking implementation by a terminal alone as an example, the terminal runs a target application program supporting a virtual environment, which can be any one of a virtual reality application program and a three-dimensional map program.
[0047] The target application program can be a stand-alone application program, such as a stand-alone 3D game program, or an online application program, or a networked application program. In this embodiment, taking the target application program installed in the terminal as a stand-alone application program as an example, when the target application program runs in the terminal, the terminal displays a virtual object group in a virtual scene. When the terminal receives an object control instruction, the terminal determines a target behavior tree from a plurality of behavior trees stored in the storage area of the terminal according to a target cooperation mode corresponding to the object control instruction. The target behavior tree includes a plurality of behavior sub-trees corresponding to a plurality of virtual objects respectively, and each behavior sub-tree represents a plurality of candidate actions of the first virtual object in the execution of the target cooperation mode. The terminal determines a target action from the behavior sub-tree corresponding to the virtual object according to state information of the virtual object, and finally displays an animation of the virtual object performing the corresponding target action in the virtual game process.
[0048] Optionally, the terminal can be a desktop computer, a laptop computer, a mobile phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III) player, an MP4 (Moving Picture Experts Group Audio Layer IV) player, and the like.
[0049] When implemented by a terminal and a server together, refer to Figure 2 which shows a schematic diagram of an implementation environment of an embodiment of the present application. Illustratively, the implementation environment includes a terminal 210, a server 220, and a communication network 230, wherein the terminal 210 and the server 220 are connected through the communication network 230.
[0050] The terminal 210 runs a target application program supporting a virtual environment. Illustratively, the terminal 210 displays a virtual scene through the target application program, and the virtual scene includes a master virtual object and a virtual object group controlled by a target account logged in by the current terminal.
[0051] When the terminal 210 receives the object control instruction, a corresponding action acquisition request is generated and sent to the server 220, wherein the object control instruction indicates a corresponding target cooperation mode of the virtual object group in participating in the virtual game process with the master virtual object. In addition, the state information of each virtual object in the virtual object group is also included in the action acquisition request, wherein the state information represents the corresponding state of each virtual object in the virtual object group in the virtual game process.
[0052] When the server 220 receives the action tree acquisition request sent by the terminal 210, first, the target action tree corresponding to the target cooperation mode is obtained from the plurality of action trees stored in the server 220, wherein the target action tree includes a behavior subtree corresponding to each virtual object, and the behavior subtree is used to represent the candidate game action performed by each virtual object in the virtual game process according to the target cooperation mode.
[0053] Secondly, the server 220 determines the target action corresponding to each virtual object from the behavior subtree corresponding to each virtual object according to the state information corresponding to each virtual object in the action acquisition request, and generates an action acquisition result and feeds back to the terminal 210.
[0054] After the terminal 210 receives the action acquisition result, the animation of each virtual object in the virtual object group performing the target action corresponding to itself is displayed in the virtual scene.
[0055] The server 220 can be used to provide background services for the client of the target application (such as a game application) in the terminal 210. For example, the server 220 can be a background server of the target application (such as a game application) described above. It is worth noting that the above-mentioned server 220 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content distribution networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms, etc. Basic cloud computing services.
[0056] Among them, cloud technology refers to a kind of hosting technology that unifies a series of resources such as hardware, software and network in wide area network or local area network, realizes the calculation, storage, processing and sharing of data.
[0057] In some embodiments, the above-mentioned server 220 can also be implemented as a node in a blockchain system.
[0058] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data for analysis, stored data, displayed data, etc.) and signals involved in the present application are authorized by the user or fully authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0059] Please refer to Figure 3 which shows a display method of object action in a virtual scene provided by an embodiment of the present application. In the embodiment of the present application, the method is applied to a terminal 210 as shown in Figure 2 for example. Taking a tactical action game as an example, the method includes the following steps.
[0060] Step 310, display a master virtual object and a virtual object group in a virtual scene.
[0061] Among them, the virtual object group is used to cooperate with the master virtual object to play a virtual game in the virtual scene, and the virtual object group includes a plurality of virtual objects.
[0062] Illustratively, the virtual object group refers to an object set containing at least two virtual objects, wherein each virtual object in the virtual object group belongs to a virtual object of the same object type, such as: all the virtual objects in the virtual object group are archers; or each virtual object in the virtual object group belongs to a virtual object of different object types, such as: the virtual object group includes object 1, object 2 and object 3, wherein object 1 and object 2 are artillerymen, and object 3 is a spearman (a type of soldier throwing a spear), which is not limited.
[0063] Optionally, during the process of controlling the virtual object group by the target account in the virtual scene, the target account can uniformly control each virtual object in the virtual object group, such as: when the target account inputs a target instruction, all virtual objects in the virtual object group perform the same action according to the target instruction; or the target account controls the virtual object group by controlling each virtual object respectively, such as: the virtual object group contains object a, object b and object c, the target account can control the virtual object group by inputting a first instruction (for controlling object a), a second instruction (for controlling object b) and a third instruction (for controlling object c) respectively, so that object a, object b and object c perform corresponding actions according to the first instruction, the second instruction and the third instruction respectively, thereby realizing the control of the target account on the virtual object group.
[0064] Illustratively, the master virtual object refers to a virtual object controlled by the target account logged in the current terminal. The master virtual object is a virtual object independently configured in the master object configuration interface.
[0065] Illustratively, there is a master object configuration interface in the game, which is used for independently configuring the master virtual object controlled by the player. For example, the player switches the appearance, clothing, virtual props, virtual mounts, etc. of the master virtual object in the master object configuration interface.
[0066] Illustratively, the virtual scene is a virtual picture displayed by the terminal through a target application program. The target application program provides a virtual environment carrying game content, and the user can control the virtual object to enter the virtual environment through the target application program, so as to control the terminal to display the picture corresponding to the virtual scene.
[0067] In some embodiments, the above-mentioned virtual scene can be a scene picture obtained by observing the virtual environment from the perspective of the master virtual object controlled by the target account; or the above-mentioned virtual scene can be a scene picture obtained by observing the virtual environment from the perspective of the slave virtual object controlled by the target account.
[0068] Optionally, the above-mentioned object perspective can be a first-person perspective of the virtual object; or the above-mentioned object perspective can be a third-person perspective bound to the virtual object.
[0069] In some embodiments, the target account can switch the perspective of the scene picture corresponding to the virtual scene between the object perspective of the master virtual object and the object perspective of the slave virtual object through a perspective switching operation.
[0070] In other embodiments, the scene picture corresponding to the virtual scene can also be a picture obtained by observing the virtual environment from a range-type third-person perspective realized by the master virtual object and the virtual object group. In one example, the picture of the virtual scene displayed by the terminal is a picture obtained by overlooking the master virtual object and the slave virtual object from a third-person perspective, and the position of the perspective can be freely moved within the activity range corresponding to the master virtual object and the slave virtual object.
[0071] In some embodiments, during the virtual match, the virtual object group cooperates with the master virtual object in a cooperative mode to participate in the battle.
[0072] Step 320, receiving an object control instruction.
[0073] The object control instruction is used to instruct the virtual object group to participate in the virtual match in a target cooperative mode.
[0074] Illustratively, the object control instruction is used to control the virtual object group to participate in the virtual match in a cooperative manner with the master virtual object. Optionally, the object control instruction is used to control all virtual objects in the virtual object group to participate in the virtual match; or the object control instruction is used to control part of the virtual objects in the virtual object group to participate in the virtual match, which is not limited.
[0075] In some embodiments, the target coordination mode refers to at least one of the following behaviors exhibited by the virtual object group during the virtual game session: charging (the virtual object group moves towards a specified target), defending (the virtual object group assumes a defensive posture to resist the attack of other virtual objects), attacking (the virtual object group assumes an offensive posture to cause a certain degree of attribute reduction effect on other virtual objects), and holding (the virtual objects form an array in a certain arrangement to defend).
[0076] Optionally, the object control instruction can be obtained in at least one of the following ways:
[0077] 1. displaying a plurality of instruction controls, and obtaining the object control instruction by triggering a target instruction control in the plurality of instruction controls;
[0078] 2. displaying an instruction input box, and obtaining the object control instruction by inputting an instruction in the instruction input box;
[0079] 3. controlling the virtual object group (or a specified number of virtual objects) to perform a specified action, and obtaining the object control instruction by the specified action, for example, controlling the virtual object group to move forward, and determining the object control instruction as "charging".
[0080] It should be noted that the above-mentioned ways of obtaining the object control instruction are only illustrative examples, and the embodiments of the present application are not limited in this regard.
[0081] Optionally, when the virtual scene includes a master virtual object and a virtual object group, the object control instruction is sent to the master virtual object, and when the master virtual object receives the object control instruction and performs the target coordination mode, the virtual object group follows the master virtual object to perform the target coordination mode and participates in the virtual game session; or when the virtual scene includes a plurality of virtual objects without a coordination relationship, the plurality of virtual objects simultaneously receive the object control instruction and perform the target coordination mode to participate in the virtual game session, which is not limited in this regard.
[0082] Optionally, the object control instruction can be implemented so that the virtual object group participates in the virtual game session in the same coordination mode, for example, each virtual object in the virtual object group performs a "charging" behavior during the virtual game session; or the object control instruction can be implemented so that each virtual object in the virtual object group participates in the virtual game session in different types of coordination modes, for example, part of the virtual objects in the virtual object group perform a "charging" behavior during the virtual game session, and another part of the virtual objects perform a "defending" behavior during the virtual game session, which is not limited in this regard.
[0083] At step 330, a target behavior tree corresponding to the target cooperation mode is obtained from the plurality of behavior trees.
[0084] The target behavior tree includes a plurality of behavior sub-trees corresponding to the plurality of virtual objects, and each behavior sub-tree indicates a plurality of candidate actions of the plurality of virtual objects in the process of executing the target cooperation mode.
[0085] The behavior tree represents the overall behavior of the virtual object group in the process of participating in the virtual game, that is, each behavior tree corresponds to a target cooperation mode, for example, the behavior tree A corresponds to the "charge" behavior, and the behavior tree B corresponds to the "defense" behavior. Different behavior trees correspond to different target cooperation modes.
[0086] Optionally, the virtual object group corresponds to one target behavior tree, or the virtual object group corresponds to a plurality of target behavior trees, which are not limited.
[0087] Optionally, the target behavior tree is obtained in at least one of the following ways:
[0088] 1. The target behavior tree is obtained from a set of behavior trees preset by the server, that is, the server pre-stores a plurality of behavior trees, different behavior trees correspond to different cooperation modes, and the server traverses the plurality of pre-stored behavior trees according to the object control instruction, and selects a behavior tree corresponding to the target cooperation mode indicated by the object control instruction as the target behavior tree.
[0089] 2. The target behavior tree is obtained from a plurality of behavior trees generated in real time during the game, that is, the user can generate the target behavior tree corresponding to the virtual object group in real time by configuring the behavior of the virtual object group during the game, for example, the user can configure the "defense" ability and the "charge" ability of the virtual object group during the game, that is, the virtual object group generates two cooperation modes (defense and charge) in real time, and determines the target behavior tree corresponding to the target cooperation mode after determining the target cooperation mode from the two cooperation modes.
[0090] It is worth noting that the above-mentioned way of obtaining the target behavior tree is only an illustrative example, and the embodiments of the present application are not limited thereto.
[0091] In some embodiments, the target behavior tree includes a plurality of behavior sub-trees, wherein each behavior sub-tree represents a plurality of candidate actions of a corresponding virtual object in the virtual object group in the process of participating in the virtual game under the condition of executing the target cooperation mode, for example, the behavior sub-tree 1 indicates that the object A in the virtual object group performs the action of holding a long sword high to charge in the process of participating in the virtual game under the condition of executing the "charge" behavior, that is, the "charge" behavior is the target cooperation mode, and "holding a long sword high" is a behavior sub-tree corresponding to the object A.
[0092] It is worth mentioning that the "behavior tree" involved in the present application is used to represent the overall behavior of the virtual object group during the virtual game, and the behavior only represents the overall cooperation mode of the virtual object group during the virtual game, that is, the "behavior tree" is for the entire virtual object group, and the "behavior sub-tree" involved in the present application represents the specific game action exhibited by the virtual object during the execution of the cooperation mode, that is, the "behavior sub-tree" is for each virtual object, and it is implemented to the specific action executed by the virtual object, for example: the virtual object group corresponds to the behavior tree 1 "attack", the object 1 in the virtual object group corresponds to the behavior sub-tree 1 "attack with a gun", the object 2 corresponds to the behavior sub-tree 2 "attack by using attack skills", and the object 3 corresponds to the behavior sub-tree 3 "attack by shooting arrows".
[0093] Optionally, the plurality of behavior sub-trees in the target behavior tree are implemented as behavior sub-trees of the same type (but the plurality of behavior sub-trees of the same type correspond to different virtual objects respectively); or, the plurality of behavior sub-trees in the target behavior tree are implemented as behavior sub-trees of different types, which are not limited.
[0094] Illustratively, the virtual object corresponds to at least one behavior sub-tree in the target behavior tree, that is, the virtual object includes at least one candidate game action during the execution of the target cooperation mode.
[0095] Optionally, each virtual object in the virtual object group corresponds to an independent behavior sub-tree, that is, each behavior sub-tree in the target behavior tree only corresponds to one virtual object; or, at least two virtual objects in the virtual object group share one behavior sub-tree, at this time, the at least two virtual objects are as a virtual object group, which are not limited.
[0096] In some embodiments, the behavior tree includes a plurality of nodes, and the behavior sub-tree corresponds to each behavior node in the behavior tree. Among them, the target application program includes a specified engine, and the target application program provides related application functions for the user by running the specified program code on the specified engine. Illustratively, the data of the obtained target behavior tree is input into the above-mentioned specified engine, and the specified engine parses the target behavior tree, thereby determining the plurality of nodes included in the behavior tree, thereby determining the behavior sub-tree corresponding to each virtual object according to the plurality of nodes, and further determining the candidate game action corresponding to the virtual object.
[0097] When multiple nodes are included in the behavior tree, the root node in each behavior tree is used to determine the target behavior tree, i.e., the root node of each behavior tree records the corresponding cooperation mode parameter of the behavior tree. After the target cooperation mode is determined according to the object control instruction, the cooperation mode parameter corresponding to the target cooperation mode is determined, so that the root node of the target behavior tree is determined according to the cooperation mode parameter, and then the target behavior tree is determined.
[0098] Alternatively, the behavior parameters can be directly recorded on each node in the behavior tree, or a behavior parameter list is read, and the corresponding behavior parameter is determined from the behavior parameter list according to the attack behavior indicated by the behavior tree node when the behavior tree is executed.
[0099] In step 340, the target actions corresponding to the multiple virtual objects are determined from the behavior sub-trees corresponding to the multiple virtual objects based on the state information corresponding to the multiple virtual objects.
[0100] The state information is used to indicate the state of the multiple virtual objects in the virtual object group during the virtual game, and the first virtual object and the second virtual object in the multiple virtual objects correspond to different target actions.
[0101] In some embodiments, the state information is used to determine whether the state of the current multiple virtual objects in the virtual object group during the virtual game satisfies the requirement of executing the corresponding game action, for example, when the target cooperation mode is "attack", after the target behavior tree "attack behavior tree" corresponding to the virtual object group is determined, the behavior sub-tree corresponding to the object 1 includes "skill attack behavior", "normal attack behavior" and "auxiliary attack behavior", etc. If the skill cool down time (CD) of the current object 1 has not reached the preset time threshold, the attack cannot be performed by releasing the skill, i.e., the "skill attack behavior" cannot be executed, but the normal attack can be performed, so the target action corresponding to the current virtual object is "normal attack behavior".
[0102] Alternatively, the determination method of the state information includes at least one of the following determination methods:
[0103] 1. According to the division information of the virtual object in the virtual object group, the state information corresponding to the virtual object is automatically added, for example, when the target behavior tree corresponding to the virtual object group is "attack behavior tree", the object A (archer) belongs to the object performing the prop attack behavior in the virtual object group, at this time, the division of the object A is to perform the prop attack behavior, and then the server automatically adds the state information of the virtual object as "holding a bow and arrow to prepare for attack";
[0104] 2. The server configures corresponding state information for the virtual object randomly according to the received object control instruction;
[0105] 3. The server uses the historical state closest to the current time as the state information of the current virtual object according to the historical states of the virtual object in the historical time period.
[0106] It is worth noting that the above-mentioned determination manner of the state information is only an illustrative example, and the embodiments of the present application are not limited thereto.
[0107] Optionally, the corresponding single target action of the virtual object is determined through the state information of the virtual object, or the corresponding multiple target actions of the virtual object are determined through the state information of the virtual object, and the present application is not limited thereto.
[0108] When the multiple target actions corresponding to the virtual object are determined, the execution sequence of the multiple target actions needs to be determined at the same time.
[0109] Optionally, each candidate game action in the behavior sub-tree is configured with an independent state condition, that is, when the state information of the virtual object meets the specified state condition, the game action corresponding to the specified state condition is taken as the target action of the virtual object, or some candidate game actions in the behavior sub-tree are configured with the same state condition, that is, when the state information of the virtual object meets the specified state condition, the virtual object can execute at least one action in the multiple game actions corresponding to the specified state condition (at this time, the multiple game actions are all target actions), and the present application is not limited thereto.
[0110] Optionally, the candidate game action corresponds to one state condition, or the candidate game action corresponds to multiple state conditions. When the candidate game action corresponds to multiple state conditions, the state information of the virtual object only needs to meet one of the multiple state conditions, and the candidate game action can be taken as the target action of the virtual object.
[0111] In some embodiments, as the state information of the virtual object changes in the process of participating in the virtual game, the corresponding target action executed by the virtual object also changes.
[0112] Optionally, the target action corresponding to each virtual object is determined through the determination of the state information corresponding to each virtual object respectively, that is, the process of determining the target action of each virtual object is independently performed, or the target action corresponding to at least two virtual objects in the same state information is determined simultaneously after the state information corresponding to each virtual object is determined.
[0113] In some embodiments, when the behavior tree is implemented as a plurality of nodes, each candidate action of the game is corresponding to a behavior node, and the behavior node corresponding to each candidate action of the game is configured with a corresponding state judgment node for determining whether the state information of the virtual object meets the condition for executing the action of the game. The state judgment node includes a state condition parameter, and the behavior node includes an action parameter corresponding to the candidate action of the game. If the state information of the virtual object meets the state condition parameter corresponding to the state judgment node, the target action corresponding to the virtual object is determined according to the action parameter in the behavior node connected to the state judgment node.
[0114] In some embodiments, when there are a first virtual object and a second virtual object in the plurality of virtual objects, if the first virtual object and the second virtual object correspond to different state information, the first virtual object and the second virtual object correspond to different target actions respectively.
[0115] Step 350, displaying in the virtual scene the animations of the plurality of virtual objects respectively performing the target actions.
[0116] In some embodiments, each node in the behavior tree corresponds to a node function, and the engine is configured to implement the action of the game corresponding to the behavior tree by executing the corresponding node function. For example, the node corresponding to the behavior tree of releasing a skill to attack is pre-configured with a skill release attack function, and the terminal is configured to display the screen of the plurality of virtual objects respectively performing the action of releasing a skill to attack when the skill release attack function is determined.
[0117] Optionally, after determining a single target action according to the state information of the plurality of virtual objects, the animations of the plurality of virtual objects respectively performing the target action are displayed in the virtual scene; or after determining a plurality of target actions according to the state information of the plurality of virtual objects, the animations of the plurality of virtual objects performing the plurality of target actions in sequence according to the execution order are displayed in the virtual scene.
[0118] Optionally, the target actions performed by each virtual object in the group of virtual objects are determined simultaneously, and therefore the animations of each virtual object simultaneously performing the target action corresponding to the virtual object are displayed in the virtual scene simultaneously; or the target actions performed by each virtual object in the group of virtual objects are determined in sequence, and therefore the animations of each virtual object performing the target action are displayed in the virtual scene in sequence, which is not limited.
[0119] In conclusion, the method for displaying object actions in a virtual scene provided by the embodiments of the present application, when receiving an object control instruction indicating that the virtual object group is to participate in a virtual game in a target cooperation mode, obtains a target behavior tree corresponding to the target cooperation mode from a plurality of behavior trees, determines a target action corresponding to each virtual object from a behavior sub-tree in the target behavior tree according to state information of each virtual object in the virtual object group, and displays an animation of the virtual object performing the target action. That is, the target behavior tree of the target cooperation mode in which the virtual object group participates in the virtual game is determined through the object control instruction, and a candidate game action is selected from a behavior sub-tree of the target behavior tree as a target action for performing the game according to the state information of each virtual object, so that the action performed by the virtual object in the game process not only adapts to the object control instruction input by the player, but also performs different actions according to different states of different virtual objects, thereby avoiding manual adjustment of the game action of each virtual object by the player, improving the flexibility of virtual object control, and improving the operability of the player in the game process.
[0120] In an optional embodiment, in the process of determining the target action corresponding to the virtual object, the plurality of virtual objects in the virtual object group are also grouped. For example, referring to FIG. 3B, Figure 4 which shows a method for displaying object actions in a virtual scene provided by an example embodiment of the present application, that is, step 340 further includes step 341 and step 342, or step 340 includes step 340a, step 340b and step 340c. This method is applied to, for example, Figure 2 a terminal 210 as shown in FIG. 3C. Taking a tactical action game as an example, the method includes the following steps.
[0121] In some embodiments, in the process of determining the target behavior tree to finally determining the target action corresponding to each virtual object, the target action corresponding to a single virtual object can be determined according to the state information of each virtual object in the virtual object group; or the virtual object group is obtained by grouping a plurality of virtual objects, and the target action corresponding to the virtual object group is determined according to the state information of the virtual object group. Alternatively, when a single target action corresponding to the virtual object group is determined, the plurality of virtual objects in the virtual object group all perform the target action; or when a plurality of target actions corresponding to the virtual object group are determined, the plurality of virtual objects in the virtual object group perform the corresponding target actions respectively, for example, the virtual object group includes object A and object B, and when the plurality of target actions corresponding to the virtual object group are determined as “normal attack” and “skill attack”, the target action corresponding to object A is “normal attack”, and the target action corresponding to object B is “skill attack”, which is not limited in this regard.
[0122] Next, several grouping processes of the plurality of virtual objects are described in detail.
[0123] First, determine the virtual object group according to the state information of multiple virtual objects.
[0124] Step 341, based on the state information corresponding to each of the plurality of virtual objects, determine at least two virtual object groups.
[0125] The virtual object group includes virtual objects corresponding to the same state information.
[0126] Illustratively, the state information corresponding to each of the plurality of virtual objects is determined according to the manner of determining the state information corresponding to the virtual object in step 340.
[0127] Optionally, the state information corresponding to each of the virtual objects in the virtual object group is determined simultaneously, or the state information corresponding to each of the virtual objects in the virtual object group is determined in a specified order, wherein the specified order can be implemented by determining the state information corresponding to each of the plurality of virtual objects in turn from left to right according to the arrangement positions of the virtual objects in the virtual object group, without limitation.
[0128] In some embodiments, the plurality of virtual objects are grouped according to the state information corresponding to each of the plurality of virtual objects, to obtain at least two virtual object groups after grouping.
[0129] In some embodiments, the grouping index of the virtual object group is that the virtual objects in the group correspond to the same state information.
[0130] Optionally, the determination manner of the virtual object group (i.e., the grouping process) includes at least one of the following manners:
[0131] 1. After determining the state information corresponding to each of the virtual objects, the plurality of state information is classified, and the same state information is classified as a group, and the virtual objects corresponding to the state information in the group are the virtual objects in the same virtual object group;
[0132] 2. After determining the state information corresponding to each of the virtual objects, starting from the first virtual object, the state information corresponding to the first virtual object is matched with the state information corresponding to other virtual objects in the virtual object group, if the matching is successful, the first virtual object is taken as a virtual object (group friend object) in the virtual object group corresponding to the first virtual object, when the first virtual object is matched with all the virtual objects, starting from the second virtual object, the matching is continued, and so on, until all the matching is completed, to obtain the virtual object group;
[0133] 3. a preset group list, the group list comprising at least two group categories, each group category corresponding to a state information, when the state information of each virtual object is determined, the state information corresponding to each virtual object is matched with the state information corresponding to each group category, if the matching is successful, the virtual object is classified into the group, and finally the matching result corresponding to the at least two group categories is obtained, and the virtual objects under each group category are taken as a virtual object group.
[0134] It is worth noting that the above-mentioned determination method of the virtual object group is only an illustrative example, and the embodiments of the present application are not limited thereto.
[0135] Optionally, the state information corresponding to different virtual object groups is different, or the state information corresponding to different virtual object groups is the same, and the embodiments of the present application are not limited thereto.
[0136] If the state information corresponding to different virtual object groups is the same, the grouping result can be obtained after average grouping or random grouping.
[0137] Step 342, in response to the state information corresponding to the virtual object group meeting a preset state condition, a candidate action corresponding to the preset state condition in the behavior sub-tree is taken as a target action corresponding to the virtual object group.
[0138] In some embodiments, the preset state condition is set by the server in advance, and is used to determine whether the state information of the current virtual object (virtual object or virtual object group) can execute the action corresponding to the preset state condition.
[0139] In some embodiments, since the multiple virtual objects in the same virtual object group correspond to the same state information, a virtual object is randomly selected, the state information of the virtual object is matched with the preset state condition, so as to determine the target action corresponding to the virtual object, and the target action corresponding to the entire virtual object group is also determined.
[0140] Optionally, the preset state condition is obtained in at least one of the following ways:
[0141] 1. The server pre-stores at least two preset state conditions before the game starts;
[0142] 2. After the game starts, the server automatically generates a preset state according to the environment of implementing the virtual scene in the process of displaying the virtual scene.
[0143] 3. The preset state condition is set by the user in a designated setting interface.
[0144] It is worth noting that the above-mentioned preset state condition is only an illustrative example, and the embodiments of the present application are not limited thereto.
[0145] Optionally, each preset state condition corresponds to a single candidate action, i.e., when the state information of the virtual object group matches the preset state condition, the single candidate action corresponding to the preset state condition is taken as the target action corresponding to the virtual object group; or, each preset state condition corresponds to multiple candidate actions, i.e., when the state information of the virtual object group matches the preset state condition, a single virtual object in the virtual object group can perform multiple target actions; or, multiple preset state conditions correspond to the same candidate action, i.e., when the virtual object group matches any one of the preset state conditions, the candidate action is taken as the target action corresponding to the virtual object group, which is not limited.
[0146] In some embodiments, in response to the state information corresponding to the virtual object group not matching the i-th preset state condition in the behavior sub-tree, the i+1-th preset state condition in the behavior sub-tree is obtained, i being a positive integer; and in response to the state information corresponding to the virtual object group matching the i+1-th preset state condition in the behavior sub-tree, the candidate action corresponding to the i+1-th preset state condition is taken as the target action.
[0147] In this embodiment, each candidate action corresponds to a preset state condition, and when the behavior sub-tree includes multiple nodes, the candidate action is implemented as a behavior node, and the preset state condition corresponding to the candidate action is implemented as a state judgment node.
[0148] In this embodiment, after determining the state information of the virtual object group, the state information is sequentially matched with the preset state conditions on each state judgment node in the order of arrangement of the multiple preset state conditions on the state judgment node. If the preset state condition on the current state judgment node does not match the state information of the virtual object group, the preset state condition on the next state judgment node is matched with the state information of the virtual object group in order until there is a preset state condition matching the state information of the virtual object group. The candidate action on the behavior node connected to the state judgment node corresponding to the preset state condition is taken as the target action corresponding to the virtual object group.
[0149] If all the preset state conditions on the state judgment nodes in the behavior sub-tree do not match the state information of the virtual object group, the virtual object in the virtual object group does not perform any action.
[0150] Optionally, the multiple preset state conditions are sorted according to their respective condition priorities; or, the multiple preset state conditions are sorted by the user.
[0151] In some embodiments, the preset state condition includes at least one of the following conditions:
[0152] 1. whether the virtual object group has a relevant configuration, such as: the current virtual object group is configured with a target skill, and the preset state condition is "the virtual object needs to be configured with a skill", which indicates that the state information of the virtual object group matches the preset condition state, and the candidate action "release skill attack" corresponding to the preset state condition is taken as the target action of the virtual object group, that is, the virtual object group attacks by releasing the target skill;
[0153] 2. whether the position of the virtual object group is within the specified range, such as: when the behavior tree is a "defense behavior tree", the position of the virtual object group is within the effective defense range, which indicates that the current position (state information) of the virtual object group meets the preset state condition, and the candidate action "shield defense behavior" corresponding to the preset state condition is taken as the target action of the virtual object group;
[0154] 3. whether the virtual object group is in a special state, wherein the special state includes the gain effect, the debuff effect, the attack times, the injury situation, etc. of the virtual object, in an example, when the virtual object group carries a specified gain effect, it can be determined that the virtual object group is in a special state, and the virtual object group meets the current preset state condition, and the candidate action "trigger special skill" corresponding to the preset state condition is taken as the target action of the virtual object group.
[0155] It is worth noting that the above-mentioned preset state condition is only illustrative, and the embodiments of the present application are not limited thereto.
[0156] In some embodiments, in response to the state information of the virtual object being updated, the updated state information corresponding to the virtual object is obtained. Based on the updated state information, an updated virtual object group is determined. The virtual objects in the updated virtual object group correspond to the updated state information.
[0157] In a realizable case, the state information of the virtual object also changes, that is, after the target action of the virtual object (or the virtual object group) is determined according to the state information of the virtual object (or the virtual object group) meeting the preset state condition, if the state information of the virtual object is updated, the virtual objects in the virtual object group are re-grouped according to the updated state information of the virtual object, to obtain an updated virtual object group, wherein the state information of the virtual objects in the updated virtual object group is also the same (i.e., the same updated state information), and the candidate action corresponding to the preset state condition matching the updated state information is determined according to the updated state information of the updated virtual object group, as the updated action of the virtual object group.
[0158] In a case where the state information of the virtual object group as a whole is updated, i.e., the state information of each virtual object in the current virtual object group is updated, the grouping is not needed, and only the updated action of the virtual object group is determined according to the updated state information of the virtual object group.
[0159] Optionally, the updated target action of the virtual object (or the updated virtual object group) is determined whenever the state information of the virtual object (or the virtual object group) is changed, or the updated state information of the virtual object (or the virtual object group) is obtained at each specified time interval, and the updated target action of the virtual object (or the updated virtual object group) is determined.
[0160] Second, group according to the preset condition first, and determine the state information according to the grouping result.
[0161] At step 340a, at least two virtual object groups corresponding to the virtual object group are determined based on a preset grouping condition.
[0162] The preset grouping condition includes at least one of the number of virtual objects, the arrangement of virtual objects, the object type of virtual objects, etc.
[0163] Illustratively, the preset grouping condition refers to a condition for determining the grouping of the virtual object group corresponding to the virtual object group.
[0164] In some embodiments, the determination manner of the virtual object group includes at least one of the following manners:
[0165] 1. Grouping according to the number of virtual objects. That is, by determining the number of virtual objects in the virtual object group, the virtual object group is evenly grouped, randomly grouped, or grouped according to a specified number, so as to determine the virtual object group.
[0166] 2. Grouping according to the arrangement of virtual objects. For example, if the virtual object group is a rectangular array (three rows and four columns, twelve virtual objects), each row of the rectangular array is regarded as a virtual object group, i.e., each virtual object group includes four virtual objects.
[0167] 3. Grouping according to the object type corresponding to each virtual object. For example, the virtual object group includes cavalry, artillery, and slingers, i.e., the virtual object group includes three types of soldiers, and the same type of soldiers is regarded as a virtual object group, i.e., the virtual object group includes a cavalry group, an artillery group, and a slinger group.
[0168] Optionally, the preset grouping condition is obtained in at least one of the following manners:
[0169] 1. The server pre-sets a list of grouping conditions, and selects a specified grouping condition from the list of grouping conditions to determine a virtual object group in the virtual object group after receiving an object control instruction.
[0170] 2. The user sets the grouping conditions by himself, i.e., the user can set the grouping conditions by himself according to actual needs before / during the game, to determine a virtual object group in the virtual object group.
[0171] It is worth noting that the above-mentioned obtaining method of the pre-set grouping condition is only an illustrative example, and the embodiments of the present application are not limited thereto.
[0172] Step 340b: determining state information corresponding to the virtual object group.
[0173] Illustratively, after grouping the virtual object group, the state information of each virtual object group is determined, wherein the method of determining the state information can refer to the related content in the above-mentioned step 840.
[0174] Optionally, each virtual object group corresponds to different state information, or at least two virtual object groups correspond to the same state information, and the present application is not limited thereto.
[0175] Step 340c: determining a target action corresponding to the virtual object from a plurality of behavior sub-trees corresponding to the virtual object based on the state information corresponding to the virtual object group.
[0176] Illustratively, since each virtual object in the virtual object group corresponds to the same state information, a virtual object is randomly selected, and a preset state condition matching the state information is determined from the behavior sub-tree according to the state information corresponding to the virtual object, so as to take the candidate game action corresponding to the preset state condition as the target action corresponding to the virtual object, and the target action corresponding to the virtual object group to which the virtual object belongs is also determined, i.e., the virtual object and the virtual object group perform the same target action.
[0177] Note: the above-mentioned steps 341 to 342, and steps 340a to 340c are two and lower steps of step 340, and the present application is not limited thereto.
[0178] In summary, the method for displaying object actions in a virtual scene provided by the embodiments of the present application, when receiving an object control instruction indicating that the virtual object group participates in a virtual game in a target cooperation mode, obtains a target behavior tree corresponding to the target cooperation mode from a plurality of behavior trees, determines a target action corresponding to each virtual object in the virtual object group from a behavior sub-tree in the target behavior tree according to state information of each virtual object in the virtual object group, and displays an animation of the virtual object performing the target action. That is, the target behavior tree of the target cooperation mode in which the virtual object group participates in the virtual game is determined through the object control instruction, and a candidate game action is selected from the behavior sub-tree of the target behavior tree as a target action for performing the game according to the state information of each virtual object, so that the action performed by the virtual object in the game process is adapted to the object control instruction input by the player, and different actions are performed by different virtual objects in different states, thereby avoiding manual adjustment of the game action of each virtual object by the player, improving the flexibility of virtual object control, and improving the operability of the player in the game process.
[0179] In the embodiments, the target action of the virtual object group is finally determined by grouping the virtual objects, which improves the control efficiency of the virtual objects and reduces the data overhead of the computer.
[0180] In an optional embodiment, the corresponding state information is determined through the division information of the virtual objects. For example, as shown in Figure 5 which shows a flowchart of the method for displaying object actions in a virtual scene provided by an example embodiment of the present application, as shown in Figure 5 the method includes the following steps.
[0181] Step 510, displaying a virtual object group in a virtual scene.
[0182] The virtual object group includes a plurality of virtual objects controlled by a target account currently logged in.
[0183] For the content of the virtual object group in step 510, detailed description has been made in step 310, which will not be repeated here.
[0184] Step 520, receiving an object control instruction.
[0185] The object control instruction is used to indicate that the virtual object group participates in a virtual game in a target cooperation mode.
[0186] Optionally, the terminal receives an object control instruction input by the user, or the terminal automatically generates an object control instruction according to the game state of the virtual object group, which is not limited.
[0187] In some embodiments, the instruction input operation is received; input content corresponding to the instruction input operation is taken as the object control instruction; or a game state of the virtual object group in the virtual scene is obtained; and the object control instruction is obtained based on the game state.
[0188] In an implementable case, the user inputs specified content through the terminal, and takes the specified content as the object control instruction.
[0189] In an implementable case, the server pre-sets a set of object control instructions, obtains a game state of the virtual object group in the virtual scene, and automatically obtains a control instruction corresponding to a preset control condition as the object control instruction when the game state meets the preset control condition, wherein the game state includes at least one of the following states: obtaining a game victory, defeating a game virtual object, and a position change. Optionally, different game states correspond to different object control instructions.
[0190] In some embodiments, the target cooperation mode includes a steadfast mode, wherein the steadfast mode is used to instruct the multiple virtual objects to arrange in a specified formation at a specified position for a virtual game.
[0191] Illustratively, a selection operation of the steadfast mode is received. The steadfast mode is implemented as a fixed mode pre-configured by the system, or the steadfast mode is implemented as a mode set by the player independently, which is not limited.
[0192] In this embodiment, when the target cooperation mode is implemented as the steadfast mode, the virtual object group arranges in a specified formation at a specified position according to the instruction of the master virtual object, and establishes a defense barrier through the specified formation to reduce the enemy virtual object's desire to seek, thereby effectively protecting the garrison area indicated by the specified formation or the master virtual object.
[0193] Illustratively, a preset area behind the multiple virtual objects in the specified formation is taken as the garrison area indicated by the specified formation, or a preset area surrounded by the multiple virtual objects in the specified formation is taken as the garrison area indicated by the specified formation, and the like.
[0194] Optionally, in the steadfast mode, the multiple virtual objects in the specified formation attack the enemy virtual object based on the player's control, or automatically attack the enemy virtual object in response to the enemy virtual object being located within a preset attack range of the specified formation, and the like.
[0195] In some embodiments, after receiving the selection operation of the steadfast mode, an arrangement setting operation of the virtual object group is received, and the arrangement setting operation is used to determine the specified positions of the multiple virtual objects in the virtual object group in the virtual scene.
[0196] In a demonstrative sense, players can trigger the corresponding control in the cooperation mode selection control to select the cooperation mode by using the cooperation mode selection control; or, in response to the main virtual character not selecting a cooperation mode within a preset time period, the cooperation mode can be selected as the target cooperation mode.
[0197] Optionally, when a player selects the "Standby Mode," the virtual object group enters the "Standby Mode" state, assisting the main virtual object in virtual battles.
[0198] Step 530: Obtain the target behavior tree corresponding to the target cooperation pattern from multiple behavior trees.
[0199] The target behavior tree includes behavior subtrees corresponding to multiple virtual objects. These behavior subtrees are used to indicate multiple candidate game actions of the virtual objects during the execution of the target cooperation mode.
[0200] Schematic representation: A behavior tree includes at least one of the following node types:
[0201] 1. Root node;
[0202] The topmost node of a behavior tree indicates the beginning of the behavior tree. A behavior tree contains only one root node.
[0203] 2. Select a node;
[0204] The child nodes of the behavior tree include selection nodes, which are used to indicate the behavior subtree corresponding to each virtual object in the virtual object group. In some embodiments, the selection node connects the behavior subtrees corresponding to multiple virtual objects respectively.
[0205] In some embodiments, the behavior subtree is also implemented as a child node in the behavior tree. Therefore, the child node in the behavior subtree is also implemented as the corresponding child node in the behavior tree, which will not be elaborated further.
[0206] 3. Status judgment node;
[0207] The child nodes of the behavior tree also include state judgment nodes. The state judgment node is used to determine the execution conditions of the child nodes connected to the state judgment node. That is, it determines whether to execute the next node connected to the state judgment node based on the execution conditions indicated by the judgment node.
[0208] In some embodiments, after determining the behavior sub-tree corresponding to the virtual object through the selection node, the state information of the virtual object is matched with the preset state condition mounted at the state judgment node. If the state information of the virtual object meets the preset state condition, it indicates that the next node connected to the state judgment node can be executed. If the state information of the virtual object does not meet the preset state condition, the state information is matched with the next state judgment node, and so on, until there is a preset state condition matching the virtual object.
[0209] 4. a behavior node;
[0210] The behavior nodes are also included in the sub-nodes of the behavior tree, and are used to control the virtual object to execute a target action. In some embodiments, the behavior nodes are leaf nodes of the behavior tree.
[0211] For illustration, reference is made to Figure 6 which shows a behavior tree diagram provided by an example embodiment of the present application, as shown in Figure 6 The current display behavior tree 600 includes a root node 610, a selection node 620, a state judgment node 630 and a behavior node 640. The state judgment node 630 and the behavior node 640 constitute a behavior sub-tree corresponding to a virtual object, that is, the behavior tree 600 contains multiple behavior sub-trees.
[0212] For illustration, reference is made to Figure 7 which shows a behavior tree determination method diagram provided by an example embodiment of the present application, as shown in Figure 7 When receiving the object control instruction 710, a target behavior tree 720 (behavior tree A) corresponding to the virtual object group is determined from multiple behavior trees (behavior tree A and behavior tree B).
[0213] In step 540, the division information respectively corresponding to the multiple virtual objects in the virtual object group is obtained.
[0214] The division information is used to indicate the behavior type of the virtual object in the execution of the target cooperation mode.
[0215] For illustration, the division information refers to the action type of the virtual object in the execution of the target cooperation mode in the virtual object group participating in the virtual game process. For example, the virtual object group includes object a, object b and object c. If the target cooperation mode is "attack behavior", the division information of object a is to execute "skill attack behavior", the division information of object b is to execute "normal attack behavior", and the division information of object c is to execute "auxiliary attack behavior".
[0216] In some embodiments, the division information of the virtual object in the virtual object group is obtained based on position information of the virtual object in the virtual object group; or the division information of the virtual object in the virtual object group is obtained based on corresponding environment information in the virtual scene.
[0217] Optionally, the division information of the virtual object can be fixed division information pre-set by the server; or the division information of the virtual object is set by the user through a specified operation; or the division information of the virtual object is changed in real time by multiple factors, wherein the factors include at least one of the position information or the environment information.
[0218] In some embodiments, the division information of the virtual object in the virtual object group is determined according to the real-time position of the virtual object in the virtual object group. For example, when the virtual object is located in the front row of the virtual object group, the virtual object can be determined as a vanguard object; when the virtual object moves to the back row of the virtual object group, the virtual object can be determined as a rearguard object.
[0219] In some embodiments, the division information of the virtual object in the virtual object group is determined according to the environment information in the virtual scene. Optionally, the environment information includes at least one of the terrain, the weather, and the obstacle position. For example, when the virtual object group is located on a high ground, the virtual object located at the highest point can be determined as an attacking object, and the virtual object located at a lower point can be determined as a defending object.
[0220] In step 550, the state information corresponding to each of the virtual objects is determined based on the division information corresponding to each of the virtual objects.
[0221] In some embodiments, the server adds the state information corresponding to each of the virtual objects based on the division information of each of the virtual objects.
[0222] In step 560, the target action corresponding to each of the virtual objects is determined from the behavior sub-tree corresponding to each of the virtual objects based on the state information corresponding to each of the virtual objects.
[0223] In some embodiments, the state information is used to indicate the state of the virtual object in the virtual object group during the virtual game.
[0224] The content of the target action in step 560 has been described in detail in the above embodiments, and will not be repeated here.
[0225] In step 570, the animation of the virtual object performing the target action is displayed in the virtual scene.
[0226] In some embodiments, the animation of at least two virtual object groups performing the target action corresponding to each of the virtual object groups is displayed in the virtual scene.
[0227] In some embodiments, in response to the end of the animation, the initial game action in the corresponding behavior sub-tree of the virtual object is obtained; and an animation of the plurality of virtual objects performing the initial game action is displayed.
[0228] Illustratively, after the animation of the virtual object group performing the target action is played, the initial game action in the behavior sub-tree corresponding to the virtual object is obtained. The initial game action represents a basic action performed by the virtual object when it is not participating in the virtual game, and an animation of the virtual object group performing the basic action is displayed.
[0229] In some embodiments, in response to the virtual object group being within the game cooperation range of the master virtual object, and based on the object control instruction, an animation of the plurality of virtual objects cooperating with the master virtual object to perform the target action is displayed in the virtual scene.
[0230] Illustratively, the game cooperation range refers to an effective range in which the virtual object group can cooperate with the master virtual object to perform the virtual game in the target cooperation mode.
[0231] When the virtual object group is within the game cooperation range from the master virtual object, the target cooperation mode is determined according to the received object control instruction, so that an animation of each virtual object in the virtual object group cooperating with the master virtual object to perform the corresponding target action is displayed.
[0232] In some embodiments, based on the arrangement setting operation, the plurality of virtual objects are displayed arranged in a specified formation at a specified position in the virtual scene, and an animation of the plurality of virtual objects arranged in the specified formation at the specified position is taken as the animation of the target action.
[0233] Illustratively, after receiving the above arrangement setting operation, the plurality of virtual objects in the specified virtual object group move to the specified position determined by the arrangement setting operation.
[0234] For example, when the specified position indicated by the arrangement setting operation is a position point, the plurality of virtual objects in the virtual object group are arranged in the specified formation at the specified position as the center.
[0235] Optionally, the specified formation is used to indicate a preconfigured formation distribution. For example, the specified formation is a dense formation, i.e., the plurality of virtual objects are arranged in a dense square manner in the virtual scene to resist attacks; or the specified formation is a wedge-shaped formation, i.e., the plurality of virtual objects are arranged in a wedge-shaped manner in the virtual scene to achieve a comprehensive sprint attack; or the specified formation is a semi-arc formation, i.e., the plurality of virtual objects are arranged in a semi-arc manner in the virtual scene to protect the central general, etc.
[0236] Optionally, at any moment in the game, a plurality of virtual objects in the virtual object group are arranged in a first formation at the designated position.
[0237] In summary, the method for displaying object actions in a virtual scene provided by the embodiments of the present application, when receiving an object control instruction indicating that the virtual object group performs a virtual game in a target cooperation mode, obtains a target behavior tree corresponding to the target cooperation mode from a plurality of behavior trees, determines a target action corresponding to each virtual object in the virtual object group from a behavior sub-tree in the target behavior tree according to state information of each virtual object in the virtual object group, and displays an animation of the virtual object performing the target action. That is, the target behavior tree of the target cooperation mode in which the virtual object group participates in the virtual game is determined by the object control instruction, and a candidate game action is selected from the behavior sub-tree of the target behavior tree as a target action for performing the game according to the state information of each virtual object, so that the action performed by the virtual object in the game process not only adapts to the object control instruction input by the player, but also performs different actions according to different states of different virtual objects, avoiding manual adjustment of the game action of each virtual object by the player, improving the flexibility of virtual object control, and improving the operability of the player in the game process.
[0238] In the embodiments, the state information of the virtual object is determined by configuring the division information corresponding to each virtual object, so that the division of the virtual object in the virtual game process is more reasonable, and the winning probability of the game is improved.
[0239] In the embodiments, the division information of the virtual object is determined by a plurality of factors, so that the virtual object is more suitable for the game situation in the current virtual scene, and the game efficiency is improved.
[0240] In the embodiments, the animation of the virtual object performing the initial game action is displayed after the animation of the virtual object performing the target action is played, so that the flexibility of the display of the object action is improved.
[0241] In an optional embodiment, for example, refer to Figure 8 which shows a flowchart of a method for displaying object actions in a virtual scene provided by an exemplary embodiment of the present application, as shown in Figure 8 The method is applied to a game scene of a troop group, and includes the following steps.
[0242] Step 810, input a troop control instruction.
[0243] For example, a virtual object group is displayed in a virtual scene, wherein the virtual object group is implemented as a target troop group, and the target troop group includes a plurality of soldiers (i.e., virtual objects).
[0244] The player inputs an operation input object control instruction as a troop control instruction for controlling the troop to perform an overall behavior (such as defense, attack, array formation, etc.), which corresponds to a target cooperation mode; or when a preset game state of the troop is met, a troop control instruction set by the server is triggered automatically, and the game state is, for example, defeating an enemy soldier, being defeated by an enemy soldier, or a position of the troop being changed. In this embodiment, the target cooperation mode performed by the target troop is determined by inputting the troop control instruction, and the target cooperation mode is implemented as troop-level control.
[0245] In step 820, a target behavior tree is determined.
[0246] Illustratively, after the target cooperation mode of the target troop is determined by the troop control instruction, a target behavior tree corresponding to the target cooperation mode is determined from a plurality of behavior trees.
[0247] In step 830, a behavior sub-tree is determined.
[0248] The target behavior tree includes a plurality of behavior sub-trees, each of which corresponds to a soldier, that is, each soldier has an independent behavior sub-tree. The behavior sub-tree includes a plurality of candidate game actions corresponding to the soldier in the process of performing the target cooperation mode.
[0249] Illustratively, according to the division information of the soldiers in the target troop, different state information is added to each soldier, and the soldiers in the target troop are grouped according to the state information of each soldier to obtain a troop group, and the state information of the soldiers in each troop group is the same. The state information includes at least one of environment information of a virtual scene, a role state of the soldier, and a control instruction received by the soldier.
[0250] Illustratively, the behavior sub-tree includes a state judgment node and a corresponding behavior node. The state judgment node is used to conditionally judge the state information of the soldier. When the state information of the soldier meets a preset state condition corresponding to the current state judgment node, a candidate game action corresponding to the preset state in the behavior sub-tree is taken as a target action of the soldier. In this embodiment, the process of determining the target action of the soldier by determining the behavior sub-tree of the soldier is implemented as soldier-level control.
[0251] In step 840, a game animation is displayed.
[0252] Illustratively, after the target action of the soldier is determined according to the behavior sub-tree, an animation of the soldier performing the target action is displayed.
[0253] Illustratively, please refer to Figure 9 which shows a game animation diagram provided by an example embodiment of the present application, as shown in Figure 9As shown, the current display is a virtual scene 900, which includes a target troop 910 in battle, the target troop 910 receives an "attack" instruction and is performing an attack action, in which a soldier 911 displays an animation of holding a long gun to attack, and a soldier 912 displays an animation of holding a shield to defend.
[0254] When the soldier performs the action, the behavior node of the soldier automatically jumps to the initial behavior node, which corresponds to the initial game action, so that the soldier performs the initial game action until the next troop control instruction is received.
[0255] In summary, the display method of object actions in a virtual scene provided by the embodiments of the present application, when an object control instruction indicating that a virtual object group performs a virtual game in a target cooperation mode is received, a target behavior tree corresponding to the target cooperation mode is obtained from a plurality of behavior trees, a target action corresponding to each virtual object in the virtual object group is determined from a behavior sub-tree in the target behavior tree according to state information of each virtual object in the virtual object group, and an animation of the virtual object performing the target action is displayed. That is, the target behavior tree of the target cooperation mode of the virtual object group participating in the virtual game is determined by the object control instruction, and the candidate game action is selected from the behavior sub-tree of the target behavior tree as the target action for the final game according to the state information of each virtual object, so that the action performed by the virtual object in the battle process not only adapts to the object control instruction input by the player, but also performs different actions according to different states of different virtual objects, avoiding manual adjustment of the game action of each virtual object by the player, improving the flexibility of virtual object control, and improving the operability of the player in the game process.
[0256] Figure 10 A block diagram of a virtual object control device provided by an embodiment of the present application is shown. The device has the functions of implementing the above-mentioned method examples, which can be implemented by hardware or corresponding software executed by hardware. The device can include:
[0257] The display module 1010 is configured to display a master virtual object and a virtual object group in a virtual scene, wherein the virtual object group is used to cooperate with the master virtual object to perform a virtual game in the virtual scene, and the virtual object group includes a plurality of virtual objects.
[0258] The receiving module 1020 is configured to receive an object control instruction, wherein the object control instruction is used to instruct the virtual object group to participate in the virtual game in a target cooperation mode.
[0259] The acquisition module 1030 is used to acquire a target behavior tree corresponding to the target cooperation mode from multiple behavior trees. The target behavior tree includes behavior subtrees corresponding to the multiple virtual objects respectively. The behavior subtrees are used to indicate multiple candidate game actions of the multiple virtual objects in the process of executing the target cooperation mode.
[0260] The determining module 1040 is used to determine the target actions corresponding to the multiple virtual objects from the behavior subtrees corresponding to the multiple virtual objects based on the state information corresponding to the multiple virtual objects respectively. The state information is used to indicate the state of the multiple virtual objects when the virtual object group is playing a virtual game. Among the multiple virtual objects, there are first virtual objects and second virtual objects that correspond to different target actions.
[0261] The display module 1010 is also used to display animations of the plurality of virtual objects performing the target action in the virtual scene.
[0262] In some embodiments, such as Figure 11 As shown, the determining module 1040 includes:
[0263] The determining unit 1041 is used to determine at least two virtual object groups based on the state information corresponding to the plurality of virtual objects respectively, wherein the virtual object group includes virtual objects corresponding to the same state information;
[0264] The determining unit 1041 is further configured to, in response to the state information corresponding to the virtual object group meeting the preset state conditions, take the candidate game action in the behavior subtree corresponding to the preset state conditions as the target action corresponding to the virtual object group.
[0265] In some embodiments, the determining unit 1041 is further configured to: in response to the state information corresponding to the virtual object group not conforming to the i-th preset state condition in the behavior subtree, obtain the (i+1)-th preset state condition in the behavior subtree, where i is a positive integer; and in response to the state information corresponding to the virtual object group conforming to the (i+1)-th preset state condition in the behavior subtree, take the candidate game action corresponding to the (i+1)-th preset state condition as the target action.
[0266] In some embodiments, the acquisition module 1030 is further configured to acquire the updated status information corresponding to the virtual object in response to an update of the status information of the virtual object;
[0267] The determining module 1040 is further configured to determine an updated virtual object group based on the updated status information, wherein the virtual objects in the updated virtual object group correspond to the updated status information.
[0268] In some embodiments, the determining module 1040 is further configured to determine at least two virtual object groups corresponding to the virtual object group based on a preset grouping condition, the preset grouping condition including at least one of a number of virtual objects, an arrangement manner of virtual objects, an object type of virtual objects, and the like; determine state information corresponding to the virtual object groups; and determine a target action corresponding to the virtual object from a behavior sub-tree corresponding to the virtual object based on the state information corresponding to the virtual object groups.
[0269] In some embodiments, the obtaining module 1030 is further configured to obtain division of labor information respectively corresponding to the plurality of virtual objects in the virtual object group, the division of labor information being used to indicate a behavior type of the virtual object in executing the target cooperation mode.
[0270] The determining module 1040 is further configured to determine state information respectively corresponding to the plurality of virtual objects based on the division of labor information respectively corresponding to the plurality of virtual objects.
[0271] In some embodiments, the obtaining module 1030 is further configured to obtain the division of labor information of the plurality of virtual objects in the virtual object group based on position information of the plurality of virtual objects in the virtual object group; or obtain the division of labor information of the plurality of virtual objects in the virtual object group based on corresponding environment information in the virtual scene.
[0272] In some embodiments, the receiving module 1020 is further configured to receive an instruction input operation; take input content corresponding to the instruction input operation as the object control instruction; or obtain a game state of the virtual object group in the virtual scene; and obtain the object control instruction based on the game state.
[0273] In some embodiments, the display module 1010 is further configured to, in response to the virtual object group being within a game cooperation range of the master virtual object and based on the object control instruction, display an animation in which the plurality of virtual objects cooperate with the master virtual object to respectively execute the target action in the virtual scene.
[0274] In some embodiments, the receiving module 1020 is further configured to receive a selection operation of the steadfast mode; and receive an arrangement setting operation of the virtual object group, the arrangement setting operation being used to determine a specified position of the plurality of virtual objects in the virtual object group in the virtual scene.
[0275] In some embodiments, the display module 1010 is further configured to display the plurality of virtual objects arranged in the specified formation at the specified positions in the virtual scene based on the arrangement setting operation, and display an action animation of the virtual objects arranged in the specified formation at the specified positions as the animation of the target action.
[0276] In summary, the virtual object control apparatus provided by the embodiments of the present application, when receiving an object control instruction indicating that a virtual object group performs a virtual game in a target cooperation mode, acquires a target behavior tree corresponding to the target cooperation mode from a plurality of behavior trees, and according to state information of each virtual object in the virtual object group, determines a target action of the virtual object from a behavior sub-tree in the target behavior tree, thereby displaying an animation of the virtual object performing the target action. That is, the target behavior tree of the target cooperation mode of the virtual object group participating in the virtual game is determined through the object control instruction, and a candidate game action is selected from the behavior sub-tree of the target behavior tree as the target action of the game according to the state information of each virtual object, so that the action performed by the virtual object in the game process not only adapts to the object control instruction input by the player, but also performs different actions according to different states of different virtual objects, avoiding manual adjustment of the game action of each virtual object by the player, improving the flexibility of virtual object control, and improving the operability of the player in the game process.
[0277] It should be noted that the virtual object control apparatus provided by the above embodiments is only exemplified by the division of the above functional modules, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the virtual object control apparatus and the display method of object action in a virtual scene provided by the above embodiments belong to the same concept, and the specific implementation process is described in detail in the method embodiments, which will not be repeated here.
[0278] Figure 12 A structure block diagram of a terminal 1200 provided by an example embodiment of the present application is shown. The terminal 1200 can be a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a notebook computer or a desktop computer. The terminal 1200 can also be referred to as a user equipment, a portable terminal, a laptop terminal, a desktop terminal, and other names.
[0279] Generally, the terminal 1200 includes a processor 1201 and a memory 1202.
[0280] The processor 1201 can include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1201 can be implemented in the form of at least one of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), a PLA (Programmable Logic Array). The processor 1201 can also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also referred to as a CPU (Central Processing Unit). The coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1201 can be integrated with a GPU (Graphics Processing Unit) that is responsible for rendering and drawing the content required to be displayed by the display screen. In some embodiments, the processor 1201 can further include an AI (Artificial Intelligence) processor for processing machine learning-related computing operations.
[0281] The memory 1202 can include one or more computer-readable storage media that can be non-transitory. The memory 1202 can also include a high-speed random access memory, and a non-volatile memory such as one or more disk storage devices, flash storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1202 is used to store at least one instruction for being executed by the processor 1201 to implement the virtual game-based control method provided by the method embodiment of the present application.
[0282] In some embodiments, the terminal 1200 further includes other components, which can be understood by those skilled in the art, Figure 12 The structure shown in the figure does not constitute a limitation on the terminal 1200, and can include more or fewer components than those shown, or combine certain components, or use different component arrangements.
[0283] Those skilled in the art can understand that all or part of the steps of the various methods of the above-mentioned embodiments can be completed by programs instructing relevant hardware, and the programs can be stored in a computer readable storage medium, which can be a computer readable storage medium included in the memory in the above-mentioned embodiments, or can be a computer readable storage medium existing separately and not assembled into the terminal. The computer readable storage medium stores at least one instruction, at least one program, a code set or an instruction set, which are loaded and executed by the processor to implement the display method of the object action in the virtual scene according to any one of the above-mentioned embodiments.
[0284] Optionally, the computer readable storage medium can include a read-only memory (ROM), a random access memory (RAM), a solid state disk (SSD) or an optical disk. The random access memory can include a resistance random access memory (ReRAM) and a dynamic random access memory (DRAM).
[0285] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware or by programs instructing relevant hardware, and the programs can be stored in a computer readable storage medium, which can be a read-only memory, a magnetic disk or an optical disk.
[0286] The above-mentioned is only optional embodiments of the present application, and does not limit the present application. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method of displaying an action of an object in a virtual scene, characterized by, The method comprises: displaying a host virtual object and a virtual object group in a virtual scene, wherein the virtual object group is used to cooperate with the host virtual object to participate in a virtual game in the virtual scene, and the virtual object group comprises a plurality of virtual objects; receiving an object control instruction, the object control instruction being used to instruct the virtual object group to participate in the virtual game in a target cooperation mode, the object control instruction comprising an instruction automatically generated based on a game state of the virtual object group, the game state comprising at least one of obtaining a game victory, defeating an enemy virtual object, and a position change of the virtual object group; obtaining a target behavior tree corresponding to the target cooperation mode from a plurality of behavior trees, the target behavior tree comprising a behavior sub-tree corresponding to each of the plurality of virtual objects, the behavior sub-tree being used to instruct a plurality of candidate game actions of the plurality of virtual objects in the execution of the target cooperation mode; obtaining division of labor information corresponding to each of the plurality of virtual objects in the virtual object group, the division of labor information being used to instruct a behavior type of the virtual object in the execution of the target cooperation mode; determining state information corresponding to each of the plurality of virtual objects based on the division of labor information corresponding to each of the plurality of virtual objects; wherein the division of labor information of the plurality of virtual objects in the virtual object group is obtained based on position information of the plurality of virtual objects in the virtual object group; or the division of labor information of the plurality of virtual objects in the virtual object group is obtained based on corresponding environment information in the virtual scene; determining target actions corresponding to each of the plurality of virtual objects from the behavior sub-trees corresponding to the plurality of virtual objects based on the state information corresponding to each of the plurality of virtual objects, the state information being used to indicate a state of the plurality of virtual objects in the virtual game of the virtual object group, the state information being used to determine whether a requirement for executing a corresponding game action is met when the plurality of virtual objects participate in the virtual game of the virtual object group, wherein different target actions corresponding to a first virtual object and a second virtual object exist in the plurality of virtual objects; displaying animations of the plurality of virtual objects respectively executing the target actions in the virtual scene.
2. The method of claim 1, wherein, The determining of the target actions corresponding to each of the plurality of virtual objects from the behavior sub-trees corresponding to the plurality of virtual objects based on the state information corresponding to each of the plurality of virtual objects comprises: determining at least two virtual object groups based on the state information corresponding to each of the plurality of virtual objects, wherein the virtual object groups comprise virtual objects corresponding to the same state information; in response to the state information corresponding to the virtual object groups meeting a preset state condition, taking a candidate game action corresponding to the preset state condition in the behavior sub-tree as the target action corresponding to the virtual object groups.
3. The method of claim 2, wherein, The response to the state information corresponding to the virtual object groups meeting the preset state condition, taking the candidate game action corresponding to the preset state condition in the behavior sub-tree as the target action corresponding to the virtual object groups comprises: In response to the state information corresponding to the virtual object group not meeting the i-th preset state condition in the behavior sub-tree, an (i+1)-th preset state condition in the behavior sub-tree is obtained, i being a positive integer; In response to the state information corresponding to the virtual object group meeting the (i+1)-th preset state condition in the behavior sub-tree, a candidate action corresponding to the (i+1)-th preset state condition is taken as the target action.
4. The method of claim 2, wherein, After the at least two virtual object groups are determined based on the state information corresponding to the plurality of virtual objects, the method further includes: In response to the state information of the virtual object being updated, updated state information corresponding to the virtual object is obtained; Based on the updated state information, an updated virtual object group is determined, the virtual objects in the updated virtual object group corresponding to the updated state information.
5. The method of claim 1, wherein, The target action corresponding to each of the plurality of virtual objects is determined from the behavior sub-trees corresponding to the plurality of virtual objects based on the state information corresponding to the plurality of virtual objects, and includes: Based on a preset grouping condition, at least two virtual object groups corresponding to the virtual object group are determined, the preset grouping condition including at least one of a number of virtual objects, an arrangement mode of virtual objects, an object type of virtual objects, and the like; State information corresponding to the virtual object group is determined; Based on the state information corresponding to the virtual object group, the target action corresponding to each of the plurality of virtual objects is determined from the behavior sub-trees corresponding to the plurality of virtual objects.
6. The method according to any one of claims 1 to 5, characterized in that, The object control instruction is received, including: An instruction input operation is received, input content corresponding to the instruction input operation being taken as the object control instruction; or A game state of the virtual object group in the virtual scene is obtained, and the object control instruction is obtained based on the game state.
7. The method according to any one of claims 1 to 5, characterized in that, The animation in which the plurality of virtual objects respectively perform the target action in the virtual scene is displayed, including: In response to the virtual object group being within a game cooperation range of the master virtual object, and based on the object control instruction, the animation in which the plurality of virtual objects cooperate with the master virtual object to respectively perform the target action in the virtual scene is displayed.
8. The method of claim 7, wherein, The target cooperation mode includes a steadfast mode, the steadfast mode being used to instruct the plurality of virtual objects to arrange in a specified formation at a specified position to perform a virtual game; The object control instruction is received, including: A selection operation on the steadfast mode is received; After the selection operation on the steadfast mode is received, the method further includes: An arrangement setting operation on the virtual object group is received, the arrangement setting operation being used to determine the specified position at which the plurality of virtual objects in the virtual object group are located in the virtual scene; The animation in which the plurality of virtual objects cooperate with the master virtual object to respectively perform the target action in the virtual scene is displayed, including: Based on the arrangement setting operation, the plurality of virtual objects are displayed as being arranged in the specified formation at the specified position in the virtual scene, and an action animation in which the plurality of virtual objects are arranged in the specified formation at the specified position is taken as the animation of the target action.
9. A display device for object actions in a virtual scene, characterized in that, The device includes: The display module is configured to display a master virtual object and a virtual object group in a virtual scene, wherein the virtual object group is configured to participate in a virtual game with the master virtual object in the virtual scene, and the virtual object group includes a plurality of virtual objects; The receiving module is configured to receive an object control instruction, wherein the object control instruction is configured to instruct the virtual object group to participate in the virtual game in a target cooperation mode, and the object control instruction includes an instruction automatically generated based on a game state of the virtual object group, and the game state includes at least one of a game victory, defeating an enemy virtual object, and a position change of the virtual object group; The obtaining module is configured to obtain a target behavior tree corresponding to the target cooperation mode from a plurality of behavior trees, wherein the target behavior tree includes a behavior sub-tree corresponding to each of the plurality of virtual objects, and the behavior sub-tree is configured to instruct a plurality of candidate game actions of the plurality of virtual objects in execution of the target cooperation mode; The obtaining module is further configured to obtain division of labor information corresponding to each of the plurality of virtual objects in the virtual object group, wherein the division of labor information is configured to indicate a behavior type of the virtual object in execution of the target cooperation mode; The determining module is configured to determine state information corresponding to each of the plurality of virtual objects based on the division of labor information corresponding to each of the plurality of virtual objects, wherein the division of labor information of the plurality of virtual objects in the virtual object group is obtained based on position information of the plurality of virtual objects in the virtual object group, or the division of labor information of the plurality of virtual objects in the virtual object group is obtained based on corresponding environment information in the virtual scene; The determining module is further configured to determine a target action corresponding to each of the plurality of virtual objects from the behavior sub-tree corresponding to each of the plurality of virtual objects based on the state information corresponding to each of the plurality of virtual objects, wherein the state information is configured to determine whether a state of the plurality of virtual objects in the virtual object group participating in the virtual game meets a requirement of executing a corresponding game action, and the state information is configured to indicate a state of the plurality of virtual objects in the virtual game, wherein a first virtual object and a second virtual object in the plurality of virtual objects correspond to different target actions; The display module is further configured to display an animation of the plurality of virtual objects executing the target actions in the virtual scene.
10. A computer device, comprising: The computer device includes a processor and a memory, and the memory stores at least one program, which is loaded and executed by the processor to implement the display method of the object action in the virtual scene as claimed in any one of claims 1 to 8.
11. A computer readable storage medium, characterized in that, The storage medium stores at least one program, which is loaded and executed by the processor to implement the display method of the object action in the virtual scene as claimed in any one of claims 1 to 8.
12. A computer program product, characterised in that, The computer instructions are executed by the processor to implement the display method of the object action in the virtual scene as claimed in any one of claims 1 to 8.
Citation Information
Patent Citations
Virtual object team interaction processing method and device, equipment, medium and program
CN114344905A
Formation control method, program, recording medium and game device
JP2002143555A
Program, information storage medium, terminal and server
JP2013013450A