Interactive control methods, devices, electronic devices, and readable storage media in games
By controlling virtual characters to perform a second skill in sports games to change the trajectory of virtual moving objects, the probability calculation problem when multiple virtual characters compete for virtual moving objects is solved, which improves the player experience and game fun, and reduces resource waste.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2026-03-13
AI Technical Summary
In sports games, when multiple virtual characters simultaneously use burst skills to compete for a virtual moving object, existing technology determines the winner through probability calculations. This leads to a decrease in player engagement, causing dissatisfaction, wasting resources, and losing players.
By determining whether a virtual character possesses a second skill, the player can control the first virtual character to execute the second skill to alter the trajectory of the virtual mobile object, thereby preventing other virtual characters from acquiring the virtual mobile object and enhancing the game's fun and player experience.
It improves the player experience for multiple virtual characters, increases user engagement, reduces resource waste, and enhances the game's fun and participation.
Smart Images

Figure CN119733241B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and more specifically to an interactive control method, device, electronic device, and readable storage medium in a game. Background Technology
[0002] In some sports games, when a virtual character carrying a virtual mobile object attacks but the mobile object misses the target and is bounced back by the target, multiple virtual characters can acquire the mobile object.
[0003] Currently, for events involving multiple virtual characters acquiring virtual mobile objects, some virtual characters can use burst skills to acquire virtual mobile objects. When multiple virtual characters use burst skills simultaneously, the virtual character that ultimately acquires the virtual mobile object is determined through probability calculation.
[0004] However, the above methods will reduce the game participation of players who cannot trigger burst skills, cause dissatisfaction among players who trigger burst skills but do not obtain virtual movement objects, thus leading to player churn, server idleness, and waste of resources. Summary of the Invention
[0005] This application provides an interactive control method, device, electronic device, and readable storage medium for games, which can enhance the fun of games, improve the player experience, increase user stickiness, and reduce resource waste. The specific solution is as follows:
[0006] In a first aspect, embodiments of this application provide an interactive control method in a game, the method comprising:
[0007] When the first virtual character possesses the second skill, in response to receiving a virtual mobile object acquisition instruction for both the first and second virtual characters, it is determined whether the virtual mobile object acquisition instruction for the second virtual character contains the first skill information corresponding to the first skill. The second virtual character is at least one virtual character other than the first virtual character. The first skill is used to represent an acquisition skill that forcibly acquires a virtual mobile object, and the second skill is used to represent a skill that changes the trajectory of the virtual mobile object to prevent the second virtual character from acquiring the virtual mobile object through the first skill.
[0008] In response to a virtual movement command for a second virtual character containing information about a first skill, the system controls the first virtual character to perform the second skill action corresponding to the second skill.
[0009] Secondly, embodiments of this application provide an interactive control device for a game, the device comprising:
[0010] The judgment unit is configured to, in response to receiving a virtual mobile object acquisition instruction for both the first and second virtual characters when the first virtual character possesses a second skill, determine whether the virtual mobile object acquisition instruction for the second virtual character contains first skill information corresponding to the first skill. The second virtual character is at least one virtual character other than the first virtual character. The first skill is used to represent an acquisition skill that forcibly acquires a virtual mobile object, and the second skill is used to represent a skill that changes the trajectory of the virtual mobile object to prevent the second virtual character from acquiring the virtual mobile object through the first skill.
[0011] The control unit is used to respond to a virtual movement command for the second virtual character, which includes information about the first skill, and to control the first virtual character to perform the second skill behavior corresponding to the second skill.
[0012] Thirdly, this application also provides an electronic device, including:
[0013] Processor; and
[0014] A memory for storing a data processing program, which, when the electronic device is powered on and runs through the processor, executes the method described in the first aspect.
[0015] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a data processing program that is executed by a processor to perform the method described in the first aspect.
[0016] In this embodiment, when the first virtual character possesses a second skill, in response to receiving a virtual movement acquisition command for both the first and second virtual characters, it determines whether the virtual movement acquisition command for the second virtual character contains first skill information corresponding to the first skill. If the command contains first skill information, it controls the first virtual character to execute the second skill behavior. The second virtual character is limited to at least one virtual character other than the first virtual character. The first skill represents a skill that forcibly acquires a virtual movement, and the second skill represents a skill that alters the trajectory of the virtual movement to prevent the second virtual character from acquiring it through the first skill. This allows the first virtual character to execute the second skill when it possesses a second skill, receives a virtual movement acquisition command for both characters, and the command contains first skill information, thereby preventing the second virtual character from acquiring the virtual movement through the first skill. This enhances the game's fun and, when there are multiple second virtual characters, improves the experience for players with multiple characters, increases user engagement, and reduces resource waste. Attached Figure Description
[0017] Figure 1 An application system diagram of an interactive control method in a game provided in an embodiment of this application;
[0018] Figure 2 An application system diagram of another interactive control method in a game provided in this application embodiment;
[0019] Figure 3 A flowchart illustrating the interactive control method in a game provided in an embodiment of this application;
[0020] Figure 4 is a schematic diagram of an interactive control method in a game provided by an embodiment of this application;
[0021] Figure 5 This is a schematic diagram of the target trajectory provided in the embodiments of this application;
[0022] Figure 6 A structural block diagram of an example of an interactive control device in a game provided in an embodiment of this application;
[0023] Figure 7 This is a structural block diagram of an example of an electronic device for interactive control in a game, provided in an embodiment of this application. Detailed Implementation
[0024] Many specific details are set forth in the following description to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application; therefore, this application is not limited to the specific embodiments disclosed below.
[0025] It should be noted that the terms "first," "second," "third," etc., in the claims, specification, and drawings of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. Such data are interchangeable where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that shown or described herein. Furthermore, the terms "comprising," "having," and their variations are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or apparatuses.
[0026] It should be understood that in the embodiments of this application, "at least one" means one or more, and "more than one" means two or more. "And / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. The character " / " generally indicates that the related objects before and after it are in an "or" relationship. "Contains A, B and / or C" means containing any one, two, or three of A, B, and C.
[0027] It should be understood that in the embodiments of this application, "B corresponding to A", "B corresponding to A", "A corresponds to B" or "B corresponds to A" means that B is associated with A, and B can be determined based on A. Determining B based on A does not mean that B is determined solely based on A; B can also be determined based on A and / or other information.
[0028] It should be noted that the instructions or operations appearing in the subsequent detailed description of the interactive control method in the game provided in the embodiments of this application can all be regarded as instructions or operations triggered by the player through fingers or by controlling a mouse, keyboard, game controller, stylus, or voice. The specific triggering operation can be determined according to the type of electronic device. For example, when the electronic device is a touch screen device such as a mobile phone, tablet, or game console, the player can trigger instructions or operations on the touch screen through any suitable object or accessory such as a finger or stylus, or through voice. When the terminal device is a non-touch screen terminal device such as a desktop computer or laptop, the player can trigger instructions or operations through external devices such as a mouse, keyboard, or game controller.
[0029] In some sports games (such as basketball video games, football video games, etc.), when a virtual character carries a virtual mobile object to attack, and the virtual mobile object (such as a basketball, football, etc.) misses the target object (such as not hitting the basket or not shooting into the goal) and is bounced back by the target object, the player can control the virtual character to compete for the virtual mobile object in order to gain the right to attack in the next round.
[0030] Currently, for events involving multiple virtual characters vying for a virtual mobility object, players can control the virtual characters to execute either burst skills or normal skills to acquire the object. Burst skills have higher priority than normal skills. That is, if multiple virtual characters trigger skills to acquire a virtual mobility object within the same or similar timeframe, and if one virtual character executes a burst skill while the others execute normal skills, the virtual character executing the burst skill will acquire the virtual mobility object. However, when multiple players control multiple virtual characters to simultaneously use burst skills, probability calculations are needed to determine the virtual character that ultimately obtains the virtual mobility object.
[0031] The above methods will reduce the game engagement of players who cannot trigger burst skills, cause dissatisfaction among players who trigger burst skills but do not obtain virtual movement objects, thus leading to player churn, server idleness, and resource waste.
[0032] For reasons related to the background technology, in order to enhance the fun of the game, improve the user experience, increase user stickiness, and reduce resource waste, the first embodiment of this application provides an interactive control method in the game. This method is applied to an electronic device, which may be a desktop computer, laptop computer, mobile phone, tablet computer, smartwatch, etc., or other electronic devices capable of interactive control in the game. This application embodiment is not specifically limited.
[0033] The technical solution of this application will be described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0034] Figure 1 This is an application system diagram of an interactive control method in a game provided as an embodiment of this application. (See diagram below.) Figure 1 As shown, the system includes a user terminal 101 and a server terminal 102. The user terminal 101 can be any device such as a smartphone, tablet, laptop, desktop computer, or personal digital assistant (PDA). The server terminal 102 can be a processing module within the user terminal 101, a processing device electrically connected to the user terminal 101, or a server communicatively connected to the user terminal 101. The server terminal 102 deploys the interactive control method for games provided in this application, enabling players to obtain the expected game effects when playing games based on the user terminal 101.
[0035] Figure 2 An application system diagram of another interactive control method in a game provided in this application embodiment. (See diagram below.) Figure 2 As shown, the system includes multiple game terminals 201 and a game server 202 communicatively connected to them. The game terminals 201 can be any device such as a smartphone, tablet, laptop, desktop computer, or personal digital assistant (PDA). The game server 202 can be a standalone server, a server cluster consisting of multiple servers, or a cloud server. The game server 202 deploys game applications and the interactive control methods provided in this application. When multiple players participate in the game using multiple game terminals 201, the game server 202 enhances the efficiency of each player's control over each virtual character based on the methods provided in this application.
[0036] The interactive control method in the game provided in this application embodiment provides a graphical user interface through a terminal device. The content displayed by the graphical user interface includes at least a portion of a virtual playing field area and multiple virtual characters located within the virtual playing field area. The virtual playing field area includes at least a target object and a virtual moving body. The games described in this embodiment include at least various ball games, such as basketball video games and football video games. The virtual characters included in this embodiment can be characters directly controlled by the player, i.e., player characters, or characters driven by computer algorithms, i.e., non-player characters.
[0037] In this embodiment, a virtual moving body can be understood as a virtual object that moves within a virtual field area triggered by a virtual character. For example, a virtual basketball in a basketball video game, or a virtual soccer ball in a soccer video game. The target object included in the virtual field area can be understood as the target that the virtual moving body hits. When the virtual character triggers the virtual moving body to hit a virtual object, the virtual character scores a point. For example, a virtual basketball hoop in a basketball video game, or a virtual goal in a soccer video game.
[0038] Figure 3 This is a flowchart illustrating the interactive control method in a game provided in an embodiment of this application. Figure 3 As shown, the method may include S301-S302.
[0039] S301. If the first virtual character has a second skill, in response to receiving a virtual mobile object acquisition instruction for the first virtual character and the second virtual character, determine whether the virtual mobile object acquisition instruction for the second virtual character contains first skill information corresponding to the first skill. The second virtual character is at least one virtual character other than the first virtual character. The first skill is used to represent an acquisition skill that forcibly acquires a virtual mobile object. The second skill is used to represent a skill that changes the trajectory of the virtual mobile object to prevent the second virtual character from acquiring the virtual mobile object through the first skill.
[0040] S302, In response to the virtual movement acquisition instruction for the second virtual character containing the first skill information, control the first virtual character to perform the second skill behavior corresponding to the second skill.
[0041] In this embodiment, the first virtual character can be understood as a virtual character controlled by the player corresponding to the terminal device, such as a virtual basketball player or a virtual soccer player. The first skill is a skill that forcibly acquires a virtual mobile object. This can be understood as the first skill having a higher priority than ordinary skills in acquiring a virtual mobile object. For example, when multiple virtual characters trigger skills to acquire virtual mobile objects within the same or similar time period, if one virtual character executes a burst skill while the others execute ordinary skills, the virtual character executing the burst skill will acquire the virtual mobile object because the burst skill has a higher priority than the ordinary skill. The first virtual character refers to the virtual character among multiple virtual characters that possesses a second skill. In this embodiment, the second skill is a skill that can change the trajectory of a virtual mobile object to prevent the virtual character triggering the first skill from acquiring it. Specifically, the second skill can be a unique skill configured by developers for a certain type of virtual character during game development, or it can be a skill triggered by meeting set conditions, such as a skill triggered by a virtual character actively defending, using items, or increasing attribute values. Correspondingly, the first virtual character is either a virtual character configured with a unique skill or a virtual character that meets set conditions. When a virtual mobile object misses its target (i.e., it touches the target but doesn't enter its interior), it will be bounced back. In this case, if the first virtual character possesses a second skill, in response to receiving a virtual mobile object acquisition command for both the first and second virtual characters, the system determines whether the command for the second virtual character contains information about the first skill. If the command does contain first skill information, the system controls the first virtual character to execute the second skill's corresponding action to alter the virtual mobile object's trajectory, preventing the second virtual character from acquiring the virtual mobile object even based on the first skill's action.
[0042] For example, in ball games, multiple virtual characters are typically divided into two teams, and scoring is based on the virtual moving body hitting a target object. In a basketball video game, if the virtual basketball misses the target object (i.e., does not enter the virtual hoop), it will bounce back from the hoop. In a soccer video game, if the virtual soccer ball misses the target object (i.e., does not enter the virtual goal), it will bounce back from the goalpost. In a basketball video game, the first skill can be a burst skill, and the second skill can be a passing skill. When the virtual basketball misses the basket and bounces back, virtual character A and virtual character B are not on the same team. Upon receiving a rebounding command for virtual character A and virtual character B, they can compete for the rebound. If virtual character A has the passing skill, it can be determined whether the rebounding command for virtual character B contains burst skill information. If it is determined that the rebounding command for virtual character B contains burst skill information, it is determined that virtual character B will be controlled by the player corresponding to virtual character B to execute the burst skill. The player corresponding to virtual character A can control virtual character A to execute the passing skill, sending the basketball flying to prevent virtual character B from grabbing the rebound.
[0043] For example, a basketball video game will be used to illustrate the above steps. Figure 4 is a schematic diagram of an interactive control method in a game provided by an embodiment of this application.
[0044] As shown in Figure 4(a), the graphical user interface displays a virtual basketball court 401, virtual characters 402 and 403, and a virtual basketball 404 located within the virtual basketball court 401. The virtual character 402 possesses the ability to pass the ball. The virtual basketball court 401 includes a virtual basketball hoop 406 erected on the baseline 405, and a virtual basket 407 supported by the virtual basketball hoop 406. The graphical user interface also displays a rebounding control 408 and other controls (not marked in this diagram).
[0045] As shown in Figure 4(b), the virtual basketball 404 is bounced back by the virtual basketball hoop 406, the virtual character 403 is controlled to execute the burst skill, and the virtual character 402 is controlled to execute the ball passing skill.
[0046] As shown in Figure 4(c), the virtual character 403 failed to execute the burst skill, while the virtual character 402 successfully executed the ball-passing skill, and the virtual basketball 404 was launched into the air.
[0047] In this embodiment, when the first virtual character possesses a second skill, in response to receiving a virtual movement acquisition command for both the first and second virtual characters, it determines whether the virtual movement acquisition command for the second virtual character contains first skill information corresponding to the first skill. If the command contains first skill information, it controls the first virtual character to execute the second skill behavior. The second virtual character is limited to at least one virtual character other than the first virtual character. The first skill represents a skill that forcibly acquires a virtual movement, and the second skill represents a skill that alters the trajectory of the virtual movement to prevent the second virtual character from acquiring the virtual movement through the first skill. This allows the first virtual character to execute the second skill when it possesses a second skill, receives a virtual movement acquisition command for both the first and second virtual characters, and the command contains first skill information, thereby preventing the second virtual character from acquiring the virtual movement through the first skill. This enhances the game's fun and, when there are multiple second virtual characters, improves the experience for players with multiple second virtual characters, increases user stickiness, and reduces resource waste.
[0048] Controlling a virtual character to perform certain skill behaviors requires the consumption of certain resources. In an optional embodiment, the above-mentioned S302 may include: responding to a virtual movement acquisition instruction for a second virtual character containing first skill information and the attribute value of a preset attribute of the first virtual character being greater than or equal to a first preset threshold, controlling the first virtual character to perform a second skill behavior corresponding to the second skill, wherein the preset attribute is used to characterize the resources required for the first virtual character to perform the second skill behavior, and the attribute value is used to characterize the amount of resources required for the first virtual character to perform the second skill behavior.
[0049] In this embodiment, the preset attribute can be a morale attribute, and the attribute value of the preset attribute can be a morale value. When controlling the virtual character to execute the first skill and the second skill, a preset amount of morale value needs to be consumed. When the first virtual character possesses the second skill, a virtual movement acquisition instruction is received for both the first and second virtual characters, and the virtual movement acquisition instruction for the second virtual character includes information about the first skill, it is also necessary to determine whether the attribute value of the preset attribute of the first virtual character is greater than or equal to a first preset threshold. The first preset threshold is used to characterize the attribute value consumed by the first virtual character to execute the second skill behavior, i.e., whether the morale value of the first virtual character is greater than or equal to the first preset threshold. When the attribute value of the preset attribute of the first virtual character is greater than or equal to the first preset threshold, the first virtual character can be controlled to execute the second skill behavior corresponding to the second skill. When the attribute value of the preset attribute of the first virtual character is less than the first preset threshold, the first virtual character cannot be controlled to execute the second skill behavior corresponding to the second skill.
[0050] Based on the above embodiments, for example, when the first preset threshold is 10, if virtual character A has the ball-passing skill, receives a rebounding instruction for virtual character A and virtual character B, and the rebounding instruction for virtual character B contains burst skill information, it is determined whether the morale value of virtual character A is greater than or equal to 10. When the morale value of virtual character A is 12, virtual character A can be controlled to execute the ball-passing skill. After virtual character A executes the ball-passing skill, its morale value is 2. When the morale value of virtual character A is 8, virtual character A cannot execute the ball-passing skill.
[0051] In an optional embodiment, after receiving the control instruction for acquiring virtual mobile objects for the first virtual character and the second virtual character, the method further includes: generating a competition queue according to the virtual mobile object acquisition instruction.
[0052] In this embodiment, a competition queue can be generated in response to receiving a control instruction from at least one virtual character to acquire a virtual mobile object. This can also be understood as the competition queue including at least one virtual character, and the server receiving a virtual mobile object acquisition instruction for that virtual character.
[0053] In an optional embodiment, the above-mentioned generation of a competition queue based on the virtual mobile acquisition instruction may include: determining whether the first virtual mobile acquisition instruction for the first virtual character and the second virtual mobile acquisition instruction for the second virtual character occur within a preset time interval; in response to the occurrence of the first virtual mobile acquisition instruction for the first virtual character and the second virtual mobile acquisition instruction for the second virtual character within the preset time interval, arranging the first virtual character and the second virtual character according to the receiving order of the first virtual mobile acquisition instruction for the first virtual character and the second virtual mobile acquisition instruction for the second virtual character to generate a competition queue.
[0054] In this embodiment, the preset time interval can be understood as the time interval during which the virtual mobile object can be acquired after it is bounced back by the target object. If the first virtual mobile object acquisition command for the first virtual character and the second virtual mobile object acquisition command for the second virtual character occur before the start time or after the end time of the preset time interval, neither the first virtual character nor the second virtual character can enter the competition queue. Alternatively, it can be understood that if the first virtual mobile object acquisition command for the first virtual character and the second virtual mobile object acquisition command for the second virtual character occur before the start time or after the end time of the preset time interval, neither the first virtual character nor the second virtual character is qualified to acquire the virtual mobile object. For example, the preset time interval is from time T0 to time T1, where time T0 is the start time of the preset time interval and time T1 is the end time of the preset time interval. When the first virtual movement acquisition command for the first virtual character and the second virtual movement acquisition command for the second virtual character occur within a preset time interval, in response to these commands, the first and second virtual characters are sequentially arranged according to their reception time from earliest to latest, generating a competition queue. The formation time of the competition queue is short and can be preset according to game settings; for example, it can be preset to 0.1 seconds. Once the first and second virtual movement acquisition commands for the first and second virtual characters have occurred within the competition queue formation time, neither the first nor the second virtual character can enter the competition queue.
[0055] For example, taking a basketball video game as an example, the preset time interval is the time interval during which a virtual basketball can be rebounded after bouncing back from the rim. Assume the time interval for rebounding is from time T0 to time T1, where T0 is the start time and T1 is the end time. At time T2, a rebounding instruction for virtual character A is received. Since no rebounding instructions for any virtual character were received between time T0 and T2, a competition queue is formed at time T2, with virtual character A as the first virtual character in the queue. At time T3, the competition queue closes, and the queue's formation time is n seconds. Time T2 is the time between T0 and T1, the start time of the competition queue, and T3 is the time after T2 plus n seconds. Between time T2 and T3, rebounding instructions for virtual character B and virtual character C are received sequentially. Therefore, the competition queue includes virtual characters A, B, and C. If a rebounding command for virtual character D is received between time T3 and time T1, although it is within the time range where rebounding is possible, the competition queue has been closed, so virtual character D will not enter the competition queue.
[0056] In an optional embodiment, the method further includes: in response to a virtual movement acquisition instruction for a second virtual character containing first skill information, clearing virtual characters in the competition queue preceding the second virtual character.
[0057] In this embodiment, during the formation of the competition queue, in response to the second virtual character entering the competition queue and the virtual movement acquisition instruction for the second virtual character containing the first skill information, the virtual characters preceding the second virtual character in the competition queue are cleared.
[0058] Based on the above embodiments, for example, between time T2 and time T3, when virtual character E enters the competition queue, the competition queue already contains virtual characters A, B, and C. In response to the rebounding instruction for virtual character E containing burst skill information, virtual characters A, B, and C are cleared, and at this time the competition queue only includes virtual character E.
[0059] In an optional embodiment, S302 may include S3021-S3022.
[0060] S3021. Determine the animation information of the second skill. The animation information of the second skill includes the animation effect of the second skill and the movement trajectory of the first virtual character performing the second skill.
[0061] S3022, In response to the virtual movement acquisition instruction for the second virtual character containing the first skill information, control the first virtual character to perform the second skill behavior corresponding to the second skill based on the animation information.
[0062] In this embodiment, after the client of the player corresponding to the first virtual character sends a virtual movement acquisition command to the server, before the server provides feedback to the client of the player corresponding to the first virtual character, the first virtual character can be controlled to execute the first part of the third skill. This can also be understood as controlling the first virtual character to pre-represent the first part of the third skill on the client of the player corresponding to the first virtual character. Here, the third skill is the skill corresponding to the virtual movement acquisition command sent by the client of the player corresponding to the first virtual character to the server. The animation information of the second skill can be determined. Responding to the virtual movement acquisition command for the second virtual character containing the first skill information, the first virtual character is controlled to execute the first part of the third skill based on the animation information of the second skill, and then the second skill is executed. When determining the animation information of the second skill, a transition processing can be performed between the last keyframe of the third skill and the first N frames of the second skill to obtain the animation information of the second skill. Here, N is a positive integer, and the last keyframe of the third skill can be understood as the last frame of the first part of the third skill.
[0063] For example, taking a basketball video game, virtual character A has a passing skill. During the time frame when rebounding is possible, the client of the player corresponding to virtual character A sends a rebounding command to the server. The rebounding skill corresponding to this command is a normal rebounding skill; that is, it is neither a burst skill nor a passing skill, and the normal rebounding skill has a lower priority than burst and passing skills. The actions of a normal rebounding skill can include crouching, jumping, touching the ball, and landing. The first part of the normal rebounding skill includes crouching. After the client of the player corresponding to virtual character A sends the rebounding command to the server, before the server provides feedback to the client of the player corresponding to virtual character A, virtual character A will execute the first part of the normal rebounding skill, that is, virtual character A will perform the crouching action. The image frame corresponding to the lowest point of the crouch when virtual character A performs the crouching action is the last frame of the first part of the normal rebounding skill, that is, the last keyframe of the normal rebounding skill. In response to the rebounding command for virtual character B, which includes burst skill information, the system controls virtual character A to execute the passing skill after crouching during the normal rebounding action, based on the passing skill animation information. The passing skill action can include jumping, touching the ball, and landing. A transition algorithm can be used to process the image frame corresponding to the lowest point of crouching during the first part of the normal rebounding action and the first three frames during the passing skill action, ensuring a smooth transition between the crouching and passing actions of virtual character A during the normal rebounding action, thereby improving the player's viewing experience.
[0064] In an optional embodiment, after S302, the method further includes: determining a target trajectory, the target trajectory being the movement trajectory of the virtual moving body after the first virtual character performs the second skill action.
[0065] In this embodiment, a first trajectory can be selected from a preset trajectory library as the target trajectory based on the hand position of the first virtual character. The height difference between the starting point height of the first trajectory and the height of the hand position of the first virtual character is less than a second preset threshold.
[0066] For example, Figure 5 This is a schematic diagram of the target trajectory provided for an embodiment of this application. Figure 5 As shown, 501 represents the hand position of virtual character A, and 502, 503 and 504 can represent trajectories in the preset trajectory library. The height difference between the starting point height of 502, 503 and 504 and the height of the hand position of virtual character A can be determined respectively. When the height difference between the starting point height of 503 and the height of the hand position of virtual character A is less than the second preset threshold, 503 is taken as the target trajectory.
[0067] In an optional embodiment, the above-mentioned determination of the animation information of the second skill may include: determining the animation information of the second skill based on the identifier of the second skill, the position of the first virtual character when receiving the virtual moving body acquisition instruction for the first virtual character, the position of the first virtual character in the first keyframe of the first virtual character performing the second skill action, the position of the first virtual character's hand in the last keyframe of the first virtual character performing the second skill action, and the position of the virtual moving body in the last keyframe of the first virtual character performing the second skill action.
[0068] For example, each skill has a unique identifier, and each identifier is bound to the animation information of the corresponding skill. Starting from the position of the first virtual character when a virtual movement acquisition command is received for the first virtual character, the coordinates of the first virtual character in each frame when executing the skill behavior corresponding to the virtual movement acquisition command are determined based on the displacement offset attached to the animation information of the skill behavior corresponding to the virtual movement acquisition command. Then, the difference between the position of the first virtual character's hand in the last keyframe of the second skill behavior and the position of the virtual movement in the last keyframe of the second skill behavior can be determined. Starting from the position of the first virtual character in the first keyframe of the second skill behavior, the motion trajectory of the first virtual character executing the second skill behavior is determined using a preset transition algorithm based on the above difference. Then, the animation information of the second skill is determined based on the coordinates of the first virtual character in each frame when executing the skill behavior corresponding to the virtual movement acquisition command and the motion trajectory of the first virtual character executing the second skill behavior.
[0069] For example, taking a basketball video game as an example, virtual character A has a passing skill. During the time period when rebounding is possible, the client of the player corresponding to virtual character A sends a rebounding command to the server. The rebounding skill corresponding to this command is a normal rebounding skill. After the client of the player corresponding to virtual character A sends the rebounding command to the server, before the server provides feedback to the client of the player corresponding to virtual character A, in order to respond to the player's operation, virtual character A will execute the first part of the normal rebounding skill behavior. The coordinates of virtual character A in each frame when executing the normal rebounding skill behavior can be determined based on the position of virtual character A when the rebounding command is received, according to the displacement offset attached to the animation information of the normal rebounding skill behavior corresponding to the rebounding command. Then, the positions of the virtual character A's hand and the virtual basketball are determined in the image frame when the virtual character A makes contact with the virtual basketball during the ball-passing skill. The difference between the positions of the virtual character A's hand and the virtual basketball is calculated. Starting from the position of the virtual character A in the first frame of the ball-passing skill, a preset transition algorithm is used to determine the motion trajectory of the virtual character A's ball-passing skill based on the difference between the positions of the virtual character A's hand and the virtual basketball. This ensures that the position of the virtual character A's hand matches the position of the virtual basketball in the image frame when the virtual character A makes contact with the virtual basketball during the ball-passing skill. Based on the motion trajectory of the virtual character A's ball-passing skill, the coordinates of the virtual character A in each frame when performing the normal rebounding skill are modified, thus obtaining the animation information of the ball-passing skill.
[0070] In an optional embodiment, the above method may further include: controlling the second virtual character to perform a first part of the first skill behavior and the behavior of not acquiring a virtual moving object, wherein the first part of the first skill behavior is from the first frame of the first skill behavior to the image frame of the second virtual character contacting the virtual moving object.
[0071] In this embodiment, animation information of the first part of the first skill and the behavior of not acquiring the virtual mobile body can be determined. Based on the animation information of the first part of the first skill and the behavior of not acquiring the virtual mobile body, the second virtual character is controlled to execute the first part of the first skill's behavior and the behavior of not acquiring the virtual mobile body. When determining the animation information of the first part of the first skill and the behavior of not acquiring the virtual mobile body, transition processing can be performed on the last frame of the first part of the first skill and the first M frames of the behavior of not acquiring the virtual mobile body to obtain the animation information of the first part of the first skill and the behavior of not acquiring the virtual mobile body, where M is a positive integer.
[0072] For example, taking a basketball video game as an example, a burst skill action can include crouching, jumping, touching the ball, and landing with a virtual basketball. The first part of the burst skill action can include crouching and jumping, and the second part can include touching the ball and landing with a virtual basketball. Virtual character A has a passing skill. When player B controls virtual character B to perform a burst skill action, but player A does not control virtual character A to perform the passing skill, virtual character B successfully grabs a rebound. This can be understood as controlling virtual character B to perform the first and second parts of the burst skill action when the burst skill is successfully executed. When player B controls virtual character B to perform a burst skill action, but player A controls virtual character A to perform the passing skill, virtual character B fails to grab a rebound. This can be understood as controlling virtual character B to perform the first part of the burst skill action and the action of failing to grab a rebound when the burst skill action fails. The action of failing to grab a rebound can include reaching out but not touching the ball and landing. When virtual character B fails to grab a rebound, the animation information of the second part of the burst skill action is replaced with the animation information of the failed rebound action. Virtual character B is then controlled to execute the first part of the burst skill action and the failed rebound action based on the animation information of the first part of the burst skill action and the failed rebound action. A preset transition algorithm can be used to transition the last frame of the first part of the burst skill action and the first three frames of the failed rebound action when determining the animation information of the first part of the burst skill action and the failed rebound action. This ensures smooth and natural transitions between each frame of virtual character B executing the first part of the burst skill action and the failed rebound action, improving the user experience.
[0073] The above is a specific implementation of an interactive control method in a game. In practice, interactive control in the game can also be implemented in other feasible ways, and this application embodiment is not limited to this.
[0074] Corresponding to the interactive control method in the game provided in the first embodiment of this application, the second embodiment of this application also provides an interactive control device in the game, such as... Figure 6 As shown, the interactive control device 600 in the game includes:
[0075] The judgment unit 601 is used to determine, in response to receiving a virtual mobile object acquisition instruction for the first virtual character and the second virtual character, whether the virtual mobile object acquisition instruction for the second virtual character contains first skill information corresponding to the first skill when the first virtual character has a second skill. The second virtual character is at least one virtual character other than the first virtual character. The first skill is used to represent an acquisition skill that forcibly acquires a virtual mobile object. The second skill is used to represent a skill that changes the trajectory of the virtual mobile object to prevent the second virtual character from acquiring the virtual mobile object through the first skill.
[0076] The control unit 602 is used to control the first virtual character to perform the second skill behavior corresponding to the second skill in response to a virtual movement acquisition instruction for the second virtual character, which includes the first skill information.
[0077] Optionally, the control unit 602 is specifically used to: in response to a virtual movement acquisition instruction for the second virtual character containing first skill information and the attribute value of the preset attribute of the first virtual character being greater than or equal to a first preset threshold, control the first virtual character to perform the second skill behavior corresponding to the second skill, wherein the first preset threshold is used to characterize the attribute value required for the first virtual character to perform the second skill behavior.
[0078] Optional, such as Figure 6 As shown, the interactive control device 600 in the game also includes a generation unit 603.
[0079] The generation unit 603 is used to generate a competition queue based on instructions obtained from the virtual mobile body.
[0080] Optionally, the generation unit 603 is specifically used to: determine whether the first virtual mobile body acquisition instruction for the first virtual character and the second virtual mobile body acquisition instruction for the second virtual character occur within a preset time interval; in response to the first virtual mobile body acquisition instruction for the first virtual character and the second virtual mobile body acquisition instruction for the second virtual character occurring within the preset time interval, arrange the first virtual character and the second virtual character according to the receiving order of the first virtual mobile body acquisition instruction for the first virtual character and the second virtual mobile body acquisition instruction for the second virtual character, and generate a competition queue.
[0081] Optional, such as Figure 6 As shown, the interactive control device 600 in the game also includes a processing unit 604.
[0082] The processing unit 604 is configured to, in response to a virtual movement acquisition instruction for the second virtual character containing first skill information, clear the virtual characters preceding the second virtual character from the competition queue.
[0083] Optionally, the control unit 602 is specifically used to: determine the animation information of the second skill, the animation information of the second skill including the animation performance effect of the second skill and the movement trajectory of the first virtual character performing the second skill behavior; respond to the virtual moving body acquisition instruction for the second virtual character containing the first skill information, and control the first virtual character to perform the second skill behavior corresponding to the second skill according to the animation information.
[0084] Optionally, the control unit 602 is specifically used to: perform transition processing on the last keyframe of the third skill and the first N frames of the second skill to obtain the animation information of the second skill. The third skill is the skill corresponding to the virtual movement command obtained for the first virtual character, where N is a positive integer.
[0085] Optionally, the control unit 602 is specifically used to: determine the animation information of the second skill based on the identifier of the second skill, the position of the first virtual character when a virtual moving body acquisition instruction is received for the first virtual character, the position of the first virtual character in the first keyframe of the first virtual character performing the second skill action, the hand position of the first virtual character in the last keyframe of the first virtual character performing the second skill action, and the position of the virtual moving body in the last keyframe of the first virtual character performing the second skill action.
[0086] Optionally, the processing unit 604 is further configured to: determine the target trajectory, which is the movement trajectory of the virtual moving body after the first virtual character performs the second skill action.
[0087] Optionally, the processing unit 604 is specifically used to: select a first trajectory from a preset trajectory library as a target trajectory based on the hand position of the first virtual character, wherein the height difference between the starting point height of the first trajectory and the height of the hand position of the first virtual character is less than a second preset threshold.
[0088] Optionally, the control unit 602 is also configured to: control the second virtual character to perform a first part of the first skill behavior and the behavior of not acquiring a virtual moving object, wherein the first part of the first skill behavior is from the first frame of the first skill behavior to the image frame of the second virtual character contacting the virtual moving object.
[0089] Optionally, the control unit 602 is specifically used to: determine the animation information of the first part of the first skill and the behavior of not acquiring the virtual mobile body; and control the second virtual character to perform the first part of the first skill behavior and the behavior of not acquiring the virtual mobile body based on the animation information of the first part of the first skill and the behavior of not acquiring the virtual mobile body.
[0090] Optionally, the control unit 602 is specifically used to: perform transition processing on the last frame of the first part of the first skill and the first M frames of the behavior of not acquiring the virtual moving body, so as to obtain the animation information of the first part of the first skill and the behavior of not acquiring the virtual moving body, where M is a positive integer.
[0091] Corresponding to the interactive control method in the game provided in the first embodiment of this application, the third embodiment of this application also provides an electronic device for interactive control in the game.
[0092] like Figure 7The diagram shown is a structural block diagram of an example of an electronic device for interactive control in a game, provided in an embodiment of this application.
[0093] In this embodiment, an optional hardware structure of the electronic device 700 may be as follows: Figure 7 As shown, it includes: at least one processor 701, at least one memory 702 and at least one communication bus 705; the memory 702 contains a program 703 and data 704.
[0094] Bus 705 can be a communication device for transmitting data between components within electronic device 700, such as an internal bus (e.g., CPU-memory bus, where the processor is the central processing unit, or CPU for short) or an external bus (e.g., a universal serial bus port or a peripheral component interconnection fast port).
[0095] Additionally, the electronic device also includes at least one network interface 706 and at least one peripheral interface 707. The network interface 706 provides wired or wireless communication with an external network 708 (e.g., the Internet, intranet, local area network, mobile communication network, etc.). In some embodiments, the network interface 706 may include any number of network interface controllers (NICs), radio frequency (RF) modules, repeaters, transceivers, modems, routers, gateways, any combination of wired network adapters, wireless network adapters, Bluetooth adapters, infrared adapters, near field communication (NFC) adapters, cellular network chips, etc.
[0096] Peripheral interface 707 is used to connect to peripherals, such as peripheral 1 in the figure. Figure 7 709 in the middle), peripheral 2 ( Figure 7 710 in the middle) and peripheral 3 ( Figure 7 (711 in the original text). Peripherals are peripheral devices, which may include, but are not limited to, cursor control devices (such as mice, touchpads, or touchscreens), keyboards, displays (such as cathode ray tube displays, liquid crystal displays), monitors or light-emitting diode displays, video input devices (such as cameras or input interfaces coupled to video files), etc.
[0097] The processor 701 may be a CPU, an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0098] The memory 702 may include high-speed RAM (Random Access Memory) memory, and may also include non-volatile memory, such as at least one disk storage device.
[0099] The processor 701 calls the program and data stored in the memory 702 and executes the following steps:
[0100] When the first virtual character possesses the second skill, in response to receiving a virtual mobile object acquisition instruction for both the first and second virtual characters, it is determined whether the virtual mobile object acquisition instruction for the second virtual character contains the first skill information corresponding to the first skill. The second virtual character is at least one virtual character other than the first virtual character. The first skill is used to represent an acquisition skill that forcibly acquires a virtual mobile object, and the second skill is used to represent a skill that changes the trajectory of the virtual mobile object to prevent the second virtual character from acquiring the virtual mobile object through the first skill.
[0101] In response to the virtual movement acquisition instruction for the second virtual character containing the first skill information, the first virtual character is controlled to perform the second skill behavior corresponding to the second skill.
[0102] Corresponding to the interactive control method in a game provided in the first embodiment of this application, the fourth embodiment of this application provides a computer-readable storage medium storing a program for the interactive control method in a game. This program is executed by a processor to perform the following steps:
[0103] When the first virtual character possesses a second skill, in response to receiving a virtual mobile object acquisition instruction for both the first and second virtual characters, it is determined whether the virtual mobile object acquisition instruction for the second virtual character contains first skill information corresponding to the first skill. The second virtual character is at least one virtual character other than the first virtual character. The first skill is used to represent an acquisition skill that forcibly acquires a virtual mobile object, and the second skill is used to represent a skill that changes the trajectory of the virtual mobile object to prevent the second virtual character from acquiring the virtual mobile object through the first skill.
[0104] In response to a virtual movement command for a second virtual character containing information about a first skill, the system controls the first virtual character to perform the second skill action corresponding to the second skill.
[0105] It should be noted that for a detailed description of the apparatus, electronic device and computer-readable storage medium provided in the second, third and fourth embodiments of this application, please refer to the relevant description of the first embodiment of this application, which will not be repeated here.
[0106] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.
[0107] In a typical configuration, a node device in a blockchain includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0108] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0109] 1. Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage media, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include non-transitory computer-readable media, such as modulated data signals and carrier waves.
[0110] 2. Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0111] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.
Claims
1. A method for controlling interaction in a game, characterized by, The method comprises the following steps: In the case that the first virtual character has a second skill, in response to receiving a virtual mobile body acquisition instruction for the first virtual character and a second virtual character, it is judged whether the virtual mobile body acquisition instruction for the second virtual character contains first skill information corresponding to a first skill, the second virtual character being at least one virtual character other than the first virtual character, the first skill being an acquisition skill for forcibly acquiring the virtual mobile body, and the second skill being a skill for changing a trajectory of the virtual mobile body to prevent the second virtual character from acquiring the virtual mobile body through the first skill; In response to the virtual mobile body acquisition instruction for the second virtual character containing the first skill information, the first virtual character is controlled to perform a second skill behavior corresponding to the second skill; The response to the virtual mobile body acquisition instruction for the second virtual character containing the first skill information, and the control of the first virtual character to perform the second skill behavior corresponding to the second skill, comprises: In response to the virtual mobile body acquisition instruction for the second virtual character containing the first skill information and the attribute value of the preset attribute of the first virtual character being greater than or equal to a first preset threshold value, the first virtual character is controlled to perform the second skill behavior corresponding to the second skill, the first preset threshold value being used to represent the attribute value consumed by the first virtual character in performing the second skill behavior.
2. The method of claim 1, wherein, After the receiving of the control instruction for the first virtual character and the second virtual character to acquire the virtual mobile body, the method further comprises: According to the virtual mobile body acquisition instruction, a competition queue is generated.
3. The method of claim 2, wherein, The generation of the competition queue according to the virtual mobile body acquisition instruction comprises: It is judged whether the first virtual mobile body acquisition instruction for the first virtual character and the second virtual mobile body acquisition instruction for the second virtual character occur within a preset time interval; In response to the first virtual mobile body acquisition instruction for the first virtual character and the second virtual mobile body acquisition instruction for the second virtual character occurring within the preset time interval, the first virtual character and the second virtual character are arranged according to the receiving order of the first virtual mobile body acquisition instruction for the first virtual character and the second virtual mobile body acquisition instruction for the second virtual character, and the competition queue is generated.
4. The method of claim 3, wherein, The method further comprises: In response to the virtual mobile body acquisition instruction for the second virtual character containing the first skill information, the virtual character before the second virtual character in the competition queue is cleared.
5. The method of claim 1, wherein, The response to the virtual mobile body acquisition instruction for the second virtual character containing the first skill information, and the control of the first virtual character to perform the second skill behavior corresponding to the second skill, comprises: determine animation information of the second skill, the animation information of the second skill including animation performance of the second skill and a motion trajectory of the first virtual character performing a second skill action corresponding to the second skill; in response to the virtual moving body acquisition instruction for the second virtual character containing the first skill information, control the first virtual character to perform the second skill action according to the animation information.
6. The method of claim 5, wherein the determining the animation information of the second skill comprises: transitioning a last key frame of a third skill and a first N frames of the second skill to obtain the animation information of the second skill, the third skill being a skill corresponding to the virtual moving body acquisition instruction for the first virtual character, and the N being a positive integer.
7. The method of claim 5, wherein, The determining the animation information of the second skill comprises: determining the animation information of the second skill according to the identifier of the second skill, a position of the first virtual character when the virtual moving body acquisition instruction for the first virtual character is received, a position of the first virtual character in a first key frame of the second skill action, a position of a hand of the first virtual character in a last key frame of the second skill action, and a position of the virtual moving body in the last key frame of the second skill action.
8. The method of claim 5, wherein, After the controlling the first virtual character to perform the second skill action, the method further comprises: determining a target trajectory, the target trajectory being a moving trajectory of the virtual moving body after the first virtual character performs the second skill action.
9. The method of claim 8, wherein, The determining the target trajectory comprises: selecting a first trajectory as the target trajectory from a preset trajectory library according to the position of the hand of the first virtual character, a height difference between a starting point height of the first trajectory and a height of the position of the hand of the first virtual character being less than a second preset threshold.
10. The method of claim 1, wherein, The method further comprises: controlling the second virtual character to perform a first part of a first skill action and a behavior without acquiring a virtual moving body, the first part of the first skill action being from a first frame of the first skill action to an image frame in which the second virtual character contacts the virtual moving body.
11. The method of claim 10, wherein, The controlling the second virtual character to perform the first part of the first skill action and the behavior without acquiring the virtual moving body comprises: determining animation information of the first part of the first skill and the behavior without acquiring the virtual moving body; controlling the second virtual character to perform the first part of the first skill action and the behavior without acquiring the virtual moving body according to the animation information of the first part of the first skill and the behavior without acquiring the virtual moving body.
12. The method of claim 11, wherein, The determining the animation information of the first part of the first skill and the behavior without acquiring the virtual moving body comprises: Transition is performed on the last frame of the first part of the first skill and the previous M frames of the behavior of the virtual mobile body not acquired, to obtain animation information of the first part of the first skill and the behavior of the virtual mobile body not acquired, M being a positive integer.
13. An interactive control device in a game, characterized by The device comprises: A judging unit is configured to, in a case where a first virtual character has a second skill, in response to receiving a virtual mobile body acquisition instruction for the first virtual character and a second virtual character, judge whether the virtual mobile body acquisition instruction for the second virtual character contains first skill information corresponding to a first skill, the second virtual character being at least one virtual character other than the first virtual character, the first skill being an acquisition skill for forcibly acquiring the virtual mobile body, and the second skill being a skill for changing a trajectory of the virtual mobile body to prevent the second virtual character from acquiring the virtual mobile body through the first skill; A control unit is configured to, in response to the virtual mobile body acquisition instruction for the second virtual character containing the first skill information, control the first virtual character to perform a second skill behavior corresponding to the second skill; The response to the virtual mobile body acquisition instruction for the second virtual character containing the first skill information and the control of the first virtual character to perform the second skill behavior corresponding to the second skill include: In response to the virtual mobile body acquisition instruction for the second virtual character containing the first skill information and an attribute value of a preset attribute of the first virtual character being greater than or equal to a first preset threshold, the control of the first virtual character to perform the second skill behavior corresponding to the second skill, the first preset threshold being used to represent an attribute value consumed by the first virtual character to perform the second skill behavior.
14. An electronic device, comprising: Comprise: A processor; And A memory for storing a data processing program, after the electronic device is powered on and the program is run by the processor, the method as claimed in any one of claims 1-12 is executed.
15. A computer readable storage medium characterized by: A data processing program is stored, the program is run by the processor, and the method as claimed in any one of claims 1-12 is executed.
Citation Information
Patent Citations
Virtual character control method and device, electronic equipment and storage medium
CN118059465A
Method and device for displaying information in game, electronic equipment and storage medium
CN118059492A