Role avoidance control method and device, equipment and medium

By generating a scalable collision model based on the dodge path in the role-playing game, and judging the collision between the attack behavior and the dodge space model in real time, the problem of small judgment range and high operation difficulty of traditional dodge control methods is solved, improving the accuracy of the game and the player's experience, and optimizing the use of computing resources.

CN121550679APending Publication Date: 2026-02-24GUANGZHOU KULUO SHUJIE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511743645.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-25
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

In traditional role-playing games, character dodging relies on the player character's own collision detection, which has a small detection range and is difficult to operate. Especially on mobile platforms, ordinary players find it difficult to dodge successfully, resulting in a poor gaming experience.

Method used

By acquiring dodge operation events triggered by player characters, a scalable collision model based on the dodge path is generated. The collision between the attack behavior and the dodge space model is judged in real time, triggering corresponding dodge interface effects and optimizing the use of computing resources.

Benefits of technology

The dodge detection range has been expanded, the difficulty of operation has been reduced, the accuracy of game detection and real-time feedback have been improved, the player's immersion and gaming experience have been enhanced, the use of computing resources has been optimized, and the smoothness and compatibility of the game have been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121550679A_ABST
    Figure CN121550679A_ABST
Patent Text Reader

Abstract

The invention relates to a role avoidance control method and device, equipment and a medium. The method comprises the following steps: responding to an avoidance operation event triggered by a player role in a game scene, and obtaining a role avoidance path corresponding to the avoidance operation event; determining an avoidance space model correspondingly occupied by the player character on the character avoidance path in real time; and judging whether an attack collision model corresponding to an attack behavior in the current game scene collides with the avoidance space model or not, and when the collision is monitored, correspondingly triggering an avoidance interface special effect in the current game scene. By optimizing a role dodging control mechanism, the game running efficiency and judgment accuracy are improved, the operation experience and immersion of players are enhanced, and meanwhile, the compatibility and fluency of the game on multiple devices are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a character dodging control method, apparatus, device, and medium thereof. Background Technology

[0002] In traditional role-playing and action games, such as massively multiplayer online role-playing games (MMORPGs) with open worlds, player characters typically have a health system. To enhance survivability, most games equip players with an evasion skill. Successfully using this skill when an attack is imminent allows the player to avoid the attack and prevent health loss. Furthermore, to encourage players to avoid abusing the evasion skill, games often include mechanisms that provide bonuses for successful evasions, encouraging players to use the skill at specific times for greater benefits.

[0003] Current technology for character dodge control primarily relies on the player character's own collision detection. If an attack targets the player character, a successful dodge is only achieved if the player character is within the attack's range during the dodge. However, this method has a limited detection range, and the dodge effect triggered by the player's dodge skill is extremely short-lived. This requires highly precise dodge maneuvers to successfully avoid attacks, significantly increasing the difficulty, especially on mobile gaming platforms where controls are more complex. For average players, successfully dodging attacks is too difficult and requires a high learning curve, making successful dodges nearly impossible. As the gaming industry continues to evolve, players' demands for a better gaming experience are increasing, and traditional character dodge control methods are no longer sufficient. A new detection method that addresses these problems is urgently needed. Summary of the Invention

[0004] The purpose of this application is to solve the above-mentioned problems by providing a character dodging control method and corresponding devices, equipment, non-volatile readable storage media, and computer program products.

[0005] According to one aspect of this application, a character dodging control method is provided, comprising: Respond to dodge events triggered by player characters in the game scene and obtain the dodge path corresponding to the dodge event; The dodge space model occupied by the player character on the dodge path is determined in real time; Determine whether the attack collision model corresponding to the attack behavior in the current game scene collides with the dodge space model. When a collision is detected, trigger the corresponding dodge interface effect in the current game scene.

[0006] According to another aspect of this application, a character dodging control device is provided, comprising: The dodge response module is configured to respond to dodge operation events triggered by the player character in the game scene and obtain the dodge path of the character corresponding to the dodge operation event. The model determination module is configured to determine in real time the dodge space model occupied by the player character on the character's dodge path; The collision detection module is configured to determine whether the attack collision model corresponding to the attack behavior in the current game scene collides with the dodge space model. When a collision is detected, the corresponding dodge interface effect in the current game scene is triggered.

[0007] According to another aspect of this application, a character dodging control device is provided, including a central processing unit and a memory, wherein the central processing unit is used to invoke and run a computer program stored in the memory to perform the steps of the method described in this application.

[0008] According to another aspect of this application, a non-volatile readable storage medium is provided, which stores a computer program implemented according to the described role dodging control method in the form of computer-readable instructions, wherein the computer program, when invoked by a computer, executes the steps included in the method.

[0009] According to another aspect of this application, a computer program product is provided, comprising a computer program / instructions that, when executed by a processor, implement the steps of the method.

[0010] This application first obtains the corresponding dodge path after the player character triggers a dodge operation event and determines the dodge space model occupied by the player character on that path in real time. This expands the scope of dodge judgment. Furthermore, by determining the dodge space model in real time and performing collision detection, this application can more accurately determine whether a dodge is successful, avoiding misjudgments or omissions caused by the small judgment range of traditional methods, thus ensuring the accuracy of game judgment. Compared with the traditional method of judging solely based on the player character's own collision objects, this method of generating a scalable collision model based on the dodge path effectively reduces the operational difficulty for players to successfully dodge. Especially on mobile terminals and other operating platforms, it allows ordinary players to easily achieve dodge effects, enabling players to experience the game and content more immersively, thereby enhancing the player's gaming experience.

[0011] Secondly, this application triggers dodge interface effects when the attack collision model and dodge space model collide, which not only provides players with intuitive visual feedback and enhances the game's real-time feedback mechanism, but also further strengthens players' perception of whether the dodge operation is successful or not, enabling players to more accurately grasp the timing of the dodge, thereby obtaining a richer visual enjoyment and a smoother operating experience during the game, effectively improving the game's playability and attractiveness.

[0012] Furthermore, this application triggers a dodge interface effect upon detecting a collision, avoiding the need for the computer background to perform high-frequency and high-precision calculations of the range and trajectory of all attacks in the current game scene. If the trajectory and velocity of each attack were calculated and compared with the player character's coordinates upon triggering, errors in judgment and rendering failures could occur due to insufficient data synchronization between the server and terminal or network lag. Moreover, as the number and complexity of attacks in the scene increase, the demand for computing resources also rises significantly. This application, however, only needs to monitor triggered collision events, effectively reducing the number and intensity of computing resource calls during the dodge judgment process. By reducing unnecessary high-precision collision detection operations, computer memory resources can be more rationally allocated to other game operation components, such as rendering and physics engine calculations, contributing to improved overall smoothness and stability of large games. The optimization effect achieved by this application is particularly significant in high-load game environments with multiple characters and complex scenes, allowing for smoother game operation even on lower-configuration devices, thus expanding game compatibility and accessibility. Attached Figure Description

[0013] Figure 1 This application provides an exemplary network architecture; Figure 2 This is a flowchart illustrating one embodiment of the character dodge control method of this application. Figure 3 This is a schematic diagram of the character dodge control device of this application; Figure 4 This is a schematic diagram of the structure of a character dodging control device used in this application. Detailed Implementation

[0014] The technical solution of this application can be widely applied to various network architectures to adapt to different types and scales of game applications. In a network architecture such as... Figure 1In the typical network architecture shown, the player's terminal device accesses the game service cluster via the network. This cluster consists of multiple game servers 81. A microservice architecture manages and maintains the operational resources of these game servers 81, providing multiple service instances. Each service instance is responsible for a different service. For example, some service instances can be used to maintain the front-end service for the terminal device 80 to access the game, while others can each be responsible for the gameplay service of one or more maps in the game's world map, providing players with corresponding map dungeon gameplay. The player's terminal device 80 has a computer program product installed and running according to the character interaction control method of this application, or the terminal device can be connected to a cloud server container, where the computer program product runs. After the computer program product runs, it accesses the game service cluster, enabling the player to control their in-game character through the terminal device, interact with various service instances of the game, and explore and interact with different maps.

[0015] Each service instance can maintain a real-time connection with the player's terminal device 80 via the network, handling various events and interactions in the game, such as player character movement, attacks, and item usage. The server provides necessary data support to the terminal device to ensure smooth game operation. This data includes, but is not limited to, map model datasets, which contain map model data for each map and resource model data for its scene resources, such as buildings, player character models, non-player character models, and various other creature or non-creature models, used by the terminal device 80 to render and generate corresponding real-time images. Based on the received map model dataset, the terminal device 80 can generate high-quality real-time images and display them in the graphical user interface, presenting the corresponding game scene to the player. Players obtain visual information about the game through real-time images of the game scene, thereby implementing gameplay.

