Game object control method and device, equipment, storage medium and product
By obtaining and analyzing user operation trajectory information, generating movement trajectory information of each part of the game object and generating move control instructions, the problem of a single control method of the game object is solved, more flexible operation and more consistent with user intentions are achieved, and the game's competitiveness and user experience are improved.
Patent Information
- Application Number
- CN202510548073.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-07-29
AI Technical Summary
The existing game object control method has a single operation method, fixed moves, and lacks flexibility.
By obtaining the user's operation track information on the game interface, the motion track information is generated based on the correlation relationship between the various parts of the game object, and the move control instructions are generated based on the motion track information, including calculating the motion track slope and preset angle, and performing collision detection to generate an interrupt command.
It improves the freedom of user operations and enriches the control methods of game objects, so that moves are no longer limited to fixed actions, and enhances the competitiveness of the game and user viscosity.
Smart Images

Figure CN120381670A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of games, and in particular, to a method, device, equipment, storage medium and product for controlling game objects. Background Art
[0002] Currently, the method for controlling game objects mainly triggers the moves emitted by the game objects through button operations, so that the game objects execute the corresponding moves. However, this method is only controlled by buttons, the operation method is relatively single, and the moves executed by the game objects are relatively fixed. Summary of the Invention
[0003] The present application provides a method, device, equipment, storage medium and product for controlling game objects to solve the problems in the prior art that the operation method is relatively single and the moves executed by the game objects are relatively fixed.
[0004] To achieve the above object, an embodiment of the present application provides a method for controlling a game object, including:
[0005] Obtaining operation trajectory information of a user on a game interface;
[0006] Based on the association relationship between the parts of the game object controlled by the user, generating the movement trajectory information of the parts of the game object according to the operation trajectory information;
[0007] Generating a move control instruction for the game object according to the movement trajectory information.
[0008] As an improvement of the above solution, the step of generating the movement trajectory information of the parts of the game object based on the association relationship between the parts of the game object controlled by the user and according to the operation trajectory information includes:
[0009] Regarding the operation trajectory information as the movement trajectory information of one part of the game object;
[0010] Based on the distance between the directly associated parts of the game object and the movement trajectory information of one part of the game object, sequentially obtaining the movement trajectory information of the directly associated parts of the game object.
[0011] As an improvement of the above solution, the step of sequentially obtaining the movement trajectory information of the directly associated parts of the game object based on the distance between the directly associated parts of the game object and the movement trajectory information of one part of the game object includes:
[0012] Based on the movement trajectory information of one part of the game object, calculating the movement trajectory slope of one part of the game object;
[0013] Based on the distance between directly associated parts of the game object, the preset angle between directly associated parts of the game object, and the slope of the movement trajectory of one of the parts of the game object, the movement trajectory information of the directly associated parts of the game object is obtained in sequence.
[0014] As an improvement to the above solution, the preset angle between the lower limb part of the game object and its associated part is obtained through the following steps:
[0015] Based on the trajectory point height between the game ground and the trajectory points in the operation trajectory information, the target posture of the game object is judged.
[0016] According to the target posture, the preset angle between the lower limb part and its associated part is determined.
[0017] As an improvement to the above solution, before generating the movement trajectory information of each part of the game object according to the operation trajectory information based on the association relationship between the parts of the game object controlled by the user, the game object control method further includes:
[0018] The game object is divided into a weapon part and / or a body part;
[0019] According to the connection relationship between the weapon part and / or the body part, the direct association relationship between the weapon part and / or the body part is obtained.
[0020] As an improvement to the above solution, the game object control method further includes:
[0021] According to the operation trajectory information, the attack distances between the weapon part of the game object and each part of the game object to be attacked are calculated;
[0022] According to the attack distances, collision detection is performed between the game object and the game object to be attacked;
[0023] In the case where it is detected that the game object collides with the game object to be attacked, a move interruption instruction of the game object is generated.
[0024] To achieve the above object, an embodiment of the present application further provides a game object control device, including:
[0025] An operation trajectory information acquisition module, configured to acquire the operation trajectory information of the user on the game interface;
[0026] A movement trajectory information generation module, configured to generate the movement trajectory information of each part of the game object according to the operation trajectory information based on the association relationship between the parts of the game object controlled by the user;
[0027] A game object control module, configured to generate a move control instruction for the game object according to the motion trajectory information.
[0028] To achieve the above object, an embodiment of the present application further provides a game object control device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the game object control method as described above is implemented.
[0029] To achieve the above object, an embodiment of the present application further provides a computer-readable storage medium. The computer-readable storage medium includes a stored computer program. Wherein, when the computer program runs, it controls the device where the computer-readable storage medium is located to execute the game object control method as described above.
[0030] To achieve the above object, an embodiment of the present application further provides a computer program product, including a computer program / instructions. When the computer program / instructions are executed by a processor, the game object control method as described above is implemented.
[0031] Compared with the prior art, a game object control method, device, device, storage medium, and product provided by an embodiment of the present application generate motion trajectory information of each part of the game object through the operation trajectory information of the user, and then generate corresponding move control instructions according to the motion trajectory information, so that each part of the game object follows the operation trajectory information of the user to generate the moves of the game object. This not only makes the user's operation more free, enriches the operation methods of game object control, but also makes the moves executed by the game object not limited to fixed moves, and the actions of the game object are more in line with the user's operations, ultimately improving the game competitiveness and user viscosity. Description of the Drawings
[0032] Figure 1 is a flowchart of a game object control method provided by an embodiment of the present application;
[0033] Figure 2 is a structural block diagram of a game object control device provided by an embodiment of the present application;
[0034] Figure 3 is a structural block diagram of a game object control device provided by an embodiment of the present application. Detailed Embodiments
[0035] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts belong to the scope of protection of the present application.
[0036] See Figure 1 , Figure 1 which is a flowchart of a game object control method provided by an embodiment of the present application. The game object control method includes:
[0037] S1. Obtain the operation trajectory information of the user on the game interface;
[0038] S2. Based on the association relationship between the parts of the game object controlled by the user, generate the movement trajectory information of the parts of the game object according to the operation trajectory information;
[0039] S3. Generate a move control instruction for the game object according to the movement trajectory information.
[0040] It can be understood that the user can control the game object in the game interface by operating on the game interface, that is, the operation of the user on the game terminal screen. That is to say, the game object is the object in the game interface controlled by the user; operations performed by the user on the game interface, such as swiping, will generate an operation trajectory. Generally, the operation trajectory of the user on the game interface can be captured through touch screen events, and then the operation trajectory information can be obtained.
[0041] In order to control the game object more flexibly, the game object is divided into parts. Based on the association relationship between the parts, the movement trajectory information of each part following the operation trajectory information is generated according to the operation trajectory information. Then, according to the movement trajectory information, a move control instruction for the game object is generated to control the game object to execute the move control instruction, which not only makes the user's operation more free, enriches the operation methods of game object control, but also makes the moves executed by the game object not limited to fixed moves, and the actions of the game object are more in line with the user's operations, ultimately improving the game competitiveness and user stickiness.
[0042] In an optional embodiment, before generating the movement trajectory information of the parts of the game object according to the operation trajectory information based on the association relationship between the parts of the game object controlled by the user, the game object control method further includes:
[0043] Divide the game object into a weapon part and / or a body part;
[0044] Based on the connection relationship between the weapon part and / or the body part, obtain the direct association relationship between the weapon part and / or the body part.
[0045] Exemplarily, if the game object only has body parts, the game object can be divided into a head part, a neck part, a torso part, a first upper limb part, a second upper limb part, a first lower limb part, and a second upper limb part. Of course, the present application is not limited to the above division method, and there can be other division methods, which are not specifically limited here.
[0046] Based on the connection relationship between each body part, obtain the association relationship between each body part; specifically, if the head part is connected to the neck part, the head part and the neck part have a direct association relationship; if the neck part is connected to the torso part, the neck part and the torso part have a direct association relationship; if the torso part is connected to the first upper limb part, the torso part and the first upper limb part have a direct association relationship; if the torso part is connected to the second upper limb part, the torso part and the second upper limb part have a direct association relationship; if the torso part is connected to the first lower limb part, the torso part and the first lower limb part have a direct association relationship; if the torso part is connected to the second lower limb part, the torso part and the second lower limb part have a direct association relationship.
[0047] Exemplarily, if the game object only has weapon parts, the game object can be divided into a first weapon part, a second weapon part, etc. Based on the connection relationship between each weapon part, obtain the association relationship between each weapon part. For example, if the first weapon part and the second weapon part are connected, the first weapon part and the second weapon part have a direct association relationship, which will not be elaborated here.
[0048] Exemplarily, if the game object has weapon parts and body parts, the game object can be divided into a head part, a neck-torso part (i.e., the neck part + the torso part), a lower limb part, a weapon part, a second upper limb part, and a first upper limb part holding the weapon, which can make the movement of the game object more in line with reality and the movement effects of the moves better. Of course, it is not limited to the above division method, and there can be other division methods, which will not be elaborated here. Based on the connection relationship between each weapon part, the connection relationship between the weapon part and the body part, and the connection relationship between each body part, obtain the direct association relationship between the weapon part and / or the body part. For example, if the weapon part is connected to the first upper limb part holding the weapon, the weapon part and the first upper limb part holding the weapon have a direct association relationship, which will not be elaborated here.
[0049] It should be noted that in the game object, there is a key body part, which is directly associated with the upper limb parts (including the first upper limb part and the second upper limb part) and the lower limb parts (including the first lower limb part and the second lower limb part). The key body part is the neck-trunk part or the trunk part.
[0050] In an optional embodiment, based on the association relationship between the parts in the game object controlled by the user, generating the motion trajectory information of the parts in the game object according to the operation trajectory information includes:
[0051] Taking the operation trajectory information as the motion trajectory information of one part of the game object;
[0052] Based on the distance between the directly associated parts in the game object and the motion trajectory information of one part of the game object, sequentially obtaining the motion trajectory information of the directly associated parts in the game object.
[0053] In the embodiment of the present application, taking the operation trajectory information as the motion trajectory information of one part of the game object, for example, as the motion trajectory information of part A, that is, the motion trajectory information of part B can be obtained according to the distance between part A and its directly associated part B and the motion trajectory information of part A; the motion trajectory information of part C can be obtained according to the distance between part B and its directly associated part C and the motion trajectory information of part B; the motion trajectory information of part D can be obtained according to the distance between part B and its directly associated part D and the motion trajectory information of part B, and so on, until the motion trajectory information of the last part in the game object is obtained.
[0054] In the embodiment of the present application, it can be directly set which part part A is specifically. Generally, it is default set as the weapon part. Of course, it is also determined which part part A is specifically according to the position of the first trajectory point in the operation trajectory information. For example, if the first trajectory point falls into the first upper limb part, then part A is the first upper limb part, or if the distance between the first trajectory point and the second upper limb part is the closest, then part A is the second upper limb part. The present application does not make specific limitations.
[0055] In an optional embodiment, based on the distance between the directly associated parts in the game object and the motion trajectory information of one part of the game object, sequentially obtaining the motion trajectory information of the directly associated parts in the game object includes:
[0056] Based on the motion trajectory information of one part of the game object, calculating the motion trajectory slope of one part of the game object;
[0057] Based on the distance between directly associated parts in the game object, the preset angle between directly associated parts in the game object, and the slope of the movement trajectory of one of the parts of the game object, the movement trajectory information of the directly associated parts in the game object is obtained in sequence.
[0058] It should be noted that, in order to improve the accuracy of each part following the operation trajectory, in the embodiments of the present application, the preset angle between each directly associated part is also combined to obtain the movement trajectory information.
[0059] In the embodiments of the present application, according to the position of the trajectory point in the movement trajectory information of a certain part, the slope of the movement trajectory of this part can be calculated, and this movement trajectory slope is preferably the average movement trajectory slope. Specifically, according to the position of the trajectory points in a piece of trajectory information, the slope between two adjacent trajectory points is calculated, and the average value of the calculated slopes is obtained to get the average slope; when the average slope > 0, it represents an ascending action, and when the average slope < 0, it represents a descending action. This trajectory information is operation trajectory information or movement trajectory information, and this average slope is the average operation trajectory slope or the average movement trajectory slope.
[0060] Exemplarily, a piece of trajectory information includes 1 to N trajectory points. From the 1st trajectory point to the Nth trajectory point, the first slope between two adjacent trajectory points is calculated:
[0061]
[0062] where k i,i-1 represents the first slope between the i-th trajectory point and the i - 1-th trajectory point, and (x i , y i ) represents the coordinates of the i-th trajectory point, and (x i-1 , y i-1 ) represents the coordinates of the i - 1-th trajectory point.
[0063] The sum of all the first slopes is divided by the number of adjacent points to obtain the average slope:
[0064]
[0065] where N represents the total number of trajectory points, k i,i-1 represents the first slope between the i-th trajectory point and the i - 1-th trajectory point, represents the average slope.
[0066] Exemplarily, for the case where the operation trajectory information is used as the movement trajectory information of part A, the operation trajectory slope (preferably the average operation trajectory slope) can be calculated according to the operation trajectory information, and the operation trajectory slope can be used as the trajectory slope of part A, or directly the operation trajectory information can be used as the movement trajectory information of part A to calculate the trajectory slope of part A.
[0067] For other parts except part A, after calculating the motion trajectory information of that part, the motion trajectory slope of that part can be calculated according to the position of the trajectory points in the motion trajectory information of that part; for the sake of simplicity in calculation, the motion trajectory slope of other parts can also be directly obtained according to the trajectory slope of part A. For example, if part A is the weapon part, multiplying the trajectory slope of the weapon part by a preset constant gives the motion trajectory slope of the key body part. Generally speaking, the motion amplitude of the key body part is smaller than that of the weapon part, and the preset constant is preferably 0.5.
[0068] Exemplarily, according to the distance between part A and its directly associated part B and the motion trajectory slope of part A, the motion trajectory information of part B is obtained; according to the distance between part B and its directly associated part C and the motion trajectory slope of part B, the motion trajectory information of part C is obtained; according to the distance between part B and its directly associated part D and the motion trajectory slope of part B, the motion trajectory information of part D is obtained, and so on, until the motion trajectory information of the last part in the game object is obtained.
[0069] In the embodiment of the present application, based on the distance between directly associated parts in the game object and the motion trajectory information of one of the parts in the game object, the motion trajectory information of the directly associated parts in the game object can be further obtained in sequence by combining the distance formula between two points.
[0070] In a specific example, the game object is divided into the following parts: head part, neck-trunk part, lower limb part, weapon part, second upper limb part, and the first upper limb part holding the weapon. Then, the weapon part is associated with the first upper limb part holding the weapon, the first upper limb part is associated with the neck-trunk part, and the neck-trunk part is respectively associated with the head part, the second upper limb part, and the lower limb part, forming the association relationship between the parts. That is to say, the first upper limb part moves following the weapon part, the neck-trunk part moves following the first upper limb part, and the head part, the second upper limb part, and the lower limb part move following the neck-trunk part respectively.
[0071] Then, by further combining the distance formula between two points, the motion trajectory information of each part can be obtained. Specifically:
[0072] Taking the operation trajectory information as the motion trajectory information of the weapon part, calculate the motion trajectory slope of the weapon part;
[0073] Combined with the distance formula between two points, based on the distance between the weapon part and the first upper limb part, the preset angle between the weapon part and the first upper limb part, the slope of the movement trajectory of the weapon part, and the position of the trajectory point in the movement trajectory information of the weapon part, calculate the position of the first upper limb part to form the movement trajectory information of the first upper limb part;
[0074] Combined with the distance formula between two points, based on the distance between the first upper limb part and the neck-trunk part, the preset angle between the first upper limb part and the neck-trunk part, the slope of the movement trajectory of the first upper limb part, and the position of the trajectory point in the movement trajectory information of the first upper limb part, calculate the position of the neck-trunk part to form the movement trajectory information of the neck-trunk part;
[0075] Combined with the distance formula between two points, based on the distance between the neck-trunk part and the head part, the preset angle between the neck-trunk part and the head part, the slope of the movement trajectory of the neck-trunk part, and the position of the trajectory point in the movement trajectory information of the neck-trunk part, calculate the position of the head part to form the movement trajectory information of the head part;
[0076] Combined with the distance formula between two points, based on the distance between the neck-trunk part and the second upper limb part, the preset angle between the neck-trunk part and the second upper limb part, the slope of the movement trajectory of the neck-trunk part, and the position of the trajectory point in the movement trajectory information of the neck-trunk part, calculate the position of the second upper limb part to form the movement trajectory information of the second upper limb part;
[0077] Combined with the distance formula between two points, based on the distance between the neck-trunk part and the lower limb part, the preset angle between the neck-trunk part and the lower limb part, the slope of the movement trajectory of the neck-trunk part, and the position of the trajectory point in the movement trajectory information of the neck-trunk part, calculate the position of the lower limb part to form the movement trajectory information of the lower limb part.
[0078] Exemplarily, for any trajectory point position in the movement trajectory information of the weapon part, that is, the weapon part position (x w , y w ), calculate any trajectory point position in the movement trajectory information of the first upper limb part, that is, the first upper limb part position (x u1 , y u2 ) through the following formula:
[0079]
[0080] In the formula, d1 represents the distance between the weapon part and the first limb part, kw represents the slope of the movement trajectory of the weapon part, and n1 represents the preset angle between the weapon part and the first upper limb part. Generally, there is no angle between the weapon part and the first upper limb part, so n1 is taken as 0. Of course, the position of the first upper limb part can be calculated by other methods, not limited to this formula.
[0081] Exemplarily, for any trajectory point position in the movement trajectory information of the first upper limb part, that is, the position of the first upper limb part (x u1 , y u2 ), the position of any trajectory point in the movement trajectory information of the neck-trunk part, that is, the position of the neck-trunk part (x b , y b ) is calculated by the following formula:
[0082]
[0083] In the formula, d2 represents the distance between the first upper limb part and the neck-trunk part, k u1 represents the slope of the movement trajectory of the first upper limb part, and n2 represents the expected angle between the first upper limb part and the neck-trunk part. This preset angle can be set in advance or obtained by extraction according to the actual situation. Specifically, when the user operates on the game interface, the angle between these two parts is obtained, and these two parts are linearized to obtain the angle. Of course, the position of the neck-trunk part can be calculated by other methods, not limited to this formula.
[0084] Among them, according to the trajectory point position in the movement trajectory information of the first upper limb part, the slope of the movement trajectory of the first upper limb part can be calculated, which can refer to the above calculation method and will not be elaborated here.
[0085] Exemplarily, for any trajectory point position in the movement trajectory information of the neck-trunk part, that is, the position of the neck-trunk part (x b , y b ), the position of any trajectory point in the movement trajectory information of the head part, that is, the position of the head part (x h , y h ) is calculated by the following formula:
[0086]
[0087] In the formula, d3 represents the distance between the neck-trunk part and the head part, k b represents the slope of the movement trajectory of the neck-trunk part, and n3 represents the expected angle between the neck-trunk part and the head part. Generally, there is no angle between the neck-trunk part and the head part, so n3 is taken as 0. Of course, the position of the head part can be calculated by other methods, not limited to this formula.
[0088] It is understandable that the head part and the neck-trunk part form the basic posture of the whole game object. The slope of the movement trajectory of the neck-trunk part is related to the slope of the operation trajectory, that is, the overall trajectory direction. To improve the simplicity of calculation, the slope of the movement trajectory of the neck-trunk part can be obtained according to the slope of the operation trajectory. For example, the slope of the movement trajectory of the neck-trunk part = the slope of the operation trajectory * m, where m is a preset constant. Generally, the movement amplitude of the neck-trunk part is smaller than that of the operation trajectory, and m is preferably 0.5. Of course, the slope of the movement trajectory of the neck-trunk part can also be calculated based on the position of the trajectory points in the movement trajectory information of the neck-trunk part. The above slope calculation method can be referred to and will not be elaborated here.
[0089] Exemplarily, for any trajectory point position in the movement trajectory information of the neck-trunk part, that is, the neck-trunk part position (x b , y b ), the position of any trajectory point in the movement trajectory information of the second upper limb part, that is, the second upper limb part position (x u2 , y u2 ) is calculated through the following formula:
[0090]
[0091] In the formula, d4 represents the distance between the neck-trunk part and the second upper limb part, k b represents the slope of the movement trajectory of the neck-trunk part, and n4 represents the predicted angle between the neck-trunk part and the second upper limb part. This preset angle can be set in advance or obtained by extraction according to the actual situation. Of course, the position of the second upper limb part can be calculated by other methods, not limited to this formula.
[0092] Exemplarily, for any trajectory point position in the movement trajectory information of the neck-trunk part, that is, the neck-trunk part position (x b , y b ), the position of any trajectory point in the movement trajectory information of the lower limb part, that is, the lower limb part position (x l , y l ) is calculated through the following formula:
[0093]
[0094] In the formula, d5 represents the distance between the neck-trunk part and the lower limb part, k b represents the slope of the neck-trunk movement trajectory, and n5 represents the preset angle between the preset neck-trunk part and the lower limb part. This preset angle can be set in advance or obtained by extraction according to the actual situation. Of course, the position of the lower limb part can be calculated by other methods, not limited to this formula.
[0095] In an optional embodiment, the preset angle between the lower limb part of the game object and its associated part is obtained through the following steps:
[0096] Based on the height of the trajectory points between the game ground and the trajectory points in the operation trajectory information, judge the target posture of the game object;
[0097] According to the target posture, determine the preset angle between the lower limb part and its associated part.
[0098] It can be understood that when the game object moves along the operation trajectory, there will be three target postures for the game object: standing, jumping up, and squatting. In each target posture, the preset angle formed between the key body part and the lower limb part may be different. To improve the accuracy of the lower limb part following the operation trajectory, the embodiments of the present application also combine the preset angles of the game object in each target posture to obtain the movement trajectory information of the lower limb part.
[0099] The judging of the target posture of the game object based on the height of the trajectory points between the game ground and the trajectory points in the operation trajectory information specifically includes:
[0100] According to the operation trajectory information, obtain the operation trajectory position, subtract the ordinate of the game ground from the ordinate of the operation trajectory position to obtain the height of the trajectory points between the operation trajectory points and the game ground;
[0101] Judge the target posture of the game object according to the relationship between the height of the trajectory points and the preset character height.
[0102] Further, judge the target posture of the game object through the following steps:
[0103] When the height of the trajectory points > (preset character height + preset weapon length), and the height of the trajectory points < (preset character height + preset weapon length + preset minimum takeoff height), determine that the target posture of the game object is the standing posture; at this time, the maximum Y-axis coordinate of the weapon part is (preset character height + preset weapon length).
[0104] When the height of the trajectory points ≥ (preset character height + preset weapon length + preset takeoff height), determine that the target posture of the game object is the jumping posture.
[0105] When the ordinate of the weapon part > (preset character height / 2), determine that the target posture of the game object is the squatting posture.
[0106] For the preset angle between the lower limb part and its associated part, this preset angle has a corresponding relationship with the target posture, and through this corresponding relationship, the preset angle corresponding to the target posture is obtained.
[0107] For example, when the target posture is a non-squatting posture, the preset angle between the lower limb part and its associated part is the first preset angle; at this time, through this first preset angle, the movement trajectory information of the lower limb part can be calculated. For example, n5 is this first preset angle.
[0108] When the target posture is a squatting posture, the preset angle between the lower limb part and its associated part is the second preset angle; at this time, through this second preset angle, the movement trajectory information of the lower limb part can be calculated. For example, n5 is this second preset angle.
[0109] In an optional embodiment, the game object control method further includes:
[0110] According to the operation trajectory information, calculate the attack distances between the weapon part of the game object and each part of the game object to be attacked;
[0111] According to the attack distances, perform collision detection on the game object and the game object to be attacked;
[0112] In the case where it is detected that the game object collides with the game object to be attacked, generate an instruction to interrupt the move of the game object.
[0113] It can be understood that after the game object initiates a move attack, by performing collision detection on the game object and the game object to be attacked, it is confirmed whether the game object's attack is successful. If a collision is detected, which means the attack is successful, then the move needs to be interrupted.
[0114] Specifically, perform collision detection on the game object through the attack distances between the weapon part of the game object and each part of the game object to be attacked; for example:
[0115] The attack distance between the weapon part of game object m and the weapon part of game object n to be attacked;
[0116] The attack distance between the weapon part of game object m and the head part of game object n to be attacked;
[0117] The attack distance between the weapon part of game object m and the neck-trunk part of game object n to be attacked;
[0118] The attack distance between the weapon part of game object m and the first upper limb part of game object n to be attacked;
[0119] The attack distance between the weapon part of game object m and the second upper limb part of game object n to be attacked;
[0120] The attack distance between the weapon part of game object m and the first lower limb part of game object n to be attacked;
[0121] The attack distance between the weapon part of game object m and the first lower limb part of the game object n to be attacked;
[0122] When any of the above attack distances is less than a preset distance threshold, it is considered that a collision occurs between the game object and the attacked game object, and a move interruption instruction for the game object is generated.
[0123] In an optional embodiment, the game object control method further includes:
[0124] When it is detected that a collision occurs between the game object and the attacked game object, calculate the damage value of the game object to the attacked game object according to the attack action of the game object and the collision part of the attacked game object.
[0125] It can be understood that when a collision occurs to game object m, that is, the attack is successful, by calculating the damage value of game object m to the attacked game object n, it is possible to perform damage calculation while enabling the game object to follow the user's operation.
[0126] Exemplarily, set the base weight base damage as Base Attack, the damage weight of the upward slash attack action is 0.8, the damage weight of the downward chop attack action is 1.5, the base defense of the character model is Defense, the defense weight of the head part is 0.5, and the defense weight of the remaining body parts except the head part is 1.5. Then the damage value of the game object to the attacked game object = Base Attack * attack action weight * Defense * defense weight.
[0127] See Figure 2 , Figure 2 is a structural block diagram of a game object control device 10 provided by an embodiment of the present application. The game object control device 10 includes:
[0128] An operation trajectory information acquisition module 11, configured to acquire operation trajectory information of a user on a game interface;
[0129] A motion trajectory information generation module 12, configured to generate motion trajectory information of each part of the game object according to the operation trajectory information based on the association relationship between each part of the game object controlled by the user;
[0130] A game object control module 13, configured to generate a move control instruction for the game object according to the motion trajectory information.
[0131] Optionally, the motion trajectory information generation module 12 is further configured to:
[0132] Use the operation trajectory information as the movement trajectory information of one part of the game object;
[0133] Based on the distance between directly associated parts in the game object and the movement trajectory information of one part of the game object, sequentially obtain the movement trajectory information of directly associated parts in the game object.
[0134] Optionally, the movement trajectory information generation module 12 is further configured to:
[0135] Based on the movement trajectory information of one part of the game object, calculate the movement trajectory slope of one part of the game object;
[0136] Based on the distance between directly associated parts in the game object, the preset angle between directly associated parts in the game object, and the movement trajectory slope of one part of the game object, sequentially obtain the movement trajectory information of directly associated parts in the game object.
[0137] Optionally, the movement trajectory information generation module 12 is further configured to:
[0138] Based on the trajectory point height between the game ground and the trajectory points in the operation trajectory information, determine the target posture of the game object;
[0139] According to the target posture, determine the preset angle between the lower limb part and its associated part.
[0140] Optionally, the game object control device 10 further includes:
[0141] An association relationship acquisition module, configured to divide the game object into a weapon part and / or a body part; according to the connection relationship between the weapon part and / or the body part, obtain the direct association relationship between the weapon part and / or the body part.
[0142] Optionally, the game object control device 10 further includes:
[0143] A move interruption instruction generation module, configured to calculate the attack distance between the weapon part of the game object and each part of the game object to be attacked according to the operation trajectory information; perform a collision detection on the game object and the game object to be attacked according to the attack distance; generate a move interruption instruction for the game object when it is detected that the game object collides with the game object to be attacked.
[0144] It should be noted that the working process of each module in the game object control device 10 described in the embodiments of the present application may refer to the working process of the game object control method described in the above embodiments, and will not be elaborated here.
[0145] A game object control device 10 provided by an embodiment of the present application generates motion trajectory information of each part of a game object through the operation trajectory information of a user, and then generates a corresponding move control instruction according to the motion trajectory information, so that each part of the game object moves following the operation trajectory information of the user to generate a move of the game object, which not only enriches the operation methods of game object control, but also makes the moves executed by the game object not limited to fixed moves, thereby improving the game competitiveness and user stickiness.
[0146] In addition, an embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium includes a stored computer program; wherein, when the computer program runs, it controls the device where the computer-readable storage medium is located to execute the game object control method described in any of the above embodiments.
[0147] In addition, an embodiment of the present application also provides a computer program product, including a computer program / instructions, and when the computer program / instructions are executed by a processor, they implement the game object control method described in any of the above embodiments.
[0148] See Figure 3 , Figure 3 is a structural block diagram of a game object control device 20 provided by an embodiment of the present application. The game object control device 20 includes: a processor 21, a memory 22, and a computer program stored in the memory 22 and executable on the processor 21. When the processor 21 executes the computer program, it implements the steps in the above-mentioned game object control method embodiment. Alternatively, when the processor 21 executes the computer program, it implements the functions of each module / unit in the above-mentioned device embodiments.
[0149] Exemplarily, the computer program can be divided into one or more modules / units. The one or more modules / units are stored in the memory 22 and executed by the processor 21 to complete the present application. The one or more modules / units can be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the game object control device 20.
[0150] The game object control device 20 may include, but is not limited to, a processor 21 and a memory 22. Those skilled in the art can understand that the schematic diagram is only an example of the game object control device 20, and does not constitute a limitation on the game object control device 20. It may include more or fewer components than shown, or combine certain components, or different components. For example, the game object control device 20 may further include an input / output device, a network access device, a bus, etc.
[0151] The processor 21 may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The processor 21 is the control center of the game object control device 20, and connects various parts of the entire game object control device 20 through various interfaces and lines.
[0152] The memory 22 can be used to store the computer programs and / or modules. The processor 21 realizes various functions of the game object control device 20 by running or executing the computer programs and / or modules stored in the memory 22, and by calling the data stored in the memory 22. The memory 22 may mainly include a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, phone book, etc.). In addition, the memory 22 may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0153] Among them, if the modules / units integrated in the game object control device 20 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above-described embodiment methods of the present application, it can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor 21, the steps of the above various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0154] It should be noted that the device embodiments described above are only illustrative. The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the attached drawings of the device embodiments provided in the present application, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0155] The above is the preferred implementation manner of the present application. It should be noted that for those of ordinary skill in the art of the present technology, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements are also regarded as the protection scope of the present application.
Claims
1. A method for controlling a game object, characterized in that, Including: Obtaining the operation trajectory information of the user on the game interface; Based on the correlation relationship between the parts of the game object controlled by the user, generating the movement trajectory information of the parts of the game object according to the operation trajectory information; Generating a move control instruction for the game object according to the movement trajectory information.
2. The game object control method according to claim 1, wherein, The generating the movement trajectory information of the parts of the game object according to the operation trajectory information based on the correlation relationship between the parts of the game object controlled by the user includes: Taking the operation trajectory information as the movement trajectory information of one part of the game object; Based on the distance between the directly related parts of the game object and the movement trajectory information of one part of the game object, sequentially obtaining the movement trajectory information of the directly related parts of the game object.
3. The game object control method according to claim 2, wherein, The sequentially obtaining the movement trajectory information of the directly related parts of the game object based on the distance between the directly related parts of the game object and the movement trajectory information of one part of the game object includes: Calculating the movement trajectory slope of one part of the game object based on the movement trajectory information of one part of the game object; Based on the distance between the directly related parts of the game object, the preset angle between the directly related parts of the game object, and the movement trajectory slope of one part of the game object, sequentially obtaining the movement trajectory information of the directly related parts of the game object.
4. The game object control method according to claim 3, wherein Obtaining the preset angle between the lower limb part of the game object and its related part through the following steps: Judging the target posture of the game object based on the trajectory point height between the game ground and the trajectory points in the operation trajectory information; Determining the preset angle between the lower limb part and its related part according to the target posture.
5. The game object control method according to any one of claims 1 to 4, characterized in that, Before the generating the movement trajectory information of the parts of the game object according to the operation trajectory information based on the correlation relationship between the parts of the game object controlled by the user, the game object control method further includes: Dividing the game object into a weapon part and / or a body part; Obtaining the direct correlation relationship between the weapon part and / or the body part according to the connection relationship between the weapon part and / or the body part.
6. The game object control method according to any one of claims 1-4, characterized in that The game object control method further includes: Calculating the attack distance between the weapon part of the game object and each part of the game object to be attacked according to the operation trajectory information; Performing a collision detection on the game object and the game object to be attacked according to the attack distance; Generating a move interruption instruction for the game object when it is detected that the game object collides with the attacked game object.
7. A game object control device, characterized in that, Including: An operation trajectory information acquisition module for acquiring the operation trajectory information of the user on the game interface; A movement trajectory information generation module for generating the movement trajectory information of the parts of the game object according to the operation trajectory information based on the correlation relationship between the parts of the game object controlled by the user; The game object control module is used to generate a move control instruction for the game object according to the motion trajectory information.
8. A game object control device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the game object control method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program; wherein, when the computer program runs, it controls the device where the computer-readable storage medium is located to execute the game object control method according to any one of claims 1 to 6.
10. A computer program product, characterized in that, It includes a computer program / instructions, and when the computer program / instructions are executed by a processor, it implements the game object control method according to any one of claims 1 to 6.