A method of object control and related apparatus
By controlling the movement of a target object by dragging it, the problem of the single operation method in the existing technology is solved, realizing the diversity and applicability of target object control, and improving the flexibility and experience of user operation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECH (BEIJING) CO LTD
- Filing Date
- 2019-01-18
- Publication Date
- 2026-07-03
AI Technical Summary
Existing target object control methods are poorly applicable in positioning scenarios. Simple long-press or click operations are difficult to meet users' operating habits, resulting in insufficient diversity and feasibility of operation methods.
The movement of a target object is controlled by dragging it. The distance the target object moves corresponds to the distance the user drags it. The direction and distance of the target object's movement are determined by receiving sliding control commands, and business control processing is performed based on the overlap between the target position and the preset business position.
It enhances the diversity and feasibility of operation methods, allowing users to trigger corresponding drag operations according to different scenarios, thereby improving the flexibility of operation and user experience.
Smart Images

Figure CN109865281B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of human-computer interaction technology, and in particular to a method and related apparatus for object control. Background Technology
[0002] People often consciously or unconsciously reminisce about their childhood memories. Now that we've entered the age of electronic technology, all sorts of video games are emerging and becoming increasingly diverse. Yet, we still find ourselves unintentionally recalling cherished childhood games—this is what we call the memories of a generation.
[0003] Currently, a mini-game called "Jump Jump" has been developed. This game uses a long press mechanism to empower a target object on the canvas, with the amount of power adjusted by the duration of the press, giving the target object initial momentum for a jump. Specifically, when the user's finger touches the screen of the terminal device and is pressed down, the target object begins to arch its back and gather momentum. When the user releases their finger, the target object begins to flip and jump, moving from one "box" to another.
[0004] However, target objects often come in a variety of types. In scenarios where target objects are located, controlling their movement through long presses or clicks is not suitable for all scenarios, and a single operation method is unlikely to meet user habits, resulting in poor applicability of the solution. Summary of the Invention
[0005] This invention provides a method and related apparatus for object control. Users can control the movement of a target object by dragging it, and the movement distance of the target object corresponds to the distance the user drags the target object. Thus, users can trigger corresponding drag operations according to different scenarios, thereby improving the diversity and feasibility of operation methods.
[0006] In view of this, the first aspect of the present invention provides a method for object control, comprising:
[0007] Receive a sliding control command input on a designated area of the touchscreen, targeting a first direction and directed toward the object;
[0008] The target object is moved a first distance toward the second direction according to the sliding control command, wherein the second direction has a projection component on the reverse extension line of the first direction;
[0009] Control the target object to move the first distance to the corresponding target position;
[0010] Based on the degree of overlap between the target location and the preset service location, corresponding service control processing is performed.
[0011] A second aspect of the present invention provides a client, comprising:
[0012] The receiving module is used to receive a sliding control command input on a designated area of the touch screen, which is directed toward a first direction and targets a target object;
[0013] The determining module is configured to determine a first distance that the target object moves toward a second direction based on the sliding control command received by the receiving module, wherein the second direction has a projection component on the reverse extension line of the first direction;
[0014] The control module is used to control the target object to move to the corresponding target position according to the first distance determined by the determining module;
[0015] The processing module is used to perform corresponding service control processing based on the degree of overlap between the target position moved by the control module and the preset service position.
[0016] In one possible design, in the first implementation of the second aspect of the present invention,
[0017] The processing module is specifically used to obtain a target distance value based on the positional relationship between the target location and the preset business location, wherein the target distance value represents the straight-line distance from the target location to the center point of the preset business location;
[0018] If the target distance value is less than or equal to the first preset distance, then a first score is generated;
[0019] If the target distance value is greater than the first preset distance and less than or equal to the second preset distance, a second score is generated, wherein the second score is less than the first score;
[0020] If the target distance value is greater than the second preset distance, a third score is generated and a score sharing interface is displayed, wherein the third score is less than the second score.
[0021] In one possible design, in a second implementation of the second aspect of the present invention, the client further includes a settings module;
[0022] The receiving module is further configured to receive an object setting instruction before receiving a sliding control instruction for a target object oriented in a first direction input in a designated area on the touch screen;
[0023] The setting module is used to set the external form of the target object according to the object setting instruction received by the receiving module, wherein the external form includes at least one of color, pattern, text and shape.
[0024] In one possible design, in a third implementation of the second aspect of the present invention, the client further includes an acquisition module and an establishment module;
[0025] The acquisition module is used to acquire a set of reference objects, wherein the set of reference objects includes N reference objects, M of the N reference objects have identification information, N is an integer greater than or equal to 1, and M is an integer greater than or equal to 0 and less than or equal to N;
[0026] The establishment module is used to establish a correspondence between the target reference object in the set of reference objects acquired by the acquisition module and the preset service location, wherein the target reference object is any one of the N reference objects.
[0027] In one possible design, in the fourth implementation of the second aspect of the present invention,
[0028] The processing module is specifically used to receive a score sharing instruction, wherein the score sharing instruction carries a target player identifier, and the target player identifier has a unique correspondence with the target player;
[0029] According to the score sharing instruction, a battle request instruction is sent to the target player, wherein the battle request instruction is used to request the target player to control the target object and generate a fourth score.
[0030] In one possible design, in a fifth implementation of the second aspect of the present invention, the client further includes a computing module;
[0031] The calculation module is used to calculate a second distance that the target object moves toward the first direction according to the sliding control command after the receiving module receives a sliding control command for the target object toward the first direction input in a designated area on the touch screen. If the first direction is a preset direction, the calculation module is used to calculate the second distance that the target object moves toward the first direction according to the sliding control command.
[0032] The determining module is specifically used to calculate the first distance the target object moves in the second direction based on the second distance, the correlation parameter, and the damping coefficient calculated by the calculation module. The correlation parameter represents the correlation between the initial velocity of the target object and the second distance, and the damping coefficient represents the energy consumption of the target object during the movement.
[0033] In one possible design, in the sixth implementation of the second aspect of the present invention, the client further includes an acquisition module and a calculation module;
[0034] The acquisition module is used to, after the receiving module receives a sliding control command input on a designated area of the touch screen for a target object facing a first direction, if the first direction is not a preset direction, acquire a first angle between the first direction and the preset direction according to the sliding control command.
[0035] The calculation module is used to calculate a second distance that the target object moves toward the first direction based on the first included angle obtained by the acquisition module;
[0036] The determining module is specifically used to calculate the first distance the target object moves in the second direction based on the second distance, the correlation parameter, and the damping coefficient, wherein the correlation parameter represents the correlation between the initial velocity of the target object and the second distance, and the damping coefficient represents the energy consumption of the target object during the movement.
[0037] In one possible design, in the seventh implementation of the second aspect of the present invention, the starting position of the sliding control command corresponds to the first horizontal coordinate and the first vertical coordinate, and the ending position of the sliding control command corresponds to the second horizontal coordinate and the second vertical coordinate.
[0038] The determining module is specifically used to obtain the horizontal coordinate distance based on the first horizontal coordinate and the second horizontal coordinate of the sliding control command, and to obtain the vertical coordinate distance based on the first vertical coordinate and the second vertical coordinate of the sliding control command.
[0039] The second included angle is calculated based on the horizontal coordinate distance and the vertical coordinate distance, wherein the second included angle represents the included angle between the first direction and the vertical direction;
[0040] Obtain the third included angle between the preset direction and the horizontal direction;
[0041] The first angle between the first direction and the preset direction is calculated based on the second included angle and the third included angle.
[0042] A third aspect of the present invention provides a terminal device for executing the object control method in the first aspect or any possible implementation thereof. Specifically, the terminal device may include a module for executing the object control method in the first aspect or any possible implementation thereof.
[0043] A fourth aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the methods described in the above aspects.
[0044] As can be seen from the above technical solutions, the embodiments of the present invention have the following advantages:
[0045] This invention provides a method for object control. First, a client receives a sliding control command input on a designated area of a touchscreen, specifying the direction of a target object towards a first direction. Then, based on the sliding control command, a first distance is determined for the target object to move in a second direction, where the second direction has a projection component on the reverse extension of the first direction. The target object is then controlled to move the first distance to the corresponding target position. Finally, corresponding business control processing is performed based on the overlap between the target position and a preset business position. Through this method, users can control the movement of a target object by dragging it, and the movement distance of the target object corresponds to the distance the user drags the object. Therefore, users can trigger corresponding drag operations according to different scenarios, thereby improving the diversity and feasibility of the operation methods. Attached Figure Description
[0046] Figure 1 This is a schematic diagram of the architecture of the object control system in an embodiment of the present invention;
[0047] Figure 2 This is a schematic diagram illustrating the relationship between the operating system, the parent application, the child application, and the child application page in an embodiment of the present invention.
[0048] Figure 3 This is a schematic diagram of one embodiment of the object control method in this invention;
[0049] Figure 4 This is a schematic diagram of an application initialization interface in an embodiment of the present invention;
[0050] Figure 5 This is a schematic diagram of an interface after the application has been successfully loaded in an embodiment of the present invention;
[0051] Figure 6 This is a schematic diagram of the main interface of an application in an embodiment of the present invention;
[0052] Figure 7 This is a schematic diagram of an interface based on an application-triggered sliding control command in an embodiment of the present invention;
[0053] Figure 8 This is a schematic diagram of an interface based on the application's sliding distance in an embodiment of the present invention;
[0054] Figure 9 This is a schematic diagram of an interface based on the first distance of an application in an embodiment of the present invention;
[0055] Figure 10This is a flowchart illustrating the control of a target object in an application scenario of the present invention;
[0056] Figure 11 This is a schematic diagram of an embodiment of target object movement in the present invention;
[0057] Figure 12 This is a schematic diagram illustrating the relationship between speed and distance in an embodiment of the present invention;
[0058] Figure 13 This is a schematic diagram of an embodiment of the target position and score in the present invention;
[0059] Figure 14 This is a schematic diagram of the score sharing interface in an embodiment of the present invention;
[0060] Figure 15 This is a schematic diagram of an interface for requesting a battle in an embodiment of the present invention;
[0061] Figure 16 This is a schematic diagram of an interface showing the battle results in an embodiment of the present invention;
[0062] Figure 17 This is a schematic diagram of an embodiment of the present invention that allows dragging at any point based on an application.
[0063] Figure 18 This is a schematic diagram of a corner relationship formed by dragging an arbitrary point in an embodiment of the present invention;
[0064] Figure 19 This is a schematic diagram of an embodiment of calculating the first included angle in the present invention;
[0065] Figure 20 This is a schematic diagram of another embodiment of calculating the first included angle in the present invention;
[0066] Figure 21 This is a schematic diagram of another embodiment of calculating the first included angle in the present invention;
[0067] Figure 22 This is a schematic diagram of another embodiment of calculating the first included angle in the present invention;
[0068] Figure 23 This is a schematic diagram of one embodiment of the client in this invention;
[0069] Figure 24 This is a schematic diagram of another embodiment of the client in this invention;
[0070] Figure 25 This is a schematic diagram of another embodiment of the client in this invention;
[0071] Figure 26 This is a schematic diagram of another embodiment of the client in this invention;
[0072] Figure 27 This is a schematic diagram of another embodiment of the client in this invention;
[0073] Figure 28 This is a schematic diagram of the structure of a terminal device in an embodiment of the present invention. Detailed Implementation
[0074] This invention provides a method and related apparatus for object control. Users can control the movement of a target object by dragging it, and the movement distance of the target object corresponds to the distance the user drags the target object. Thus, users can trigger corresponding drag operations according to different scenarios, thereby improving the diversity and feasibility of operation methods.
[0075] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “corresponding to,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0076] It should be understood that the client provided by this invention is used to execute the object control method. The client can run in a browser or independently; this is not limited here. This invention will be described using an interactive application as an example, specifically a game application, to illustrate how the client executes the object control method provided by this invention. The main gameplay of the game application is controlling the movement of a target object. The physical movement of the target object in the real-world scene is mainly achieved by converting the elastic potential energy generated by the user's clicks and drags into kinetic energy. After release, the object gains an initial velocity, decelerates due to friction, and stops after traveling a certain distance. It is understood that the target object can be a controllable object in the game, such as a car, checkers, or an animal. Here, a car is used as an example; however, this is only for illustration and should not be construed as a limitation of this invention.
[0077] For ease of understanding, this invention proposes an object control method, which is applied to... Figure 1Please refer to the object control system shown. Figure 1 , Figure 1 This is a schematic diagram of the object control system architecture in an embodiment of the present invention. As shown in the figure, the user launches the game application through a client. The client sends a game initialization command to the server. The server responds to the command and sends game application-related material information to the client, enabling the client to load the game application using this material information. After loading, the user enters the game interface, which displays the target object (e.g., a car in the game) and a preset business location (e.g., a parking space in the game). The user touches the screen and drags it backward a certain distance. The client calculates the distance the car will move based on this distance. If the car stops in the parking space, the operation is successful, and a score is awarded. In practice, the game score is accumulated. For example, if the first operation scores 3 points and the second operation scores 3 points, the client will display the total score, which is 6 points. Conversely, if the car does not stop in the parking space, the operation fails, and the client displays the user's total score for the game and exits the game. Users can also share their game scores with friends. The client sends a score sharing instruction to the server, and the server sends the user's game score to the user's friends according to the score sharing instruction.
[0078] For ease of understanding, this invention can also be applied to lottery scenarios. Users launch the lottery application through a client, which sends an initialization command to the server. The server responds to this command and sends lottery application-related material information to the client, enabling the client to load the lottery application using this material information. Once loaded, the user enters the lottery interface, which displays the target object (e.g., a checkers piece) and a preset business location (e.g., the winning lottery number). The user touches the screen and drags it backward a certain distance; the client calculates the checkers number based on this distance. If the number matches the winning number, it indicates a win.
[0079] This invention can also be used in weather forecasting scenarios. Users launch the weather forecasting application through a client. The client sends an initialization command to the server, which responds by sending relevant material information to the client, enabling the client to load the application. Once loaded, the user enters the weather forecasting interface, which displays a target object (e.g., a kitten) and a preset location (e.g., a destination). The user touches the screen and drags it backward a short distance; the client calculates the destination based on this distance. If the destination is exactly where the forecast is located, the weather conditions at that destination are announced.
[0080] It should be noted that the client is deployed on a terminal device, which includes, but is not limited to, tablets, laptops, PDAs, mobile phones, and personal computers (PCs). There are no restrictions on this.
[0081] Please see Figure 2 , Figure 2 This is a schematic diagram illustrating the relationship between the operating system, the parent application, the child application, and the child application page in an embodiment of the present invention. The present invention is mainly applied to generating child applications, including child application pages, within an environment provided by the parent application. Specifically, the child application may refer to a mini-program. Figure 2 As shown, an operating system runs on the terminal device, and a parent application runs on the operating system. The parent application can specifically refer to a browser, so a mini-program can be understood as an application running on a browser. Sub-applications are generated within the environment provided by the parent application, and these sub-applications include sub-application pages. The terminal device can obtain the sub-application identifier from the local machine or a server through the parent application.
[0082] The operating system (OS) is a computer program that manages and controls the hardware and software resources of the terminal. It is the most basic system software that runs directly on the bare metal of the terminal, and applications need the support of the operating system to run.
[0083] A parent application is the application that hosts child applications, providing the environment for their implementation. The parent application is a native application. A native application is an application that can run directly on the operating system. A parent application can be a social application, a dedicated application that supports child applications, a file management application, an email application, or a game application, etc. Social applications include instant messaging applications, social networking service (SNS) applications, or live streaming applications, etc.
[0084] Sub-applications are applications that can be implemented within the environment provided by the parent application. Sub-applications can specifically be social applications, file management applications, email applications, or game applications, etc.
[0085] A common component is a component provided by the parent application that can be shared by different sub-applications. It has a visual form and is a building block of the sub-application's page. A common component may also encapsulate logic code for handling events triggered by that component. Different sub-applications share common components, specifically by calling the same component simultaneously or at different times. In one embodiment, a common component may also be shared by both the parent application and the sub-applications.
[0086] Based on the above description, the method for object control in this invention will be described below. Please refer to [link / reference]. Figure 3 One embodiment of the object control method in this invention includes:
[0087] 101. Receive a sliding control command input on a designated area of the touchscreen, indicating a first direction toward the target object;
[0088] In this embodiment, we will continue to use a game application as an example. First, the user launches the game application through the client, that is, the client sends a game initialization command to the server. The server responds to the game initialization command and sends material information related to the game application to the client. Please refer to [link to relevant documentation]. Figure 4 , Figure 4 This is a schematic diagram of the application initialization interface in an embodiment of the present invention. As shown in the figure, the client downloads material information from the server and initializes the game application. After initialization is complete, the client loads the main interface of the game application. Please refer to [link / reference]. Figure 5 . Figure 5 This is a schematic diagram of an interface after the application has been successfully loaded in an embodiment of the present invention. As shown in the figure, the first time you enter the interface, you see a welcome page. The welcome page can use dynamic effects to demonstrate how to play the game. After clicking the "Start Game" button on the welcome page, you will enter the game. Figure 6 The game interface shown. Please refer to [link / reference]. Figure 6 , Figure 6 This is a schematic diagram of the main interface of an application in an embodiment of the present invention. As shown in the figure, the value shown in the lower left corner is the player's cumulative score. The target object in the interface can be a car, and any position in the interface can be a touch point. The parking space (i.e., the white box) in the interface can represent a preset business location.
[0089] Users trigger swipe control commands through the terminal device screen. These commands can only be executed in a specific area of the touchscreen (or behind the target object). The start and end positions of the swipe command on the touchscreen are different. In practice, it can also be a double-tap command, where the start and end positions are the same. However, this invention primarily focuses on swipe commands. Please participate. Figure 7 , Figure 7 This is a schematic diagram of an interface for triggering a sliding control command based on an application, as shown in the figure. The user presses and holds a position on the interface with appropriate force and drags the cart in a first direction, thereby triggering the sliding control command. The pressed position is the touchscreen start position, which can be represented by coordinate values (Xa, Ya). The released position is the touchscreen end position, which can be represented by coordinate values (Xb, Yb).
[0090] 102. Determine the first distance the target object moves toward the second direction according to the sliding control command, wherein the second direction has a projection component on the reverse extension line of the first direction;
[0091] In this embodiment, the client determines a first distance the target object will move in the second direction based on the user-triggered swipe control command. This first distance is the distance the target object will slide in the preset direction. For easier understanding, please refer to [link to relevant documentation]. Figure 8 , Figure 8 This is a schematic diagram of an interface based on the application's sliding distance in an embodiment of the present invention. As shown in the figure, the track is presented as a preset direction from a 30-degree perspective. The distance L1 is the distance the car travels in the preset direction after being dragged by the user. L1 represents the sliding distance corresponding to the sliding control command. Please refer to... Figure 9 , Figure 9 This is a schematic diagram of an interface based on the first distance of the application in an embodiment of the present invention. As shown in the figure, when the user releases the screen, the car will slide a distance in the second direction in the preset direction. This distance includes the first distance and the sliding distance. The distance traveled from the original position of the car to the sliding stop position is the first distance shown in L2.
[0092] The second direction has a projection component on the reverse extension of the first direction, meaning that the direction in which the user slides on the screen is opposite to the direction in which the target object moves.
[0093] 103. Control the target object to move a first distance to the corresponding target position;
[0094] In this embodiment, the client can control the target object to move based on the first distance, so that the target object moves to the target position, where the target position is the end point of the first distance.
[0095] 104. Perform corresponding business control processing based on the overlap between the target location and the preset business location.
[0096] In this embodiment, after the client controls the target object to move a first distance to the corresponding target position, the target object remains at the final target position. At this point, corresponding business control processing is required based on the overlap between the target position and the preset business position. The preset business position is a pre-set location point, and different preset business positions may have different distances between them. In the game scenario, when the overlap between the target position and the preset business position is 0, the business processing terminates; when the overlap between the target position and the preset business position is not equal to 0, a scoring and survival-preserving process is triggered.
[0097] The following will combine Figure 10 For a detailed explanation of the process of controlling the movement of the target object, please refer to [link / reference]. Figure 10, Figure 10 This is a flowchart illustrating the control of the target object in the application scenario of this invention. As shown in Figure (a), the interface is the welcome page the user enters for the first time. The welcome page uses dynamic effects to demonstrate how to play the game application. A "Start Game" button is set on the welcome page. After the user clicks this button, they will enter the interface shown in (b). In the interface (b), both the car and the house adopt a 3D pixel style with a 30-degree perspective. It should be noted that the specific angle and design style can be determined according to the production materials; this is only an illustration. In the interface shown in (c), the user can drag downwards from any point on the screen, thereby dragging the car a certain distance along the line extending in the opposite direction of the car's front. In actual applications, the screen will also generate feedback when dragging and set a dynamic effect for the car. When the user releases the drag operation, the car will gain initial acceleration, and the interface shown in (d) will appear, with the car sliding forward along the direction of the front. Please refer to the interface shown in (e). If the car slides into the parking space, you can get a bonus based on the accuracy of the parking. The entire game interface will move downwards along the direction of the car's movement, that is, enter the interface shown in (f), so that the view can return the car to the initial position.
[0098] Conversely, if the car does not stop within the parking space, the game ends, and the screen can provide a dynamic feedback effect. After the game ends, a leaderboard will pop up, allowing users to view their score ranking among friends, as well as their highest historical score.
[0099] This invention provides a method for object control. First, a client receives a sliding control command input on a designated area of a touchscreen, specifying the direction of a target object towards a first direction. Then, based on the sliding control command, a first distance is determined for the target object to move in a second direction, where the second direction has a projection component on the reverse extension of the first direction. The target object is then controlled to move the first distance to the corresponding target position. Finally, corresponding business control processing is performed based on the overlap between the target position and a preset business position. Through this method, users can control the movement of a target object by dragging it, and the movement distance of the target object corresponds to the distance the user drags the object. Therefore, users can trigger corresponding drag operations according to different scenarios, thereby improving the diversity and feasibility of the operation methods.
[0100] Optionally, in the above Figure 3 Based on the corresponding embodiments, in the first optional embodiment of the object control method provided by the present invention, the corresponding service control processing is performed according to the overlap between the target location and the preset service location, which may include:
[0101] Based on the positional relationship between the target location and the preset business location, obtain the target distance value, where the target distance value represents the straight-line distance from the target location to the center point of the preset business location;
[0102] If the target distance value is less than or equal to the first preset distance, then the first score is generated;
[0103] If the target distance value is greater than the first preset distance and less than or equal to the second preset distance, a second score is generated, wherein the second score is less than the first score;
[0104] If the target distance is greater than the second preset distance, a third score is generated and a score sharing interface is displayed. The third score is less than the second score.
[0105] This embodiment will introduce a method for calculating the score. After the target object moves to the target location, the target distance value can be obtained based on the positional relationship between the target location and the preset service location. The target distance value represents the straight-line distance from the target location to the preset service location. It can be understood that the preset service location can also correspond to a preset range. If the preset range is circular, then the center point of the preset service location is the center of the circle. If the preset range is rectangular, then the center point of the preset service location is the intersection of the two diagonals of the rectangle. If the preset range is an irregular shape, then the center point of the preset service location can be set according to the situation.
[0106] The client determines the target distance value. If the target distance value is less than or equal to a first preset distance, a first score is generated, which can be 3 points. If the target distance value is greater than the first preset distance and less than or equal to a second preset distance, a second score is generated, which can be 1 point. If the target distance value is greater than the second preset distance, a third score is generated, and a score sharing interface is displayed, where the third score can be 0 points.
[0107] For easier understanding, please refer to Figure 11 , Figure 11 This is a schematic diagram of an embodiment of the target object movement in this invention. As shown in the figure, taking a game application as an example, the core of the game is that a car undergoes uniformly decelerated motion on a straight line. The car is dragged backward a certain distance from the starting point A, forming a sliding distance D. The elastic potential energy gained by the car is converted into kinetic potential energy when the car is released, which provides the car with an initial velocity V(0). The initial velocity V(0) and the sliding distance D are linearly positively correlated, and the correlation parameter is a constant K. That is:
[0108] V(0) = K×D;
[0109] When released, the trolley initially accelerates and moves in a straight line. Due to frictional resistance, its velocity V(t) gradually decreases until it reaches zero and comes to a stop. V(t) changes uniformly with time t, exhibiting a linear negative correlation. The correlation is equal to the damping coefficient R between the plane and the trolley, i.e., R, where R is the coefficient of friction.
[0110] V(t) = V(0) - R*t;
[0111] Where V(t) represents the velocity of the target object as a function of time, V(0) represents the initial velocity of the target object, R represents the damping coefficient, and t represents time.
[0112] When V(t) = 0, t can be obtained. max =K×D / R;
[0113] Among them, t max This represents the maximum time the target object stays at the target position, i.e., the maximum time the target object travels. K represents the relevance parameter, D represents the sliding distance, which can also be called the second distance. The second distance can be expressed as m×C, where C represents the dragging distance, m represents the set feedback constant, which is used to express the multiple of the distance the finger slides on the screen to the movement of the car. Usually, m equals 1, and R represents the damping coefficient.
[0114] According to the formula for uniformly decelerated linear motion, the real-time distance traveled by the trolley is S(t), where S(t) represents the change in the target object's distance over time. Due to damping, S(t) is positively correlated with time t using a second-order Bézier curve, i.e.:
[0115] S(t) = -R × t 2 / 2 + V(0)t;
[0116] V(t) = -R × t + V(0);
[0117] When V(t)=0, the car comes to a stop after traveling the farthest distance S, that is...
[0118] S = S(t max )= (K 2 ×D 2 ) / 2R;
[0119] V = V(t max ) = 0 - R tmax + K×D;
[0120] V(t max S(t) represents the speed of the target object when it travels to its maximum travel time. max () indicates the furthest distance traveled from the starting point. Please refer to [link / reference]. Figure 12 , Figure 12This is a schematic diagram illustrating the relationship between speed and distance in an embodiment of the present invention. As shown in the figure, S1 represents the distance from V(0) to V(t). max The curve S2 represents the curve from S(t) to S(t). max The curve of S(t) max = D+L, where D represents the second distance and L represents the first distance, which is the distance between the parking space in this level and the actual stopping position of the car. The distance between two adjacent parking spaces in each level is randomly generated.
[0121] Therefore, it can be seen that the first distance of the target object is only related to the initial position of the target object when it is dragged backward, that is, the first distance is related to the sliding distance.
[0122] The target object travels a distance L from parking space A to its final parking position P. At this point, we only need to compare the target distance between parking space P and the next parking space B. For easier understanding, please refer to [link to relevant documentation]. Figure 13 , Figure 13 This is a schematic diagram of an embodiment of the target position and score in this invention. As shown in the figure, it can be divided into three cases:
[0123] The first scenario is that if the target distance is less than or equal to the first preset distance, then the first score is generated. For example, when the target distance is between 1 / 4 of a parking space, 3 points are added and the game continues, meaning the first score is 3 points.
[0124] The second scenario is that if the target distance is greater than the first preset distance and less than or equal to the second preset distance, a second score is generated. The second score is less than the first score. For example, when the target distance is between 1 / 2 parking space and 1 / 4 parking space, 1 point is added and the game continues, meaning the second score is 1 point.
[0125] The third scenario is that if the target distance is greater than the second preset distance, a third score is generated and a score sharing interface is displayed. The third score is less than the second score. For example, if the target distance is greater than 1 / 2 parking space length, no points are added and the game ends.
[0126] Secondly, this embodiment of the invention provides a method for calculating scores. After the target object moves to the target location, a target distance value is obtained based on the positional relationship between the target location and a preset business location. If the target distance value is less than or equal to a first preset distance, a first score is generated. If the target distance value is greater than the first preset distance and less than or equal to a second preset distance, a second score is generated, where the second score is less than the first score. If the target distance value is greater than the second preset distance, a third score is generated, and a score sharing interface is displayed, where the third score is less than the second score. Through this method, scores are divided into three categories: high score, low score, and no score. The classification is based on the accuracy between the target location where the target object stops after moving and the actual required stopping location. The more accurate the comparison, the higher the score, thereby improving the rationality of the solution.
[0127] Optionally, in the above Figure 3 Based on the corresponding embodiments, in a second optional embodiment of the object control method provided by the present invention, before receiving a sliding control command for a target object oriented in a first direction input in a designated area on a touchscreen, the method may further include:
[0128] Receive object setting instructions;
[0129] According to the object setting instructions, set the external form of the target object, where the external form includes at least one of color, pattern, text and shape.
[0130] This embodiment introduces a method for setting a target object. Specifically, before receiving a sliding control command input on a designated area of the touchscreen indicating the target object's orientation in a first direction, the client can also receive a user-triggered object setting command. This object setting command carries setting parameters related to the target object, enabling the client to set the external form of the target object according to the object setting command.
[0131] Taking game applications as an example, users can customize the appearance of the car, specifically adjusting its external shape in the following ways:
[0132] 1. Color: This adjusts the overall color scheme of the car, such as red, blue, yellow, or green. Optionally, you can also adjust the car's brightness (or lightness / darkness). Brightness refers to the degree of lightness or darkness of a color. Taking achromatic colors as an example, white has the highest brightness, and black has the lowest. Adding gray tones creates a brightness series. Optionally, you can also adjust the car's chroma (or saturation / purity). Chroma refers to the degree of color saturation or purity. A pure color has the highest chroma. Mixing other colors reduces its chroma; the more colors mixed, the lower the chroma.
[0133] 2. Logo: This refers to a trademark (logo) that can be placed on the vehicle's body, such as a logo for a penguin. The logo should be recognizable, easy to identify and remember, and simple in terms of color and composition. The logo should also be distinctive, differentiating itself from other logos and possessing its own unique characteristics.
[0134] 3. Text: You can write the name on the car body, such as "Brilliant". The size and font of the text can be adjusted as needed. Note that the adjusted text size should be smaller than the car body.
[0135] 4. Shape: This means that the type of vehicle can be changed, such as a sedan, truck, convertible, bicycle, motorcycle, or miniature train. It can even be designed to resemble an airplane or an animal. There are no restrictions on this.
[0136] Secondly, in this embodiment of the invention, before receiving a sliding control command input on a designated area of the touchscreen for a target object oriented in a first direction, the client can also receive an object setting command and set the external form of the target object according to the object setting command. The external form includes at least one of color, pattern, text, and shape. Through this method, users can design target objects according to their preferences, thereby improving the flexibility of the solution, enhancing user interaction with the application, and increasing user stickiness. Furthermore, merchants can set some distinctive external forms for target objects according to actual needs, which can be applied to various scenarios, such as auto shows, interactive activities organized by operations teams, holiday activities, and brand promotion activities, providing more visible resources through scene material embedding.
[0137] Optionally, in the above Figure 3 Based on the first embodiment, the third optional embodiment of the object control method provided by the present invention may further include:
[0138] Obtain a set of reference objects, which includes N reference objects. M of the N reference objects have identification information. N is an integer greater than or equal to 1, and M is an integer greater than or equal to 0 and less than or equal to N.
[0139] Establish the correspondence between the target reference object and the preset business location in the reference object set, where the target reference object is any one of the N reference objects.
[0140] This embodiment introduces a method for designing reference objects. For ease of explanation, a game application will continue to be used as an example below. It should be understood that this does not constitute a limitation of the present invention. Specifically, users can design different reference objects according to their needs. The reference objects can be buildings in the game application. Identification information is set on different buildings. The identification information can be text or patterns, thereby generating a set of reference objects. For example, the set of reference objects includes 100 buildings, of which 20 buildings have different text written on them, such as "Happy New Year" or "Love Animals," etc., which are DIY-related text. Next, the client needs to establish a target reference object and a preset business location. The target reference object refers to any one of the reference objects in the set of reference objects, thereby establishing a correspondence between buildings and parking spaces. Typically, one parking space corresponds to one building.
[0141] Furthermore, in this embodiment of the invention, the client can also obtain a set of reference objects, which includes N reference objects, of which M reference objects have identification information. The client then establishes a correspondence between the target reference object in the set and a preset business location, where the target reference object is any one of the N reference objects. Through this method, users can design reference objects according to their needs, thereby improving the flexibility of the solution, enhancing user interaction with the application, and increasing user stickiness. In addition, merchants can set some distinctive external forms for the reference objects according to actual needs, thus enabling their application in various scenarios, such as auto shows, interactive activities organized by operations teams, holiday events, and brand promotion activities, providing more visible resources through scene material embedding.
[0142] Optionally, in the above Figure 3 Based on the first embodiment, in the fourth optional embodiment of the object control method provided by this invention, displaying a score sharing interface may include:
[0143] Receive a score sharing instruction, wherein the score sharing instruction carries the target player identifier, and the target player identifier has a unique correspondence with the target player;
[0144] According to the score sharing instruction, a battle request instruction is sent to the target player. The battle request instruction is used to request the target player to control the target object and generate a fourth score.
[0145] This embodiment introduces a method for sharing scores between users. User A can trigger a score sharing command in the score sharing interface. This command will include target player identifiers, such as identifiers B and C. Identifier B corresponds to target player B, and identifier C corresponds to target player C. For easier understanding, please refer to [link to relevant documentation]. Figure 14 , Figure 14 This is a schematic diagram of the score sharing interface in an embodiment of the present invention. As shown in the figure, player A can select the "Friend PK" button on the score sharing interface, thus triggering a score sharing command. The client then generates a battle request command based on the score sharing command and sends the battle request command to at least one target player (e.g., player B). At this time, player B can choose whether to accept the challenge, i.e., enter... Figure 15 The interface shown is Figure 15 This is a schematic diagram of an interface for requesting a match in an embodiment of the present invention. Player B can see Player A's total score on the interface, for example, 71 points. If Player B chooses to challenge, they click the "Challenge" button and then start the game. After the game ends, they can enter... Figure 16 The interface shown is Figure 16 This is a schematic diagram of an interface showing the battle result in an embodiment of the present invention. As shown in the figure, player B controls the movement of the target object in the game. After the game ends, a fourth score is generated, such as 77 points. At this time, player B's score is greater than player A's score, that is, player B has successfully challenged the opponent.
[0146] Furthermore, this embodiment of the invention introduces a method for sharing scores between users. The client receives a score-sharing instruction from a user, which carries a target player identifier. This target player identifier has a unique correspondence with the target player. Then, based on the score-sharing instruction, a battle request instruction is sent to the target player. This battle request instruction requests the target player to control the target object and generate a fourth score. Through this method, after each game, users can send battle invitations to their friends via an interactive application, thereby increasing the frequency of interaction between users and enhancing the social nature and spread of the solution.
[0147] Optionally, in the above Figure 3 as well as Figure 3 Based on any one of the first to fourth embodiments, in a fifth optional embodiment of the object control method provided by the present invention, after receiving a sliding control command for a target object oriented in a first direction input on a designated area of the touchscreen, the method may further include:
[0148] If the first direction is a preset direction, then the second distance the target object moves toward the first direction is calculated according to the sliding control command;
[0149] Determining the first distance the target object moves toward the second direction based on the sliding control command can include:
[0150] Based on the second distance, the correlation parameter, and the damping coefficient, the first distance the target object moves in the second direction is calculated. The correlation parameter represents the correlation between the initial velocity of the target object and the second distance, and the damping coefficient represents the energy consumption of the target object during the movement.
[0151] This embodiment introduces a method for triggering a sliding control command in the direction of the reverse extension of a target object's forward movement within a specified area of the interface. Specifically, the touchscreen starting position of the sliding control command is any position on the interface (e.g., the body of a car). Dragging the target object along a first direction is considered a preset direction. The client then needs to calculate a second distance the target object moves in the first direction based on the touchscreen starting and ending positions. This second distance is the actual distance the car is dragged in the first direction. The client can calculate the first distance of the target object based on the second distance, a correlation parameter, and a damping coefficient. The correlation parameter represents the correlation between the target object's initial velocity and the second distance, while the damping coefficient represents the energy consumption of the target object during movement.
[0152] That is, S=(K 2 ×D 2 ) / 2R;
[0153] L=SD;
[0154] Where S represents the total distance the target object moves, L represents the first distance, K represents the correlation parameter, D represents the second distance, and R represents the damping coefficient.
[0155] Furthermore, in this embodiment of the invention, a method is introduced to trigger a sliding control command in the direction of the reverse extension line of a target object at a specified position on the interface. If the first direction is a preset direction, a second distance the target object moves towards the first direction is calculated according to the sliding control command. Then, based on the second distance, a correlation parameter, and a damping coefficient, a first distance the target object moves towards the second direction is calculated. The correlation parameter represents the correlation between the initial velocity of the target object and the second distance, and the damping coefficient represents the energy consumption of the target object during movement. Through the above method, a method for triggering control commands according to user habits is designed, combining user habits to achieve corresponding operations, thereby improving the feasibility and operability of the solution.
[0156] Optionally, in the above Figure 3 as well as Figure 3Based on any one of the first to fourth embodiments, in the sixth optional embodiment of the object control method provided by the present invention, receiving a sliding control command for a target object oriented in a first direction input on a designated area of a touchscreen may further include:
[0157] If the first direction is not the preset direction, the first angle between the first direction and the preset direction is obtained according to the sliding control command;
[0158] Calculate the second distance the target object moves in the first direction based on the first included angle;
[0159] Determining the first distance the target object moves toward the second direction based on the sliding control command can include:
[0160] Based on the second distance, the correlation parameter, and the damping coefficient, the first distance the target object moves in the second direction is calculated. The correlation parameter represents the correlation between the initial velocity of the target object and the second distance, and the damping coefficient represents the energy consumption of the target object during the movement.
[0161] In this embodiment, a method is introduced to trigger a sliding control command in the direction of the reverse extension line of a non-target object in a specified area of the interface. That is, the touch screen starting position of the sliding control command is any position on the interface (such as the body of a car), but the target object is not dragged along the first direction. In this case, it is considered that the first direction that triggers the sliding control command is not the preset direction. At this time, the client needs to obtain the first angle between the first direction and the preset direction according to the sliding control command, and then calculate the second distance that the target object moves towards the first direction according to the first angle.
[0162] For easier understanding, please refer to Figure 17 , Figure 17 This is a schematic diagram of an embodiment of the present invention that allows arbitrary point dragging based on an application. As shown in the figure, the initial position of the touchscreen is point A (coordinates (Xa, Ya), and the final position is point B (coordinates (Xb, Yb)). The vertical distance obtained by drawing a perpendicular line from point B to a preset direction is denoted as G, and the second distance is denoted as H. The preset direction is the extension of the car's forward path. A first angle, denoted as α, can be calculated based on the second distance and the preset direction. Then, the second distance is calculated based on the first angle. The second distance can also be considered as the distance mapped to the first direction.
[0163] The second distance is denoted as C. Finally, the client can calculate the first distance of the target object based on the second distance, the correlation parameter, and the damping coefficient. The correlation parameter represents the correlation between the initial velocity of the target object and the second distance, and the damping coefficient represents the energy consumption of the target object during its movement.
[0164] To translate the above process into a more easily understood graphical diagram, please refer to [link / reference]. Figure 18 , Figure 18 This is a schematic diagram of a corner relationship formed by dragging an arbitrary point in an embodiment of the present invention. As shown in the figure, clicking the screen and dragging from point A(Xa,Ya) to point B(Xb,Yb) a distance of H corresponds to the movement distance of the car being C. The first angle between the first direction and the preset direction is denoted as α, the second angle between the first direction and the vertical direction is denoted as γ, and the third angle between the preset direction and the horizontal direction is denoted as β. According to the cosine formula, we can derive:
[0165] C = cosα × H;
[0166] According to the Pythagorean theorem:
[0167] H=[(Yb-Ya) 2 +(Yb-Ya) 2 )] 1 / 2 ;
[0168] According to the arctangent formula:
[0169] γ=tan-1(Yb-Ya) / (Xb-Xa); or γ=arctan(Yb-Ya) / (Xb-Xa).
[0170] The client can calculate the first distance of the target object based on the second distance, the correlation parameter, and the damping coefficient. The correlation parameter represents the correlation between the target object's initial velocity and the second distance, and the damping coefficient represents the energy consumption of the target object during its movement, i.e., S = (K 2 ×C 2 ) / 2R;
[0171] L=SD;
[0172] Where S represents the target object's movement distance, L represents the first distance, K represents the correlation parameter, C represents the second distance, and R represents the damping coefficient.
[0173] Furthermore, in this embodiment of the invention, a method is introduced to trigger a sliding control command in the direction of the reverse extension line of a non-target object at any position on the interface. If the first direction is not a preset direction, a first angle between the first direction and the preset direction is obtained according to the sliding control command. A second distance for the target object to move in the first direction is calculated based on the first angle. Finally, a first distance for the target object to move in the second direction is calculated based on the second distance, a correlation parameter, and a damping coefficient. The correlation parameter represents the correlation between the initial velocity of the target object and the second distance, and the damping coefficient represents the energy consumption of the target object during movement. This method reduces the difficulty of user operation. Users can trigger operations at any position on the interface, and even if the dragging direction is not on the reverse extension line of the target object's movement, the distance the target object can move can be accurately calculated, thereby improving the flexibility and positioning accuracy of the solution.
[0174] Optionally, in the above Figure 3 Based on the sixth embodiment, in the seventh optional embodiment of the object control method provided by the present invention, the starting position of the sliding control command corresponds to the first horizontal coordinate and the first vertical coordinate, and the ending position of the sliding control command corresponds to the second horizontal coordinate and the second vertical coordinate.
[0175] Obtaining the first angle between the first direction and the preset direction based on the sliding control command can include:
[0176] The horizontal distance is obtained based on the first and second horizontal coordinates of the sliding control command, and the vertical distance is obtained based on the first and second vertical coordinates of the sliding control command.
[0177] The second included angle is calculated based on the distance on the horizontal and vertical coordinates, where the second included angle represents the angle between the first direction and the vertical direction;
[0178] Obtain the third angle between the preset direction and the horizontal direction;
[0179] The first angle between the first direction and the preset direction is calculated based on the second and third included angles.
[0180] This embodiment will describe how to calculate the first included angle in four different scenarios. It is understood that in practical applications, the first included angle can also be calculated using polar coordinates. The touchscreen starting position includes a first horizontal coordinate Xa and a first vertical coordinate Ya, and the touchscreen ending position includes a second horizontal coordinate Xb and a second vertical coordinate Yb. The horizontal coordinate distance is obtained based on the first and second horizontal coordinates, and is represented as (Xb-Xa). The vertical coordinate distance is obtained based on the first and second vertical coordinates, and is represented as (Yb-Ya).
[0181] For better understanding, please refer to... Figure 18 And see Figure 19 , Figure 19 This is a schematic diagram of an embodiment of calculating the first included angle in the present invention, as shown below. Figure 18 and Figure 19 As shown, it can be seen that:
[0182] The first case satisfies (Xb-Xa)<0 and (Yb-Ya)<0, √3×|(Xb-Xa)|<|(Yb-Ya)|;
[0183] Then: γ=arctan[(Xb-Xa) / (Yb-Ya)];
[0184] Since arctan is an odd function, γ > 0;
[0185] α = 90° – β + γ;
[0186] α = 60° + γ;
[0187] Where α represents the first included angle, γ represents the second included angle, the second included angle is the angle between the first direction and the vertical direction, β represents the second included angle, and the third included angle is the angle between the preset direction and the horizontal direction.
[0188] For better understanding, please refer to... Figure 18 And see Figure 20 , Figure 20 This is a schematic diagram of another embodiment of calculating the first included angle in the present invention, as shown below. Figure 18 and Figure 20 As shown, it can be seen that:
[0189] The second case satisfies (Xb-Xa)>0 and (Yb-Ya)<0, |(Xb-Xa)|<√3×|(Yb-Ya)|;
[0190] Then: γ=arctan[(Xb-Xa) / (Yb-Ya)];
[0191] Since arctan is an odd function, γ < 0;
[0192] α = 90° – β + γ;
[0193] α = 60° + γ;
[0194] Where α represents the first included angle, γ represents the second included angle, the second included angle is the angle between the first direction and the vertical direction, β represents the second included angle, and the third included angle is the angle between the preset direction and the horizontal direction.
[0195] For better understanding, please refer to... Figure 18 And see Figure 21 , Figure 21 This is a schematic diagram of another embodiment of calculating the first included angle in the present invention, as shown below. Figure 18 and Figure 21 As shown, it can be seen that:
[0196] The third case satisfies (Xb-Xa)>0 and (Yb-Ya)<0, |(Xb-Xa)|>√3×|(Yb-Ya)|;
[0197] Then: γ=arctan[(Xb-Xa) / (Yb-Ya)];
[0198] Since arctan is an odd function, γ < 0;
[0199] α = β–(90°+γ);
[0200] α = -(60°+γ);
[0201] Where α represents the first included angle, γ represents the second included angle, the second included angle is the angle between the first direction and the vertical direction, β represents the second included angle, and the third included angle is the angle between the preset direction and the horizontal direction.
[0202] For better understanding, please refer to... Figure 18 And see Figure 22 , Figure 22 This is a schematic diagram of another embodiment of calculating the first included angle in the present invention, as shown below. Figure 18 and Figure 22 As shown, it can be seen that:
[0203] The fourth case satisfies (Xb-Xa)>0 and (Yb-Ya)>0, √3×|(Xb-Xa)|>|(Yb-Ya)|;
[0204] Then: γ=arctan[(Xb-Xa) / (Yb-Ya)];
[0205] Since arctan is an odd function, γ > 0;
[0206] α = 90° - γ + β;
[0207] α = 120°–γ;
[0208] Where α represents the first included angle, γ represents the second included angle, the second included angle is the angle between the first direction and the vertical direction, β represents the second included angle, and the third included angle is the angle between the preset direction and the horizontal direction.
[0209] Therefore, the second distance and the first included angle are only related to the start position and the end position of the touch screen. After obtaining the first included angle α, the second distance can be calculated, and then the first distance can be calculated from the second distance. This will not be elaborated here.
[0210] Furthermore, in this embodiment of the invention, a specific method for calculating the first included angle is provided. This involves obtaining the horizontal distance based on the first and second horizontal coordinates of the sliding control command, and obtaining the vertical distance based on the first and second vertical coordinates of the sliding control command. Then, based on the horizontal and vertical distances, the second included angle is calculated, where the second included angle represents the angle between the first direction and the vertical direction. Next, a third included angle between a preset direction and the horizontal direction is obtained. Finally, based on the second and third included angles, the first included angle between the first direction and the preset direction is calculated. This method provides a specific and reasonable way to calculate the first included angle, utilizing physical and mathematical principles to derive the degree measure of the first included angle, thereby improving the feasibility and operability of the solution.
[0211] The client in this invention is described in detail below. Please refer to [link / reference]. Figure 23 , Figure 23 This is a schematic diagram of one embodiment of the client in this invention. The client 20 includes:
[0212] The receiving module 201 is used to receive a sliding control command input on a designated area of the touch screen, which is directed toward a first direction and targets a target object.
[0213] The determining module 202 is used to determine a first distance that the target object moves toward a second direction according to the sliding control command received by the receiving module 201, wherein the second direction has a projection component on the reverse extension line of the first direction;
[0214] Control module 203 is used to control the target object to move to the corresponding target position according to the first distance determined by the determining module 202;
[0215] The processing module 204 is used to perform corresponding service control processing based on the degree of overlap between the target position moved by the control module 203 and the preset service position.
[0216] In this embodiment, the receiving module 201 receives a sliding control command input on a designated area of the touch screen, which is directed toward a first direction for a target object. The determining module 202 determines a first distance that the target object moves toward a second direction based on the sliding control command received by the receiving module 201. The second direction has a projection component on the reverse extension line of the first direction. The control module 203 controls the target object to move to the corresponding target position according to the first distance determined by the determining module 202. The processing module 204 performs corresponding service control processing based on the overlap between the target position moved by the control module 203 and the preset service position.
[0217] In this embodiment of the invention, a client is provided. First, the client receives a sliding control command input on a designated area of a touchscreen, specifying a target object moving in a first direction. Then, based on the sliding control command, a first distance is determined for the target object to move in a second direction, where the second direction has a projection component on the reverse extension of the first direction. The client then controls the target object to move the first distance to the corresponding target position. Finally, corresponding service control processing is performed based on the overlap between the target position and a preset service position. Through this method, users can control the movement of a target object by dragging it, and the distance the target object moves corresponds to the distance the user drags it. Therefore, users can trigger corresponding drag operations according to different scenarios, thereby improving the diversity and feasibility of the operation methods.
[0218] Optionally, in the above Figure 23 Based on the corresponding embodiments, in another embodiment of the client 20 provided by the present invention,
[0219] The processing module 204 is specifically used to obtain a target distance value based on the positional relationship between the target location and the preset service location, wherein the target distance value represents the straight-line distance from the target location to the center point of the preset service location;
[0220] If the target distance value is less than or equal to the first preset distance, then a first score is generated;
[0221] If the target distance value is greater than the first preset distance and less than or equal to the second preset distance, a second score is generated, wherein the second score is less than the first score;
[0222] If the target distance value is greater than the second preset distance, a third score is generated and a score sharing interface is displayed, wherein the third score is less than the second score.
[0223] Secondly, this embodiment of the invention provides a method for calculating scores. After the target object moves to the target location, a target distance value is obtained based on the positional relationship between the target location and a preset business location. If the target distance value is less than or equal to a first preset distance, a first score is generated. If the target distance value is greater than the first preset distance and less than or equal to a second preset distance, a second score is generated, where the second score is less than the first score. If the target distance value is greater than the second preset distance, a third score is generated, and a score sharing interface is displayed, where the third score is less than the second score. Through this method, scores are divided into three categories: high score, low score, and no score. The classification is based on the accuracy between the target location where the target object stops after moving and the actual required stopping location. The more accurate the comparison, the higher the score, thereby improving the rationality of the solution.
[0224] Optionally, in the above Figure 23 Based on the corresponding embodiments, please refer to Figure 24 In another embodiment of the client 20 provided in this invention, the client 20 further includes a setting module 205;
[0225] The receiving module 201 is further configured to receive an object setting instruction before receiving a sliding control instruction for a target object oriented in a first direction input in a designated area on the touch screen;
[0226] The setting module 205 is used to set the external form of the target object according to the object setting instruction received by the receiving module 201, wherein the external form includes at least one of color, pattern, text and shape.
[0227] Secondly, in this embodiment of the invention, before receiving a sliding control command input on a designated area of the touchscreen for a target object oriented in a first direction, the client can also receive an object setting command and set the external form of the target object according to the object setting command. The external form includes at least one of color, pattern, text, and shape. Through this method, users can design target objects according to their preferences, thereby improving the flexibility of the solution, enhancing user interaction with the application, and increasing user stickiness. Furthermore, merchants can set some distinctive external forms for target objects according to actual needs, which can be applied to various scenarios, such as auto shows, interactive activities organized by operations teams, holiday activities, and brand promotion activities, providing more visible resources through scene material embedding.
[0228] Optionally, in the above Figure 24 Based on the corresponding embodiments, please refer to Figure 25In another embodiment of the client 20 provided in this invention, the client 20 further includes an acquisition module 206 and an establishment module 207;
[0229] The acquisition module 206 is used to acquire a set of reference objects, wherein the set of reference objects includes N reference objects, M of the N reference objects have identification information, N is an integer greater than or equal to 1, and M is an integer greater than or equal to 0 and less than or equal to N;
[0230] The establishment module 207 is used to establish the correspondence between the target reference object in the set of reference objects acquired by the acquisition module 206 and the preset service location, wherein the target reference object is any one of the N reference objects.
[0231] Furthermore, in this embodiment of the invention, the client can also obtain a set of reference objects, which includes N reference objects, of which M reference objects have identification information. The client then establishes a correspondence between the target reference object in the set and a preset business location, where the target reference object is any one of the N reference objects. Through this method, users can design reference objects according to their needs, thereby improving the flexibility of the solution, enhancing user interaction with the application, and increasing user stickiness. In addition, merchants can set some distinctive external forms for the reference objects according to actual needs, thus enabling their application in various scenarios, such as auto shows, interactive activities organized by operations teams, holiday events, and brand promotion activities, providing more visible resources through scene material embedding.
[0232] Optionally, in the above Figure 24 Based on the corresponding embodiments, in another embodiment of the client 20 provided by the present invention,
[0233] The processing module 204 is specifically used to receive a score sharing instruction, wherein the score sharing instruction carries a target player identifier, and the target player identifier has a unique correspondence with the target player;
[0234] According to the score sharing instruction, a battle request instruction is sent to the target player, wherein the battle request instruction is used to request the target player to control the target object and generate a fourth score.
[0235] Furthermore, this embodiment of the invention introduces a method for sharing scores between users. The client receives a score-sharing instruction from a user, which carries a target player identifier. This target player identifier has a unique correspondence with the target player. Then, based on the score-sharing instruction, a battle request instruction is sent to the target player. This battle request instruction requests the target player to control the target object and generate a fourth score. Through this method, after each game, users can send battle invitations to their friends via an interactive application, thereby increasing the frequency of interaction between users and enhancing the social nature and spread of the solution.
[0236] Optionally, in the above Figure 23 , Figure 24 or Figure 25 Based on the corresponding embodiments, please refer to Figure 26 In another embodiment of the client 20 provided in this invention, the client further includes a computing module 208;
[0237] The calculation module 208 is used to calculate a second distance that the target object moves toward the first direction according to the sliding control command after the receiving module 201 receives a sliding control command for the target object toward the first direction input in a designated area on the touch screen. If the first direction is a preset direction, the calculation module 208 is used to calculate the second distance that the target object moves toward the first direction according to the sliding control command.
[0238] The determining module 202 is specifically used to calculate the first distance the target object moves in the second direction based on the second distance, the correlation parameter, and the damping coefficient calculated by the calculation module 208. The correlation parameter represents the correlation between the initial velocity of the target object and the second distance, and the damping coefficient represents the energy consumption of the target object during the movement.
[0239] Furthermore, in this embodiment of the invention, a method is introduced to trigger a sliding control command in the direction of the reverse extension line of a target object at a specified position on the interface. If the first direction is a preset direction, a second distance the target object moves towards the first direction is calculated according to the sliding control command. Then, based on the second distance, a correlation parameter, and a damping coefficient, a first distance the target object moves towards the second direction is calculated. The correlation parameter represents the correlation between the initial velocity of the target object and the second distance, and the damping coefficient represents the energy consumption of the target object during movement. Through the above method, a method for triggering control commands according to user habits is designed, combining user habits to achieve corresponding operations, thereby improving the feasibility and operability of the solution.
[0240] Optionally, in the above Figure 23 , Figure 24 or Figure 25 Based on the corresponding embodiments, please refer to Figure 27 In another embodiment of the client 20 provided in this invention, the client 20 further includes an acquisition module 206 and a calculation module 208;
[0241] The acquisition module 206 is further configured to, after the receiving module 201 receives a sliding control command input on a designated area of the touch screen for a target object facing a first direction, if the first direction is not a preset direction, obtain a first angle between the first direction and the preset direction according to the sliding control command.
[0242] The calculation module 208 is used to calculate the second distance the target object moves toward the first direction based on the first included angle obtained by the acquisition module 206;
[0243] The determining module 202 is specifically used to calculate the first distance the target object moves in the second direction based on the second distance, the correlation parameter, and the damping coefficient, wherein the correlation parameter represents the correlation between the initial velocity of the target object and the second distance, and the damping coefficient represents the energy consumption of the target object during the movement.
[0244] Furthermore, in this embodiment of the invention, a method is introduced to trigger a sliding control command in the direction of the reverse extension line of a non-target object at any position on the interface. If the first direction is not a preset direction, a first angle between the first direction and the preset direction is obtained according to the sliding control command. A second distance for the target object to move in the first direction is calculated based on the first angle. Finally, a first distance for the target object to move in the second direction is calculated based on the second distance, a correlation parameter, and a damping coefficient. The correlation parameter represents the correlation between the initial velocity of the target object and the second distance, and the damping coefficient represents the energy consumption of the target object during movement. This method reduces the difficulty of user operation. Users can trigger operations at any position on the interface, and even if the dragging direction is not on the reverse extension line of the target object's movement, the distance the target object can move can be accurately calculated, thereby improving the flexibility and positioning accuracy of the solution.
[0245] Optionally, in the above Figures 23 to 27 Based on any of the embodiments corresponding to the present invention, in another embodiment of the client 20 provided by the present invention, the starting position of the sliding control command corresponds to the first horizontal coordinate and the first vertical coordinate, and the ending position of the sliding control command corresponds to the second horizontal coordinate and the second vertical coordinate.
[0246] The determining module 202 is specifically used to obtain the horizontal coordinate distance based on the first horizontal coordinate and the second horizontal coordinate of the sliding control command, and to obtain the vertical coordinate distance based on the first vertical coordinate and the second vertical coordinate of the sliding control command.
[0247] The second included angle is calculated based on the horizontal coordinate distance and the vertical coordinate distance, wherein the second included angle represents the included angle between the first direction and the vertical direction;
[0248] Obtain the third included angle between the preset direction and the horizontal direction;
[0249] The first angle between the first direction and the preset direction is calculated based on the second included angle and the third included angle.
[0250] Furthermore, in this embodiment of the invention, a specific method for calculating the first included angle is provided. This involves obtaining the horizontal distance based on the first and second horizontal coordinates of the sliding control command, and obtaining the vertical distance based on the first and second vertical coordinates of the sliding control command. Then, based on the horizontal and vertical distances, the second included angle is calculated, where the second included angle represents the angle between the first direction and the vertical direction. Next, a third included angle between a preset direction and the horizontal direction is obtained. Finally, based on the second and third included angles, the first included angle between the first direction and the preset direction is calculated. This method provides a specific and reasonable way to calculate the first included angle, utilizing physical and mathematical principles to derive the degree measure of the first included angle, thereby improving the feasibility and operability of the solution.
[0251] This invention also provides another client, such as... Figure 28 As shown, for ease of explanation, only the parts related to the embodiments of the present invention are shown. For specific technical details not disclosed, please refer to the method section of the embodiments of the present invention. The terminal device can be any terminal device including mobile phones, tablet computers, personal digital assistants (PDAs), point-of-sale (POS) terminals, in-vehicle computers, etc. Taking a mobile phone as an example:
[0252] Figure 28 This is a block diagram illustrating a portion of the structure of a mobile phone related to the terminal device provided in an embodiment of the present invention. (Reference) Figure 28The mobile phone includes components such as a radio frequency (RF) circuit 310, a memory 320, an input unit 330, a display unit 340, a sensor 350, an audio circuit 360, a wireless fidelity (WiFi) module 370, a processor 380, and a power supply 390. Those skilled in the art will understand that... Figure 28 The mobile phone structure shown does not constitute a limitation on the mobile phone and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0253] The following is combined with Figure 28 A detailed introduction to each component of a mobile phone:
[0254] RF circuit 310 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and processes it with processor 380; additionally, it transmits uplink data to the base station. Typically, RF circuit 310 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier (LNA), a duplexer, etc. Furthermore, RF circuit 310 can also communicate wirelessly with networks and other devices. The aforementioned wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Message Service (SMS), etc.
[0255] The memory 320 can be used to store software programs and modules. The processor 380 executes various mobile phone functions and data processing by running the software programs and modules stored in the memory 320. The memory 320 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 320 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0256] The input unit 330 can be used to receive input numerical or character information, and to generate key signal inputs related to user settings and function control of the mobile phone. Specifically, the input unit 330 may include a touch panel 331 and other input devices 332. The touch panel 331, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel 331), and drive the corresponding connection devices according to a pre-set program. Optionally, the touch panel 331 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 380, and can also receive and execute commands sent by the processor 380. In addition, the touch panel 331 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 331, the input unit 330 may also include other input devices 332. Specifically, other input devices 332 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.
[0257] The display unit 340 can be used to display information input by the user or information provided to the user, as well as various menus of the mobile phone. The display unit 340 may include a display panel 341, which may optionally be configured as a liquid crystal display (LCD), organic light-emitting diode (OLED), or similar form. Furthermore, a touch panel 331 may cover the display panel 341. When the touch panel 331 detects a touch operation on or near it, it transmits the information to the processor 380 to determine the type of touch event. Subsequently, the processor 380 provides corresponding visual output on the display panel 341 based on the type of touch event. Although in Figure 28 In this embodiment, the touch panel 331 and the display panel 341 are two separate components to realize the input and output functions of the mobile phone. However, in some embodiments, the touch panel 331 and the display panel 341 can be integrated to realize the input and output functions of the mobile phone.
[0258] The mobile phone may also include at least one sensor 350, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 341 according to the ambient light level, and the proximity sensor can turn off the display panel 341 and / or backlight when the phone is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometer, tapping), etc. Other sensors that may be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.
[0259] Audio circuit 360, speaker 361, and microphone 362 provide an audio interface between the user and the mobile phone. Audio circuit 360 converts received audio data into electrical signals and transmits them to speaker 361, where speaker 361 converts them into sound signals for output. On the other hand, microphone 362 converts collected sound signals into electrical signals, which are received by audio circuit 360, converted into audio data, and then output to processor 380 for processing. The audio data is then transmitted via RF circuit 310 to, for example, another mobile phone, or output to memory 320 for further processing.
[0260] WiFi is a short-range wireless transmission technology. Through a WiFi module 370, mobile phones can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 28WiFi module 370 is shown, but it is understood that it is not an essential component of a mobile phone and can be omitted as needed without changing the essence of the invention.
[0261] The processor 380 is the control center of the mobile phone, connecting various parts of the phone through various interfaces and lines. It performs various functions and processes data by running or executing software programs and / or modules stored in the memory 320, and by calling data stored in the memory 320. Optionally, the processor 380 may include one or more processing units; optionally, the processor 380 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the aforementioned modem processor may also not be integrated into the processor 380.
[0262] The mobile phone also includes a power supply 390 (such as a battery) that supplies power to various components. Optionally, the power supply can be logically connected to the processor 380 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.
[0263] Although not shown, mobile phones may also include a camera, Bluetooth module, etc., which will not be described in detail here.
[0264] In this embodiment of the invention, the processor 380 included in the terminal device also has the following functions:
[0265] Receive a sliding control command input on a designated area of the touchscreen, targeting a first direction and directed toward the object;
[0266] The target object is moved a first distance toward the second direction according to the sliding control command, wherein the second direction has a projection component on the reverse extension line of the first direction;
[0267] Control the target object to move the first distance to the corresponding target position;
[0268] Based on the degree of overlap between the target location and the preset service location, corresponding service control processing is performed.
[0269] Optionally, the processor 380 is also used to perform the following steps:
[0270] Based on the positional relationship between the target location and the preset service location, a target distance value is obtained, wherein the target distance value represents the straight-line distance from the target location to the center point of the preset service location;
[0271] If the target distance value is less than or equal to the first preset distance, then a first score is generated;
[0272] If the target distance value is greater than the first preset distance and less than or equal to the second preset distance, a second score is generated, wherein the second score is less than the first score;
[0273] If the target distance value is greater than the second preset distance, a third score is generated and a score sharing interface is displayed, wherein the third score is less than the second score.
[0274] Optionally, the processor 380 is also used to perform the following steps:
[0275] Receive object setting instructions;
[0276] According to the object setting instructions, the external form of the target object is set, wherein the external form includes at least one of color, pattern, text and shape.
[0277] Optionally, the processor 380 is also used to perform the following steps:
[0278] Obtain a set of reference objects, wherein the set of reference objects includes N reference objects, M of the N reference objects have identification information, N is an integer greater than or equal to 1, and M is an integer greater than or equal to 0 and less than or equal to N;
[0279] Establish a correspondence between the target reference object in the set of reference objects and the preset service location, wherein the target reference object is any one of the N reference objects.
[0280] Alternatively, the processor 380 is specifically configured to perform the following steps:
[0281] Receive a score sharing instruction, wherein the score sharing instruction carries a target player identifier, and the target player identifier has a unique correspondence with the target player;
[0282] According to the score sharing instruction, a battle request instruction is sent to the target player, wherein the battle request instruction is used to request the target player to control the target object and generate a fourth score.
[0283] Optionally, the processor 380 is also used to perform the following steps:
[0284] If the first direction is a preset direction, then the second distance the target object moves toward the first direction is calculated according to the sliding control command;
[0285] The second distance of the target object is calculated based on the first distance, the correlation parameter, and the damping coefficient, wherein the correlation parameter represents the initial velocity of the target object and the first distance.
[0286] Optionally, the processor 380 is also used to perform the following steps:
[0287] If the first direction is not a preset direction, then the first angle between the first direction and the preset direction is obtained according to the sliding control command;
[0288] Calculate the second distance the target object moves toward the first direction based on the first included angle;
[0289] Based on the second distance, the correlation parameter, and the damping coefficient, the first distance the target object moves in the second direction is calculated. The correlation parameter represents the correlation between the initial velocity of the target object and the second distance, and the damping coefficient represents the energy consumption of the target object during the movement.
[0290] Optionally, the processor 380 is also used to perform the following steps:
[0291] The horizontal coordinate distance is obtained based on the first horizontal coordinate and the second horizontal coordinate of the sliding control command, and the vertical coordinate distance is obtained based on the first vertical coordinate and the second vertical coordinate of the sliding control command.
[0292] The second included angle is calculated based on the horizontal coordinate distance and the vertical coordinate distance, wherein the second included angle represents the included angle between the first direction and the vertical direction;
[0293] Obtain the third included angle between the preset direction and the horizontal direction;
[0294] The first angle between the first direction and the preset direction is calculated based on the second included angle and the third included angle.
[0295] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0296] In the embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units through some interfaces, and may be electrical, mechanical, or other forms.
[0297] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0298] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0299] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0300] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for object control, characterized in that, include: Receive a sliding control command input on a designated area of the touchscreen, targeting a first direction and directed toward the object; If the first direction is not a preset direction, then the first angle between the first direction and the preset direction is obtained according to the sliding control command; if the first direction is not a preset direction, it means that the sliding control command is triggered in the direction of the reverse extension line of the non-target object's forward path in the specified area. The preset direction is the track direction of the reverse extension of the target object's forward path; Calculate the second distance the target object moves toward the preset direction based on the first included angle; Based on the second distance, the correlation parameter, and the damping coefficient, a first distance is calculated for the target object to move in the second direction. The correlation parameter represents the correlation between the initial velocity of the target object and the second distance; the damping coefficient represents the energy consumption of the target object during movement; and the second direction has a projection component on the reverse extension of the preset direction. The first distance is: L = SD, where S = (K 2 ×C 2 S represents the moving distance of the target object, D represents the sliding distance of the target object in the preset direction, K represents the correlation parameter, C represents the second distance, and R represents the damping coefficient. Control the target object to move the first distance to the corresponding target position; Based on the overlap between the target location and the preset service location, corresponding service control processing is performed, specifically including: Based on the positional relationship between the target location and the preset service location, a target distance value is obtained, wherein the target distance value represents the straight-line distance from the target location to the center point of the preset service location; If the target distance value is less than or equal to the first preset distance, then a first score is generated; If the target distance value is greater than the first preset distance and less than or equal to the second preset distance, a second score is generated, wherein the second score is less than the first score; If the target distance value is greater than the second preset distance, a third score is generated and a score sharing interface is displayed, wherein the third score is less than the second score; The score sharing interface includes: Receive a score sharing instruction, wherein the score sharing instruction carries a target player identifier, and the target player identifier has a unique correspondence with the target player; According to the score sharing instruction, a battle request instruction is sent to the target player, wherein the battle request instruction is used to request the target player to control the target object and generate a fourth score; The starting position of the sliding control command corresponds to a first horizontal coordinate and a first vertical coordinate, and the ending position of the sliding control command corresponds to a second horizontal coordinate and a second vertical coordinate; obtaining the first angle between the first direction and the preset direction according to the sliding control command includes: The horizontal coordinate distance is obtained based on the first horizontal coordinate and the second horizontal coordinate of the sliding control command, and the vertical coordinate distance is obtained based on the first vertical coordinate and the second vertical coordinate of the sliding control command. The second included angle is calculated based on the horizontal coordinate distance and the vertical coordinate distance, wherein the second included angle represents the included angle between the first direction and the vertical direction; Obtain the third included angle between the preset direction and the horizontal direction; The first angle between the first direction and the preset direction is calculated based on the second angle and the third angle. The calculation method for the first included angle includes the following cases: The first case satisfies (Xb-Xa)<0 and (Yb-Ya)<0, √3×|(Xb-Xa)|<|(Yb-Ya)|; Then: γ=arctan[(Xb-Xa) / (Yb-Ya)], and γ>0; α=90°–β+γ; or, α=60°+γ; The second case satisfies (Xb-Xa)>0 and (Yb-Ya)<0, |(Xb-Xa)|<√3×|(Yb-Ya)|; Then: γ=arctan[(Xb-Xa) / (Yb-Ya)], and γ<0; α=90°–β+γ; or, α=60°+γ; The third case satisfies (Xb-Xa)>0 and (Yb-Ya)<0, |(Xb-Xa)|>√3×|(Yb-Ya)|; Then: γ=arctan[(Xb-Xa) / (Yb-Ya)], and γ<0; α = β–(90°+γ); or, α = -(60°+γ); The fourth case satisfies (Xb-Xa)>0 and (Yb-Ya)>0, √3×|(Xb-Xa)|>|(Yb-Ya)|; Then: γ=arctan[(Xb-Xa) / (Yb-Ya)], and γ>0; α=90°-γ+β; or, α=120°–γ; Wherein, α represents the first included angle, γ represents the second included angle, the second included angle is the angle between the first direction and the vertical direction, β represents the second included angle, and the third included angle is the angle between the preset direction and the horizontal direction; Xa is the first abscissa, Ya is the first ordinate, Xb is the second abscissa, and Yb is the second ordinate.
2. The method according to claim 1, characterized in that, Before receiving a sliding control command for a target object oriented in a first direction input on a designated area of the touchscreen, the method further includes: Receive object setting instructions; According to the object setting instructions, the external form of the target object is set, wherein the external form includes at least one of color, pattern, text and shape.
3. The method according to claim 1, characterized in that, The method further includes: Obtain a set of reference objects, wherein the set of reference objects includes N reference objects, M of the N reference objects have identification information, N is an integer greater than or equal to 1, and M is an integer greater than or equal to 0 and less than or equal to N; Establish a correspondence between the target reference object in the set of reference objects and the preset service location, wherein the target reference object is any one of the N reference objects.
4. The method according to any one of claims 1 to 3, characterized in that, After receiving a sliding control command for a target object oriented in a first direction input on a designated area of the touchscreen, the method further includes: If the first direction is a preset direction, then the second distance the target object moves toward the first direction is calculated according to the sliding control command.
5. A client application, characterized in that, include: The receiving module is used to receive a sliding control command for a target object oriented in a first direction, input in a designated area on the touch screen; The acquisition module is used to acquire a first angle between the first direction and the preset direction according to the sliding control command if the first direction is not a preset direction; the first direction not being a preset direction means that the sliding control command is triggered in the direction of the reverse extension line of the forward path of the non-target object in the specified area. The preset direction is the track direction of the reverse extension of the target object's forward path; The calculation module is used to calculate a second distance that the target object moves toward the preset direction based on the first included angle; The determining module is used to calculate a first distance that the target object moves in a second direction based on the second distance, the correlation parameter, and the damping coefficient. The correlation parameter represents the correlation between the initial velocity of the target object and the second distance; the damping coefficient represents the energy consumption of the target object during movement; and the second direction has a projected component on the reverse extension of the preset direction. The first distance is: L = SD, where S = (K 2 ×C 2 S represents the moving distance of the target object, D represents the sliding distance of the target object in the preset direction, K represents the correlation parameter, C represents the second distance, and R represents the damping coefficient. The control module is used to control the target object to move to the corresponding target position according to the first distance determined by the determining module; The processing module is used to perform corresponding service control processing based on the overlap between the target position moved by the control module and the preset service position, specifically including: Based on the positional relationship between the target location and the preset service location, a target distance value is obtained, wherein the target distance value represents the straight-line distance from the target location to the center point of the preset service location; If the target distance value is less than or equal to the first preset distance, then a first score is generated; If the target distance value is greater than the first preset distance and less than or equal to the second preset distance, a second score is generated, wherein the second score is less than the first score; If the target distance value is greater than the second preset distance, a third score is generated and a score sharing interface is displayed, wherein the third score is less than the second score; The score sharing interface includes: Receive a score sharing instruction, wherein the score sharing instruction carries a target player identifier, and the target player identifier has a unique correspondence with the target player; According to the score sharing instruction, a battle request instruction is sent to the target player, wherein the battle request instruction is used to request the target player to control the target object and generate a fourth score; The starting position of the sliding control command corresponds to a first horizontal coordinate and a first vertical coordinate, and the ending position of the sliding control command corresponds to a second horizontal coordinate and a second vertical coordinate; obtaining the first angle between the first direction and the preset direction according to the sliding control command includes: The horizontal coordinate distance is obtained based on the first horizontal coordinate and the second horizontal coordinate of the sliding control command, and the vertical coordinate distance is obtained based on the first vertical coordinate and the second vertical coordinate of the sliding control command. The second included angle is calculated based on the horizontal coordinate distance and the vertical coordinate distance, wherein the second included angle represents the included angle between the first direction and the vertical direction; Obtain the third included angle between the preset direction and the horizontal direction; The first angle between the first direction and the preset direction is calculated based on the second angle and the third angle. The calculation method for the first included angle includes the following cases: The first case satisfies (Xb-Xa)<0 and (Yb-Ya)<0, √3×|(Xb-Xa)|<|(Yb-Ya)|; Then: γ=arctan[(Xb-Xa) / (Yb-Ya)], and γ>0; α=90°–β+γ; or, α=60°+γ; The second case satisfies (Xb-Xa)>0 and (Yb-Ya)<0, |(Xb-Xa)|<√3×|(Yb-Ya)|; Then: γ=arctan[(Xb-Xa) / (Yb-Ya)], and γ<0; α=90°–β+γ; or, α=60°+γ; The third case satisfies (Xb-Xa)>0 and (Yb-Ya)<0, |(Xb-Xa)|>√3×|(Yb-Ya)|; Then: γ=arctan[(Xb-Xa) / (Yb-Ya)], and γ<0; α = β–(90°+γ); or, α = -(60°+γ); The fourth case satisfies (Xb-Xa)>0 and (Yb-Ya)>0, √3×|(Xb-Xa)|>|(Yb-Ya)|; Then: γ=arctan[(Xb-Xa) / (Yb-Ya)], and γ>0; α=90°-γ+β; or, α=120°–γ; Wherein, α represents the first included angle, γ represents the second included angle, the second included angle is the angle between the first direction and the vertical direction, β represents the second included angle, and the third included angle is the angle between the preset direction and the horizontal direction; Xa is the first abscissa, Ya is the first ordinate, Xb is the second abscissa, and Yb is the second ordinate.
6. A terminal device, characterized in that, include: Memory, transceiver, processor, and bus system; The memory is used to store programs; The processor is used to execute the program in the memory, including the following steps: Receive a sliding control command input on a designated area of the touchscreen, targeting a first direction and directed toward the object; If the first direction is not a preset direction, then the first angle between the first direction and the preset direction is obtained according to the sliding control command; if the first direction is not a preset direction, it means that the sliding control command is triggered in the direction of the reverse extension line of the non-target object's forward path in the designated area; the preset direction is the track direction of the reverse extension line of the target object's forward path. Calculate the second distance the target object moves toward the preset direction based on the first included angle; Based on the second distance, the correlation parameter, and the damping coefficient, a first distance is calculated for the target object to move in the second direction. The correlation parameter represents the correlation between the initial velocity of the target object and the second distance; the damping coefficient represents the energy consumption of the target object during movement; and the second direction has a projection component on the reverse extension of the preset direction. The first distance is: L = SD, where S = (K 2 ×C 2 S represents the moving distance of the target object, D represents the sliding distance of the target object in the preset direction, K represents the correlation parameter, C represents the second distance, and R represents the damping coefficient. Control the target object to move the first distance to the corresponding target position; Based on the overlap between the target location and the preset service location, corresponding service control processing is performed, specifically including: Based on the positional relationship between the target location and the preset service location, a target distance value is obtained, wherein the target distance value represents the straight-line distance from the target location to the center point of the preset service location; If the target distance value is less than or equal to the first preset distance, then a first score is generated; If the target distance value is greater than the first preset distance and less than or equal to the second preset distance, a second score is generated, wherein the second score is less than the first score; If the target distance value is greater than the second preset distance, a third score is generated and a score sharing interface is displayed, wherein the third score is less than the second score; The score sharing interface includes: Receive a score sharing instruction, wherein the score sharing instruction carries a target player identifier, and the target player identifier has a unique correspondence with the target player; According to the score sharing instruction, a battle request instruction is sent to the target player, wherein the battle request instruction is used to request the target player to control the target object and generate a fourth score; The starting position of the sliding control command corresponds to a first horizontal coordinate and a first vertical coordinate, and the ending position of the sliding control command corresponds to a second horizontal coordinate and a second vertical coordinate; obtaining the first angle between the first direction and the preset direction according to the sliding control command includes: The horizontal coordinate distance is obtained based on the first horizontal coordinate and the second horizontal coordinate of the sliding control command, and the vertical coordinate distance is obtained based on the first vertical coordinate and the second vertical coordinate of the sliding control command. The second included angle is calculated based on the horizontal coordinate distance and the vertical coordinate distance, wherein the second included angle represents the included angle between the first direction and the vertical direction; Obtain the third included angle between the preset direction and the horizontal direction; The first angle between the first direction and the preset direction is calculated based on the second angle and the third angle. The calculation method for the first included angle includes the following cases: The first case satisfies (Xb-Xa)<0 and (Yb-Ya)<0, √3×|(Xb-Xa)|<|(Yb-Ya)|; Then: γ=arctan[(Xb-Xa) / (Yb-Ya)], and γ>0; α=90°–β+γ; or, α=60°+γ; The second case satisfies (Xb-Xa)>0 and (Yb-Ya)<0, |(Xb-Xa)|<√3×|(Yb-Ya)|; Then: γ=arctan[(Xb-Xa) / (Yb-Ya)], and γ<0; α=90°–β+γ; or, α=60°+γ; The third case satisfies (Xb-Xa)>0 and (Yb-Ya)<0, |(Xb-Xa)|>√3×|(Yb-Ya)|; Then: γ=arctan[(Xb-Xa) / (Yb-Ya)], and γ<0; α = β–(90°+γ); or, α = -(60°+γ); The fourth case satisfies (Xb-Xa)>0 and (Yb-Ya)>0, √3×|(Xb-Xa)|>|(Yb-Ya)|; Then: γ=arctan[(Xb-Xa) / (Yb-Ya)], and γ>0; α=90°-γ+β; or, α=120°–γ; Wherein, α represents the first included angle, γ represents the second included angle, the second included angle is the angle between the first direction and the vertical direction, β represents the second included angle, and the third included angle is the angle between the preset direction and the horizontal direction; Xa is the first abscissa, Ya is the first ordinate, Xb is the second abscissa, and Yb is the second ordinate. The bus system is used to connect the memory and the processor to enable communication between the memory and the processor.
7. A computer-readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform the method as claimed in any one of claims 1 to 4.