Method, device, equipment and medium for determining the position of target object in game scene

By determining the priority attack request on the server side and synchronizing the target object's knockback position, the problem of inconsistent target object position in multiple online games is solved, reducing game delays and server loads, and improving user experience.

CN119770954APending Publication Date: 2025-04-08WEBANK (CHINA)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510008641.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-03
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

In multiplayer online games, the location of the target object is inconsistent on different clients, resulting in latency and instability in the game experience, and excessive server load, which may lead to crashes or delays.

Method used

By receiving attack requests from multiple clients on the server side, the attack request for priority repulsion is determined, and the target client is sent instructions, requiring them to calculate and transmit back the target object's repulsion position. The server then synchronizes the location to clients in other areas of interest.

Benefits of technology

Resolves the problem of inconsistent location of target objects, reduces game latency, improves user experience, and reduces server load, avoiding the risk of network bandwidth latency and server crashes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119770954A_ABST
    Figure CN119770954A_ABST
Patent Text Reader

Abstract

The present application relates to the field of game technology, and in particular to a method, device, equipment and medium for determining the position of a target object in a game scene. In the method, a server receives multiple attack requests for a target object sent by multiple clients, determines a first attack request as a reference, and a target client; sends first information to the target client to instruct the target client to determine the knockback position of the target object, thereby solving the server load problem; the server receives the knockback position sent by the target client, and sends second information carrying the knockback position to other clients in an area of ​​interest, thereby instructing any other client to display the target object at the knockback position on its own client, thereby solving the problem of inconsistent position of the target object in the game scene and the problem of server network bandwidth delay, thereby reducing game delay and improving the user's gaming experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of game technology, and in particular to a method, device, equipment and medium for determining the position of a target object in a game scene. Background Art

[0002] With the development of online games, multiplayer online battles have become possible. Players can fight with other players in real time, which increases the complexity and sociality of the battle system. In order to achieve a realistic and immersive combat experience, a physics engine is used to simulate the combat performance of attackers and attacked, such as knockback effects. When multiple players use skills with knockback effects to attack the same target object, such as the Nian Beast, the performance of the Nian Beast will be inconsistent on the clients of each player. For example, if players A, B, and C use skills with knockback effects to attack the Nian Beast M at the same time, Figure 1 FIG. 1 is a schematic diagram of a target object repelling direction in the related art. Figure 1 As shown, on A's client, the Nian beast was repelled in the direction of B; while on the client side of B, the Nian beast was repelled in the direction of C; In addition, since most servers do not have a physics engine, when the Nian Beast is attacked by a skill that causes a knockback, it may be knocked back into an obstacle or get stuck in an obstacle. Figure 2 FIG. 1 is a schematic diagram of a target object being stuck in an obstacle in the related art. Figure 2 As shown in the figure, when player P uses a skill with knockback to attack the target object, Nian Beast M, Nian Beast M is knocked back and moves along In the direction of the obstacle, if the repulsion distance is 2 meters, and the Nian beast M is 1.5 meters away from the obstacle |MC|, since the server does not have a physics engine, that is, there is no physical data of the obstacle, it is impossible to detect and determine the existence of the obstacle. Then the Nian beast will eventually stop at point D |MD| = 2 meters, resulting in the problem that the Nian beast enters the interior of the obstacle or gets stuck in the obstacle.

[0003] If physical data is placed on the server to calculate physical collisions, there are two fatal problems: one is the server network bandwidth delay problem. Since physical calculations are usually computationally intensive tasks, placing them on the server for calculation may increase network latency. Players may experience untimely feedback or freezes during combat, which seriously affects the gaming experience. The server must synchronize the position and orientation of the repelled Nian beast to all player clients within the Area of ​​Interest (AOI) at each time step (tick). A large amount of synchronization data needs to be transmitted between the server and the client, which will also increase network bandwidth consumption, which may cause network congestion, data loss or delay, and affect real-time interaction and combat experience between players. The other is the server load problem. A large amount of physical calculations will increase the server load, cause server performance degradation, and even cause server crashes or delays. This will affect the gaming experience of other players, causing the game to be unstable or unable to run properly.

[0004] Therefore, there is an urgent need for a method for determining the position of a target object in a game scene to solve the problem of inconsistent positions of target objects in the game scene, reduce game delays and improve the user's gaming experience. Summary of the invention

[0005] The present application provides a method, device, equipment and medium for determining the position of a target object in a game scene, which are used to solve the problem of inconsistent positions of target objects in a game scene, reduce game delays and improve the user's gaming experience.

[0006] In a first aspect, the present application provides a method for determining the position of a target object in a game scene, the method being applied to a server, and the method comprising:

[0007] Receive multiple attack requests against a target object sent by multiple clients;

[0008] Determine a first attack request as a reference from the multiple attack requests, and a target client to which the first attack request belongs;

[0009] Sending first information to the target client, wherein the first information is used to instruct the target client to determine a repulse position of the target object; the repulse position is a position to which the target object moves after being attacked by the first attack request;

[0010] The knockback position sent by the target client is received, and second information carrying the knockback position is sent to other clients in the area of ​​interest, wherein the second information is used to instruct any other client to display the target object at the knockback position on its own client.

[0011] In a possible implementation manner, determining the first attack request as a reference from the multiple attack requests includes:

[0012] marking a timestamp on any attack request according to a time at which any attack request is received;

[0013] The attack request corresponding to the earliest timestamp is determined as the first attack request used as a reference.

[0014] In a possible implementation, the method further includes:

[0015] After the attack duration of the first attack request is reached, a second attack request serving as a reference is determined from the attack requests that have not yet reached the attack duration; the attack request that has not yet reached the attack duration is an attack request that has not yet reached the attack duration among the multiple attack requests, and / or an attack request that is newly added within the attack duration of the first attack request.

[0016] In a second aspect, the present application provides a method for determining the position of a target object in a game scene, the method being applied to a client, the method comprising:

[0017] In response to an attack request initiated by a local player against a target object, sending the attack request to a server;

[0018] receiving first information sent by the server, where the first information is sent by the server to a target client to which the first attack request belongs after the server determines a first attack request as a reference from among multiple attack requests for the target object;

[0019] Determine a repulsive position of the target object after being attacked by the attack request, and display the target object at the repulsive position on the client side;

[0020] The knockback position is sent to the server; the server is used to send second information carrying the knockback position to other clients in the area of ​​interest; the second information is used to instruct any other client to update the knockback position of the target object in its own client according to the knockback position.

[0021] In a possible implementation, the method further includes:

[0022] If the first message sent by the server is not received, the subsequent step of determining the repulse position of the target object is not performed;

[0023] If the first information sent by the server is not received but the second information sent by the server is received, the target object is displayed at the knockback position on the client side.

[0024] In a possible implementation manner, determining the repulse position of the target object after being attacked by the attack request includes:

[0025] Determine a knockback direction according to the position of the local player and the initial position of the target object, and determine an attack distance according to an attack action corresponding to the attack request;