[0016] This application not only applies to the gaming experience for single players but can also be extended to multiplayer online game environments. In multiplayer games, multiple players' (users') terminal devices simultaneously connect to the game service cluster. Each service instance needs to handle interaction requests from multiple players and update the game status in real time. This application ensures that each player receives consistent and high-quality character interaction control in multiplayer game scenarios, while optimizing the resource utilization of servers and terminal devices and improving the overall operational efficiency of the game system.

[0017] In an exemplary application scenario of this application, consider a massively multiplayer online role-playing game (MMORPG) where players can freely explore a vast open-world map and control their character to enter various specific dungeon maps to complete quests. In this game, the player character can frequently switch between different maps, such as switching from a bustling city map to a mysterious dungeon map, or from one room to another.

[0018] One exemplary application scenario of this application is a game client, which can also work in conjunction with a server. During game operation, when a player triggers a dodge operation, the client generates a corresponding dodge space model based on the character's dodge path. The dodge space model mentioned in this application can be a scalable collider based on the character's movement path, and its size and shape can be adjusted according to game design requirements. At the same time, the game engine tracks attack behaviors in the current game scene in real time. These attack behaviors typically have corresponding attack collision models used to determine the range of influence of the attack.

[0019] The term "system" as used in this application may refer to a collection of software and hardware environments on the game client and / or server side, used to implement various functions of the game. It includes components such as game engine, physics system, collision detection module, special effects rendering module, and audio system. These components work together to process player input, execute game logic, update game state, generate visual and auditory feedback, and provide players with an interactive experience.

[0020] To achieve accurate and reasonable dodge detection, this application determines the success of a dodge by detecting the collision between the attack collision model and the dodge space model. If a collision occurs, corresponding dodge interface effects are triggered, such as lighting effects and changes in character animation, to enhance the player's visual experience and operational feedback. This method can also be integrated with other game systems, such as character attribute systems, skill systems, and reward systems. The game can configure the size and duration of the dodge space model generated by the game character based on the current game scene, or provide additional skill effects or attribute bonuses to the character after a successful dodge, and offer a special buff such as a dodge counterattack, which can deal additional damage to monsters, thereby enriching the game's strategy and playability.

[0021] Please see Figure 2 The character dodging control method of this application, in some embodiments, includes the following steps: Step S3100: Respond to the dodge operation event triggered by the player character in the game scene, and obtain the dodge path of the character corresponding to the dodge operation event.

[0022] In typical role-playing games, player characters can move freely while performing various actions such as attacking, jumping, crouching, transforming, flying, or dodging. Dodging is usually achieved by clicking a dodge skill control on the game screen or by mapping a button on a game peripheral to a dodge skill control. This can be flexibly configured by those skilled in the art according to the game's business requirements. Dodge events can be initiated by players through input devices such as game controllers, keyboards, mice, or mobile device touchscreens. For example, when a player presses a specific dodge button or makes a dodge gesture on the touchscreen, the game client's input processing module captures this event and identifies it as a dodge event. When the player character triggers a dodge event, the game client immediately responds to this action.

[0023] In game scenarios, triggering a dodge event signifies the player's intention to avoid an impending attack. This occurs when the player is in combat facing attacks from enemy characters or monsters, such as melee, magical, or ranged attacks, or attacks triggered by environmental mechanisms. Players need to dodge promptly to avoid damage. Therefore, dodge is most crucial when an enemy initiates an attack and it's about to hit the player. At this moment, the player must quickly assess the attack's trajectory and range, and trigger the dodge event to move the character to a safe position, thus avoiding the attack. Under certain combat mechanics, such as combo systems or skills with large attack ranges, players may also need to frequently trigger dodges to maintain survivability and a consistent attack rhythm. For example, when an enemy character unleashes a large-area-of-effect attack, the player needs to dodge to quickly move out of the attack range and avoid the corresponding area-of-effect damage. In some game designs, the dodge mechanic can be combined with a counterattack mechanism, allowing the player character to immediately counterattack the enemy character after successfully dodging, thereby gaining a combat advantage.

[0024] A dodge event can be determined by a single player action. Once the player character triggers a dodge action, a dodge event is triggered. Dodge actions can be triggered in various ways. Besides a single dodge command input, a dodge event can also be automatically triggered when the player character is in a special state due to a specific action, even if no dodge action is explicitly triggered. For example, if a player character is in a special state and the player only issues an attack command, but is attacked by an enemy character, a dodge will be automatically triggered, constituting a dodge event. In some cases, a dodge event can also be triggered by a combination of events. For instance, if a special red glow effect appears on an enemy character, indicating an impending attack, and the player character dodges during the period the red glow effect is active and flashes, then the red glow effect and the player's dodge action together constitute a dodge event. Therefore, dodge operation events can be triggered by a single operation or a combination of multiple events. In the specific game development process, common interface interaction logic can be referenced for setting.

[0025] After detecting a dodge event, the game client obtains the corresponding character dodge path. The dodge path refers to the movement trajectory of the player character when performing a dodge maneuver in the game scene. This path can be determined in several ways. A common method is based on a preset dodge animation and direction. When the player presses the dodge button, the game client calculates a dodge path of fixed length and direction based on the character's current orientation and the preset dodge animation. The character dodge path can also be dynamically adjusted according to the specific design of the game. For example, in some games, the dodge path is modified based on the player character's agility attribute or equipment characteristics to provide a more personalized gaming experience. When calculating the dodge path, the game client may call the game engine's physics system to ensure the feasibility and realism of the path. If there are impassable obstacles on the dodge path, the physics system will detect this and adjust the path to avoid the obstacles.

[0026] In one implementation, when a player character triggers a dodge operation, the display effect of a specific dodge action on the game screen can serve as a notification that the dodge operation has been successfully triggered. For example, when a player character triggers a dodge operation, they will perform a dodge action that demonstrates their agility, such as jumping, crouching, sidestepping, rolling, spinning, or taking a backstep, depending on their character configuration or specific equipment configuration. Different player characters can also be configured with different dodge actions in specific states. In this case, regardless of the form of the dodge action triggered by the player character in the game scene, their movement trajectory in the game scene can be regarded as the character's dodge path. During the duration of the corresponding dodge action, the player character can also obtain an invincibility effect for a certain number of consecutive game frames. During this time, the player character will not receive any damage and will be immune to all additional negative effects. This makes the player character's state in the game scene correspond to the dodge operation, making it more consistent with the operation logic of dodge.

[0027] In one implementation, during the process of obtaining the character's dodging path, the game client represents the path as a series of waypoints, which define the positions the character needs to pass through sequentially during the dodging process. The movement between waypoints can be smoothed using linear interpolation or other interpolation algorithms. The game client can use Bézier curves to generate smooth dodging paths, making the character's movement more natural.

[0028] In one implementation, the generation of the character's dodge path also takes into account dynamic elements in the game scene, such as the movement of other characters and changes in obstacles. The game client may update the dodge path in real time to cope with dynamic changes in the scene. For example, when a new obstacle suddenly appears on the dodge path, the game client will recalculate the path to ensure that the character can successfully dodge.

[0029] In one implementation, during the process of acquiring the character's dodging path, the game client also records relevant information about the dodging path, such as the player character's dodging start point, dodging end point, dodging length, and dodging direction. This information will be used for subsequent generation of the dodging space model and collision detection. For example, the length and direction of the dodging path will directly affect the size and shape of the dodging space model, thereby affecting the range and accuracy of the dodging judgment.

[0030] Step S3200: Determine in real time the dodge space model occupied by the player character on the character's dodge path.

[0031] In a game scenario, after a player character triggers a dodge event and obtains their dodge path, the next step is to generate a dodge space model that the player character occupies along that path. The dodge space model can be a virtual 3D geometry representing a specific spatial area occupied by the player character during dodge. It can consist of the player character's own collider and a geometric collider generated along the dodge path; for example, the geometric collider could be a cuboid, whose size is adjustable to expand the dodge detection range. The shape and size of the dodge space model can be dynamically adjusted based on the character's model and game design requirements. For example, for a tall melee character, the dodge space model generated based on their larger model could be a large capsule to cover a larger area around the character's body; while for a smaller ranged character, the dodge space model generated based on their model could be a smaller box to suit their smaller movement range and posture.

