Virtual character control method and device, electronic equipment and storage medium
By receiving role replacement instructions, the attack operation of the virtual character is automatically detected and the third virtual character with dynamic display of the defense status is solved, and the problem of single control of the virtual character is achieved, more flexible and convenient defense operations are achieved, and the game is improved with the immersion and defense effect.
Patent Information
- Application Number
- CN202510528970.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-07-08
AI Technical Summary
In the prior art, the virtual character control method is relatively single, and it is difficult to achieve complex control operations, especially when the player user cannot detect the upcoming threat in time, resulting in a lag in defense operations and affecting the player user's defense effect.
By receiving role replacement instructions, it automatically detects whether the attack operation of the first virtual character meets the defense conditions, and displays the third virtual character in the defense state in the virtual scene, dynamically adapts to the state of the new on-field character, including bullet knife defense skills, block defense skills and avoidance support skills, delaying the exit operation to ensure the natural transition of the scene and improve defense capabilities.
It reduces the complexity of user operations, improves the flexibility and convenience of virtual character control, enhances the immersion and fun of the game, and ensures the immediacy and visual effects of defense operations.
Smart Images

Figure CN120268047A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the technical field of processing animated data, and in particular, to a method, apparatus, electronic device, and storage medium for controlling virtual characters. Background Art
[0002] A virtual character refers to an active object in a virtual environment. A virtual environment refers to a three-dimensional environment created through computer technology and existing in the digital world, which can simulate the real world or be a pure imaginary space. A virtual environment usually contains one or more virtual characters. A virtual character can be a three-dimensional object or entity simulated through computer technology, which does not exist in the physical world but in the virtual environment. In the related art, the control method of virtual characters is relatively single, usually only able to control a single virtual character in the virtual scene, and it is difficult to implement complex control operations. Summary of the Invention
[0003] In view of the above problems, the present disclosure is proposed to provide a method, apparatus, electronic device, and storage medium for controlling virtual characters that overcome the above problems or at least partially solve the above problems.
[0004] According to one aspect of the embodiments of the present disclosure, a method for controlling a virtual character is provided. The method includes:
[0005] Displaying a scene image of a virtual scene; wherein, the scene image includes: a first virtual character capable of performing an attack operation and a second virtual character capable of performing a defense operation;
[0006] In response to a received character replacement instruction, if the attack operation of the first virtual character meets the defense condition, displaying a third virtual character in a defensive state in the virtual scene.
[0007] In an optional implementation manner, after responding to the received character replacement instruction, it further includes:
[0008] If the attack operation of the first virtual character does not meet the defense condition, displaying a third virtual character in a non-defensive state in the virtual scene.
[0009] In an optional implementation manner, the attack operation of the first virtual character includes: the attack operation being performed by the first virtual character and / or the attack operation that the first virtual character will perform after a preset time;
[0010] The defense conditions include: a plurality of level defense conditions corresponding to a plurality of different defense levels, where the defense levels are determined according to the attack type of the attack operation and / or the time length of the preset time; and, the defense states include: a plurality of level defense states corresponding to the plurality of level defense conditions.
[0011] In an alternative implementation, the displaying, in the virtual scenario, of the third virtual character in a defense state when the attack operation of the first virtual character meets the defense conditions includes:
[0012] Determining the level defense condition corresponding to the attack operation of the first virtual character, and displaying the third virtual character so that the level defense state of the third virtual character matches the level defense condition corresponding to the attack operation;
[0013] Among them, the third virtual characters in different level defense states have different defense skills, and the defense skills include at least one of the following: parry defense skill, block defense skill, and dodge support skill.
[0014] In an alternative implementation, the method further includes: pre-configuring different response priorities for the plurality of level defense conditions; then the determining the level defense condition corresponding to the attack operation of the first virtual character includes:
[0015] When there are at least two level defense conditions satisfied by the attack operation of the first virtual character, determining the level defense condition corresponding to the attack operation of the first virtual character according to the response priorities of the at least two level defense conditions.
[0016] In an alternative implementation, when the attack operation of the first virtual character is an attack operation that the first virtual character will perform after a preset time, before responding to the received character replacement instruction, it further includes:
[0017] When it is detected that the attack operation of the first virtual character meets the defense conditions, displaying the state of the first virtual character as an attack prompt state.
[0018] In an alternative implementation, the attack prompt state includes at least one of the following: a state of light flashing, and / or a state of color change;
[0019] And, when the defense conditions include a plurality of level defense conditions, the attack prompt states corresponding to different level defense conditions are different.
[0020] In an alternative implementation, the virtual scene is a game scene in a virtual game of the player-versus-player environment type, the first virtual character is a non-master character in the game scene that is not controlled by the player user, and the second virtual character and the third virtual character are master characters controlled by the player user.
[0021] In an alternative implementation, after receiving the character replacement instruction, it further includes: replacing the master character controlled by the player user from the second virtual character with the third virtual character; and delaying the exit operation of the second virtual character so that the second virtual character and the third virtual character are respectively displayed at different positions in the virtual scene.
[0022] In an alternative implementation, the delaying the exit operation of the second virtual character includes:
[0023] When it is detected that the animation type of the character animation of the second virtual character is the delayed exit type, delaying the exit operation of the second virtual character so that the character animation of the second virtual character is played out and / or the delay duration of the second virtual character reaches a preset duration.
[0024] In an alternative implementation, the delayed exit type includes: an animation type that matches a pre-configured preset attack type and / or preset defense type, and / or an animation type whose duration exceeds a preset duration threshold.
[0025] In an alternative implementation, the character attribute information of the third virtual character is determined according to the character attribute information of the first virtual character and the character attribute information of the second virtual character;
[0026] Wherein, the character attribute information includes at least one of the following: character azimuth coordinates, character orientation information, attack direction information, and character action information.
[0027] According to another aspect of the present disclosure, a control device for a virtual character is provided, including:
[0028] A display module, adapted to display a scene picture of a virtual scene; wherein, the scene picture includes: a first virtual character capable of performing an attack operation and a second virtual character capable of performing a defense operation;
[0029] A response module, adapted to respond to a received character replacement instruction, and if the attack operation of the first virtual character meets the defense condition, display a third virtual character in a defensive state in the virtual scene.
[0030] According to another aspect of the present disclosure, an electronic device is provided, including: a processor, a memory, a communication interface, and a communication bus, and the processor, the memory, and the communication interface complete communication with each other through the communication bus;
[0031] The memory is used to store at least one executable instruction, and the executable instruction causes the processor to execute the control method of the virtual character as described above.
[0032] According to another aspect of the present disclosure, a computer storage medium is provided, and at least one executable instruction is stored in the storage medium, and the executable instruction causes a processor to execute the control method of the virtual character as described above.
[0033] According to another aspect of the present disclosure, a computer program product is provided, including computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in the processor of an electronic device, the processor in the electronic device executes the control method of the virtual character as described above.
[0034] In an embodiment of the present disclosure, when a role replacement instruction is received, it is possible to automatically detect whether the attack operation of the first virtual character meets the defense condition, and when the detection result is yes, display a third virtual character in a defensive state in the virtual scene. Thus, in the present disclosure, the state of the newly introduced third virtual character in response to the role replacement instruction can be dynamically adapted according to the attack situation of the first virtual character, without the user performing complex control logic, which can improve the defense ability of the newly introduced third virtual character in necessary situations, thereby reducing the complexity of user operations and enhancing the flexibility and convenience in controlling virtual characters.
[0035] The above description is only an overview of the technical solution of the present disclosure. In order to be able to understand the technical means of the present disclosure more clearly, it can be implemented according to the content of the description. And in order to make the above and other purposes, features, and advantages of the present disclosure more obvious and understandable, the following specifically illustrates the specific embodiments of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] By reading the detailed description of the preferred embodiments below, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered to be a limitation of the present disclosure. And throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:
[0037] Figure 1 A flowchart of a control method for a virtual character provided by an embodiment of the present disclosure is shown;
[0038] Figure 2 A schematic diagram showing a scene picture of the method for controlling a virtual character in an embodiment of the present disclosure before receiving a character replacement instruction;
[0039] Figure 3 A schematic diagram showing a scene picture after receiving a character replacement instruction;
[0040] Figure 4 A schematic structural diagram of a control device for a virtual character provided in an embodiment of the present disclosure;
[0041] Figure 5 A schematic structural diagram of an electronic device provided in another embodiment of the present disclosure. Detailed implementation manners
[0042] Hereinafter, exemplary embodiments of the present disclosure will be described in more detail with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be completely conveyed to those skilled in the art.
[0043] Figure 1 A flowchart of a method for controlling a virtual character provided in an embodiment of the present disclosure is shown. As Figure 1 shown, the method specifically includes the following steps:
[0044] Step S110: Display a scene picture of a virtual scene; wherein, the scene picture includes: a first virtual character capable of performing an attack operation and a second virtual character capable of performing a defense operation.
[0045] Among them, the virtual scene is a digital environment generated by computer graphics technology, including interactive elements such as terrain, objects, and characters, such as game levels, simulation training sites, etc. A virtual character generally refers to a character in a game-like virtual scene, an animation character, etc. For example, a virtual character can be a controlled character in a game virtual scene, and the controlled character can achieve different action performances according to the interaction operations of player users. For another example, a virtual character can also be an NPC (non-player character), that is, a game character in an electronic game that is not manipulated by a real player.
[0046] The first virtual character is a character with the ability to initiate attacks, and its attack operations include, but are not limited to, skill releases, long-range shootings, melee slashes, etc. The first virtual character can be controlled by AI, automatically controlled by the system, or controlled by other users. The second virtual character is usually a character with defensive capabilities controlled by player users, and its defensive operations include, but are not limited to, blocking, dodging, shield generation, etc. Of course, the first virtual character can also perform defensive operations, and the second virtual character can also perform attack operations, which are not limited in this disclosure.
[0047] Step S120: In response to the received character replacement instruction, if the attack operation of the first virtual character meets the defense condition, display a third virtual character in a defensive state in the virtual scene.
[0048] Among them, the character replacement instruction can be triggered in various ways. For example, it can be triggered by physical buttons (such as game control buttons) or virtual buttons (such as virtual button elements in the virtual scene), or it can be triggered by voice instructions. The specific triggering method of the character replacement instruction is not limited in this application. Thus, the character replacement instruction can be an instruction input by the user or automatically triggered by the system, and can also be generated in various ways such as shortcut keys, voice commands, or AI strategy decisions. This instruction is used to display a newly entered third virtual character in the virtual scene.
[0049] Among them, the defense condition can be flexibly set according to actual needs. For example, it can be set according to the attack state, attack type, etc. of the first virtual character, so as to set the attack operations with preset attack states and / or preset attack types as attack operations that meet the defense condition. In specific implementation, it can be set according to factors such as the power and trigger time of the attack operation.
[0050] Thus, in this disclosure, after receiving the character replacement instruction, it is further determined whether the attack operation of the first virtual character meets the defense condition, and when the judgment result is yes, a third virtual character in a defensive state is displayed in the virtual scene. This method can dynamically determine the response method of the character replacement instruction based on the correlation judgment between the attack operation and the defense condition, so that the entry state (such as defensive state or non-defensive state) of the third virtual character automatically meets the current scene requirements.
[0051] Among them, being in a defensive state means presenting a defensive posture (such as shield deployment, defensive formation, being in a posture of deflecting a sword and parrying, etc.) or having defensive skills (such as deflecting a sword skill, blocking skill, etc.). The specific manifestation form of the defensive state is not limited in this disclosure, as long as it can enable the third virtual character to have the ability of instant defense.
[0052] It can be seen that this method can automatically detect whether the attack operation of the first virtual character meets the defense condition when receiving the role replacement instruction, and display the third virtual character in a defense state in the virtual scene when the detection result is yes. Therefore, in the present disclosure, the state of the third virtual character that comes on stage in response to the role replacement instruction can be dynamically adapted according to the attack situation of the first virtual character, without the user having to execute complex control logic, and can enhance the defense capability of the third virtual character that comes on stage when necessary, thereby reducing the complexity of user operations and enhancing the flexibility and convenience of controlling virtual characters.
[0053] In addition, in order to achieve better technical effects, those skilled in the art may also make various changes and modifications to the above embodiments:
[0054] In an optional implementation, when a role replacement instruction is received, if the attack operation of the first virtual character does not meet the defense condition, a third virtual character in a non-defense state is displayed in the virtual scene. Among them, the third virtual character in a non-defense state can be in various other states other than the defense state, such as a relaxed state, a running state, a stationary state, etc. In short, the third virtual character in a non-defense state does not show a defensive posture, and / or does not have defensive skills for the time being. It can be seen that the response method of the role replacement instruction in the present application is dynamically determined by the attack operation of the first virtual character. When the attack operation of the first virtual character does not meet the defense condition, it means that the current battle situation is not in a critical state. Therefore, there is no need for the newly-appeared third virtual character to be directly presented in a defensive state.
[0055] In an optional implementation, the attack operation of the first virtual character may include at least one of the following: (1) the attack operation currently being executed by the first virtual character (i.e., the attack operation currently being executed when the character replacement instruction is triggered). For example, if the attack operation currently being executed by the first virtual character includes multiple consecutive actions and lasts for a long time, the character replacement instruction may be triggered during the process in which the first virtual character is executing the attack operation. (2) the attack operation that the first virtual character will execute after a preset time (i.e., the attack operation that will be executed within a preset time after the character replacement instruction is triggered). For example, if the first virtual character is about to launch an attack operation with greater lethality in 3 seconds, the user may trigger the character replacement instruction before the attack operation is launched to parry in time.
[0056] In addition, to adapt to various scenarios with different critical levels, the above defense conditions may include: multiple level defense conditions corresponding to multiple different defense levels. Among them, the defense level can be determined according to the attack type of the attack operation and / or the time length of the preset time. For example, the level defense conditions of multiple different defense levels can be divided according to the lethality of the attack operations of different attack types, so that the level defense conditions with a higher defense level correspond to the attack types with stronger lethality. Another example is that the level defense conditions of multiple different defense levels can be divided according to the length of the preset time: according to the difference between the time when the role replacement instruction is triggered and the time when the first virtual role is about to initiate an attack operation (used to represent the length of the preset time), the corresponding level defense conditions are determined, so that the level defense conditions with a higher defense level correspond to the case with a smaller difference (the smaller the difference, the more urgent the time, and thus the more efficient the defense method should be). The present disclosure does not limit the specific setting method of the level defense conditions, as long as different threat levels can be distinguished, and then different level defense conditions can be configured accordingly. Correspondingly, the defense states may include: multiple level defense states corresponding to the multiple level defense conditions. For example, the higher the defense level corresponding to the level defense condition, the better the defense effect of the corresponding level defense state.
[0057] In an optional implementation manner, if the attack operation of the first virtual role meets the defense conditions, the third virtual role in the defense state can be displayed in the virtual scene in the following manner: determine the level defense condition corresponding to the attack operation of the first virtual role, and display the third virtual role so that the level defense state of the third virtual role matches the level defense condition corresponding to the attack operation. Among them, the third virtual role in different level defense states has different defense skills, and the defense skills may include at least one of the following: parry defense skill, block defense skill, and dodge support skill. The present disclosure does not limit the specific types and quantities of the defense skills, as long as the defense skills with different defense effects can be respectively corresponding to different level defense states.
[0058] In an optional implementation manner, to facilitate the management of multiple level defense conditions, different response priorities can be pre-configured for the multiple level defense conditions. Correspondingly, when the level defense conditions met by the attack operation of the first virtual role are at least two, the level defense condition corresponding to the attack operation of the first virtual role is determined according to the response priorities of the at least two level defense conditions. For example, assume that the first virtual role will initiate two different types of attack operations within the preset time, and each type of attack operation corresponds to a different defense level. At this time, according to the pre-configured response priorities, the level defense condition with the highest defense level should be selected to improve the defense effect.
[0059] Among them, priority management can be achieved through various methods such as a priority queue (when an attack operation satisfies multiple defense conditions, add the corresponding defense levels to the priority queue and execute the defense condition with the highest priority taken from the head of the queue), priority attributes (bind priority attributes to each defense condition and directly compare the attribute values to select the highest level), state machines (take the defense level as the state and the priority determines the state transition path), weight scoring (calculate the score by comprehensively considering the priority of the defense level, the weight of the attack type, the time decay factor, etc.).
[0060] In an alternative implementation manner, the inventor found during the implementation of the present invention that in traditional virtual character control methods, defense operations often have latency. For example, before an attack operation is triggered, the player user cannot timely detect the upcoming threat, resulting in a delay in the player user's defense decision-making and affecting the player user's defense effect. Therefore, in the case where the attack operation of the first virtual character is an attack operation that the first virtual character will execute after a preset time, in order to give a timely warning to the player user, before responding to the received character replacement instruction, the following operations can further be performed: when it is detected that the attack operation of the first virtual character satisfies the defense condition, display the state of the first virtual character as an attack prompt state. It can be seen that this method can detect in real time whether the attack operation satisfies the defense condition during the pre-execution stage of the attack operation (triggered after the preset time), and when it is detected that the defense condition is satisfied, display the state of the first virtual character as an attack prompt state. Among them, the attack prompt state refers to: when the attack operation of the first virtual character is about to be triggered, prompt the player user that they are currently in a state of attack threat through visual or auditory feedback. It can be seen that the attack prompt state can further add visual information and / or auditory information related to the attack prompt on the basis of the original state.
[0061] In an alternative implementation, the attack prompt state may include at least one of the following: a light flashing state, and / or a color change state. Among them, the light flashing state means that by periodically adjusting the brightness or frequency of the character contour light effect (such as flashing 3 times per second), it is prompted that an attack is about to occur. The color change state means that the main color or highlight color of the character model is replaced with a preset warning color (such as red representing a high-risk attack). Correspondingly, when the defense conditions include multiple levels of defense conditions, the attack prompt states corresponding to different levels of defense conditions are different. Among them, the level of defense conditions can be determined according to the defense levels divided by the attack type, damage value or strategy weight (such as Level1~Level3), and the higher the level, the greater the threat. For example, when the defense level includes three levels, the threat level of the third level is the greatest, and it can be prompted by red and fast flashing; the threat level of the second level is medium, and it can be prompted by orange and medium-speed flashing; the threat level of the first level is the lowest, and it can be prompted by yellow and slow flashing (or no flashing). Of course, it is also possible to only perform attack prompts for at least one level of defense conditions with higher levels, and not perform attack prompts for other levels of defense conditions with lower levels. The present disclosure does not limit the specific details.
[0062] In specific implementation, before the preset time of the attack operation arrives (such as 3 seconds), the attack instruction can be captured through an event listener, and the attack attributes (such as damage type, range) are matched with the preset defense condition rule library, and the character rendering interface is called according to the matching result to update the material or the animation state machine to trigger the attack prompt effect. Among them, different levels of defense conditions correspond to different attack prompt states, which can strengthen the perception of defense priorities through visual differences. In addition, those skilled in the art can also set the attack prompt state to a particle special effect or a sound effect prompt state according to actual needs. The present disclosure does not limit the specific details. In short, through the visual differentiation of the attack prompt state, players can be helped to quickly identify the threat level and optimize the allocation of defense resources (such as giving priority to intercepting Level3 attacks).
[0063] In an alternative implementation, the virtual scene is a game scene, the first virtual character is a non-master character in the game scene (such as the hostile character of the player user, also called the attack character), and the second virtual character is the master character controlled by the player user. Among them, the game scene may further include a game scene in a virtual game of the Player versus Environment (PVE) type or a game scene in a virtual game of the Player versus Player (PVP) type.
[0064] Since the predictability of monster behavior in PVE-type games is relatively high, which facilitates the design of more complex environmental interaction rules. Therefore, preferably, the game scenario in this application is usually the game scenario in a PVE-type virtual game. Correspondingly, the first virtual character is a non-player-controlled character in the game scenario, for example, it can be a monster-type character controlled by AI or a system program. The second virtual character and the third virtual character are both player-controlled characters. For example, the second virtual character can be a frontcourt-type player-controlled character, and the third virtual character can be a backcourt-type player-controlled character. Among them, the frontcourt character can perform functions such as melee output and threat attraction, and needs to respond to monster behavior in real time; the backcourt character can be responsible for functions such as long-range support and healing, and can cooperate depending on the position information of the frontcourt character. Through the coupling of role division and AI behavior, the immersion of player cooperation and environmental confrontation in the PVE scenario can be enhanced. Through the separation of character control rights (player / non-player) and the design of PVE-exclusive interaction rules, the generalized character interaction model in traditional action games can be refined, and the balance problem between the predictability of environmental behavior and the complexity of player cooperation in the PVE scenario is solved.
[0065] Optionally, after receiving the received character replacement instruction, further replace the player-controlled character from the second virtual character with the third virtual character, so that the player user has the control right over the third virtual character. The inventor found in the process of implementing the present invention that in the traditional substitution method, the replaced character (such as the second virtual character) usually exits the field instantaneously, resulting in the newly entered third virtual character fighting alone on the field, which not only reduces the defensive effect but also causes visual incoherence. It can be seen that in the traditional main control character replacement method, due to the immediate exit of the original character, the scene is abrupt and the immersion of the game is damaged. To solve the above problems, in this disclosure, the exit operation of the second virtual character can be delayed so that the second virtual character and the third virtual character are respectively displayed at different positions in the virtual scene, achieving the effect of both characters being on the field at the same time, so that the scene transition can be more natural, and the fighting effect can be improved, enhancing the interest of combat games.
[0066] It can be seen that the above character replacement instruction is used to trigger the event of main control character switching. The delayed exit operation means that the second virtual character remains in the scene for a period of time (such as 5 seconds) after replacement and continues to perform preset actions (such as unfinished attack actions, standby actions, slow disappearance animations, etc.). Among them, the second virtual character and the third virtual character can be placed in non-overlapping areas (such as diagonal standing positions, height stratification) through a coordinate allocation algorithm. Specifically, during implementation, the exit delay time can also be dynamically adapted according to the defense level: the higher the defense level, the longer the second virtual character stays on the field. Moreover, different preset actions can also be configured according to different defense levels.
[0067] In an alternative implementation, the exit operation of the second virtual character can be delayed in the following manner: when it is detected that the animation type of the character animation of the second virtual character is a delayed exit type, the exit operation of the second virtual character is delayed so that the character animation of the second virtual character is played to completion and / or the delay duration of the second virtual character reaches a preset duration. The delayed exit type refers to an animation type that allows exiting only after specific conditions are met. For example, a defense-related exit method can be adopted: the exit animation is bound to the defense condition level (such as a longer trigger duration and more complex actions for the exit animation at Level 3 defense level); another example is a strategy retention type exit method: the character still participates in the scene logic after exiting (such as continuously providing an aura effect until the animation ends). The preset duration refers to the maximum waiting time (i.e., the delay time) dynamically calculated based on the defense priority. This method can determine the exit animation type based on the defense condition level, and can use the animation playback integrity and / or the preset duration as the delay termination condition, thus taking into account both the performance fluency and the strategy controllability, and further ensuring the complete playback of the exit animation and avoiding action afterimages. Additionally, the delay parameter can be dynamically adjusted according to the defense level to synchronize the exit logic with the combat rhythm.
[0068] It can be seen that in the above method, an animation of the delayed exit type can be preset, so that when the second virtual character is executing an animation of the delayed exit type, the exit of the second virtual character is delayed to ensure that the second virtual character can complete the complete animation actions. Among them, the delayed exit type can be configured according to various factors such as the duration of the animation and the action complexity, and the present disclosure does not limit this.
[0069] In an alternative implementation, the delayed exit type can include: an animation type that matches a preset attack type and / or a preset defense type configured in advance, and / or an animation type with a duration exceeding a preset duration threshold.
[0070] In an alternative implementation, the character attribute information of the third virtual character can be determined according to the character attribute information of the first virtual character and the character attribute information of the second virtual character. The character attribute information includes at least one of the following: character position coordinates, character orientation information, attack direction information, and character action information. For example, the position, orientation, and appearance action of the third virtual character can all be dynamically determined according to the relevant attribute information of the first virtual character and the second virtual character, so that the appearance position and appearance action of the third virtual character are more in line with the visual effects of the real scene.
[0071] For ease of understanding, the implementation of the above embodiments will be introduced below with an example. First, some related concepts that may be involved in this example will be explained:
[0072] 3C: refers to the combination of Character, Camera and Control, which represents the three most basic elements in most game designs.
[0073] Character substitution mechanism: The character substitution mechanism of an action game refers to a mechanism that allows players to switch and control multiple characters (or forms) in real time during combat or exploration, and to cope with complex battle situations through skill complementarity, attribute differences, or tactical coordination between characters.
[0074] Flipping / Blocking Mechanism: The Flipping / Blocking Mechanism is a core mechanism in action games that uses precise timing to achieve defense or counterattack. It converts the enemy's attack behavior into the enemy's hit stiffness. Its core logic is "risk and benefit coexist" - high risk (failure to operate may lead to defeat) and high reward (interrupting enemy attacks and creating opportunities for counterattacks).
[0075] Precision input range: refers to a design mechanism in which players must accurately complete operation instructions (such as key combinations and timing judgment) within a specific time window in order to trigger high-yield skills or combos.
[0076] Sense of impact: The sense of impact in action games is the comprehensive feedback experience that players get during attacking behavior. Its essence is a combination of intuitive physical logic and appropriately exaggerated artistic expression. Its composition includes many aspects such as impact animation, frame freeze, impact special effects, and camera vibration.
[0077] In related technologies, in order to improve the flexibility of virtual character control, virtual characters in virtual games can be replaced. This method can not only improve the depth of combat strategy (such as attribute restraint, combo connection) but also enhance the fun of multiplayer collaboration (such as division of labor, rotation challenge) through the diversity of character / ability combinations. Among them, traditional character replacement methods mainly include the following types:
[0078] (1) Multiple characters are present in the team, the control is switched, and the remaining non-main characters are controlled by AI or the system: This method can well reflect the sense of bond of multi-player team battles, and at the same time, some battle designs that are biased towards global strategies can be carried out. In this method, the presence of multiple characters in the team is guaranteed, but when the control is switched, the remaining non-main characters are controlled by AI or the system (for example, the behavior of non-main characters can be automatically controlled by AI, or the behavior of non-main characters can be controlled by the system according to pre-configured program logic). Although this method well guarantees the hustle and bustle and atmosphere of multi-player battles, since the non-main characters are automatically driven by AI in the backfield, players will feel that the behavior of these characters is out of their control, and players cannot fully control these characters, thus losing the sense of operation.
[0079] (2) Controlling a single character, the operation of switching characters will cause the previous controlling character to instantly leave the field and be replaced by a new character: This method ensures that there is only one character on the field. When the controlling character is switched, it will instantly appear in the original place (directly replaced by the new character), so that the action module and skill mechanism of the new character can be used. It can be seen that this method will cause the previous controlling character to instantly leave the field and become the new character when switching characters. This method ensures that in the case of multi-character battles, all characters are controlled by the player, rather than being managed by the AI background. However, this method results in only one character on the field (when switching characters, the old character instantly leaves the field, and then the new character comes on the field), which not only loses the sense of teamwork in multi-player battles, but also directly cuts the original character off the field, which interrupts the original character's actions, resulting in a very abrupt artistic perception.
[0080] (3) Control a single character and switch abilities / forms / weapons, etc.: This method is similar to switching "weapons / abilities". Although there is no actual character switching, the character's action module can be changed to obtain different combat feedback. This method has similar defects as the previous method: when the character is switched, the action of the previous ability / form / weapon will suddenly disappear, resulting in an abrupt change in the artistic perception.
[0081] In addition, the traditional knife-flipping / blocking skill is a defensive mechanism based on precise timing judgment and weapon interaction. Its core is to transform the enemy's attack into a counterattack window through specific operations. It is a typical 3C performance effect. The traditional knife-flipping / blocking skill generally uses some kind of operation to make the main control character enter a certain defensive posture to deal with the enemy's attack. From the different operation dimensions, it can be divided into the following types:
[0082] (1) Dedicated defense / block button: This type of game will design a separate defense button, such as a "block button", so that the character can enter a unique defense action (such as a block action or a knife parry action) after pressing the button at the appropriate time. If it can be ensured that the defense button is pressed exactly in a very short time before the enemy attack arrives, the defensive effects such as knife parry can be accurately triggered. This method has at least the following defects: when the user presses the block button, the main control character may be in the process of executing any action. Therefore, how to smoothly switch from any action to a dedicated knife parry action has become a problem that needs to be solved urgently. The specific reason is that when the player triggers the block button, the character may be in any other attack behavior, and these attack animations may not be reasonably transitioned to defensive animations such as knife parry, which will inevitably lead to the loss of certain artistic expressions.
[0083] (2) Block / defense derivatives triggered by attack buttons: This method does not set up a separate block button, but integrates the block action into the entire attack button-derived combo. It is essentially similar to a dedicated block button, except that the block button triggering method is different. This method ensures that only certain attack animations can be transitioned to defensive animations such as knife parrying. However, because its skill activation has a precondition (the player must first enter a certain attack animation before transitioning to the knife parrying animation), therefore, in the high-speed action interaction mode, it may cause the player to not have time to react, resulting in a sticky feel and poor usability.
[0084] (3) In a specific interval of the attack animation, there is a built-in defense judgment (such as a blocking judgment): In high-speed action games, in order to avoid the problem of frequently entering a certain defensive action that may disrupt the rhythm of the battle, a common design is to cancel the defensive action and instead have a built-in defense / block judgment in the interval of some attack actions. As long as the enemy's attack action hits a specific interval of our attack animation, the knife-flipping effect will be automatically triggered, and the enemy will be hit into a rigid state. This method avoids the animation art problem of transitioning from other attack animations to the knife-flipping animation. However, because there is no separate knife-flipping animation, the actual knife-flipping trigger window is not obvious, and it is difficult for players to predict when the appropriate trigger interval is. In addition, there is still a problem of stickiness and uncontrollability in the feel.
[0085] In addition, all the knife-flipping / blocking designs introduced above are designed based on the current single-player character. However, due to the unstable relative positions between the main character and the enemy monster, our character may appear at any angle and any position of the enemy monster. Therefore, at the moment when the knife-flipping is triggered, the relative position of the two sides is uncontrollable, and the expected 3C extreme performance effect cannot be achieved.
[0086] It can be seen that the above method has at least the following defects:
[0087] (1) When the main control character is replaced, the replaced character will leave the field immediately, which makes the whole picture look abrupt. To solve this problem, in this example, when the main control character is replaced, the replaced non-main control character in the backcourt will not disappear immediately, but will remain on the field for a period of time, thus creating a noisy feeling of team battle.
[0088] (2) In the traditional method, the knife flicking / blocking skills are triggered by a specific knife flicking / blocking button, and the knife flicking / blocking button is targeted at the main control character that is already on the field. At this time, the main control character that is already on the field needs to quickly transition from the action currently being performed (which may be any action type) to the knife flicking / blocking action, which may cause the action transition process to be rigid and inconsistent with the laws of physics and mechanics. In order to solve this problem, in this example, defensive skills such as knife flicking / blocking are combined with the substitution operation. Therefore, defensive skills such as knife flicking / blocking are targeted at the main control character that is newly on the field. Therefore, the appearance action of the main control character that is newly on the field can be flexibly configured, thereby ensuring that during the entire knife flicking / blocking action, the character's transition from other actions to the knife flicking action is smooth and consistent with the intuition of physics and human mechanics.
[0089] (3) In addition, since the traditional knife flick button / block button is targeted at the main control character that is already on the field, however, the position and direction of the main control character that is already on the field are dynamically adjusted according to the game stage. Therefore, it is impossible to ensure that when the knife flick / block is triggered, the position and direction of the main control character that is already on the field are consistent with the trigger direction of the knife flick / block. In order to solve the above problem, in this example, defensive skills such as knife flick / block are combined with the substitution operation. Therefore, defensive skills such as knife flick / block are targeted at the main control character that is newly on the field. Since the appearance position and direction of the main control character that is newly on the field can be flexibly configured, it is easy to create the most outstanding knife flick and block strike feeling, and it can be ensured that when the knife flick / block is triggered, a series of factors such as the lens composition / character standing position can meet the game design requirements and physical mechanics, thereby ensuring that the control method of the virtual character in the virtual animation is more realistic and avoiding the problem of inconsistency with the real physical situation.
[0090] This example proposes a new mechanism for substitution and retention and an extreme support mechanism (i.e., an automatic defense mechanism when substitution). Among them, the substitution and retention mechanism means that when replacing the main control character in the team, the former main control character who has left the field will leave the field at least after executing its original attack animation behavior, so that the visual effect of the screen will not be unrealistic due to abrupt exit, and it can ensure that the new and old characters are on the field at the same time for a period of time, thus creating a sense of hustle and bustle and realism of the battle. This mechanism ensures that multiple characters of our side can attack at the same time on the field, creating a sense of hustle and bustle of the entire team battle. In addition, it ensures that the attack behavior of our characters is triggered by the player's main control command, rather than driven by a third-party AI, thus ensuring the player's sense of control of the operation. This method also ensures that the character's attack animation will not be interrupted by the substitution command, and the attack animation can be played smoothly and then switched to the exit animation, ensuring the fluency of the artistic expression. The effect of multiple characters staying on the field is achieved by substitution, which gives more space for game design and increases the upper limit of the player's possible operation.
[0091] The extreme support mechanism means that before the enemy attack arrives, the main control character is replaced by changing characters, and the new main control character will automatically enter the evasion stop animation state, or the knife parry animation state and other defensive states, so as to help the original main control character resist this attack, while not affecting the original main control character's previous attack behavior. Among them, extreme support refers to the way in which the new character in the defensive state provides support when the main control character is in danger (i.e., extreme situation). Since the extreme support action (corresponding to the new main control character, i.e., the "third virtual character" mentioned above) and the original attack action (corresponding to the original main control character, i.e., the "second virtual character" mentioned above) are not triggered by the same main control character, the art design problem of how to transition from any attack action to a special knife parry action is naturally avoided (when the new character appears and performs the knife parry, the old character can still perform its own attack animation without interfering with each other). At the same time, since the replacement is an immediate operation command (i.e. the "role replacement command" mentioned above), it does not require any pre-behavior preparation or identification of the triggering interval, so the player's operation feedback is clear and efficient. Finally, since the extreme support strategy uses a newly-appeared main control character to perform the extreme support action, the position and angle of its birth point can be flexibly designed to achieve a perfect and stable lens composition state between the newly-appeared character and the monster in the attacking behavior (such as the "first virtual character" mentioned above), thereby achieving the expected extreme 3C performance and enhancing the realism when controlling the virtual character.
[0092] First, the implementation method of the substitution and retention mechanism in this example is introduced. Among them, the processing of the old exiting character (i.e., the second virtual character) needs to achieve the following effect: after receiving the exit command, the old exiting character will not exit immediately, but will trigger the subsequent exit logic after executing the current attack action. For the processing of the new entry character (i.e., the third virtual character), the following key elements need to be determined by the algorithm to ensure a good performance effect: (1) The appearance position of the new character: At this time, the position of the old character cannot be directly used, otherwise it will cause the model positions of the new and old characters to overlap, resulting in anomalies in the artistic performance, which is inconsistent with the real perspective effect. Therefore, in this example, it is necessary to dynamically calculate the legal new position point based on the position of the enemy and the original old character. (2) The appearance animation of the new character: Because the new character was not on the scene before, the new character needs to be directly presented in the virtual scene from an invisible state. Therefore, it is necessary to match the corresponding appearance animation to the new character through preset rules to ensure that the animation performance is reasonable and realistic. For example, the corresponding appearance animation can be configured according to the position relationship and action method between the enemy and the original old character.
[0093] To achieve the above objective, in this example, an enumeration class can be used to mark all the states of the virtual character throughout its life cycle, specifically including the following states:
[0094] In: Inside the venue, indicating that the main control character is in the in-venue state of normal operation, and this state can also be called the in-presence state;
[0095] PendingSwitchOut: Waiting for the exit process, and this state is also called the delayed exit state;
[0096] SwitchingOut: In the exit process, and this state is the exiting state;
[0097] Out: Exited, indicating that the character has exited at this time and is no longer visible inside the venue, and this state is the exited state.
[0098] It can be seen that in order to achieve the delayed exit of the old character in this example, the in-presence state and the exited state are extended, and the delayed exit state and the exiting state are newly added. Among them, the delayed exit state is used to enable the old character to continue to complete the ongoing attack action or other actions to ensure that the old character can exit after a certain delay. The exiting state is usually used to present the exit animation to make the exit process of the old character more natural rather than disappearing abruptly from the screen, so as to ensure that the exit animation of the old character is more in line with the real visual effect.
[0099] During specific implementation, when triggering the exit command for a virtual character whose state belongs to In (when receiving a character replacement command, that is, when it is necessary to trigger the exit command for the old character), the state of the character will not be directly set to Out. Instead, its state will first be set to PendingFadeOut (or PendingSwitchOut). Additionally, specific Tag markers (also called delay markers), such as MuteSwitchOutTag, can be added in advance within the attack animation interval corresponding to the character. Correspondingly, when the character is within the frame interval of the attack animation with such a delay marker added, the character will carry the corresponding Tag marker. Correspondingly, the character replacement system will perform an Update for each frame (update frame by frame) to determine the exit state of the character: If the exit state of the character is a delayed exit state, it will further determine whether the character carries a delay marker. If the character carries a delay marker, it means that its animation frame is in a state where it cannot exit temporarily. At this time, the background logic will directly skip and wait until the next frame of animation is updated, and then repeat the judgment. Additionally, if the character does not carry a delay marker, it means that the character is now ready to perform the SwitchOut exit logic, and the entire state of the character will switch from PendingSwitchOut to SwitchingOut. Among them, if the exit state of this character is SwitchingOut, the animation of the character can be transitioned from the original animation state to a new exit animation state. And a Dither FadeOut material logic can be synchronously enabled, using the Dither method to modify the material animation parameters of the character frame by frame, making it more and more transparent. When the Dither FadeOut ends and the character is in a fully transparent and invisible state, the exit state of the character will be updated to Out, and a series of data of its entity will be set to the exited state. Through the above method, a complete process of the old character's exit can be completed. Among them, the MuteSwitchOutTag marker can be added manually or automatically in advance for the interval of the attack animation frames that are not expected to be interrupted; for some actions that can be switched to exit at any time (such as the Idle action), this marker can be set to empty. Through this form of data configuration, the exit performance of the old character can be precisely controlled. Thus, it can be seen that through the configuration of the delay marker, it is possible to flexibly select specific attack animations for delay configuration, so that specific attack animations can achieve the effect of delayed exit. Among them, the animation type with the delay marker added is the delayed exit type mentioned above. Correspondingly, when it is detected that the animation type of the second virtual character's character animation is the delayed exit type, the exit operation of the second virtual character will be delayed. Thus, it can be seen that the animation type of the second virtual character's character animation can be quickly determined whether it is the delayed exit type through the preset delay marker.
[0100] The entry process of the new character can be triggered by pressing buttons such as the character substitution button (also called the character replacement button), which is used to trigger the character replacement instruction. This character replacement button can be implemented in the form of various virtual buttons or physical buttons. It should be noted that clicking the character substitution button at different times may trigger different levels of character substitution performances. In other words, the same character substitution button can trigger different substitution methods in different offensive and defensive states. For example, when clicking the character substitution button when there is no special performance, a normal substitution operation is triggered, and the new character can appear from beside the old character, accompanied by an initial Rush dash action. Another example is that when a certain condition is met and the character substitution button is clicked, a higher-level substitution is triggered. At this time, the new character can appear beside the target monster, accompanied by a high-level attack action. Another example is that when the enemy's attack is about to hit the main controlled character of our side, clicking the character substitution button will trigger the ultimate support substitution. At this time, the new character will appear in front of the direction the target monster is facing during the attack, accompanied by a parry action (i.e., a defensive action). Therefore, different action performances can be accompanied by different appearance positions to meet the needs of the actual scenario.
[0101] In addition, since the same character replacement button integrates multiple functions, in order to accurately determine which function needs to be responded to currently, a priority management mechanism can be used to determine which substitution configuration needs to be responded to when the character replacement button is pressed. Specifically, a priority queue corresponding to the substitution window of the character replacement button can be configured. Through this priority queue, it is determined which substitution window has the highest response priority when multiple substitution windows corresponding to the character replacement button exist simultaneously.
[0102] In this priority queue, a configuration item for the normal substitution window is added by default. It always exists and has the lowest priority. Only when there are no other substitution windows in this priority queue, this configuration item will take effect, indicating that the normal substitution window is responded to at this time (corresponding to the situation where the attack operation of the first virtual character does not meet the defense condition, used to display the third virtual character in a non-defensive state). In addition, during the game process, according to the specific business requirements, the configuration items of the substitution windows are dynamically added and deleted in this priority queue, and multiple configuration items can exist simultaneously. Correspondingly, when it is detected that the user presses the character replacement button, the configuration item of the substitution window with the highest response priority is taken out from this priority queue, and the substitution logic corresponding to the configuration item of the substitution window with the highest response priority is executed.
[0103] Among them, the configuration items of the substitution window with the highest response priority specifically include the following information: (1) Substitution-in action Index (i.e., appearance action): It represents the entry animation of the character to be applied at this time. Each Index corresponds to a separate entry animation and can be flexibly configured. (2) Appearance position PosRotCalculator: It is a runtime Position and Rotation calculation algorithm class. Because in the actual application scenario, it is necessary to dynamically calculate the appearance position of the new character according to the relative positions of the old character and the target enemy. The calculation process it contains is as follows: First, according to the configuration of ReferTarget (reference point) in the configuration item, determine the coordinate origin at this time: The old character can be used as the origin, or the position of the target enemy can be used as the origin, specifically depending on the current offensive and defensive situation. Second, according to the configuration of Coordinate (coordinate) in the configuration item, determine the coordinate system direction at this time. Specifically, the XYZ coordinate axes of the world coordinate can be used as the coordinate system direction, or the facing direction (i.e., orientation) of the old character (i.e., the second virtual character) or the target enemy (i.e., the first virtual character) can be used as the coordinate system direction, or the direction of the line connecting the target enemy and the old character can be used as the coordinate system direction. Finally, after obtaining the coordinate system information and the coordinate origin information, according to the configurations of PositionOffset (position offset) and AngleOffset (angle offset), the final Position and Rotation information can be determined, so as to accurately determine the appearance position and orientation of the new character (i.e., the third virtual character). After the appearance action and appearance position of the new character are determined, in the subsequent process, the data of the new character can also be updated. For example, mark the status of the new character as the present status (In).
[0104] Through the above method, the configuration process of substituting and remaining on the field can be realized. It can be seen that in order to implement the substitution and remaining on the field mechanism, it is necessary to pre-define various states of the character, and also need to configure the response method of the substitution button through the priority management mechanism.
[0105] Next, introduce the specific implementation process of the ultimate support strategy. Among them, in order to improve the experience of player users, the following elements can be configured in the complete ultimate support strategy:
[0106] (1) Give the player a clear indication to prompt the player that they are currently in the operation window of the ultimate support:
[0107] For example, when the first virtual character in the virtual scene, such as a certain monster, is in the pre-swing window period of a certain attack action, it will add a high-priority substitution window configuration item related to extreme support to the priority queue corresponding to the substitution key. Additionally, to more significantly give the player a hint and make the player aware that the monster has entered this window, when the behavior of the monster triggers the high-priority substitution window configuration item, a high-intensity yellow cross flash special effect hint (i.e., the first virtual character is in the attack hint state) can be given to facilitate the player's judgment.
[0108] (2) When the new character of extreme support appears, it should be in a suitable birth position and a suitable appearance action state:
[0109] As mentioned in the substitution and stay mechanism above, when the substitution function is successfully used and the high-priority substitution window configuration item related to extreme support is triggered, the animation state and entry position where the entry character (i.e., the third virtual character) should appear can be dynamically calculated according to the specific information in this configuration item. At the same time, since the attack actions of the monster are extremely diverse, ranging from far to near, different entry positions and / or appearance actions can be configured in this high-priority substitution window configuration item for different attack moves of the monster (specifically characterized by different defense conditions) to ensure that the entry position and / or appearance action of the third virtual character can perfectly match the attack action of the monster and achieve the most perfect relative position pose diagram.
[0110] (3) The 3C sense of hitting elements included in the successful trigger of extreme support:
[0111] According to the different character types, extreme support can be further divided into the following two types, and both types of extreme support have different 3C performances:
[0112] Category 1: Evasion support (corresponding to the evasion support skill mentioned above)
[0113] When the defensive conditions for evasion support are met, the background program can send an event callback named "evasion support". When this event callback is monitored, additional artistic effects can be customized. For example, a full-screen special effect can be triggered at this time: changing the color of the entire scene to highlight the sense of tension through the change of the environment. Additionally, a TimeSlow effect can be triggered, that is, all Entity objects in the whole scene except the main controlling character enter a slow-motion state, and only the main controlling character can maintain the normal animation speed, so as to highlight the contrast between fast and slow at this time. This effect can automatically disappear after a few seconds. Thus, in the evasion support method, the tense atmosphere can be highlighted through various special effects such as scene color change and slow speed. In addition, the entry action of the third virtual character can enter an animation state similar to a dodge roll (i.e., a specific manifestation of the defensive state, using the dodge method for defense), showing the visual effect of successfully dodging the attack of the enemy monster.
[0114] Category 2: Parry support (corresponding to the parry defense skill and / or block defense skill mentioned above)
[0115] After the new character appears in response to the character change operation, it will automatically be in the parry animation state (i.e., a specific manifestation of the defensive state). The new character will maintain this parry animation state for about 50 frames to wait for the enemy's strike frame to hit the character in this state.
[0116] Among them, in order to facilitate the target monster to accurately hit the new character in the parry action within the specified time and avoid the failure of defense due to special reasons, the Buff mechanism state named ParrySpecial can be enabled on the monster in the program. In this state, the anti-interruption level of the defensive target object (i.e., the monster) is set to the highest to prevent its attack action from being interrupted by other high-level actions, so as to avoid the problem that the parry cannot be triggered. Additionally, the hit stun frame effect of all other attacks can be cancelled to avoid the attack action being stunned by the hit stun, so that the attack cannot hit the parry character (i.e., the third virtual character) within the specified time.
[0117] At this time, if the attack of the target enemy hits the third virtual character in this state, the background program will send a callback event named "Parry Support Success". Through this callback event, the subsequent art performance can be customized to make the art performance more rich. For example, the art performance included in the callback event can include: a. Close-up of diagonal strike shot: A single side close-up shot, plus a diagonal strike effect of the shot, focusing on the character (i.e., the third virtual character) where the parry occurs; b. Camera shake: Exaggerated action freeze frames (i.e., the so-called meaty effect, the actions of both the enemy and the player will be instantly frozen at the action frames corresponding to the triggered parry for a longer number of frames); c. Exaggerated parry spark special effects; d. Exaggerated parry sound effects; e. Exaggerated controller vibration. In addition, for some small monsters with lower levels, the parry can directly put them into a special parry hard-hit animation state.
[0118] (4) Other operations that can be further performed after the player's character successfully triggers the ultimate support:
[0119] Category 1: Evasion Support
[0120] You can continue to click the attack button to derive the corresponding parry counterattack action. By continuing to attack, more other counterattack actions can be derived to enrich the character interaction effect.
[0121] Category 2: Parry Support
[0122] After successfully triggering effects such as parry, the player's character will enter the animation state of the parry follow-through. At this time, according to the different behaviors of the monster, different action derivation logics can be triggered in the subsequent process:
[0123] Continuous automatic parry: If the subsequent attack of the enemy continues to hit the player's character (such as the third virtual character) in the animation state of the parry follow-through, the background program can send a callback event named "Continuous Parry". Through this callback event, the subsequent art performance can be customized, including: a. The continuous parry still retains the corresponding sound effects, vibrations, and spark special effects, but will no longer retain the close-up of the diagonal strike shot effect of the first parry; b. After the continuous parry, it will re-enter the parry follow-through state.
[0124] In addition, after the animation state of the parry follow-through ends, if you continue to click the attack button, the corresponding parry counterattack action can be derived.
[0125] In summary, this example can automatically determine the response mode of the substitution key according to the current offensive and defensive status when the user presses the substitution key, so that one button has multiple functions. In addition, in critical situations, the new character can be automatically put into a defensive state such as bouncing a knife through extreme support, which simplifies user operation, improves the convenience of character control, and optimizes the visual performance of the new character, making its art animation more in line with the requirements of real physics. Moreover, the old character can continue to remain on the field, making the art effect more realistic and the battle atmosphere on the field more ideal.
[0126] Figure 2 FIG. 1 is a schematic diagram showing a scene screen of a method for controlling a virtual character in an embodiment of the present disclosure before receiving a character replacement instruction. Figure 2 As shown, in the scene picture of the virtual scene, there are: a first virtual character 31 (such as a little monster) that can perform attack operations and a second virtual character 32 that can perform defense operations. Figure 3 FIG. 1 is a schematic diagram showing a scene after receiving a role replacement instruction. Figure 3 As shown, after receiving the character replacement instruction, in addition to the first virtual character 31 and the second virtual character 32, the scene screen further adds a third virtual character 33. Among them, the appearance position and appearance animation of the third virtual character 33 can be flexibly determined according to the relative position relationship between the first virtual character 31 and the second virtual character 32. It can be seen that this method can make the second virtual character 32 and the third virtual character 33 appear in the virtual scene at the same time, and the third virtual character 33 automatically maintains a defensive posture (such as holding a flick knife or other parrying posture). It can be understood that Figure 2 and Figure 3 The characters in the game are only for illustration. In actual situations, the positions, shapes and postures of the characters can be flexibly configured according to the game requirements.
[0127] Figure 4 A schematic diagram of a control device 40 for a virtual character provided by another embodiment of the present disclosure is shown, wherein the device comprises:
[0128] The display module 41 is adapted to display a scene picture of a virtual scene; wherein the scene picture includes: a first virtual character capable of performing an attack operation and a second virtual character capable of performing a defense operation;
[0129] The response module 42 is adapted to respond to the received character replacement instruction and, if the attack operation of the first virtual character satisfies the defense condition, display a third virtual character in a defense state in the virtual scene.
[0130] In an optional implementation, the response module is further adapted to:
[0131] If the attack operation of the first virtual character does not meet the defense condition, a third virtual character in a non-defense state is displayed in the virtual scenario.
[0132] In an optional implementation manner, the attack operation of the first virtual character includes: the attack operation being executed by the first virtual character, and / or the attack operation that the first virtual character will execute after a preset time;
[0133] The defense condition includes: a plurality of level defense conditions corresponding to a plurality of different defense levels, where the defense level is determined according to the attack type of the attack operation and / or the time length of the preset time; and, the defense state includes: a plurality of level defense states corresponding to the plurality of level defense conditions.
[0134] In an optional implementation manner, if the attack operation of the first virtual character meets the defense condition, the response module is specifically adapted to:
[0135] Determine the level defense condition corresponding to the attack operation of the first virtual character, and display the third virtual character so that the level defense state of the third virtual character matches the level defense condition corresponding to the attack operation;
[0136] Among them, the third virtual character in different level defense states has different defense skills, and the defense skills include at least one of the following: a parry defense skill, a block defense skill, and an evasion support skill.
[0137] In an optional implementation manner, different response priorities are configured in advance for the plurality of level defense conditions; then the response module is specifically adapted to:
[0138] When the level defense conditions met by the attack operation of the first virtual character are at least two, determine the level defense condition corresponding to the attack operation of the first virtual character according to the response priorities of the at least two level defense conditions.
[0139] In an optional implementation manner, when the attack operation of the first virtual character is the attack operation that the first virtual character will execute after a preset time, the response module is further adapted to:
[0140] When it is detected that the attack operation of the first virtual character meets the defense condition, display the control state of the first virtual character as an attack prompt state.
[0141] In an optional implementation manner, the attack prompt state includes at least one of the following: a light flashing state, and / or a color change state;
[0142] Moreover, when the defense conditions include multiple levels of defense conditions, the attack prompt states corresponding to different levels of defense conditions are different.
[0143] In an alternative implementation, the virtual scenario is a game scenario in a virtual game of the player-versus-player environment type, the first virtual character is a non-master character in the game scenario, and the second virtual character and the third virtual character are master characters controlled by a player user.
[0144] In an alternative implementation, the response module is further adapted to: replace the master character controlled by the player user from the second virtual character with the third virtual character; and delay the exit operation of the second virtual character so that the second virtual character and the third virtual character are respectively displayed at different positions in the virtual scenario.
[0145] In an alternative implementation, the response module is specifically adapted to:
[0146] When it is detected that the animation type of the character animation of the second virtual character is the delayed exit type, delay the exit operation of the second virtual character so that the character animation of the second virtual character is played out and / or the delay duration of the second virtual character reaches a preset duration.
[0147] In an alternative implementation, the delayed exit type includes: an animation type matching a pre-configured preset attack type and / or preset defense type, and / or an animation type with a duration exceeding a preset duration threshold.
[0148] In an alternative implementation, the character attribute information of the third virtual character is determined according to the character attribute information of the first virtual character and the character attribute information of the second virtual character;
[0149] Wherein, the character attribute information includes at least one of the following: character azimuth coordinates, character orientation information, attack direction information, and character action information.
[0150] Figure 5 FIG. shows a schematic structural diagram of an electronic device according to another embodiment of the present disclosure. The specific embodiments of the present disclosure do not limit the specific implementation of the electronic device.
[0151] As Figure 5 shown, the electronic device may include: a processor 502, a communication interface 504, a memory 506, and a communication bus 508.
[0152] Wherein:
[0153] The processor 502, the communication interface 504, and the memory 506 communicate with each other via the communication bus 508.
[0154] The communication interface 504 is used to communicate with network elements of other devices such as clients or other servers.
[0155] The processor 502 is used to execute the program 510, and specifically can execute the relevant steps in the embodiments of the control method of the above virtual character.
[0156] Specifically, the program 510 may include program code, and the program code includes computer operation instructions.
[0157] The processor 502 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present disclosure. One or more processors included in the electronic device may be of the same type of processor, such as one or more CPUs. Or they may be different types of processors, such as one or more CPUs and one or more ASICs.
[0158] The memory 506 is used to store the program 510. The memory 506 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk memory.
[0159] The program 510 is specifically used to cause the processor 502 to execute the corresponding operations in the embodiments of the control method of the above virtual character.
[0160] The algorithms and displays provided herein are not inherently related to any particular computer, virtual device, or other equipment. Various general-purpose devices can also be used in conjunction with the teachings herein. Based on the above description, the structure required to construct such devices is obvious. In addition, the present disclosure is not directed to any specific programming language. It should be understood that the content of the present disclosure described herein can be implemented using various programming languages, and the description of the specific language above is to disclose the best implementation manner of the present disclosure.
[0161] In the specification provided herein, a large number of specific details are set forth. However, it can be understood that the embodiments of the present disclosure can be practiced without these specific details. In some instances, well-known methods, structures, and technologies have not been shown in detail so as not to obscure the understanding of this specification.
[0162] Similarly, it should be understood that, in order to streamline the present disclosure and assist in understanding one or more of the various disclosed aspects, in the foregoing description of the exemplary embodiments of the present disclosure, the various features of the present disclosure are sometimes grouped together in a single embodiment, figure, or description thereof. However, the methods of the present disclosure should not be construed as reflecting an intention that the claimed present disclosure requires more features than are expressly recited in each claim.
[0163] Those skilled in the art will appreciate that the modules in the devices in the embodiments can be adaptively changed and disposed in one or more devices different from those of the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and in addition, they can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all the features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all the processes or units of any method or device so disclosed. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) can be replaced by an alternative feature that provides the same, equivalent, or similar purpose.
[0164] In addition, those skilled in the art will be able to understand that although some of the embodiments herein include certain features included in other embodiments rather than other features, the combination of the features of different embodiments means that it is within the scope of the present disclosure and forms different embodiments. For example, any one of the claimed embodiments can be used in any combination.
[0165] The various component embodiments of the present disclosure can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) can be used in practice to implement some or all of the functions of some or all of the components in the device according to the embodiments of the present disclosure. The present disclosure can also be implemented as a device or device program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program for implementing the present disclosure can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, or provided on a carrier signal, or in any other form.
[0166] It should be noted that the above embodiments are illustrative of the present disclosure rather than limiting the present disclosure, and those skilled in the art can design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in the claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present disclosure can be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In the unit claims listing several devices, several of these devices may be embodied by the same item of hardware. The use of the words first, second, and third, etc. does not denote any order. These words may be interpreted as names.
Claims
1. A control method for a virtual character, the method comprising: Displaying a scene picture of a virtual scene; wherein, the scene picture includes: a first virtual character capable of performing an attack operation and a second virtual character capable of performing a defense operation; In response to a received character replacement instruction, if the attack operation of the first virtual character meets the defense condition, displaying a third virtual character in a defensive state in the virtual scene.
2. The method according to claim 1, wherein, After the response to the received character replacement instruction, it further includes: If the attack operation of the first virtual character does not meet the defense condition, displaying a third virtual character in a non-defensive state in the virtual scene.
3. The method according to claim 1 or 2, wherein The attack operation of the first virtual character includes: the attack operation being performed by the first virtual character and / or the attack operation that the first virtual character will perform after a preset time; The defense condition includes: multiple level defense conditions corresponding to multiple different defense levels, and the defense level is determined according to the attack type of the attack operation and / or the time length of the preset time; and, the defensive state includes: multiple level defensive states corresponding to the multiple level defense conditions.
4. The method according to claim 3, wherein The step of if the attack operation of the first virtual character meets the defense condition, displaying a third virtual character in a defensive state in the virtual scene includes: Determining the level defense condition corresponding to the attack operation of the first virtual character, and displaying the third virtual character so that the level defensive state of the third virtual character matches the level defense condition corresponding to the attack operation; Wherein, the third virtual character in different level defensive states has different defense skills, and the defense skills include at least one of the following: parry defense skill, block defense skill, and dodge support skill.
5. The method according to claim 4, wherein The method further includes: pre-configuring different response priorities for the multiple level defense conditions; then the step of determining the level defense condition corresponding to the attack operation of the first virtual character includes: When there are at least two level defense conditions met by the attack operation of the first virtual character, determining the level defense condition corresponding to the attack operation of the first virtual character according to the response priorities of the at least two level defense conditions.
6. The method according to any one of claims 1-5, wherein, When the attack operation of the first virtual character is the attack operation that the first virtual character will perform after a preset time, before the response to the received character replacement instruction, it further includes: When it is detected that the attack operation of the first virtual character meets the defense condition, displaying the state of the first virtual character as an attack prompt state.
7. The method according to claim 6, wherein, The attack prompt state includes at least one of the following: a light flashing state and / or a color change state; And, when the defense condition includes multiple level defense conditions, the attack prompt states corresponding to different level defense conditions are different.
8. According to the method as claimed in any one of claims 1 to 7, wherein, The virtual scene is a game scene in a virtual game of the player-versus-player environment type, the first virtual character is a non-master character in the game scene that is not controlled by a player user, and the second virtual character and the third virtual character are master characters controlled by the player user.
9. The method according to any one of claims 1-8, wherein, After receiving the received character replacement instruction, it further includes: replacing the main controlled character controlled by the player user from the second virtual character with the third virtual character; and delaying the exit operation of the second virtual character so that the second virtual character and the third virtual character are respectively displayed at different positions in the virtual scene.
10. The method according to claim 9, wherein, The delaying the exit operation of the second virtual character includes: When it is detected that the animation type of the character animation of the second virtual character is the delayed exit type, delaying the exit operation of the second virtual character so that the character animation of the second virtual character is played to completion and / or the delay duration of the second virtual character reaches a preset duration.
11. The method according to claim 10, wherein, The delayed exit type includes: an animation type matching a preset attack type and / or a preset defense type configured in advance, and / or an animation type with a duration exceeding a preset duration threshold.
12. The method according to any one of claims 1-11, wherein, The character attribute information of the third virtual character is determined according to the character attribute information of the first virtual character and the character attribute information of the second virtual character; Wherein, the character attribute information includes at least one of the following: character azimuth coordinates, character orientation information, attack direction information, and character action information.
13. A control device for a virtual character, comprising: A display module, adapted to display a scene picture of a virtual scene; wherein, the scene picture includes: a first virtual character capable of performing an attack operation and a second virtual character capable of performing a defense operation; A response module, adapted to respond to a received character replacement instruction, and if the attack operation of the first virtual character meets the defense condition, display a third virtual character in a defensive state in the virtual scene.
14. An electronic device, comprising: A processor, a memory, a communication interface, and a communication bus, the processor, the memory, and the communication interface complete mutual communication through the communication bus; The memory is used to store at least one executable instruction, and the executable instruction causes the processor to execute the control method for a virtual character according to any one of claims 1-12.
15. A computer storage medium, in which at least one executable instruction is stored, and the executable instruction causes a processor to execute the control method for a virtual character according to any one of claims 1-12.
16. A computer program product, characterized in that, It includes computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code. When the computer-readable code runs in the processor of an electronic device, the processor in the electronic device executes the control method for a virtual character according to any one of claims 1-12.