[0026] Determine an initial knockback position according to the initial position, the knockback direction and the attack distance;

[0027] The knockback position of the target object is determined by using a collision detection function according to the initial position and the initial knockback position.

[0028] In a possible implementation, the method further includes:

[0029] After receiving the second information sent by the server, the relative position of the local player is determined according to the initial position of the target object, the knockback position and the position of the local player; and the position of the local player is updated to the relative position and displayed.

[0030] In a possible implementation manner, displaying on the client that the target object is located at the repulse position includes:

[0031] Determine a knockback trajectory according to the initial position, the knockback position and the attack duration corresponding to the attack action; the knockback trajectory is a parabola;

[0032] Determine the real-time position of the target object corresponding to each time step in the parabola;

[0033] The target object is displayed according to the real-time position until the real-time position is the knockback position.

[0034] In a third aspect, the present application provides a device for determining the position of a target object in a game scene, the device being applied to a server, and the device comprising:

[0035] A receiving module, configured to receive multiple attack requests sent by multiple clients against a target object; determine a first attack request as a reference from the multiple attack requests, and a target client to which the first attack request belongs;

[0036] a sending module, configured to send first information to the target client, wherein the first information is used to instruct the target client to determine a repulse position of the target object; the repulse position is a position to which the target object moves after being attacked by the first attack request;

[0037] The receiving module is further used to receive the knockback position sent by the target client;

[0038] The sending module is further used to send second information carrying the knockback position to other clients in the area of ​​interest, wherein the second information is used to instruct any other client to display the target object at the knockback position on its own client.

[0039] In a possible implementation manner, the receiving module is specifically configured to mark a timestamp on any attack request according to a receiving time of any attack request; and determine the attack request corresponding to the earliest timestamp as the first attack request used as a reference.

[0040] In a possible implementation, the receiving module is further used to determine, after the attack duration of the first attack request is reached, a second attack request serving as a reference from attack requests that have not yet reached the attack duration; the attack request that has not yet reached the attack duration is an attack request that has not yet reached the attack duration among the multiple attack requests, and / or an attack request that is newly added within the attack duration of the first attack request.

[0041] In a fourth aspect, the present application provides a device for determining the position of a target object in a game scene, the device being applied to a client, and the device comprising:

[0042] A sending module, configured to respond to an attack request initiated by a local player against a target object and send the attack request to a server;

[0043] a receiving module, configured to receive first information sent by the server, wherein the first information is sent by the server to a target client to which the first attack request belongs after the server determines a first attack request as a reference from multiple attack requests for the target object; determine a repulse position of the target object after being attacked by the attack request, and display the target object at the repulse position on its own client;

[0044] The sending module is further used to send the knockback position to the server; the server is used to send second information carrying the knockback position to other clients in the area of ​​interest; the second information is used to instruct any other client to display the target object at the knockback position on its own client.

[0045] In a possible implementation, the receiving module is further used to, if the first message sent by the server is not received, not perform the subsequent step of determining the repulse position of the target object; if the first message sent by the server is not received and the second message sent by the server is received, display the target object at the repulse position on its own client.

[0046] In a possible implementation, the receiving module is specifically used to determine the knockback direction according to the position of the local player and the initial position of the target object, and determine the attack distance according to the attack action corresponding to the attack request; determine the initial knockback position according to the initial position, the knockback direction and the attack distance; and determine the knockback position of the target object using a collision detection function based on the initial position and the initial knockback position.

[0047] In a possible implementation, the receiving module is further used to determine the relative position of the local player based on the initial position of the target object and the knockback position and the position of the local player after receiving the second information sent by the server; and update the position of the local player to the relative position and display it.

[0048] In a possible implementation, the receiving module is specifically used to determine a repulse trajectory based on the initial position, the repulse position and the attack duration corresponding to the attack action; the repulse trajectory is a parabola; determine the real-time position of the target object corresponding to each time step in the parabola; and display the target object according to the real-time position until the real-time position is the repulse position.

[0049] In a fifth aspect, the present application provides an electronic device, comprising at least a processor and a memory, wherein the processor is configured to implement the steps of any method described in the first aspect when executing a computer program stored in the memory.

[0050] In a sixth aspect, the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of any method described in the first aspect.

[0051] In a seventh aspect, the present application provides a computer program product, comprising: a computer program code, which, when executed on a computer, enables the computer to execute the steps of any method described in the first aspect.

[0052] In an embodiment of the present application, a server receives multiple attack requests for a target object sent by multiple clients, determines a first attack request as a reference, and a target client; sends a first message to the target client to instruct the target client to determine the knockback position of the target object, thereby solving the server load problem; the server receives the knockback position sent by the target client, and sends a second message carrying the knockback position to other clients in the area of ​​interest, thereby instructing any other client to display the target object at the knockback position on its own client, thereby solving the problem of inconsistent position of the target object in the game scene and the problem of server network bandwidth delay, thereby reducing game delay and improving the user's gaming experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the implementation methods in the embodiments of the present application or the related technologies, the following is a brief introduction to the drawings required for use in the embodiments or the related technology descriptions. Obviously, the drawings described below are some embodiments of the present application, and a person skilled in the art can also obtain other drawings based on these drawings.

[0054] Figure 1 A schematic diagram of a target object repelling direction in the related art;

[0055] Figure 2 A schematic diagram of a target object being stuck in an obstacle in the related art;

[0056] Figure 3 A schematic diagram of a method for determining the position of a target object in a game scene provided in some embodiments of the present application;

[0057] Figure 4 A schematic diagram of a repulsion position provided for some embodiments of the present application;

[0058] Figure 5 A time diagram of multiple attack requests provided for some embodiments of the present application;

[0059] Figure 6 A schematic diagram of a process for determining the position of a target object in another game scene provided for some embodiments of the present application;

[0060] Figure 7 A schematic diagram of another repulsion position of a target object provided in some embodiments of the present application;

[0061] Figure 8 A schematic diagram of a repulsion trajectory of a target object provided in some embodiments of the present application;

[0062] Fig. 9 A schematic diagram of relative positions of local players provided for some embodiments of the present application;

[0063] Fig.10 A schematic diagram of an interactive process for determining the position of a target object in a game scene provided for some embodiments of the present application;

[0064] Fig.11 A schematic diagram of a device for determining the position of a target object in a game scene provided in some embodiments of the present application;

[0065] Fig.12 A schematic diagram of the structure of another device for determining the position of a target object in a game scene provided for some embodiments of the present application;

[0066] Fig.13 A schematic diagram of the structure of an electronic device provided for some embodiments of the present application. DETAILED DESCRIPTION

[0067] In order to make the purpose, technical solutions and advantages of this application clearer, this application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the embodiments described in this application are only part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0068] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their ordinary and common meanings.

[0069] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances.

[0070] The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.

[0071] The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.

[0072] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0073] Before introducing the method for determining the position of a target object in a game scene provided by an embodiment of the present application, in order to facilitate understanding, the background technology and professional terms of the embodiment of the present application are first introduced.