[0032] In one implementation, when a player character triggers a dodge operation in the current scene, the player character enters a dodge state with a certain duration. During the time from the start to the end of this dodge state, the player character can be considered to be in a state where a dodge space model can be generated. At this time, the game resources corresponding to the dodge space model can be generated or recycled along the dodge path of the player character when the player character in the dodge state dodges in the current game scene.

[0033] This application can obtain the real-time coordinates of the player character along the dodge path, reflecting the character's current position during the dodge. Based on the character's initial and real-time coordinates, the length generation parameters of the cuboid collider can be determined. The length generation parameters can be calculated based on the displacement and duration of the dodge action. For example, if the total displacement of the dodge action is 5 meters, the length of the cuboid collider can be set to be slightly greater than 5 meters to ensure coverage of the entire dodge path. Then, based on the player character's body collider model parameters and the calculated length generation parameters, the real-time volume of the dodge space model is obtained. The body collider model parameters include the shape of the character's body, such as a capsule or box, and its dimensions, such as width and height. The calculation of the real-time volume needs to comprehensively consider the dimensions of the body collider and the length and cross-sectional area of ​​the cuboid collider. If the character's body collider is a box 1 meter wide and 2 meters high, and the length of the cuboid collider is 5 meters with the same cross-sectional area as the width of the character's body, then the real-time volume of the dodge space model can be approximated as a cuboid 5 meters long, 1 meter wide, and 2 meters high. Then, scene resources corresponding to the dodge space model, including the geometric definition and physical properties of the cuboid collider, can be loaded into the current game scene. Further, based on the calculated real-time volume, the collision volume of the cuboid collider is dynamically adjusted. This adjustment process is typically handled by the game engine's physics system to ensure that the collider's size matches the calculation results. The physics system sets the length, width, and height of the cuboid collider according to the real-time volume parameters to match the character's dodge path and actions.

[0034] Step S3300: Determine whether the attack collision model corresponding to the attack behavior in the current game scene and the dodge space model collide. When a collision is detected, trigger the dodge interface effect in the current game scene.

[0035] When a player character triggers a dodge event and generates a dodge space model, it's necessary to determine whether the attack collision model corresponding to the attack behavior in the current game scene collides with the dodge space model. The attack collision model is a geometric representation of the attack range corresponding to the attack behavior in the current game scene; its shape and size depend on the type, range, and intensity of the attack. For example, a melee attack might correspond to a smaller box-shaped collision model, while an area-of-effect spell attack might correspond to a larger sphere or fan-shaped collision model. The attack collision model is usually defined by preset parameters of the attack skill and generated by the game engine when the attack occurs. Collision detection can be performed using the game engine's collision detection module. This module monitors collision events between the attack collision model and the dodge space model in real time. When the attack collision model collides with the dodge space model, a corresponding event handling mechanism is triggered. Based on the attack type and the parameters of the dodge space model, it determines whether the collision is valid. If the overlapping area of ​​the attack collision model and the dodge space model exceeds a preset threshold, a valid collision is considered to have occurred.

[0036] When a collision is detected between the attack collision model and the dodge space model, a dodge interface effect is triggered in the current game scene. Dodge interface effects serve as a mechanism to provide visual feedback to players, enhancing the game's immediate responsiveness and immersion. The type and presentation of these effects can be customized according to game design requirements. Common dodge interface effects include lighting effects, particle effects, and character movement changes. When a player successfully dodges an attack, a brief aura of light or shadow can be generated around the character, or particle splash effects can appear along the character's movement path, visually informing the player of a successful dodge.

[0037] In one implementation, the visual effects of the dodge interface can be dynamically adjusted according to the type and intensity of the attack. For example, more obvious effects can be generated for powerful attacks, while simpler effects can be generated for normal attacks. This not only enhances the visual effects of the game but also helps players better identify the danger level of the attack, thereby making more reasonable dodge decisions.

[0038] In one implementation, the triggering of dodge interface effects is handled by the game engine's event system. When the collision detection module detects a collision between the attack collision model and the dodge space model, it sends an event notification to the event system. Upon receiving the notification, the event system calls a pre-defined effect generation function to generate corresponding effect resources based on the relevant parameters of the attack and dodge. These effect resources include textures, animations, and sound effects, which are pre-made and stored in a resource library during game development. During effect generation, the appearance of the effects is adjusted based on real-time calculated parameters such as collision position and collision intensity to ensure that the effects match the real-time state of the game scene.

[0039] In one implementation, the generation and display of dodge interface effects can work in conjunction with other game systems such as the rendering system and the physics system. For example, the rendering system is responsible for drawing effect resources onto the game screen, and the physics system provides motion and interaction support for the effects, so that some effects can be dynamically adjusted according to the character's movement state or interact with other objects in the scene.

[0040] The event-based collision detection mechanism employed in this application can optimize the use of computational resources and avoid errors in judgment and rendering failures. In this application, dodge interface effects are triggered only when the attack collision model collides with the dodge space model, instead of performing comprehensive high-precision calculations for every attack. During game operation, the attack collision model for attack behavior remains active, but high-precision trajectory and flight speed calculations are not performed for every attack. Only when the attack collision model and the dodge space model actually collide will the necessary calculations related to a successful dodge operation be executed and the corresponding effects triggered. This event-based detection method reduces the need for high-frequency and high-precision calculations, thereby reducing the consumption of computational resources.

[0041] In one implementation, spatial partitioning technology can be used to further optimize collision detection. By dividing the game scene into multiple regions, collision detection is only performed when the attack collision model and the dodge space model are located in the same or adjacent regions. This method narrows the detection range, avoids unnecessary cross-region detection, and thus saves memory resources. This optimization is particularly effective in high-load environments with multiple characters and complex scenes. By reducing unnecessary high-precision collision detection, more computing resources can be allocated to critical tasks such as image rendering and physics engine calculations, thereby improving the overall smoothness and stability of the game. On low-configuration devices, this optimization strategy allows the game to run more smoothly with limited hardware resources. By rationally allocating memory resources and reducing computational intensity, the game's compatibility and accessibility are significantly improved, allowing more players to have a good gaming experience on different devices.

[0042] As can be seen from the above embodiments, by obtaining the dodge path in response to dodge operation events, this application provides a basis for subsequent dodge judgment, enhancing the immediacy and interactivity of the game. By generating a scalable cuboid collider as the dodge space model, and combining it with the player character's own collider, the dodge judgment range is expanded, allowing the player character to trigger dodge judgment more easily, reducing the game's operational difficulty, and thus improving the user experience. Furthermore, by determining the length and volume of the dodge space model in real time and dynamically adjusting the collider size according to the character's movement state, the flexibility and accuracy of dodge judgment can be improved, thereby further adapting to different types of characters and combat scenarios in the game. This application also further determines whether the attack collision model and the dodge space model collide, and triggers dodge interface effects when a collision occurs, thereby providing players with intuitive visual feedback, enhancing the game's visual effects and immersion, and helping players better grasp the timing of dodge. Moreover, this application can also optimize the use of computing resources by reducing unnecessary high-precision collision detection, improving the game's smoothness and stability in complex multi-character scenarios, while improving the running performance on low-configuration devices, enhancing the game's compatibility and accessibility.

[0043] Based on any embodiment of the method in this application, in response to a dodge operation event triggered by a player character in a game scene, the method obtains the character's dodge path corresponding to the dodge operation event, including: Step S3110: In response to the dodge operation applied to the player character, the player character's current initial coordinates and orientation are obtained by triggering the dodge operation event.

[0044] When a player performs a dodge operation on their character using an input device such as a keyboard, mouse, touchscreen, or gamepad, the game client responds and triggers a dodge event. This event signifies the player's intention to dodge to avoid an impending attack or danger. The game client's input processing module listens to the player's input in real time. Upon detecting a dodge operation, it immediately records the player character's initial coordinates and orientation. The initial coordinates are the character's position in the game world, represented as a 3D coordinate point (x, y, z); the orientation is the direction the character is currently facing, typically represented by quaternions or Euler angles. The specific method for obtaining the initial coordinates and orientation depends on the game engine and platform. In PC games, this can be obtained through graphics APIs such as DirectX or OpenGL. On mobile devices, it's typically achieved through platform APIs like Android's Sensor API or iOS's Core Motion API, which provide the device's rotation and position data.

[0045] In one implementation, the game can use a network synchronization mechanism to send the player character's initial coordinates and orientation information to the game server for verification and synchronization, so as to ensure that all players see the same scene state, which can prevent cheating or avoid data inconsistency in multiplayer online games.