[0074] In the 1970s, early electronic games appeared. The initial game combat system was very simple. Players could attack enemies by simply clicking the left button of the mouse. The enemy's health would decrease after being attacked. In some early role-playing games (PRGs), combat was often turn-based, with players and enemies taking turns to attack, without complex operations or strategies. With the advancement of technology, real-time combat systems began to appear, and players could attack, defend, or use skills at any time, which required players to have faster reaction and decision-making capabilities. Later action games used combat actions, i.e., the combination of the attacker's attack action and the attacked person's attack action and strategy. Action games began to incorporate more combat strategies, such as combo systems, blocking, and evasion mechanisms, making combat more dynamic and unpredictable.

[0075] With the change of technology, nowadays Massive Multiplayer Online Role-Playing Game (MMORPG) pays more attention to the realism and sense of immersion in battles. Physical engines such as PhysX and Havok are born. The introduction of physical engines makes the combat effects more realistic, such as knockback and repulse effects, which enhances the visual effects of battles and the immersion of players.

[0076] RPG: is a type of electronic game, usually called "role-playing game" in Chinese. The core feature of this type of game is that the player plays one or more fictional characters in the game and participates in the game's story, battles and other activities from the perspective of these characters. RPG games emphasize the development of the storyline and the growth of individual characters, usually accompanied by a rich world view setting, complex plot and diverse character development paths.

[0077] MMORPG: An online multiplayer role-playing game, usually called "massively multiplayer online role-playing game" in Chinese. This type of game is characterized by supporting a large number of players to interact online in the same virtual world at the same time. Players can create their own characters and go on adventures, complete quests, explore the game world, and participate in battles with other players. MMORPG combines the elements of RPG (role-playing game) and the technical features of MMO (massively multiplayer online game), providing players with rich social experience and lasting game fun.

[0078] PhysX: A physics engine developed by NVIDIA for physical simulation and special effects rendering in games and virtual reality. PhysX provides high-performance physical effects, including rigid body physics, collision detection, cloth simulation, fluid simulation and other functions. As a professional physics engine, PhysX is widely used in game development, virtual reality and simulation, providing developers with rich physical effects and interactive experience. Features of PhysX include high performance, ease of use and scalability, enabling developers to quickly implement complex physical effects and enhance the realism and immersion of games. The underlying UE5 uses the PhysX physics engine.

[0079] Collision detection function (LineTraceSingleByChannel): In UE5, it is a function used to perform a single ray detection, which allows you to draw a straight line from one point to another in the 3D game world and detect whether there are any objects on this line that intersect with it. This function is particularly suitable for scenes such as detecting whether two points are in contact with an object, collision detection of weapon shooting trajectories, etc. The main function of the LineTraceSingleByChannel function is to emit a ray from a point and detect whether it intersects with any object on the specified collision channel. If a collision is detected, the function will return collision information, including the location of the collision point, the collided object, etc. (you need to know the starting and end points of the collision).

[0080] AOI: Area Of Interest, refers to the area that players see in real time in the game. This concept is particularly important on the game server side because it is directly related to the management of game performance and stability. Specifically, AOI changes as the position of the player or game unit in the scene changes, ensuring that only necessary areas in the game world are loaded and updated, thereby improving the smoothness and responsiveness of the game. In the game world, the scene is usually composed of various areas, each of which has a perception range. When a player or an NPC in the game enters an area, the server notifies other players and NPCs in the area so that they can respond in time. This mechanism not only effectively manages a large number of game objects, but also avoids unnecessary calculations and communications, further improving the performance and stability of the game. Therefore, the AOI algorithm is one of the key technologies for game servers to manage players and NPCs, especially in MMORPG (Massive Multiplayer Online Role-Playing Games), which supports any unit in the game world to handle events that occur within a certain radius, ensuring the smooth progress of the game and a good experience for players.

[0081] Tick: In game development, "tick" is a common term used to represent the time step in the game engine or game world. Specifically, "tick" refers to the time interval between each frame of the game engine, usually in milliseconds (ms). In each tick, the game engine updates the status of various objects, characters, animations, etc. in the game world to ensure the operation and performance of the game. Each object or character in the game will be updated in each tick, including position, rotation, animation status, collision detection, etc. The game engine calculates the movement and interaction of objects based on the time interval of each tick, so as to achieve the continuous operation and interactive effect of the game. In game development, setting the tick interval reasonably is crucial to the performance and performance of the game. A shorter tick interval can improve the smoothness and accuracy of the game, but it will also increase the computational burden; while a longer tick interval may cause the game to run less smoothly or accurately. In summary, "tick" is an important concept in game development, which is used to represent the time step in the game engine or game world, affecting the operation and performance of the game.

[0082] With the development of online games, multiplayer online battles have become possible. Players can fight with other players in real time, which increases the complexity and sociality of the battle system. In order to achieve a realistic and immersive combat experience, a physics engine is used to simulate the combat performance of attackers and attacked, such as knockback effects. When multiple players use skills with knockback effects to attack the same target object, such as the Nian Beast, the performance of the Nian Beast will be inconsistent on the clients of each player. For example, if players A, B, and C use skills with knockback effects to attack the Nian Beast M at the same time, Figure 1 FIG. 1 is a schematic diagram of a target object repelling direction in the related art. Figure 1 As shown, on A's client, the Nian beast was repelled in the direction of B; while on the client side of B, the Nian beast was repelled in the direction of C; In addition, since most servers do not have a physics engine, when the Nian Beast is attacked by a skill that causes a knockback, it may be knocked back into an obstacle or get stuck in an obstacle. Figure 2 FIG. 1 is a schematic diagram of a target object being stuck in an obstacle in the related art. Figure 2 As shown in the figure, when player P uses a skill with knockback to attack the target object, Nian Beast M, Nian Beast M is knocked back and moves along In the direction of the obstacle, if the repulsion distance is 2 meters, and the Nian beast M is 1.5 meters away from the obstacle |MC|, since the server does not have a physics engine, that is, there is no physical data of the obstacle, it is impossible to detect and determine the existence of the obstacle. Then the Nian beast will eventually stop at point D |MD| = 2 meters, resulting in the problem that the Nian beast enters the interior of the obstacle or gets stuck in the obstacle.

[0083] If physical data is placed on the server to calculate physical collisions, there are two fatal problems: one is the server network bandwidth delay problem. Since physical calculations are usually computationally intensive tasks, placing them on the server for calculation may increase network latency. Players may experience untimely feedback or freezes during combat, which seriously affects the gaming experience. The server must synchronize the position and orientation of the repelled Nian beast to all player clients within the AOI range for each tick. A large amount of synchronization data needs to be transmitted between the server and the client, which will also increase network bandwidth consumption, which may cause network congestion, data loss or delay, and affect real-time interaction and combat experience between players. The other is the server load problem. A large amount of physical calculations will increase the server load, cause server performance to degrade, and even cause server crashes or delays. This will affect the gaming experience of other players, causing the game to be unstable or unable to run properly.