[0046] Step S3120: Based on the preset dodge distance and the character's initial coordinates, obtain the character's endpoint coordinates in the direction the player character is facing, and determine the character dodge path the player character travels from the character's initial coordinates to the character's endpoint coordinates.

[0047] In a game scenario, when a player performs a dodge maneuver, there are two corresponding moments: the start and the end of the dodge. Obtaining the path the player character traverses within the game environment between these two moments helps us determine the character's dodge path before and after the dodge. The preset dodge distance is a fixed value or a variable range pre-set by game designers based on a character's agility, speed, or game balance requirements. For example, for an agile character, the preset dodge distance might be larger to reflect their flexible movement ability; while for a heavily armored character, the preset dodge distance might be smaller to reflect their slower movement speed. In some game designs, the preset dodge distance can also be dynamically adjusted based on the character's current state. For instance, if the character is carrying a heavy load or is fatigued, the dodge distance will adaptively decrease.

[0048] One calculation method for obtaining a character's endpoint coordinates is vector manipulation. This involves combining the character's initial coordinates and facing vector with a preset dodge distance to calculate the character's endpoint coordinates in the current facing direction. Therefore, the character's endpoint coordinates can be obtained by multiplying the direction vector corresponding to the character's facing direction by the preset dodge distance, and then adding this product to the character's initial coordinates. The direction vector corresponding to the character's facing direction also needs to be normalized after acquisition to ensure the accuracy of the dodge distance.

[0049] After obtaining the character's final coordinates, a smooth movement trajectory is generated based on the character's initial and final coordinates. This can be seen as a way to determine the character's dodge path. The dodge path can be a straight line or a curve, depending on the game design requirements. When generating the dodge path, obstacles and terrain in the game scene also need to be considered. Obstacles on the path can be detected by calling the game engine's navigation grid system or physics system, and the path can be replanned if necessary to ensure that the character can successfully reach the final coordinates. If there are impassable walls on the path, the path can be adjusted so that after colliding with the wall, the character moves a small preset distance to either side of the wall.

[0050] In one implementation, the generation of the character's dodge path can also be combined with the character's animation system. When the character performs a dodge action, the animation system will play the corresponding dodge animation. The generation of the character's dodge path needs to match the duration and keyframes of the animation to ensure that the character's movement is consistent with the animation performance. If the duration of the dodge animation is 0.5 seconds, it is necessary to ensure that the character moves from the initial coordinates to the end coordinates within 0.5 seconds to achieve visual synchronization.

[0051] Through the above implementation methods, this application, by responding to dodge operations and obtaining the character's initial coordinates and orientation, can promptly and accurately capture the player's intentions, providing necessary initial data for subsequent dodge path calculations. This ensures that the game system can quickly respond to the player's operations, enhancing the game's immediacy and interactivity. Next, based on the preset dodge distance and the character's initial coordinates, the application calculates the character's endpoint coordinates and determines the character's dodge path. This application, through mathematical calculations and physical simulations combined with game scenes and character animations, generates a reasonable and smooth movement trajectory. This not only improves the accuracy of dodge judgments but also ensures the naturalness and fluidity of character movement, enhancing the overall game experience. Furthermore, by rationally planning the dodge path, unnecessary collisions between the character and obstacles in the scene are avoided, further optimizing game performance.

[0052] Based on any embodiment of the method in this application, the real-time determination of the dodge space model occupied by the player character on the character's dodge path includes: Step S3210: Obtain the real-time coordinates of the player character on the character's dodge path, and determine the length generation parameters of the dodge space model based on the character's initial coordinates and the character's real-time coordinates.

[0053] Once the player character triggers a dodge operation and begins moving along the dodge path, the player character's real-time coordinates on the dodge path are acquired. These real-time coordinates reflect the character's position in the game scene during the dodge state after triggering the dodge operation; they can be obtained through real-time updates by the game engine's physics system and character control system. Based on the character's initial and real-time coordinates, the length generation parameter of the dodge space model can be determined. This length generation parameter can be a key data point defining the extension length of the dodge space model along the dodge path direction. Its calculation method can be based on the distance between the character's initial and real-time coordinates, adjusted according to a preset dodge space model scale or the character's movement speed.

[0054] Because the player character's own collider during a normal dodge movement is likely to be small, and the duration of the dodge movement is usually short, it is very difficult for the player character to successfully respond to the collision of attacks in the game scene using their own configured collider during dodge. However, by expanding the volume of the collider available for the player character's collision detection, the difficulty of responding to successful dodge maneuvers can be reduced. Therefore, by using not only the player character's own collider to detect attacks in the game scene during the player character's dodge, but also by expanding the collision detection range through the dodge space model generated from the player character's initial position to their current position, a more convenient collision detection mechanism can be provided to improve the player's gaming experience. This not only increases the success rate of successful dodge maneuvers, but also avoids over-expanding the detection of successful dodges by limiting the length of the dodge space model to the player character's initial and real-time coordinates after triggering the dodge, thus preventing the successful dodge maneuver from becoming a situation that could be abused or disrupt the game balance.

[0055] In one implementation, the player character's initial position is recorded when the player character begins to dodge, and then the player character's current position is obtained in each frame update. By measuring the straight-line distance between the initial position and the current position and combining it with a preset scaling factor, a length generation parameter can be obtained. The length generation parameter can be used to determine the size and shape of the dodge space model to ensure that the dodge space model can accurately cover the movement range of the character during the dodge process.

[0056] Step S3220: Obtain the real-time volume of the dodge space model based on the collision model parameters of the player character and the length generation parameters.

[0057] Once the player character triggers a dodge event and begins moving along the dodge path, the real-time volume of the dodge space model can be obtained based on the player character's collider model parameters and previously determined length generation parameters. The player character's collider model parameters include the shape and dimensions of the character's body, which may be a capsule, box, or sphere, and has corresponding width, height, and depth parameters. The length generation parameters are determined based on the character's initial and real-time coordinates and are used to define the extension length of the dodge space model along the dodge path.

[0058] By combining the collision model parameters and length generation parameters of the player character, the real-time volume of the dodge space model can be calculated. If the collision of the character is a box that is 1 meter wide, 2 meters high, and 1 meter deep, and the length generation parameters determine that the extension length in the dodge path direction is 5 meters, then the real-time volume of the dodge space model can be approximated as a cuboid that is 5 meters long, 1 meter wide, and 2 meters high, with a volume of 5 × 1 × 2 = 10 cubic meters.

[0059] In one implementation, the dodge space model can be generated at the midpoint between the player character's real-time coordinates and the character's initial coordinates. The generated length of the dodge space model is obtained by subtracting the initial coordinates from the player character's real-time coordinates. The generated width and height are determined based on the player character's own collider. The orientation of the dodge space model is the player character's initial orientation when triggering the dodge operation.

[0060] Step S3230: Load the scene resources corresponding to the dodge space model in the current game scene, and adjust the collision volume of the dodge space model based on the real-time volume, wherein the dodge space model is configured as a three-dimensional geometric model that is invisible to the player.

[0061] When a player character triggers a dodge event and begins moving along the dodge path, the scene resources corresponding to the dodge space model are loaded into the current game scene. The dodge space model can be configured as a 3D geometric model representing the space occupied by the player character during dodge. To enhance the player's immersive gaming experience, the dodge space model, like the player character's collision detection line, can be configured to be invisible to the player, thus not directly affecting the game's visual presentation. Loading scene resources can be achieved by extracting predefined geometric shapes and physical properties from the game's resource library. The dodge space model can be a cuboid, capsule, or sphere, depending on the game design requirements and the character's characteristics. The corresponding game resources are pre-made and stored during game development for quick loading and instantiation when needed.

[0062] In one implementation, the collision volume of the dodge space model is adjusted based on the real-time volume determined in the previous steps. The real-time volume is calculated based on the player character's collider model parameters and the length parameters generated on the dodge path. The process of adjusting the collision volume is usually completed by the game engine's physics system to ensure that the size of the collider matches the real-time volume. If the real-time volume calculation shows that the dodge space model should be a cuboid with a length of 5 meters, a width of 1 meter, and a height of 2 meters, the physics system will adjust the length, width, and height of the dodge judgment collider that can be triggered to successfully dodge, so as to ensure that it is consistent with the volume of the dodge judgment collider that should be generated when the character triggers a dodge operation in the game scene.

[0063] The above embodiments accurately reflect the character's movement state and path changes by acquiring the player character's coordinates on the dodge path in real time and determining the length generation parameters of the dodge space model. This ensures that the dodge space model can dynamically adjust according to the character's actual movement, improving the accuracy and flexibility of dodge judgment. Furthermore, by calculating the real-time volume of the dodge space model based on the character's collision model parameters and length generation parameters, appropriate dodge space models of different sizes can be generated for different characters. This dynamic volume calculation based on character characteristics and movement state enhances the personalization and adaptability of dodge judgment, ensuring that different types of characters can obtain a reasonable dodge judgment range. Finally, the scene resources corresponding to the dodge space model are loaded into the game scene, and the collision volume is adjusted according to the real-time volume. This also ensures that the dodge space model can be seamlessly integrated with the game's physics system. Optimizing collision detection efficiency through dynamic adjustment of the collision volume reduces unnecessary computational burden while ensuring the accuracy of dodge judgment. This not only improves the game's performance but also provides players with a smoother and more natural dodge experience.

[0064] Based on any embodiment of the method in this application, determining whether the attack collision model corresponding to the attack behavior in the current game scene collides with the dodge space model includes: Step S3310: Respond to the attack judgment event corresponding to each attack behavior within the preset judgment range, and determine the corresponding attack collision model based on the pre-configured collision volume of each attack behavior in the current game scene, wherein the attack collision model is configured to be larger than the collision volume of its corresponding attack behavior.

[0065] To achieve a more accurate and scalable attack detection mechanism, the game engine can respond to attack detection events corresponding to each attack behavior within a preset detection range. When an attack behavior occurs, the game engine determines the corresponding attack collision model based on the pre-configured collision volume of that attack behavior in the current scene. The size of the attack collision model can be set to be larger than the actual collision volume of its corresponding attack behavior. This design expands the attack detection range, thereby increasing the probability of attack hits and providing players with a more intuitive gaming experience. In implementation, the response to attack detection events is handled through the game engine's event system. When an attack behavior is triggered, the event system publishes an attack detection event, and the physics system subscribes to this event to execute the corresponding collision detection logic. The pre-configured collision volume is the size of the collider pre-set during the game design phase based on factors such as the type, intensity, and range of the attack. For example, for a fireball attack, its pre-configured collision volume might be a sphere with a radius of two meters; while for an area-of-effect spell attack, it might be a cube with a side length of five meters.

[0066] Since attacks in the game scene will cause damage or other negative effects to the player character, making successful dodge difficult, the attack collision model that triggers a successful dodge can be configured to be larger than the collision volume that can cause damage to the player character. The attack collision model can be understood as a collision model specifically used to determine a successful dodge, and it can be different from the size of the collider of the attack itself. Therefore, determining the attack collision model involves enlarging a pre-configured collision volume. For example, the attack collision model for a spherical fireball attack with a collision volume of two meters in radius can be generated with a radius of three meters. This enlargement can be achieved through simple geometric transformations, such as scaling the radius of the sphere or increasing the side length of the cube. The enlargement ratio can be adjusted according to the game's balance requirements and design intent to achieve different detection effects.

[0067] In this way, the attack collision model can cover a larger area, making attack judgment more lenient. Even if the attack has not yet collided with the player character's collision volume (i.e., no attack judgment has occurred), if the player character triggers a dodge maneuver just before the attack arrives, a successful dodge judgment can still be triggered, resulting in a "perfect dodge" outcome. This enhances the game's playability and the player's experience. Furthermore, decoupling the size of the attack collision model from the actual collision volume provides game designers with greater flexibility, allowing them to independently adjust the judgment range without affecting the attack's effectiveness.

[0068] In one implementation, the generation and management of attack collision models are handled by the game engine's physics system. The physics system dynamically adjusts the attributes of the collision models based on pre-configured parameters and the real-time game state. When an attack occurs, the physics system generates a corresponding attack collision model in real time based on the type and direction of the attack and registers it with the physical world's collision detection system. After the attack ends, the physics system promptly reclaims these temporarily generated collision models to avoid resource leaks and performance degradation.

[0069] Step S3320: Determine whether the collision volume of the attack collision model of each attack behavior overlaps with that of the evasion space model during its movement along the corresponding attack path, so as to determine whether the attack collision model and the evasion space model collide.

[0070] To achieve accurate attack and dodge detection, it is also possible to determine whether the collision volume of the attack collision model for each attack behavior overlaps with that of the dodge space model during its movement along the corresponding attack path, thereby determining whether a collision occurs between the attack collision model and the dodge space model. In this application, the attack collision model is generated based on a pre-configured collision volume of the attack behavior. Its size can be larger than the actual attack collision volume, thus expanding the attack detection range. However, in some cases, it can also be configured to be equal to the actual attack collision volume. The dodge space model is a three-dimensional geometric model generated on the player character's dodge path. Its size and shape are dynamically adjusted according to the character's movement state and are invisible to the player.

[0071] In one implementation, the judgment process can be handled by the game engine's physics system. The physics system tracks the movement of each attack collision model along its attack path and detects in real time whether its collision volume overlaps with the dodge space model. The attack path can be a straight line, a parabola, or other complex paths, depending on the type and design of the attack. For example, for an arrow attack flying in a straight line, its path is a straight line; while for a spell attack with a parabolic trajectory, the path is a parabola. Regardless of the path, it is already configured in the pre-loaded resources. In the game scene, there is no need to calculate the flight speed and attack range of the attack when it occurs to determine whether it will collide with the player character. It is only necessary to consider the overlap between the attack collision model and the dodge space model within the attack range of the attack as a collision situation. A collision determination event is then used as the trigger response mechanism for the collision situation, thereby completing the corresponding dodge success determination.

[0072] In one implementation, the physics system uses quadtree or octree spatial partitioning techniques to divide the game scene into multiple regions to optimize collision detection efficiency. By only detecting attack collision models and dodge space models located in the same or adjacent regions, unnecessary collision detection can be reduced, thus saving computational resources. During detection, the physics system calculates the distance between the attack collision model and the dodge space model and compares it with their collision volumes. If their collision volumes overlap at a certain moment, a collision is determined, and this determination triggers corresponding game logic, such as displaying dodge interface effects or applying attack effects. To improve the accuracy and efficiency of detection, the physics system can employ various algorithms, such as the separating axis theorem or the Gilbert-Johnson-Kidd algorithm, to quickly and accurately determine whether two 3D models have collided.

[0073] In one implementation, the collision determination process considers not only the duration and path of the attack itself, but also the duration of the dodge action and the dynamic changes of the dodge space model. For multiple attacks, such as a combo skill containing multiple consecutive attack actions, the collision model of each individual attack action can be checked separately. During game development, the game system has been equipped with the ability to accurately identify the start and end times of each attack action, and can perform corresponding collision checks at a preset detection frequency along the path of each attack action. For example, for a three-stage combo attack, independent collision checks will be performed during the flight or action time of each segment, ensuring that each segment of the attack has a chance to correctly interact with the dodge space model.

[0074] The synergistic effect of the above embodiments ensures effective judgment of attacks and dodges. By responding to each attack behavior within a preset judgment range and determining the corresponding attack collision model, the comprehensiveness and accuracy of attack judgment can be ensured. The attack collision model is set to be larger than the actual collision volume of its corresponding attack behavior, which expands the attack judgment range and increases the probability of attack hits, thus providing players with a more intuitive and forgiving gaming experience. Furthermore, by determining whether the attack collision model overlaps with the collision volume of the dodge space model on its path, this embodiment achieves precise detection of attack and dodge actions. By tracking the attack path and the dynamic changes of the dodge space model in real time, the interaction between the two can be accurately captured, ensuring the timeliness and accuracy of the judgment results. In addition, this embodiment also considers the duration of attacks and dodges and continuously performs collision detection throughout the process. This adapts to various complex attack types, such as area-of-effect spells with continuous damage and combo skills containing multiple attack actions, ensuring accurate judgment at each attack stage and improving the fairness and playability of the game.

[0075] Based on any embodiment of the method in this application, when a collision is detected, a dodge interface effect in the current game scene is triggered accordingly, including: Step S3410: In response to the collision determination event triggered when the attack collision model and the dodge space model collide, the preset dodge interface effects are composited into the rendered image of the player character's 3D model.