[0084] Therefore, there is an urgent need for a method for determining the position of a target object in a game scene to solve the problem of inconsistent positions of target objects in the game scene, reduce game delays and improve the user's gaming experience.

[0085] Based on this, an embodiment of the present application provides a method for determining the position of a target object in a game scene, and the method is applied to a server, and the method includes: receiving multiple attack requests for the target object sent by multiple clients; determining a first attack request as a reference and a target client to which the first attack request belongs from the multiple attack requests; sending first information to the target client, the first information being used to instruct the target client to determine a repulse position of the target object; the repulse position being the position to which the target object moves after being attacked by the first attack request; receiving the repulse position sent by the target client, and sending second information carrying the repulse position to other clients in an area of ​​interest, the second information being used to instruct any other client to display the target object at the repulse position on its own client.

[0086] Embodiment 1:

[0087] Figure 3 A schematic diagram of a method for determining the position of a target object in a game scene provided in some embodiments of the present application. Figure 3 As shown, the process includes:

[0088] S301: receiving multiple attack requests sent by multiple clients for a target object; determining a first attack request used as a reference and a target client to which the first attack request belongs from the multiple attack requests.

[0089] The method in the embodiment of the present application is applied to an electronic device, wherein the electronic device is a server.

[0090] Due to differences in network delays and client processing time, multiple clients may send attack requests for the same target object almost at the same time, resulting in inconsistent repulsion directions and repulsion positions of the target object. In order to solve the problem of inconsistent positions of target objects in game scenes, reduce game delays and improve the user's gaming experience, a priority repulser mechanism is provided in an embodiment of the present application. When there are multiple clients sending multiple attack requests for the same target object almost at the same time, the server can receive multiple attack requests for the target object sent by multiple clients, and determine the first attack request as a reference from the multiple attack requests, as well as the client to which the first attack request belongs, namely the target client. In order to enable the target client to determine the repulsion position of the target object, the network bandwidth delay of the server is reduced, and the load on the server is reduced.

[0091] Specifically, for example, there are clients A, B, C, D, and the target object Nian Beast M within the AOI. Among them, clients A, B, and C send attack requests to the server for the target object Nian Beast M almost at the same time. was repelled in the direction of B; while on the client side of B, the Nian beast was repelled in the direction of C; In order to ensure that the repelling position of the target object is consistent, in the embodiment of the present application, the server can determine the first attack request as a reference from multiple attack requests according to the time when the attack request is received. For example, the server receives the attack request of client B the earliest, then the client B to which the first attack request belongs can be determined as the target client, that is, the priority repellent of the target object Nian beast M is set to the target client B.

[0092] S302: Sending first information to the target client, where the first information is used to instruct the target client to determine a repulse position of the target object; the repulse position is a position to which the target object moves after being attacked by the first attack request.

[0093] In order to reduce the load of the server and determine the repulse position of the target object, in an embodiment of the present application, the server sends a first message to the target client, and the first message is used to instruct the target client to determine the repulse position of the target object, which is the position to which the target object moves after being attacked by the first attack request.

[0094] For example, Figure 4 A schematic diagram of a repulsion position is provided for some embodiments of the present application. Figure 4 As shown, the target object Nian Beast M moves according to the attack of the first attack request of the client B. The moving direction is the direction of the connection between the local player of the client B and the target object Nian Beast M.

[0095] S303: Receive the knockback position sent by the target client, and send second information carrying the knockback position to other clients in the area of ​​interest, wherein the second information is used to instruct any other client to display the target object at the knockback position on its own client.

[0096] In order to ensure the consistency of the position of the target object in each client in the game, the server can receive the knockback position sent by the target client and synchronize the knockback position to other clients in the area of ​​interest, that is, send the second information carrying the knockback position to other clients in the area of ​​interest, and the second information is used to instruct any other client to display the target object at the knockback position on its own client. Among them, the area of ​​interest can be an area within a preset radius with the target object as the core, which can be freely set according to actual needs, and this application does not limit this. So that other clients in the area of ​​interest can display the target object at the knockback position on their own clients according to the knockback position sent by the server.

[0097] In the embodiment of the present application, the server sets a priority knockback mechanism to solve the problem of inconsistent performance when multiple client players attack the same target object at the same time. The server synchronizes the knockback position calculated by the target client to other clients to simulate the knockback effect. The calculation process of the knockback position of the target object does not need to be placed on the server, which solves the server load problem. In the entire knockback process, the server only synchronizes the knockback position once, which solves the server network bandwidth delay problem.

[0098] In an embodiment of the present application, a server receives multiple attack requests for a target object sent by multiple clients, determines a first attack request as a reference, and a target client; sends a first message to the target client to instruct the target client to determine the knockback position of the target object, thereby solving the server load problem; the server receives the knockback position sent by the target client, and sends a second message carrying the knockback position to other clients in the area of ​​interest, thereby instructing any other client to display the target object at the knockback position on its own client, thereby solving the problem of inconsistent position of the target object in the game scene and the problem of server network bandwidth delay, thereby reducing game delay and improving the user's gaming experience.

[0099] Embodiment 2:

[0100] In order to further ensure the consistency of the position of the target object in the game scene and improve the user's gaming experience, based on the above embodiment, in the embodiment of the present application, the determining of the first attack request as a reference from the multiple attack requests includes:

[0101] marking a timestamp on any attack request according to a time at which any attack request is received;

[0102] The attack request corresponding to the earliest timestamp is determined as the first attack request used as a reference.

[0103] Taking the above example, clients A, B, and C in the AOI range use knockback skills to attack the target object Nian Beast M at the same time. After receiving the requests from clients A, B, and C, the server will synchronize the knockback displacement effect in sequence. The client Nian Beast M in the AOI range is first knocked back by the local player of client A, and before the knockback effect is completed, it is knocked back by the local player of client B, and then by the local player of client C. If the network delay between the server and the client is added, the chaos will be further amplified. In this case, the server needs a mechanism to decide which client's request will be executed first.

[0104] In an embodiment of the present application, the server marks a timestamp on any attack request according to the time when the attack request is received, and then determines the processing order of multiple attack requests based on the timestamp, and determines the attack request corresponding to the earliest timestamp as the first attack request for reference, ensuring that all clients can eventually synchronize to the same game state.

[0105] In an embodiment of the present application, a timestamp is marked on any attack request according to the time when the attack request is received; the attack request corresponding to the earliest timestamp is determined as the first attack request used as a reference, ensuring that all clients can eventually synchronize to the same game state, further ensuring the consistency of the position of the target object in the game scene, and improving the user's gaming experience.

[0106] Embodiment 3:

[0107] In order to further ensure the consistency of the position of the target object in the game scene and improve the user's gaming experience, based on the above embodiments, in the embodiment of the present application, the method further includes:

[0108] After the attack duration of the first attack request is reached, a second attack request serving as a reference is determined from the attack requests that have not yet reached the attack duration; the attack request that has not yet reached the attack duration is an attack request that has not yet reached the attack duration among the multiple attack requests, and / or an attack request that is newly added within the attack duration of the first attack request.