[0076] When the attack collision model collides with the dodge space model, a collision detection event is triggered. In response to this event, pre-defined dodge interface effects are composited into the rendered image of the player character's 3D model. Dodge interface effects are a visual feedback mechanism used to intuitively demonstrate a successful dodge to the player. These effects can include lighting effects, particle effects, character animation changes, etc., with the specific presentation depending on the game design requirements. Dodge interface effects can be pre-configured by the game system and include, but are not limited to, one or more combinations of color gradients, halo diffusion, energy fluctuations, model outline highlighting, particle scattering, or screen space distortion, designed to instantly convey a clear signal to the player that the enemy character is currently in a successful collision detection event.

[0077] When a collision event occurs, the game engine's effects system receives a notification and generates corresponding visual effects based on preset effects resources and parameters. These effects resources are typically pre-made during game development and stored in a resource library for quick loading and use when needed. The process of compositing the dodge interface effects onto the rendered image of the cube model can be implemented using the game engine's rendering pipeline. The effects system overlays the generated effects image with the character's 3D model image using transparency blending, ensuring the effects blend naturally into the character image without completely obscuring the character model itself. For example, when a player successfully dodges an attack, a brief aura is generated around the character. This aura image is composited onto the character's rendered image, and by adjusting the aura's transparency and color, it coexists seamlessly with the character model, enhancing the visual effect.

[0078] In one implementation, the synthesis of dodge interface effects can also be combined with the character's current action and state, triggering a character action change effect the moment the character completes the dodge action, such as the character's outline glowing or the action accelerating, to enhance visual impact and feedback effect.

[0079] Step S3420: Update the image of the player character in the game scene based on the synthesized rendered image, and insert dodge sound effects corresponding to the dodge interface effects into the game sound effects.

[0080] When the attack collision model collides with the dodge space model, a collision detection event is triggered. Upon responding to this event, preset dodge interface effects are composited into the rendered image of the player character's 3D model. At this point, the game engine's effects and rendering systems work together. The effects system generates visual effects such as lighting and particle effects based on preset parameters, while the rendering system overlays these effects onto the character model image, using transparency blending technology to ensure a natural blend without completely obscuring the character model. Simultaneously, the game engine's rendering system updates the player character's image in the game scene based on the composited image, combining the 3D model, effects, and textures into a final 2D image, which is then displayed on the screen. It also updates vertex data, textures, and materials, and passes the data to the graphics API via the rendering pipeline to execute the final image rendering. The audio system can insert dodge sound effects corresponding to the dodge interface effects into the game's sound effects. This can be achieved through preloading sound effect resources, triggering audio events, and mixing and playing sound effects. When a dodge detection event occurs, the audio system plays the preset dodge sound effect and performs spatial sound processing as needed to enhance realism. For example, a brief "whoosh" sound is played when an attack is successfully dodged to simulate the effect of the attack brushing past. The sound effect is inserted into the current game audio track and the spatial attributes are adjusted according to the character's position, making the player feel as if they have actually dodged an attack.

[0081] Through the above embodiments of this application, this application not only provides players with intuitive visual feedback, but also enhances the visual expressiveness of the game through dynamic lighting and particle effects; furthermore, this embodiment enhances the effect of visual feedback through sound effects, allowing players to hear matching sounds while seeing the dodge effect. The insertion of sound effects is achieved through the preloading and real-time mixing technology of the audio system, ensuring the synchronization of sound effects and visual effects, further enhancing the player's immersion. This multi-sensory feedback mechanism helps players better understand the game state and adjust their operation strategies in a timely manner. Players can quickly judge whether the dodge was successful through visual and auditory feedback, thereby making more reasonable decisions in subsequent operations; this instant feedback can also improve player operation satisfaction, making the game experience smoother and more natural.

[0082] Based on any embodiment of the method in this application, when a collision is detected, the method further includes: Step S3510: In response to the collision determination event, obtain the attacking unit that triggered the corresponding attack behavior, and reset the player character's dodge cooldown count in the current game scene.

[0083] When a collision detection event is detected, the system can also identify the attacking unit that triggered the corresponding attack. This attacking unit can be an enemy character, monster, trap, or other game entity capable of launching an attack. Different types of attacking units have unique identifiers in the game system to distinguish different attack sources. In a massively multiplayer online role-playing game, the attacking unit might be a specific NPC or a player-controlled enemy character. The process of acquiring the attacking unit is completed collaboratively by the game engine's event system and entity component system. When a collision detection event occurs, the event system carries relevant information about the attack collision model, including the attacking unit's identifier. Using this identifier, the system retrieves the specific attacking unit instance from the game scene's entity manager, thereby obtaining its detailed information, such as attack type, attack power, and attack range.

[0084] Next, the player character's dodge cooldown count in the current game scene will be reset. The dodge cooldown count is a mechanism in the game design that limits the number of times a player character can dodge within a certain time. Each successful dodge reduces the remaining dodge cooldown count. When the dodge cooldown count reaches zero, the player cannot dodge again until it automatically recovers after a certain cooldown period. The reset of the dodge cooldown count is usually handled by the game's skill or attribute system. An initial consecutive dodge cooldown count can be set to two, based on game balance design. For example, the player character can only trigger two consecutive dodges, and after two consecutive dodges, there is a one-second wait before the player character can trigger the next dodge. Each time the player successfully dodges an attack, the remaining dodge cooldown count can be increased by one to reward the player for the successful dodge. Therefore, when a successful dodge is detected, the remaining dodge cooldown count will be reset to the initial value, allowing the player to dodge again within a short period.

[0085] Step S3520: Activate the player character's dodge counterattack permission within the preset counterattack judgment time, listen for the dodge counterattack operation triggered by the player character, and revoke the dodge counterattack permission when the counterattack judgment time ends.

[0086] When a player character successfully dodges an attack and triggers a collision event, a limited time window needs to be provided for the player to immediately counterattack, increasing the strategic depth and interactivity of the combat. The player character's dodge-counterattack privilege can be activated within a preset counterattack judgment duration. The preset counterattack judgment duration is a predefined time parameter in the game design, typically set to a short few seconds based on the game's pace and balance requirements. For example, it can be set between 0.5 and 2 seconds, depending on the game type and design requirements. After activating the dodge-counterattack privilege, the system begins monitoring for player-triggered dodge-counterattack actions. Players can trigger a dodge-counterattack through specific input combinations, such as pressing an attack button or performing a specific gesture. The system needs to monitor player input in real-time and determine if it meets the trigger conditions for a dodge-counterattack. For example, in an action role-playing game, a player might need to trigger an attack shortly after a successful dodge by clicking an attack component on the game screen or inputting an attack command through an input device to activate a special dodge-counterattack effect.

[0087] In one implementation, the dodge counterattack operation can be triggered not only by a single simple action by the player, but also by, for example, by long-pressing an attack component, a dodge component, or inputting other combinations of commands that can trigger the dodge counterattack operation. It can also be triggered by short, continuous, multiple taps, long presses, or drags on a component. The triggering conditions for the corresponding dodge counterattack operation can be freely and richly configured according to the game's combat mechanics, and are specifically set by the developers based on the actual situation.

[0088] In one implementation, when a player character triggers a dodge action, they gain invincibility for a specific duration. The duration of this invincibility is calculated independently of the counterattack judgment duration. During game development, the dodge action is defined; it can be set so that the player character gains invincibility simply by dodging, or it can be set so that the player character gains invincibility only upon successfully triggering a specific dodge event. For the latter, for example, when the player character triggers a collision judgment event, an invincibility window is provided. During this window, the player character is immune to damage and negative effects, thus the invincibility effect applies even if the player character does not trigger a dodge counterattack.

[0089] In one implementation, the special effect of dodge counterattack can be set to be more powerful than the player's regular attack. For example, dodge counterattack can significantly reduce the enemy's shield value. This high reward encourages players to trigger dodge counterattack more often, allowing players to better utilize the game mechanics to improve their combat ability and obtain a better combat experience.

[0090] In one implementation, the game client's input processing module continuously listens for player input events. When it detects input that meets the trigger conditions for a dodge-counterattack, it immediately executes the corresponding counterattack logic, such as launching an attack and playing a counterattack animation. The dodge-counterattack privilege is automatically revoked when the counterattack judgment time ends, ensuring that the player cannot use the dodge-counterattack for an extended period after a successful dodge. This strengthens the connection between the dodge-counterattack and dodge actions while maintaining game balance and challenge. A timer can be used to track the remaining counterattack judgment time. When the timer reaches zero, the relevant status flags are reset, and the player character's dodge-counterattack privilege is revoked. When the counterattack judgment time is set to one second, the player is allowed to trigger a dodge-counterattack within one second after a successful dodge. If the player does not trigger a counterattack within this second, the counterattack privilege is automatically revoked, and the player needs to successfully dodge the attack again to regain this privilege.

[0091] Step S3530: When the player character triggers the dodge counterattack operation within the counterattack judgment time, the attack effect bound to the dodge counterattack operation is applied to the attacking unit, and the dodge counterattack permission is revoked in advance.

[0092] In the game, when a player character successfully triggers a dodge-counterattack within the counterattack judgment time, the attack effect bound to that dodge-counterattack will be applied to the previously acquired attack unit. The specific content of the attack effect is preset during the game design phase and may include damage, status ailments, knockback effects, shield value reduction, or resistance reduction. Dodge-counterattacks are usually bound to specific input commands, such as pressing a specific attack interface component or key combination, or performing a specific gesture. By listening to these input commands in real time, the bound attack effect can be executed immediately upon detecting valid input. For example, if the player presses the attack button within one second after successfully dodging, a powerful counterattack that can significantly reduce the enemy unit's shield value will be triggered. This powerful counterattack can be configured with exclusive interface effects and effects specifically matched to the player character, while also dealing considerable damage to the enemy.

[0093] In one implementation, the dodge counterattack privilege can be revoked in advance while the attack effect is being executed. This ensures that each dodge counterattack opportunity can only be used once, preventing players from triggering counterattacks multiple times after a successful dodge, thus gaining game benefits that are disproportionate to their actions. Specifically, the privilege can be revoked by resetting the relevant status flags, for example, by setting the "dodge counterattack available" flag to false. When a player triggers a dodge counterattack within the counterattack judgment time, even if the counterattack judgment time has not ended, the set damage and additional effects will be dealt to the attacking unit immediately, and the player character's dodge counterattack privilege will be revoked at the same time.

[0094] In another implementation, when the player character triggers the dodge counterattack operation within the counterattack determination time, the player character can also be given a special buff state that lasts for a period of time. During the duration of this special buff state, the player character's attack effect on the attacking unit will bring higher benefits, such as increasing damage or weakening shield value. Even if the dodge counterattack permission is revoked, the player character can continue to maintain the corresponding special buff state, thus serving as a special combat state reward after the player character successfully triggers the dodge counterattack operation within the counterattack determination time.

[0095] The embodiments described above in this application acquire attacking units and reset the player character's dodge cooldown by responding to collision detection events. This not only provides players with more dodge opportunities but also encourages them to actively utilize dodge skills in combat, thereby increasing the game's dynamism and playability. Furthermore, this embodiment activates dodge-counterattack permissions within a preset counterattack detection duration and listens for the player's counterattack actions, providing players with immediate counterattack opportunities. Players need to judge the timing of their counterattack and execute actions within a short timeframe, thus enhancing the game's interactivity and immersion. Moreover, by automatically revoking counterattack permissions at the end of the counterattack detection duration, game balance is ensured, preventing players from using counterattack skills without restriction. This encourages players to make quick decisions within a limited time window, further enhancing the game's operability and challenge.

[0096] Based on any embodiment of the method in this application, it further includes: Step S3610: Obtain the dodge duration corresponding to the player character in the current game scene based on the preset dodge configuration, and determine the dodge judgment duration corresponding to the dodge operation event triggered by the current player character based on the dodge duration.

[0097] After receiving a player character's dodge action, the system can obtain the dodge duration corresponding to the current player character based on the preset dodge configuration, and determine the dodge judgment duration corresponding to the dodge action event accordingly. The preset dodge configuration is a set of parameters defined during the game design phase to control the player character's dodge behavior. These parameters are stored in the game's configuration file or database and can vary depending on factors such as the character's type, level, equipment, or skills. The preset dodge configuration typically includes a base dodge duration and adjustment rules for that duration. For example, the base dodge duration for an agile character can be set to 1 second, while the base dodge duration for a heavily armored character can be set to 0.5 seconds. The dodge configuration can also include adjustment rules for the dodge duration, such as dynamically adjusting the dodge duration based on the character's current stamina or agility attribute.

[0098] The process of obtaining dodge duration can be completed collaboratively by the game's character attribute system and configuration management system. The character attribute system provides the character's current attribute values, such as agility and stamina. The configuration management system calculates the final dodge duration according to preset rules. If the preset rules stipulate that dodge duration equals the base duration multiplied by the agility attribute coefficient, then the character's agility attribute value is read, and the actual dodge duration is calculated using this rule. When determining the dodge judgment duration based on the dodge duration, the execution process of the dodge operation also needs to be considered. The dodge judgment duration refers to the time period from when the player triggers the dodge operation to when the dodge action is completed. During this time, dodge-related judgment logic such as generating a dodge space model and detecting collisions is executed. Normally, the dodge check duration is configured to be consistent with the dodge duration. However, in some cases, it may be adjusted according to game design requirements. For example, to enhance the game's tolerance, the dodge check duration can be set to 1.2 times the base dodge duration to ensure that the player still receives a check as the dodge action is about to end. Or, if a character's dodge duration is 1 second, and the dodge check duration is set to 1.2 seconds, continuously monitoring collision events between the attack collision model and the dodge space model within the dodge check duration can ensure that the corresponding collision events are only triggered during the player's dodge.

[0099] Step S3620: If no collision determination event is detected within the dodge determination time range, or after responding to the collision determination event, reclaim the scene resources of the dodge space model, end the response to the current dodge operation event, and re-listen for the next dodge operation event triggered by the player character.

[0100] After a player character triggers a dodge operation, if no collision event is detected within the dodge judgment time, or if a collision event has already been responded to, it indicates that the player's dodge operation did not trigger the collision event corresponding to a successful dodge, or the collision event response has been completed. At this point, the scene resources of the dodge space model will be reclaimed and the next dodge operation will be prepared. The reclamation operation may include deleting colliders from the physics engine and removing effects from the rendering system, releasing memory associated with the dodge space model, stopping collision detection, and removing any visual effects associated with the model to ensure efficient use of game resources and avoid unnecessary memory consumption and computational burden.

[0101] Next, the response to the current dodge operation event ends. At this point, the relevant state flags and event listeners are reset to their initial state, and preparations are made to handle new dodge operations. For example, the "Dodge" state flag for the player character in the current game scene is set to false, and listening for collision detection events related to the current dodge operation stops. Listening for the next dodge operation event triggered by the player character resumes, and the corresponding input processing module is reactivated to await new input from the player. Once a new dodge operation is detected, the entire process of controlling the player character's dodge operation as described in this application is re-executed.

[0102] Through the synergistic effect of the above embodiments, this application can dynamically acquire and determine the dodge duration and dodge judgment duration, enabling the dodge judgment to be flexibly adjusted according to character characteristics and game state, thereby improving the adaptability and accuracy of the dodge mechanism. After the dodge judgment duration ends, the scene resources of the dodge space model are promptly reclaimed to release memory and processing power, avoid resource waste, and ensure the high efficiency of game operation. At the same time, the response to the current dodge operation ends and the new dodge operation event is re-listened for, allowing players to seamlessly connect continuous dodge actions, improving the smoothness and responsiveness of game operation. This resource management and operation response mechanism not only enhances the performance of the game but also optimizes the player's gaming experience, making the game process smoother and more intuitive.

[0103] Please see Figure 3 According to one aspect of this application, a character dodging control device includes a dodging response module 4100, a model determination module 4200, and a collision judgment module 4300. The dodging response module 4100 is configured to respond to a dodging operation event triggered by a player character in a game scene and obtain the character's dodging path corresponding to the dodging operation event. The model determination module 4200 is configured to determine in real time the dodging space model occupied by the player character on the character's dodging path. The collision judgment module 4300 is configured to determine whether a collision occurs between the attack collision model corresponding to an attack behavior in the current game scene and the dodging space model; when a collision is detected, a corresponding dodging interface effect is triggered in the current game scene.

[0104] Based on any embodiment of the device in this application, the touch response module 4100 includes: a coordinate acquisition unit, configured to respond to a dodge operation performed on the player character, and correspondingly trigger the dodge operation event to acquire the player character's current initial coordinates and orientation; and a path determination unit, configured to acquire the player character's endpoint coordinates in the orientation based on a preset dodge distance and the initial coordinates, and determine the dodge path traveled by the player character from the initial coordinates to the endpoint coordinates.