[0109] Taking the above example, clients A, B, and C in the AOI range use knockback skills to attack the target object Nian Beast M at the same time. After receiving the requests from clients A, B, and C, the server will synchronize the knockback displacement effect in sequence. The client Nian Beast M in the AOI range is first knocked back by the local player of client A, and before the knockback effect is completed, it is knocked back by the local player of client B, and then by the local player of client C. If the network delay between the server and the client is added, the chaos will be further amplified. In this case, the server needs a mechanism to decide which client's request will be executed first.

[0110] Figure 5 A time diagram of multiple attack requests provided in some embodiments of the present application. Figure 5 As shown, after the attack duration of the first attack request is reached, a second attack request serving as a reference is determined from the attack requests that have not yet reached the attack duration; the attack request that has not yet reached the attack duration is an attack request that has not yet reached the attack duration among multiple attack requests, and / or an attack request that is newly added within the attack duration of the first attack request.

[0111] In an embodiment of the present application, after the attack duration of the first attack request is reached, a second attack request is determined as a reference from the attack requests that have not yet reached the attack duration; the attack request that has not yet reached the attack duration is an attack request that has not yet reached the attack duration among multiple attack requests, and / or an attack request newly added within the attack duration of the first attack request, further ensuring the consistency of the position of the target object in the game scene and improving the user's gaming experience.

[0112] Embodiment 4:

[0113] In order to further ensure the position consistency of the target object in the game scene and improve the user's gaming experience, based on the same technical concept, on the basis of the above embodiments, in an embodiment of the present application, a method for determining the position of the target object in the game scene is provided, and the method is applied to the client. Figure 6 A schematic diagram of another process for determining the position of a target object in a game scene provided in some embodiments of the present application. Figure 6 The process shown includes:

[0114] S601: In response to an attack request initiated by a local player against a target object, the attack request is sent to a server.

[0115] The method in the embodiment of the present application is applied to an electronic device, wherein the electronic device is a client device, such as a mobile phone, a PC, etc.

[0116] S602: Receive first information sent by the server, where the first information is sent by the server to a target client to which the first attack request belongs after the server determines a first attack request as a reference from multiple attack requests for the target object.

[0117] S603: Determine the repulse position of the target object after being attacked by the attack request, and display the target object at the repulse position on the client.

[0118] S604: Send the knockback position to the server; the server is used to send second information carrying the knockback position to other clients in the area of ​​interest; the second information is used to instruct any other client to display the target object at the knockback position on its own client.

[0119] The method in the embodiment of the present application corresponds to the method in the above-mentioned embodiment 1. The specific execution process can refer to the above-mentioned embodiment and will not be repeated here.

[0120] In an embodiment of the present application, a server receives multiple attack requests for a target object sent by multiple clients, determines a first attack request as a reference, and a target client; sends a first message to the target client to instruct the target client to determine the knockback position of the target object, thereby solving the server load problem; the server receives the knockback position sent by the target client, and sends a second message carrying the knockback position to other clients in the area of ​​interest, thereby instructing any other client to display the target object at the knockback position on its own client, thereby solving the problem of inconsistent position of the target object in the game scene and the problem of server network bandwidth delay, thereby reducing game delay and improving the user's gaming experience.

[0121] Embodiment 5:

[0122] In order to solve the server load problem and network bandwidth delay problem, based on the above embodiments, in the embodiment of the present application, the step of determining the repulse position of the target object after being attacked by the attack request includes:

[0123] Determine a knockback direction according to the position of the local player and the initial position of the target object, and determine an attack distance according to an attack action corresponding to the attack request;

[0124] Determine an initial knockback position according to the initial position, the knockback direction and the attack distance;

[0125] The knockback position of the target object is determined by using a collision detection function according to the initial position and the initial knockback position.

[0126] The physical data does not need to be put on the server, and the knockback collision detection algorithm is performed on the client, so there will be no server load problem. In addition, the server only synchronizes the final knockback position once during the entire knockback process, which will not cause the server network bandwidth delay problem mentioned above.

[0127] On the priority knockback client, i.e. the target client, collision detection needs to be performed based on the skill's knockback distance and the scene's physical data to calculate the final knockback position:

[0128] Figure 7Another schematic diagram of the knockback position of a target object provided in some embodiments of the present application. Assume that the knockback skill requires the attacker to be knocked back S (cm) within t (seconds), and the client timestamp when the knockback skill occurs is T S (seconds), the world coordinate of the first player to be repelled is Pos P , the world coordinate of the attacked M is Pos M , the final knockback position is Pos M ', the final knockback position can be determined according to the UE5 collision detection function LineTrace SingleByChannel, and the starting point and end point of the function are determined. The starting point is the attacked position Pos_M (that is, the position of the Nian beast M), and the end point is the point Pos_M of the attacked person in the direction of the line connecting the priority knockbacker and the attacked person. E , execute the physical collision algorithm of all Nian beasts to obtain the correct repulse position to ensure that the attacked person will not be hit into the obstacle.

[0129] So Where |Pos M Pos P | is the distance between the priority knockback player P and the attacked player M, the attacked player is knocked back S (cm), and the client timestamp when the knockback skill occurs is T S (seconds), the world coordinate of the first player to be repelled is Pos P , the world coordinate of the attacked M is Pos M .

[0130] The final knockback position is:

[0131]

[0132] Example: The stick attack skill knocks the target 5 meters away within 3 seconds.

[0133] The client timestamp when the knockback skill occurs is: 1703485825

[0134] The world coordinates of the priority repellent P are (10, 20, 2).

[0135] The world coordinates of the attacked M are (15, 25, 2). There is an obstacle 3 meters away from the attacked M in the direction of the PM line. Then according to the final position

[0136]

[0137]

[0138] In an embodiment of the present application, the client determines the repulse direction according to the position of the local player and the initial position of the target object, determines the attack distance according to the attack action corresponding to the attack request; determines the initial repulse position according to the initial position, the repulse direction and the attack distance; and determines the repulse position of the target object using a collision detection function based on the initial position and the initial repulse position, thereby solving the server load problem and network bandwidth delay problem while avoiding the attacker from being stuck in an obstacle.

[0139] Embodiment 6:

[0140] In order to enhance the visual effect of the game and the player's sense of immersion and make the battle appear more dynamic and realistic, based on the above embodiments, in the embodiment of the present application, the display of the target object at the knockback position on the client itself includes:

[0141] Determine a knockback trajectory according to the initial position, the knockback position and the attack duration corresponding to the attack action; the knockback trajectory is a parabola;

[0142] Determine the real-time position of the target object corresponding to each time step in the parabola;

[0143] The target object is displayed according to the real-time position until the real-time position is the knockback position.

[0144] Prioritize the knockback client to perform the knockback effect on the target object, such as the Nian Beast M. Figure 8 A schematic diagram of a repulsion trajectory of a target object provided in some embodiments of the present application.