[0105] Based on any embodiment of the device in this application, the model determination module 4200 includes: a parameter calculation unit, configured to acquire the real-time coordinates of the player character on the character's dodge path in real time, and determine the length generation parameter of the dodge space model based on the character's initial coordinates and the character's real-time coordinates; a volume calculation unit, configured to obtain the real-time volume of the dodge space model according to the player character's collision body model parameters and the length generation parameter; and a model loading unit, configured to load the scene resources corresponding to the dodge space model in the current game scene, and adjust the collision volume of the dodge space model based on the real-time volume, wherein the dodge space model is configured as a three-dimensional geometric model invisible to the player.

[0106] Based on any embodiment of the device in this application, the collision determination module 4300 includes: an attack model unit, configured to respond to an attack determination event corresponding to each attack behavior within a preset determination range, and determine a corresponding attack collision model based on a pre-configured collision volume of each attack behavior in the current game scene, wherein the attack collision model is configured to be larger than the collision volume of its corresponding attack behavior; and a collision determination unit, configured to determine whether the attack collision model of each attack behavior has a moment when it is traveling along the corresponding attack path and its collision volume overlaps with that of the dodge space model, so as to determine whether the attack collision model and the dodge space model collide.

[0107] Based on any embodiment of the device in this application, the collision determination module 4300 further includes: an effects synthesis unit, configured to synthesize preset dodge interface effects into the rendered image of the three-dimensional model of the player character in response to a collision determination event triggered when the attack collision model and the dodge space model collide; and a resource update unit, configured to update the image of the player character in the game scene based on the synthesized rendered image, and insert dodge sound effects corresponding to the dodge interface effects into the game sound effects.

[0108] Based on any embodiment of the device in this application, the collision judgment module 4300 further includes: a cooldown reset unit, configured to respond to the collision judgment event, acquire the attacking unit that triggered the corresponding attack behavior, and reset the player character's dodge cooldown count in the current game scene; a counterattack monitoring unit, configured to activate the player character's dodge counterattack permission within a preset counterattack judgment duration, monitor the dodge counterattack operation triggered by the player character, and reclaim the dodge counterattack permission when the counterattack judgment duration ends; and a dodge counterattack unit, configured to apply the attack effect bound to the dodge counterattack operation to the attacking unit when the player character triggers the dodge counterattack operation within the counterattack judgment duration, and reclaim the dodge counterattack permission in advance.

[0109] Based on any embodiment of the device in this application, it further includes: a duration determination module, configured to obtain the dodge duration corresponding to the player character in the current game scene based on a preset dodge configuration, and determine the dodge judgment duration corresponding to the dodge operation event triggered by the current player character according to the dodge duration; and a resource recycling module, configured to recycle the scene resources of the dodge space model, end the response to the current dodge operation event, and relisten for the next dodge operation event triggered by the player character if the collision judgment event is not detected within the dodge judgment duration, or after responding to the collision judgment event.

[0110] Another embodiment of this application also provides a character dodging control device. For example... Figure 4 The diagram shows the internal structure of a character dodging control device. This device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. The computer-readable, non-volatile storage medium stores an operating system, a database, and computer-readable instructions. The database stores information sequences, and when executed by the processor, these computer-readable instructions enable the processor to implement a character dodging control method.

[0111] The processor of this character dodging control device provides computing and control capabilities, supporting the operation of the entire device. The memory of this device can store computer-readable instructions, which, when executed by the processor, cause the processor to perform the character dodging control method of this application. The network interface of this device is used for communication with a terminal.

[0112] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the character dodge control device to which the present application is applied. The specific character dodge control device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0113] In this embodiment, the processor is used to execute... Figure 3 The specific functions of each module are described, and the memory stores the program code and various data required to execute the aforementioned modules or sub-modules. A network interface is used to enable data transmission between user terminals or servers. In this embodiment, the non-volatile readable storage medium stores the program code and data required to execute all modules in the role-dodging control device of this application. The server can call the server's program code and data to execute the functions of all modules.

[0114] This application also provides a non-volatile readable storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the role dodging control method of any embodiment of this application.

[0115] This application also provides a computer program product, including a computer program / instructions that, when executed by one or more processors, implement the steps of the method described in any embodiment of this application.

[0116] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The aforementioned storage medium can be a computer-readable storage medium such as a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM).

Claims

1. A method for controlling character dodge, characterized in that, include: Respond to dodge events triggered by player characters in the game scene and obtain the dodge path corresponding to the dodge event; The dodge space model occupied by the player character on the dodge path is determined in real time; Determine whether the attack collision model corresponding to the attack behavior in the current game scene collides with the dodge space model. When a collision is detected, trigger the corresponding dodge interface effect in the current game scene.

2. The character dodging control method according to claim 1, characterized in that, The process of responding to a dodge event triggered by a player character in the game scene and obtaining the corresponding dodge path includes: In response to the dodge operation performed on the player character, the player character's current initial coordinates and orientation are obtained by triggering the dodge operation event. Based on the preset dodge distance and the character's initial coordinates, the player character's endpoint coordinates in the direction the character is facing are obtained, and the dodge path taken by the player character from the character's initial coordinates to the character's endpoint coordinates is determined.

3. The character dodging control method according to claim 1, characterized in that, The real-time determination of the dodge space model occupied by the player character along the character's dodge path includes: The player character's real-time coordinates on the character's dodge path are obtained in real time, and the length generation parameters of the dodge space model are determined based on the character's initial coordinates and real-time coordinates. The real-time volume of the dodge space model is obtained based on the collider model parameters of the player character and the length generation parameters; Load the scene resources corresponding to the dodge space model in the current game scene, and adjust the collision volume of the dodge space model based on the real-time volume. The dodge space model is configured as a three-dimensional geometric model that is invisible to the player.

4. The character dodging control method according to claim 3, characterized in that, The step of determining whether the attack collision model corresponding to the attack behavior in the current game scene collides with the dodge space model includes: Responding to the attack judgment event corresponding to each attack behavior within the preset judgment range, the corresponding attack collision model is determined based on the pre-configured collision volume of each attack behavior in the current game scene, wherein the attack collision model is configured to be larger than the collision volume of its corresponding attack behavior. Determine whether the collision volume of the attack collision model of each attack behavior overlaps with that of the evasion space model during its movement along the corresponding attack path, so as to determine whether the attack collision model and the evasion space model collide.

5. The character dodging control method according to claim 4, characterized in that, When a collision is detected, the corresponding dodge interface effects in the current game scene are triggered, including: In response to a collision detection event triggered when the attack collision model and the dodge space model collide, preset dodge interface effects are composited into the rendered image of the player character's 3D model; The player character's image in the game scene is updated based on the synthesized rendered image, and dodge sound effects corresponding to the dodge interface effects are inserted into the game sound effects.

6. The character dodging control method according to claim 5, characterized in that, The method of detecting a collision also includes: In response to the collision detection event, the attacking unit that triggered the corresponding attack behavior is obtained, and the player character's dodge cooldown count in the current game scene is reset; Activate the player character's dodge counterattack permission within the preset counterattack judgment time, listen for the dodge counterattack operation triggered by the player character, and revoke the dodge counterattack permission when the counterattack judgment time ends. When the player character triggers the dodge counterattack operation within the counterattack judgment time, the attack effect bound to the dodge counterattack operation will be applied to the attacking unit, and the dodge counterattack privilege will be revoked in advance.

7. The character dodging control method according to any one of claims 1-6, characterized in that, Also includes: Based on the preset dodge configuration, obtain the dodge duration corresponding to the player character in the current game scene, and determine the dodge judgment duration corresponding to the dodge operation event triggered by the current player character based on the dodge duration; If no collision event is detected within the specified dodge detection time, or after responding to the collision event, the scene resources of the dodge space model are reclaimed, the response to the current dodge operation event ends, and the system starts listening for the next dodge operation event triggered by the player character.

8. A character dodging control device, characterized in that, include: The dodge response module is configured to respond to dodge operation events triggered by the player character in the game scene and obtain the dodge path of the character corresponding to the dodge operation event. The model determination module is configured to determine in real time the dodge space model occupied by the player character on the character's dodge path; The collision detection module is configured to determine whether the attack collision model corresponding to the attack behavior in the current game scene collides with the dodge space model. When a collision is detected, the corresponding dodge interface effect in the current game scene is triggered.

9. A character dodging control device, comprising a central processing unit and a memory, characterized in that, The central processing unit is used to invoke and run a computer program stored in the memory to perform the steps of the method as described in any one of claims 1 to 7.

10. A non-volatile readable storage medium, characterized in that, It stores, in the form of computer-readable instructions, a computer program implemented according to any one of claims 1 to 7, which, when invoked by a computer, executes the steps included in the corresponding method.