[0145] The attacked person moves from Pos_M to Pos_M' according to the calculation, such as Figure 8 Black line segments, in order to enhance the visual effect of the game and the player's immersion, and make the battle appear more dynamic and realistic, in the embodiment of the present application, vertical displacement is added on the basis of horizontal displacement, so that the repulse effect of the attacked person is shown as follows Figure 8 The blue curve in the figure is a parabola. The purpose is to make the knockback effect more three-dimensional and in line with the laws of physics. For example, being knocked away by an attacker can make the player feel that the game world is more real.

[0146] Then, the client needs to calculate the coordinates Pos of the attacker for each tick M_T and display it.

[0147] Assume that the current client timestamp is T C (seconds), the acceleration due to gravity is g, and according to the parameter settings in the above embodiment, the horizontal speed V0 of the attacker being knocked away can be calculated according to the following formula:

[0148]

[0149] The horizontal displacement of the victim is determined according to the following formula:

[0150]

[0151] Determine the victim's total vertical height using the following formula:

[0152]

[0153] The vertical flying speed V1 is calculated according to the following formula:

[0154]

[0155] The client timestamp is T C (seconds), the height of the attacked person is H C :

[0156]

[0157] In summary, the coordinates Pos of the attacked person at each tick can be calculated M_T for:

[0158]

[0159] when hour,

[0160]

[0161] when hour,

[0162]

[0163] According to the above example parameters, the acceleration due to gravity g = 9.8 m / s 2 ,The following is a specific example to further illustrate the coordinate calculation process of the victim. The current client timestamp T C is 1703485827, and the client timestamp when the knockback skill occurs is T S (seconds). Calculate the world coordinates Pos of the attacked M according to the above formula M_T :

[0164]

[0165] Therefore

[0166]

[0167] In an embodiment of the present application, a knockback trajectory is determined based on the initial position of the attacked, the knockback position, and the attack duration corresponding to the attack action; and the knockback trajectory is a parabola; the real-time position of the target object corresponding to each time step in the parabola is determined; the target object is displayed according to the real-time position until the real-time position is the knockback position, which enhances the visual effects of the game and the player's sense of immersion, making the battle appear more dynamic and realistic.

[0168] Embodiment 7:

[0169] In order to further enhance the visual effects of the game and the player's sense of immersion and make the battle appear more dynamic and realistic, based on the above embodiments, in the embodiment of the present application, the method further includes:

[0170] If the first message sent by the server is not received, the subsequent step of determining the repulse position of the target object is not performed;

[0171] If the first information sent by the server is not received but the second information sent by the server is received, the target object is displayed at the knockback position on the client side.

[0172] If the first message sent by the server is not received, it means that the current client is another non-priority repellent client, and the subsequent step of determining the repelling position of the target object will not be performed. If the first message sent by the server is not received and the second message sent by the server is received, it means that the current client is another non-priority repellent client in the area of ​​interest. Since the user of the own client can see the attacked, and the attacked is repelled by the user of the target client of the priority repellent, the target object can be displayed at the repelling position on the own client, further enhancing the visual effects of the game and the player's immersion, making the battle appear more dynamic and realistic. Simulation of the repelling effect of the attacked on other non-priority repellent clients: First, record the final repelling position Pos of the target object (such as the Nian Beast M) synchronized from the server on the local client. M_S , record the client timestamp at this time as T S , record the world coordinates of the priority repellent B synchronized by the server at this time as Pos P , then T C The coordinates of the victim at the time of the timestamp M_T The calculation process is similar to that in the target client.

[0173] The following is a specific example to further illustrate the process of repelling the attacker of other non-priority repellent clients.

[0174] As in the above embodiment, when hour:

[0175]

[0176] when hour:

[0177]

[0178] When T C -T S = t, Pos M_T =Pos M_S , to ensure that all clients are consistent in the position of the attacked at the end. It should be noted that due to the difference in server network synchronization delay, there may be a slight deviation in the Pos_P and Pos_M synchronized by the server to each client.

[0179] The following is a more specific example to further illustrate the repulsion process of other non-priority repulser clients. For example, the example parameters in the above embodiment are gravitational acceleration g = 9.8 m / s 2 , the current client timestamp is 1703485826, calculate the world coordinates Pos of the victim M M_T The process is as follows:

[0180] T C -T S =1703485826-1703485825=1;

[0181] Therefore

[0182]

[0183]

[0184] In an embodiment of the present application, if the first message sent by the server is not received, the subsequent step of determining the repulse position of the target object will not be performed; if the first message sent by the server is not received and the second message sent by the server is received, the target object is displayed at the repulse position on its own client, further enhancing the visual effects of the game and the player's sense of immersion, making the battle appear more dynamic and realistic.

[0185] Embodiment 8:

[0186] In order to enhance the visual effects of the game and the player's sense of immersion and make the battle appear more dynamic and realistic, based on the above embodiments, in the embodiment of the present application, the method further includes:

[0187] After receiving the second information sent by the server, the relative position of the local player is determined according to the initial position of the target object, the knockback position and the position of the local player; and the position of the local player is updated to the relative position and displayed.

[0188] Since after the attack duration of the first attack request is reached, a second attack request serving as a reference can be determined from the attack requests that have not yet reached the attack duration, a non-target client, i.e., a non-priority repulser client, may be a client that initiates a second attack request after the first attack request. In order to ensure the gaming experience of other non-priority repulser clients participating in the attack and the continuity of the second attack, in an embodiment of the present application, one's own displacement performance can be simulated in other non-priority repulser clients, and the condition that needs to be met is that the non-priority repulser client participates in the attack. Fig. 9 A schematic diagram of the relative positions of local players provided in some embodiments of the present application. Fig. 9 As shown, in the non-priority repellent client P1, the position of the attacked (such as: Nian beast M) changes from Pos M Move to Pos M_S , if the local player P1 is also using the continuous attack skill to attack the Nian Beast M, since P1 is not the priority repellent at this time, the repelling effect of B will not take effect, and the attacked player will still follow the same order from Pos M Move to Pos M_S In order to ensure the performance of the local player P1's own attack, the position of the local player P1 will follow the attacked person (such as: Nian Beast M) to make relative movements to maintain the relative position relationship.

[0189] Specifically, for example, the position of local player P1 when attacking is: Pos P1 , the position of the attacked person: Pos M .

[0190] The position of the attacked person at any time is Pos M_T , then the position of the local player P1 at any time is Pos P1_T It can be determined according to the following formula:

[0191] Pos P1_T =Pos P1 +(Pos M_T -Pos M )

[0192] If the non-priority repulser client is not participating in the attack, then this step is not necessary.

[0193] In an embodiment of the present application, after receiving the second information sent by the server, the relative position of the local player is determined based on the initial position and the knockback position of the target object and the position of the local player; the position of the local player is updated to a relative position and displayed to ensure the gaming experience of other non-priority knockback clients participating in the attack, thereby enhancing the visual effects of the game and the player's sense of immersion.

[0194] The entire process of the method for determining the position of a target object in a game scene in an embodiment of the present application is further illustrated below using a specific example. Fig.10 A schematic diagram of an interactive process for determining the position of a target object in a game scene provided in some embodiments of the present application. Fig.10 As shown, the process includes: multiple clients use knockback skills to attack the Nian Beast M; the server receives the request, confirms the client of the priority knockbacker, and synchronizes it with other player clients; other player clients receive the priority knockbacker client of the Nian Beast M, and determine whether they are the priority knockbacker client; if not, they determine themselves as other non-priority knockbacker clients, and record the priority knockbacker of the Nian Beast M synchronized from the server; if so, they determine themselves as the priority knockbacker client, and calculate the final knockback position according to the knockback distance and physical data using the obstacle collision detection algorithm; the priority knockbacker client performs the knockback effect of the Nian Beast M, and synchronizes the final knockback position of the Nian Beast M to the server. Other non-priority knockbacker clients record the final knockback position of the Nian Beast M synchronized from the server. Other non-priority knockbacker clients simulate the knockback performance of the Nian Beast M based on the previously recorded priority knockbacker and knockback position data. It should be noted that the implementation process of this example is only one implementation method of the method for determining the position of the target object in the game scene of the present application, and is not limited to this implementation process. The specific implementation process can refer to the above embodiments, and the repeated parts will not be repeated here.

[0195] In an embodiment of the present application, a server receives multiple attack requests for a target object sent by multiple clients, determines a first attack request as a reference, and a target client; sends a first message to the target client to instruct the target client to determine the knockback position of the target object, thereby solving the server load problem; the server receives the knockback position sent by the target client, and sends a second message carrying the knockback position to other clients in the area of ​​interest, thereby instructing any other client to display the target object at the knockback position on its own client, thereby solving the problem of inconsistent position of the target object in the game scene and the problem of server network bandwidth delay, thereby reducing game delay and improving the user's gaming experience.

[0196] Embodiment 9:

[0197] Based on the same technical concept, on the basis of the above embodiments, in an embodiment of the present application, a device for determining the position of a target object in a game scene is provided, and the device is applied to a server. Fig.11 A schematic diagram of a device for determining the position of a target object in a game scene provided in some embodiments of the present application. Fig.11 As shown, the device comprises:

[0198] The receiving module 1101 is configured to receive multiple attack requests sent by multiple clients against a target object; determine a first attack request as a reference from the multiple attack requests, and a target client to which the first attack request belongs;

[0199] The sending module 1102 is used to send first information to the target client, where the first information is used to instruct the target client to determine a repulse position of the target object; the repulse position is a position to which the target object moves after being attacked by the first attack request;

[0200] The receiving module 1101 is further configured to receive the knockback position sent by the target client;

[0201] The sending module 1102 is further configured to send second information carrying the knockback position to other clients in the area of ​​interest, wherein the second information is configured to instruct any other client to display the target object at the knockback position on its own client.

[0202] In a possible implementation, the receiving module 1101 is specifically configured to mark a timestamp on any attack request according to a receiving time of any attack request; and determine the attack request corresponding to the earliest timestamp as the first attack request used as a reference.

[0203] In a possible implementation, the receiving module 1101 is further used to determine, after the attack duration of the first attack request is reached, a second attack request serving as a reference from attack requests that have not yet reached the attack duration; the attack request that has not yet reached the attack duration is an attack request that has not yet reached the attack duration among the multiple attack requests, and / or an attack request newly added within the attack duration of the first attack request.

[0204] In an embodiment of the present application, a server receives multiple attack requests for a target object sent by multiple clients, determines a first attack request as a reference, and a target client; sends a first message to the target client to instruct the target client to determine the knockback position of the target object, thereby solving the server load problem; the server receives the knockback position sent by the target client, and sends a second message carrying the knockback position to other clients in the area of ​​interest, thereby instructing any other client to display the target object at the knockback position on its own client, thereby solving the problem of inconsistent position of the target object in the game scene and the problem of server network bandwidth delay, thereby reducing game delay and improving the user's gaming experience.

[0205] Embodiment 10:

[0206] Based on the same technical concept, on the basis of the above embodiments, in an embodiment of the present application, another device for determining the position of a target object in a game scene is provided, and the device is applied to a client. Fig.12 A schematic diagram of another device for determining the position of a target object in a game scene provided in some embodiments of the present application. Fig.12 As shown, the device comprises:

[0207] A sending module 1202, configured to respond to an attack request initiated by a local player against a target object and send the attack request to a server;

[0208] The receiving module 1201 is used to receive first information sent by the server, where the first information is sent by the server to a target client to which the first attack request belongs after the server determines a first attack request as a reference from multiple attack requests for the target object; determine a repulse position of the target object after being attacked by the attack request, and display the target object at the repulse position on its own client;

[0209] The sending module 1202 is further used to send the knockback position to the server; the server is used to send second information carrying the knockback position to other clients in the area of ​​interest; the second information is used to instruct any other client to display the target object at the knockback position on its own client.

[0210] In a possible implementation, the receiving module 1201 is also used to not perform the subsequent step of determining the repulse position of the target object if the first message sent by the server is not received; if the first message sent by the server is not received and the second message sent by the server is received, displaying the target object at the repulse position on its own client.

[0211] In a possible implementation, the receiving module 1201 is specifically used to determine the knockback direction according to the position of the local player and the initial position of the target object, and determine the attack distance according to the attack action corresponding to the attack request; determine the initial knockback position according to the initial position, the knockback direction and the attack distance; and determine the knockback position of the target object using a collision detection function based on the initial position and the initial knockback position.

[0212] In a possible implementation, the receiving module 1201 is further used to determine the relative position of the local player based on the initial position of the target object and the knockback position and the position of the local player after receiving the second information sent by the server; and update the position of the local player to the relative position and display it.

[0213] In a possible implementation, the receiving module 1201 is specifically used to determine a repulse trajectory according to the initial position, the repulse position and the attack duration corresponding to the attack action; the repulse trajectory is a parabola; determine the real-time position of the target object corresponding to each time step in the parabola; and display the target object according to the real-time position until the real-time position is the repulse position.

[0214] In the embodiments of the present application,

[0215] Embodiment 11:

[0216] Based on the same inventive concept and on the basis of the above embodiments, in an embodiment of the present application, an electronic device is provided, which can realize the functions of the information disclosure device described above. Fig.13 A schematic diagram of the structure of an electronic device provided in some embodiments of the present application. Fig.13 As shown, the electronic device includes: a processor 1301, a communication interface 1302, a memory 1303 and a communication bus 1304, wherein the processor 1301, the communication interface 1302, and the memory 1303 communicate with each other through the communication bus 134;

[0217] The memory 1303 stores a computer program. When the program is executed by the processor 1301, the processor 1301 executes the steps included in the method for determining the position of a target object in a game scene as described in any of the above embodiments.

[0218] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0219] The communication interface 1302 is used for communication between the above electronic device and other devices.

[0220] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0221] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (Network Processor, NP), etc.; it can also be a digital signal processing processor (Digital Signal Processing, DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.

[0222] In an embodiment of the present application, a server receives multiple attack requests for a target object sent by multiple clients, determines a first attack request as a reference, and a target client; sends a first message to the target client to instruct the target client to determine the knockback position of the target object, thereby solving the server load problem; the server receives the knockback position sent by the target client, and sends a second message carrying the knockback position to other clients in the area of ​​interest, thereby instructing any other client to display the target object at the knockback position on its own client, thereby solving the problem of inconsistent position of the target object in the game scene and the problem of server network bandwidth delay, thereby reducing game delay and improving the user's gaming experience.

[0223] Embodiment 12:

[0224] Based on the same inventive concept, on the basis of the above embodiments, in an embodiment of the present application, a computer-readable storage medium is provided, in which a computer program executable by a processor is stored. When the program runs on the processor, the processor executes the steps included in the method for determining the position of a target object in a game scene as described in any of the above embodiments.

[0225] The above-mentioned computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor in the electronic device, including but not limited to magnetic storage such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc., optical storage such as CD, DVD, BD, HVD, etc., and semiconductor storage such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD), etc.

[0226] Based on the same inventive concept, the embodiment of the present application also provides a computer program product, which includes: computer program code, when the computer program code is run on a computer, the computer executes the steps of the method for determining the position of a target object in a game scene as described above. Since the principle of solving the problem by the above computer program product is similar to the method for determining the position of a target object in the above game scene, the implementation of the above computer program product can refer to the implementation of the method, and the repeated parts will not be repeated.

[0227] In an embodiment of the present application, a server receives multiple attack requests for a target object sent by multiple clients, determines a first attack request as a reference, and a target client; sends a first message to the target client to instruct the target client to determine the knockback position of the target object, thereby solving the server load problem; the server receives the knockback position sent by the target client, and sends a second message carrying the knockback position to other clients in the area of ​​interest, thereby instructing any other client to display the target object at the knockback position on its own client, thereby solving the problem of inconsistent position of the target object in the game scene and the problem of server network bandwidth delay, thereby reducing game delay and improving the user's gaming experience.

[0228] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0229] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0230] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0231] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0232] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for determining the position of a target object in a game scene, characterized in that: The method is applied to a server, and the method comprises: Receive multiple attack requests against a target object sent by multiple clients; Determine a first attack request as a reference from the multiple attack requests, and a target client to which the first attack request belongs; Sending first information to the target client, wherein the first information is used to instruct the target client to determine a repulse position of the target object; the repulse position is a position to which the target object moves after being attacked by the first attack request; The knockback position sent by the target client is received, and second information carrying the knockback position is sent to other clients in the area of ​​interest, wherein the second information is used to instruct any other client to display the target object at the knockback position on its own client.

2. The method according to claim 1, characterized in that The determining a first attack request as a reference from the multiple attack requests includes: marking a timestamp on any attack request according to a time at which any attack request is received; The attack request corresponding to the earliest timestamp is determined as the first attack request used as a reference.

3. The method according to claim 1, characterized in that The method further comprises: After the attack duration of the first attack request is reached, a second attack request serving as a reference is determined from the attack requests that have not yet reached the attack duration; the attack request that has not yet reached the attack duration is an attack request that has not yet reached the attack duration among the multiple attack requests, and / or an attack request that is newly added within the attack duration of the first attack request.

4. A method for determining the position of a target object in a game scene, characterized in that: The method is applied to a client, and the method comprises: In response to an attack request initiated by a local player against a target object, sending the attack request to a server; receiving first information sent by the server, where the first information is sent by the server to a target client to which the first attack request belongs after the server determines a first attack request as a reference from among multiple attack requests for the target object; Determine a repulsive position of the target object after being attacked by the attack request, and display the target object at the repulsive position on the client side; The knockback position is sent to the server; the server is used to send second information carrying the knockback position to other clients in the area of ​​interest; the second information is used to instruct any other client to display the target object at the knockback position on its own client.

5. The method according to claim 4, characterized in that The method further comprises: If the first message sent by the server is not received, the subsequent step of determining the repulse position of the target object is not performed; If the first information sent by the server is not received but the second information sent by the server is received, the target object is displayed at the knockback position on the client side.

6. The method according to claim 4, characterized in that The determining the repulsion position of the target object after being attacked by the attack request includes: Determine a knockback direction according to the position of the local player and the initial position of the target object, and determine an attack distance according to an attack action corresponding to the attack request; Determine an initial knockback position according to the initial position, the knockback direction and the attack distance; The knockback position of the target object is determined by using a collision detection function according to the initial position and the initial knockback position.

7. The method according to claim 5, characterized in that The method further comprises: After receiving the second information sent by the server, the relative position of the local player is determined according to the initial position of the target object, the knockback position and the position of the local player; and the position of the local player is updated to the relative position and displayed.

8. The method according to any one of claims 4 to 7, characterized in that: The displaying on the client terminal that the target object is located at the repulse position includes: Determine a repulse trajectory according to the initial position, the repulse position and the attack duration corresponding to the attack action; the repulse trajectory is a parabola; Determine the real-time position of the target object corresponding to each time step in the parabola; The target object is displayed according to the real-time position until the real-time position is the knockback position.

9. A device for determining the position of a target object in a game scene, characterized in that: The device is applied to a server, and comprises: A receiving module, configured to receive multiple attack requests sent by multiple clients against a target object; determine a first attack request as a reference from the multiple attack requests, and a target client to which the first attack request belongs; a sending module, configured to send first information to the target client, wherein the first information is used to instruct the target client to determine a repulse position of the target object; the repulse position is a position to which the target object moves after being attacked by the first attack request; The receiving module is further used to receive the knockback position sent by the target client; The sending module is further used to send second information carrying the knockback position to other clients in the area of ​​interest, wherein the second information is used to instruct any other client to display the target object at the knockback position on its own client.

10. A device for determining the position of a target object in a game scene, characterized in that: The device is applied to a client, and comprises: A sending module, configured to respond to an attack request initiated by a local player against a target object and send the attack request to a server; a receiving module, configured to receive first information sent by the server, wherein the first information is sent by the server to a target client to which the first attack request belongs after the server determines a first attack request as a reference from multiple attack requests for the target object; determine a repulse position of the target object after being attacked by the attack request, and display the target object at the repulse position on its own client; The sending module is further used to send the knockback position to the server; the server is used to send second information carrying the knockback position to other clients in the area of ​​interest; the second information is used to instruct any other client to display the target object at the knockback position on its own client.

11. An electronic device, characterized in that: include: A memory for storing program instructions; A processor is used to call the program instructions stored in the memory, and execute the steps included in any one of the methods of claims 1-8 according to the obtained program instructions.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the method according to any one of claims 1 to 8.

13. A computer program product, characterized in that The computer program product comprises: a computer program code, and when the computer program code is run on a computer, the computer is enabled to execute the method according to any one of claims 1 to 8.