Virtual character control method and device, electronic equipment and storage medium
By displaying the resources required for virtual character movement and the safe movement position in the graphical user interface of the terminal device, the problem of excessive resource consumption in virtual character control is solved, and the game interaction experience and rhythm control are improved.
Patent Information
- Application Number
- CN202210134174.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-14
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2042-02-14
AI Technical Summary
In existing virtual character control methods, players need to consume a lot of health when controlling the virtual character to jump, resulting in a poor game interaction experience and making it impossible to perform subsequent control operations effectively.
The terminal device provides a graphical user interface to respond to player control operations, displays the amount of virtual resources required for the virtual character to move from the current location to the target location, and recommends safe relocation locations when necessary to ensure that resource consumption is within a safe range.
It improves the player's game interaction experience, allowing players to better grasp the game rhythm and perform subsequent operations, and reduces unnecessary consumption of virtual character resources.
Smart Images

Figure CN116617665B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of game technology, and in particular to a virtual character control method, device, electronic device, and storage medium. Background Technology
[0002] With the rapid development of internet technology and the growing entertainment and cultural needs of the people, the development of games has entered a new era. In order to achieve the diversity of games, games often allow players to control the virtual character they are playing to jump to a designated location in the game scene.
[0003] In existing games, when players control virtual characters to jump in the game scene, they generally lose more health points if they jump to a higher height.
[0004] It can be seen that the existing virtual character control methods are relatively simple, which is not conducive to players performing other control operations, resulting in a poor game interaction experience. Summary of the Invention
[0005] The purpose of this application is to address the shortcomings of the prior art by providing a virtual character control method, device, electronic device, and storage medium that can recommend safe displacement positions to players, enabling them to perform subsequent control operations, maintain game rhythm, and improve the player's game interaction experience.
[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:
[0007] In a first aspect, the present invention provides a virtual character control method, which provides a graphical user interface through a terminal device, the graphical user interface including at least one virtual character in a game scene, the method comprising:
[0008] In response to a first control operation for a first position in the game scene, a first quantity of virtual resources required to move from the current position of the virtual character to the first position is displayed at the first position;
[0009] If the first quantity is not less than a preset quantity threshold, then at least one second position and a second quantity of virtual resources required to move from the current position of the virtual character to the second position are displayed between the current position of the virtual character and the first position in the game scene.
[0010] Wherein, the second quantity is less than the preset quantity threshold.
[0011] In an optional implementation, the graphical user interface further includes a displacement control, and the first control operation for the first position in the game scene includes: a touch operation with the displacement control and the first position as the starting and ending positions.
[0012] In an optional implementation, the touch operation with the displacement control and the first position as the starting and ending positions includes:
[0013] A touch operation that slides from the first position to the displacement control; and / or a touch operation that slides from the displacement control to the first position.
[0014] In an optional implementation, the step of identifying and displaying at least one second position between the current position of the virtual character in the game scene and the first position includes:
[0015] Based on the maximum displacement distance of the virtual character without consuming virtual resources for each displacement, or based on the displacement distance that the virtual character can successfully displace each time, at least one second position is marked and displayed between the current position and the first position of the virtual character in the game scene. The displacement distance that the virtual character can successfully displace each time refers to the displacement distance when the virtual resource is not zero when the virtual character moves from the current position to the second position.
[0016] In an optional implementation, after identifying and displaying at least one second position between the current position of the virtual character in the game scene and the first position, and a second quantity of virtual resources required to move from the current position of the virtual character to the second position, the method further includes:
[0017] In response to the selection operation of a first safe position in at least one second position, the virtual character is controlled to move from the current position to the first safe position.
[0018] In an optional implementation, the step of identifying and displaying a first quantity of virtual resources required to move from the virtual character's current position to the first position in response to a first control operation for a first position in the game scene includes:
[0019] In response to a first control operation targeting a first position in the game scene, the relative position difference between the current position of the virtual character and the first position is determined;
[0020] Based on the relative position difference and the virtual resources required for the virtual character to move one unit, calculate the first quantity of virtual resources required to move from the current position of the virtual character to the first position, and display the first quantity at the first position.
[0021] In an optional implementation, if the second position includes multiple locations, the step of controlling the virtual character to move from its current position to the first safe position in response to a selection operation of at least one second position includes:
[0022] In response to a successive selection operation of at least two first safe positions among a plurality of second positions, the virtual character is controlled to move sequentially from the current position to each of the first safe positions according to the selection time corresponding to each first safe position.
[0023] In an optional implementation, the method further includes:
[0024] If no selection operation is received within the preset time period, then any safe location is determined from at least one of the second locations as the first safe location, and the virtual character is controlled to move from the current location to the first safe location.
[0025] In an optional implementation, after controlling the virtual character to move from its current position to the first safe position corresponding to the selection operation, the method further includes:
[0026] In response to a second control operation, the virtual character is controlled to move from the first safe position to the second safe position corresponding to the second control operation.
[0027] In an optional implementation, the response to the first control operation for a first position in the game scene further includes:
[0028] The displacement direction of the virtual character is determined based on the current position of the virtual character and the first position;
[0029] The type of virtual resources required by the virtual character is determined based on the displacement direction.
[0030] In an optional implementation, the method further includes:
[0031] Obtain the quantity of virtual resources held by the virtual character;
[0032] If it is determined that the number of virtual resources corresponding to the selection operation is greater than the number of virtual resources held by the virtual character, a preset prompt message is displayed, which is used to indicate that the number of virtual resources held by the virtual character is insufficient.
[0033] In a second aspect, the present invention provides a virtual character control device that provides a graphical user interface via a terminal device, the graphical user interface including at least one virtual character in a game scene, the device comprising:
[0034] A response module is configured to respond to a first control operation for a first position in the game scene, and to identify and display at the first position a first quantity of virtual resources required to move from the current position of the virtual character to the first position;
[0035] An identification module is configured to, if the first quantity is not less than a preset quantity threshold, identify and display at least one second position and a second quantity of virtual resources required to move from the current position of the virtual character to the second position in the game scene between the current position of the virtual character and the first position; wherein the second quantity is less than the preset quantity threshold.
[0036] In an optional implementation, the graphical user interface further includes a displacement control, and the first control operation for the first position in the game scene includes: a touch operation with the displacement control and the first position as the starting and ending positions.
[0037] In an optional implementation, the touch operation with the displacement control and the first position as the starting and ending positions includes:
[0038] A touch operation that slides from the first position to the displacement control; and / or a touch operation that slides from the displacement control to the first position.
[0039] In an optional implementation, the identification module is specifically used to identify and display at least one second position between the current position and the first position of the virtual character in the game scene, based on the maximum displacement distance corresponding to each displacement of the virtual character without consuming virtual resources, or based on the displacement distance that the virtual character can successfully displace each time. The displacement distance that the virtual character can successfully displace each time refers to the displacement distance when the virtual resource is not zero when the virtual character moves from the current position to the second position.
[0040] In an optional implementation, the identification module is further configured to control the virtual character to move from its current position to the first safe position in response to a selection operation of a first safe position among at least one second position.
[0041] In an optional implementation, the response module is specifically configured to respond to a first control operation for a first position in the game scene and determine the relative position difference between the current position of the virtual character and the first position.
[0042] Based on the relative position difference and the virtual resources required for the virtual character to move one unit, calculate the first quantity of virtual resources required to move from the current position of the virtual character to the first position, and display the first quantity at the first position.
[0043] In an optional implementation, if the second position includes multiple locations, the identification module is further configured to, in response to a continuous selection operation of at least two first safe locations among the multiple second locations, control the virtual character to move sequentially from the current location to each of the first safe locations according to the selection time corresponding to each of the first safe locations.
[0044] In an optional implementation, the virtual character control device further includes a control module, configured to determine any safe position from at least one of the second positions as the first safe position if no selection operation is received within a preset time period, and control the virtual character to move from the current position to the first safe position.
[0045] In an optional implementation, the control module is further configured to, in response to a second control operation, control the virtual character to move from the first safe position to the second safe position corresponding to the second control operation.
[0046] In an optional implementation, the response module is further configured to determine the displacement direction of the virtual character based on the current position of the virtual character and the first position;
[0047] The type of virtual resources required by the virtual character is determined based on the displacement direction.
[0048] In an optional implementation, the virtual character control device further includes: a display module, configured to acquire the quantity of virtual resources held by the virtual character; if it is determined that the quantity of virtual resources corresponding to the selection operation is greater than the quantity of virtual resources held by the virtual character, then a preset prompt message is displayed, the preset prompt message being used to indicate that the quantity of virtual resources held by the virtual character is insufficient.
[0049] Thirdly, the present invention provides an electronic device, comprising: a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the virtual character control method as described in any of the foregoing embodiments.
[0050] Fourthly, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the virtual character control method as described in any of the foregoing embodiments.
[0051] The beneficial effects of this application are:
[0052] This application provides a virtual character control method, device, electronic device, and storage medium. The method can provide a graphical user interface through a terminal device. The graphical user interface includes at least one virtual character in a game scene. The method includes: responding to a first control operation for a first position in the game scene, marking and displaying a first quantity of virtual resources required to move from the virtual character's current position to the first position at the first position; if the first quantity is not less than a preset quantity threshold, marking and displaying at least one second position and a second quantity of virtual resources required to move from the virtual character's current position to the second position between the virtual character's current position and the first position in the game scene; wherein the second quantity is less than the preset quantity threshold, thereby enabling the system to recommend safe displacement positions to the player through the marked at least one second position and the second quantity corresponding to the second position, so that the player can perform other subsequent control operations, grasp the game rhythm, and improve the player's game interaction experience. Attached Figure Description
[0053] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0054] Figure 1 A cloud interaction system architecture diagram provided for an embodiment of this application;
[0055] Figure 2 A flowchart illustrating a virtual character control method provided in an embodiment of this application;
[0056] Figure 3 This application provides a schematic diagram of the displacement of a virtual character.
[0057] Figure 4 A flowchart illustrating another virtual character control method provided in this application embodiment;
[0058] Figure 5 A flowchart illustrating yet another virtual character control method provided in this application embodiment;
[0059] Figure 6 A flowchart illustrating another virtual character control method provided in this application embodiment;
[0060] Figure 7 A flowchart illustrating yet another virtual character control method provided in this application embodiment;
[0061] Figure 8A flowchart illustrating another virtual character control method provided in this application embodiment;
[0062] Figure 9 A flowchart illustrating yet another virtual character control method provided in this application embodiment;
[0063] Figure 10 A schematic diagram of the functional modules of a virtual character control device provided in an embodiment of this application;
[0064] Figure 11 This is a schematic diagram of an electronic device structure provided in an embodiment of this application. Detailed Implementation
[0065] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0066] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0067] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0068] In existing games, players need to consume a certain amount of health when controlling virtual characters to jump in the game scene, but the amount of health consumed each time is unknown to the player. Therefore, it is not conducive to the player's subsequent control operations and the player's grasp of the entire game process, resulting in a poor game interaction experience.
[0069] In one embodiment of this application, the virtual character control method can run on a terminal device or a server. The terminal device can be a local terminal device. When the virtual character control method runs on a server, it can be implemented and executed based on a cloud interaction system, which can include a server and client devices.
[0070] Figure 1 A cloud interaction system architecture diagram is provided for embodiments of this application, such as... Figure 1As shown, the system may include: a client device 10 and a server 20, wherein the client device 10 can be connected to the server 20 via a network 30.
[0071] In an optional implementation, various cloud applications, such as cloud gaming, can run under the cloud interaction system. Taking cloud gaming as an example, cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operation mode, the game program and the game screen presentation are separated. The storage and execution of the game character's transmission method are completed on the cloud gaming server. The client device 10 is used for receiving and sending data and presenting the game screen. For example, the client device 10 can be a display device with data transmission capabilities close to the user, such as a mobile terminal, television, computer, or PDA; however, the terminal device for information processing is the cloud gaming server in the cloud. When playing the game, the player operates the client device 10 to send operation commands to the cloud gaming server. The cloud gaming server runs the game according to the operation commands, encodes and compresses the game screen and other data, returns it to the client device 10 through the network, and finally, the client device 10 decodes and outputs the game screen.
[0072] In an optional implementation, taking a game as an example, the local terminal device stores the game program and is used to display the game screen. The local terminal device is used to interact with the player through a graphical user interface (GUI), i.e., conventionally by downloading, installing, and running the game program via an electronic device. The local terminal device can provide the GUI to the player in various ways, such as rendering it on the terminal's display screen or providing it to the player via holographic projection. For example, the local terminal device can include a display screen for displaying the GUI, which includes game screens, and a processor for running the game, generating the GUI, and controlling the display of the GUI on the display screen.
[0073] Figure 2 This application provides a flowchart illustrating a virtual character control method. The method can provide a graphical user interface (GUI) through a terminal device. The terminal device can be either the aforementioned local terminal device or a client device in the aforementioned cloud interaction system. The GUI can include at least one virtual character in a game scene, such as... Figure 2 As shown, the method may include:
[0074] S101, in response to a first control operation for a first position in the game scene, a first quantity of virtual resources required to move from the current position of the virtual character to the first position is displayed at the first position.
[0075] Optionally, the first control operation can be generated by applying touch methods such as clicking, long pressing, swiping, and dragging to the first position on the touch screen, without limitation. The first position in the game scene is the target position for the virtual character's movement. In response to this first control operation, the first quantity of virtual resources required for the virtual character to move from the current position to the first position can be calculated and marked at the first position. This allows players to easily and intuitively know the number of virtual resources required to move from the current position to the first position.
[0076] In some embodiments, the virtual resource may refer to the virtual character's health points, virtual medicines, etc., and is not limited thereto. Optionally, depending on different application scenarios, the virtual character's movement method may be: leaping, jumping, sliding, etc., and is not limited thereto.
[0077] S102. If the first quantity is not less than a preset quantity threshold, then at least one second position and a second quantity of virtual resources required to move from the current position of the virtual character to the second position are displayed between the current position of the virtual character and the first position in the game scene.
[0078] The second quantity is less than a preset quantity threshold. The preset quantity threshold represents the maximum amount of virtual resources that a virtual character is allowed to consume while moving safely. It can be customized by the player or determined in real time based on the amount of virtual resources held by the virtual character in the game scene. For example, when the virtual resource is the virtual character's health, the preset quantity threshold can be 1 / 2 of the total health of the virtual character in the game scene. Of course, the specific setting method is not limited to this.
[0079] Based on the above description, to better understand this application, the following embodiment will be described using the virtual character's health as an example of virtual resources. It can be seen that if the first quantity is not less than a preset quantity threshold, it means that the amount of virtual resources required for the virtual character to move from the current position to the first position is large, that is, the virtual character loses a lot of health when moving from the current position to the first position. This is not conducive to the player's subsequent control operations (such as controlling the virtual character to release skills or launching an attack on the enemy virtual character), nor is it conducive to the player's overall grasp of the game rhythm. In this case, the embodiment of this application can mark and display at least one second position and a second quantity of virtual resources required to move from the virtual character's current position to the second position between the virtual character's current position and the first position in the game scene. The second quantity is less than the preset quantity threshold. That is, at least one second position can be understood as the position when the virtual character moves safely. Based on this description, it can be seen that at this time, by marking and displaying each second position and the second quantity corresponding to each second position, a safe position for movement can be recommended to the player, so that the player can choose any second position as the position for the next movement according to the actual application scenario. This facilitates the player's subsequent control operations, grasps the game rhythm, and improves the player's game interaction experience.
[0080] In some embodiments, there may be a relative position difference between the current position and the first position, a relative position difference between the current position and the second position, and a relative position difference between the second position and the first position. This is not limited here and may vary depending on the actual application scenario.
[0081] In summary, this application provides a virtual character control method. This method can provide a graphical user interface (GUI) via a terminal device. The GUI includes at least one virtual character in a game scene. The method includes: responding to a first control operation on a first position in the game scene, identifying and displaying a first quantity of virtual resources required to move from the virtual character's current position to the first position at the first position; if the first quantity is not less than a preset quantity threshold, identifying and displaying at least one second position and a second quantity of virtual resources required to move from the virtual character's current position to the second position between the virtual character's current position and the first position in the game scene; wherein the second quantity is less than the preset quantity threshold, enabling the system to recommend safe movement positions to the player through the identified at least one second position and the corresponding second quantity, allowing the player to perform subsequent control operations, maintain game rhythm, and improve the player's game interaction experience.
[0082] Optionally, the graphical user interface further includes a displacement control for a first control operation at a first position in the game scene, including: a touch operation with the displacement control and the first position as the starting and ending positions.
[0083] The start and end positions refer to the initial and final positions. Specifically, the first control operation at the first position in the game scene can include: a touch operation starting at the position of the displacement control and ending at the first position; or a touch operation starting at the first position and ending at the position of the displacement control. In some embodiments, the specific touch method can be a continuous click operation based on the touchscreen, such as clicking the movement control first and then clicking the first position. Of course, in other embodiments, it can also be a swipe operation, a drag operation, etc., which are not limited here.
[0084] Optionally, a touch operation with the displacement control and the first position as the starting and ending positions includes: a touch operation of sliding from the first position to the displacement control; and / or, a touch operation of sliding from the displacement control to the first position.
[0085] In some embodiments, the aforementioned first control operation may be a sliding operation whereby the player slides from a first position to a displacement control on the touchscreen, or it may be a sliding operation whereby the player slides from a displacement control to a first position on the touchscreen. This is not limited to any particular method and can be flexibly set according to the actual application scenario. Of course, depending on the actual application scenario, users may also be allowed to switch between the two touch control methods through custom settings.
[0086] Optionally, the above-mentioned marker between the current position of the virtual character in the game scene and the first position displays at least one second position, including:
[0087] Based on the maximum displacement distance of the virtual character without consuming virtual resources for each displacement, or based on the displacement distance that the virtual character can successfully displace each time, at least one second position is marked and displayed between the current position and the first position of the virtual character in the game scene.
[0088] The displacement distance that a virtual character can successfully move each time refers to the displacement distance from the current position to the second position when the virtual resource is not zero.
[0089] In some embodiments, when determining and displaying at least one second position between the current position and the first position of a virtual character in a game scene, there are two possible methods for determination:
[0090] Method 1: Based on the maximum displacement distance of the virtual character when each displacement does not consume virtual resources, and the position difference between the current position of the virtual character in the game scene and the first position, determine at least one second position and mark it.
[0091] Figure 3This is a schematic diagram of the displacement of a virtual character provided in an embodiment of this application. For example, if the maximum displacement distance of the virtual character M without consuming health during each displacement (jump) is 100 meters, and the position difference between the current position O and the first position B is 380 meters, then three second positions can be determined between the current position O and the first position B, such as... Figure 3 As shown, positions A1, A2, and A3 are respectively. The position difference between position A3 and the first position B is 80 meters. The position differences between the current position O and position A1, position A1 and position A2, and position A2 and position A3 are 100 meters each. It can be seen that if the player controls the virtual character M to jump according to the recommended second positions, it can be guaranteed that the virtual character M does not consume health with each jump. This allows the virtual character M to launch virtual attacks on other enemy virtual characters in time after jumping to each second position, improving the player's win rate and game experience. Of course, in some embodiments, the division can also be based on the principle of average division. As can be seen from the above description, if the virtual character is to jump from the current position O to the first position B, it is necessary to control the virtual character to jump at least 4 times to ensure that the virtual character does not consume health with each displacement (jump). Therefore, according to the principle of average division, the displacement that the virtual character can jump each time is determined to be 95 meters (380 meters ÷ 4 = 95 meters). Of course, the specific determination method is not limited to this and can be different depending on the actual application scenario.
[0092] Method 2: Considering that in some game scenarios, players want to control a virtual character located at its current position to move as close as possible to a first position through a single displacement, optionally, at least one second position can be determined and displayed based on the displacement distance that the virtual character can successfully displace each time and the positional difference between the virtual character's current position and the first position in the game scene. The displacement distance that the virtual character can successfully displace each time is related to the virtual resources currently held by the virtual character. It can be understood that the more virtual resources the virtual character currently holds, the farther the displacement distance will be; otherwise, the displacement distance will be shorter.
[0093] Specifically, a second position can be determined based on the current successful displacement distance of the virtual character and the position difference between the current position of the virtual character and the first position in the game scene. After the player controls the virtual character to jump to the second position, considering that the player may further control the virtual character in the second position to accumulate virtual resources (for example, by completing tasks to obtain a certain amount of health), the second position can optionally be used as the current position. Based on the current successful displacement distance of the virtual character and the position difference between the current position of the virtual character and the first position in the game scene, the next second position is iteratively determined and marked.
[0094] For example, if a virtual character's current health is 70% of its total health, and you want to move the virtual character from its current position O to a first position B, and the position difference between the current position O and the first position B is known to be 380 meters, then in this case, a second position can be determined between the current position O and the first position B based on the position points where the virtual character is allowed to move in the game scene. It can be understood that the determined second position should be a position point where the virtual character is allowed to move in the game scene, and the virtual character's health will not be completely consumed when moving from the current position to the second position, that is, the virtual character will not die. For example, the virtual character's remaining health can be 20% of its total health. In this way, the virtual character at the current position can be moved to the first position with as few displacements as possible, improving the player's interaction efficiency.
[0095] Figure 4 This is a flowchart illustrating another virtual character control method provided in an embodiment of this application. Optionally, as... Figure 4 As shown, after identifying and displaying at least one second position and a second quantity of virtual resources required to move from the virtual character's current position to the second position in the game scene, the method further includes:
[0096] S201, in response to the selection operation of a first safe position among at least one second position, control the virtual character to move from the current position to the first safe position.
[0097] As can be seen from the above description, by marking at least one second position and the corresponding second quantity in the game scene, players can be assisted in determining the displacement position of the virtual character by combining the actual application scenario and the quantity of virtual resources held by the virtual character.
[0098] In some embodiments, the first safe position can be any of at least one second position, without limitation. Optionally, players can use touch screens to interact with the first safe position through tapping, long-pressing, swiping, dragging, or other touch methods to generate a selection operation for the first safe position. In response to the selection operation, players can control the virtual character to move from the current position (e.g., leap, jump, slide, etc.) to the first safe position, thus allowing players to conveniently and quickly control the virtual character to move.
[0099] Figure 5 This is a flowchart illustrating another virtual character control method provided in an embodiment of this application. Optionally, as... Figure 5 As shown, in response to a first control operation targeting a first position in the game scene, the first quantity of virtual resources required to move from the virtual character's current position to the first position is displayed at the first position, including:
[0100] S301, In response to a first control operation targeting a first position in the game scene, determine the relative position difference between the current position of the virtual character and the first position.
[0101] The explanation of the first control operation can be found in the relevant sections above, and will not be repeated here. In response to the first control operation, the relative position difference between the virtual character's current position and the first position can be determined. Optionally, the relative position difference may include the position difference in the horizontal direction and / or the position difference in the vertical direction, which is not limited here.
[0102] S302. Based on the relative position difference and the virtual resources required for the virtual character to move one unit, calculate the first quantity of virtual resources required to move from the current position of the virtual character to the first position, and display the first quantity at the first position.
[0103] Optionally, the virtual resources required for each unit of movement of the virtual character can be the same or different. That is, the virtual resources required for each unit of movement of the virtual character can be linearly related to the relative position difference or non-linearly related, without limitation. Based on the above explanation, it can be seen that by calculating the relative position difference and the virtual resources required for each unit of movement of the virtual character, a first quantity can be calculated and displayed at the first position. It can be understood that at this time, the player can clearly know the amount of virtual resources required for this movement based on the displayed first quantity, which facilitates the player in planning the movement route.
[0104] Optionally, if there are multiple second positions, the above-mentioned response to selecting a first safe position among at least one second position, controlling the virtual character to move from the current position to the first safe position, includes:
[0105] In response to a successive selection operation of at least two first safe positions among a plurality of second positions, the virtual character is controlled to move sequentially from the current position to each first safe position according to the selection time corresponding to each first safe position.
[0106] In some embodiments, considering that players need to control virtual characters to continuously move according to multiple second positions marked in the game scene in order to improve the player's movement efficiency, optionally, at least two first safe positions among the multiple second positions can be acted on by continuous clicking, dragging or other touch methods on the touch screen to generate a continuous selection operation. In response to the continuous selection operation, the selection time corresponding to each first safe position can be obtained. According to the selection time corresponding to each first safe position, the virtual character can be controlled to move from the current position to each first safe position in sequence, thereby achieving the purpose of continuous movement.
[0107] For example, if the game scene displays multiple second positions, and taking the virtual character's current position as a reference, the multiple second positions displayed in the game scene, in order from top to bottom and left to right, are A5, A6, A7, and A8. Optionally, the player can use a touchscreen to perform a series of clicks on the two first safe positions, A5 and A6, to generate a continuous selection operation. In response to this continuous selection operation, the player can control the virtual character to move from its current position to position A5, and then from position A5 to position A6. Of course, the specific control method is not limited to this.
[0108] Figure 6 This is a flowchart illustrating another virtual character control method provided in an embodiment of this application. Optionally, as... Figure 6 As shown, after identifying and displaying at least one second position and a second quantity of virtual resources required to move from the virtual character's current position to the second position in the game scene, the method further includes:
[0109] S401. If no selection operation is received within the preset time period, determine any safe position from at least one second position as the first safe position, and control the virtual character to move from the current position to the first safe position.
[0110] The preset time period can be set based on human experience or customized by the player. Optionally, its value can be 10 seconds, 30 seconds, etc., without limitation. If no selection operation for the first safe position among at least one second position is received within the preset time period, considering that this may be due to the player's lack of familiarity with the movement method and failure to make a timely selection, optionally, any safe position from at least one second position can be determined as the first safe position, and the virtual character can be controlled to move from the current position to the first safe position. This can guide the player and help them move quickly. Furthermore, it is understood that by applying the embodiments of this application, the game progress can also be advanced without player interaction, improving the player's gaming experience.
[0111] Figure 7 This is a flowchart illustrating another virtual character control method provided in an embodiment of this application. Optionally, as... Figure 7 As shown, after the virtual character is moved from its current position to the first safe position corresponding to the selection operation, the process further includes:
[0112] S501, In response to the second control operation, control the virtual character to move from the first safe position to the second safe position corresponding to the second control operation.
[0113] The second safe position corresponding to the second control operation can be any position other than the first safe position from a plurality of second positions, and is not limited herein. Optionally, the second control operation can be generated by applying touch methods such as clicking, long pressing, sliding, and dragging to the second safe position on the touch screen. In response to the second control operation, the virtual character can be moved from the first safe position to the second safe position. That is, by applying the embodiments of this application, after controlling the virtual character to move to the first safe position to perform game tasks (such as accumulating health, picking up virtual equipment, or engaging in combat with other enemy virtual characters), the virtual character can be further controlled to move from the first safe position to the second safe position, so that the player can flexibly adjust the movement route according to the actual application scenario, thereby improving the applicability of this application.
[0114] Figure 8 This is a flowchart illustrating another virtual character control method provided in an embodiment of this application. In some embodiments, to diversify gameplay and improve the player's interactive experience, different virtual resources can be consumed when the virtual character moves in different directions. Optionally, as... Figure 8 As shown, the response to the first control operation targeting the first position in the game scene further includes:
[0115] S601. Determine the displacement direction of the virtual character based on its current position and first position.
[0116] Optionally, the relative position difference between the virtual character's current position and the first position can be determined based on the virtual character's current position and the first position. If the relative position difference includes a position difference in the vertical direction, the displacement direction of the virtual character can be further determined based on this vertical position difference. Optionally, if the vertical position difference indicates that the virtual character's current position is higher than the first position, the displacement direction of the virtual character can be determined as the first displacement direction; otherwise, the displacement direction of the virtual character can be determined as the second displacement direction.
[0117] S602. Determine the type of virtual resources required by the virtual character based on the direction of displacement.
[0118] Based on the above explanation, after determining the virtual character's direction of movement, the type of virtual resources the virtual character needs to consume can be further determined according to that direction. For example, when the virtual character moves in the first direction, it needs to consume its health; when it moves in the second direction, it needs to consume its virtual medicines. Of course, the specific setting is not limited to this. Depending on the actual application scenario, it can also be set so that when the virtual character moves in the second direction, it first consumes its virtual medicines, and if virtual medicines are insufficient, it consumes its health.
[0119] Figure 9 This is a flowchart illustrating another virtual character control method provided in an embodiment of this application.
[0120] Optionally, such as Figure 9 As shown, the above method also includes:
[0121] S701. Obtain the quantity of virtual resources held by the virtual character.
[0122] S702. If it is determined that the number of virtual resources corresponding to the selected operation is greater than the number of virtual resources held by the virtual character, a preset prompt message is displayed. The preset prompt message is used to indicate that the number of virtual resources held by the virtual character is insufficient.
[0123] As explained above, controlling a virtual character to move from its current position to the first safe position requires a certain amount of virtual resources. Each selection operation requires a corresponding amount of virtual resources. In this case, considering that the amount of virtual resources corresponding to the selection operation may be greater than the amount of virtual resources held by the virtual character, it is understandable that the virtual character will fail to move from its current position to the first safe position due to insufficient virtual resources. Therefore, to improve the player's gaming experience and help them understand why the movement operation failed, a preset prompt message can optionally be displayed in the graphical user interface. This preset prompt message can indicate that the virtual character's virtual resources are insufficient, thus improving the player's gaming interaction experience.
[0124] Figure 10 This is a functional module diagram of a virtual character control device provided in an embodiment of this application. The device can provide a graphical user interface (GUI) via a terminal device. The GUI includes at least one virtual character in a game scene. The basic principle and technical effects of this device are the same as those in the aforementioned corresponding method embodiments. For brevity, parts not mentioned in this embodiment can be referred to the corresponding content in the method embodiments. Figure 10 As shown, the virtual character control device 100 includes:
[0125] The response module 110 is configured to respond to a first control operation for a first position in the game scene, and to display at the first position a first quantity of virtual resources required to move from the current position of the virtual character to the first position;
[0126] The identification module 120 is configured to, if the first quantity is not less than a preset quantity threshold, identify and display at least one second position between the current position of the virtual character and the first position in the game scene, and a second quantity of virtual resources required to move from the current position of the virtual character to the second position; wherein the second quantity is less than the preset quantity threshold.
[0127] In an optional implementation, the graphical user interface further includes a displacement control, and the first control operation for the first position in the game scene includes: a touch operation with the displacement control and the first position as the starting and ending positions.
[0128] In an optional implementation, the touch operation with the displacement control and the first position as the starting and ending positions includes:
[0129] A touch operation that slides from the first position to the displacement control; and / or a touch operation that slides from the displacement control to the first position.
[0130] In an optional implementation, the identification module is specifically used to identify and display at least one second position between the current position and the first position of the virtual character in the game scene, based on the maximum displacement distance corresponding to each displacement of the virtual character without consuming virtual resources, or based on the displacement distance that the virtual character can successfully displace each time. The displacement distance that the virtual character can successfully displace each time refers to the displacement distance when the virtual resource is not zero when the virtual character moves from the current position to the second position.
[0131] In an optional implementation, the identification module is further configured to control the virtual character to move from its current position to the first safe position in response to a selection operation of a first safe position among at least one second position.
[0132] In an optional implementation, the response module is specifically configured to respond to a first control operation for a first position in the game scene and determine the relative position difference between the current position of the virtual character and the first position.
[0133] Based on the relative position difference and the virtual resources required for the virtual character to move one unit, calculate the first quantity of virtual resources required to move from the current position of the virtual character to the first position, and display the first quantity at the first position.
[0134] In an optional implementation, if the second position includes multiple locations, the identification module is further configured to, in response to a continuous selection operation of at least two first safe locations among the multiple second locations, control the virtual character to move sequentially from the current location to each of the first safe locations according to the selection time corresponding to each of the first safe locations.
[0135] In an optional implementation, the virtual character control device further includes a control module, configured to determine any safe position from at least one of the second positions as the first safe position if no selection operation is received within a preset time period, and control the virtual character to move from the current position to the first safe position.
[0136] In an optional implementation, the control module is further configured to, in response to a second control operation, control the virtual character to move from the first safe position to the second safe position corresponding to the second control operation.
[0137] In an optional implementation, the response module is further configured to determine the displacement direction of the virtual character based on the current position of the virtual character and the first position;
[0138] The type of virtual resources required by the virtual character is determined based on the displacement direction.
[0139] In an optional implementation, the virtual character control device further includes: a display module, configured to acquire the quantity of virtual resources held by the virtual character; if it is determined that the quantity of virtual resources corresponding to the selection operation is greater than the quantity of virtual resources held by the virtual character, then a preset prompt message is displayed, the preset prompt message being used to indicate that the quantity of virtual resources held by the virtual character is insufficient.
[0140] The above-described device is used to execute the method provided in the foregoing embodiments, and its implementation principle and technical effect are similar, so they will not be described again here.
[0141] These modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more microprocessors, or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a system-on-a-chip (SOC).
[0142] Figure 11 This is a schematic diagram of an electronic device structure provided in an embodiment of this application. The electronic device can be the aforementioned terminal device or a server. Figure 11 As shown, the electronic device may include a processor 210, a storage medium 220, and a bus 230. The storage medium 220 stores machine-readable instructions executable by the processor 210. When the electronic device is running, the processor 210 communicates with the storage medium 220 via the bus 230, and the processor 210 executes the machine-readable instructions to perform the steps of the above method embodiment. The specific implementation and technical effects are similar and will not be described in detail here.
[0143] Optionally, this application also provides a computer-readable storage medium storing a computer program, which, when run by a processor, executes the steps of the above-described method embodiments. The specific implementation and technical effects are similar and will not be repeated here.
[0144] In the several embodiments provided in this application, it should be understood that the disclosed apparatus 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 through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0145] 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.
[0146] Furthermore, the functional units in the various embodiments of this application 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 in a combination of hardware and software functional units.
[0147] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods of the various embodiments of this application. 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.
[0148] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0149] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need further definition and explanation in subsequent figures. The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for controlling a virtual character, characterized in that, The method of providing a graphical user interface via a terminal device, the graphical user interface including at least one virtual character in a game scene, includes: In response to a first control operation for a first position in the game scene, a first quantity of virtual resources required to move from the current position of the virtual character to the first position is displayed at the first position; If the first quantity is not less than a preset quantity threshold, then at least one second position and a second quantity of virtual resources required to move from the current position of the virtual character to the second position are displayed between the current position of the virtual character and the first position in the game scene. Wherein, the second quantity is less than the preset quantity threshold.
2. The method according to claim 1, characterized in that, The graphical user interface further includes a displacement control, and the first control operation for the first position in the game scene includes: a touch operation with the displacement control and the first position as the starting and ending positions.
3. The method according to claim 2, characterized in that, The touch operation with the displacement control and the first position as the starting and ending positions includes: A touch operation that slides from the first position to the displacement control; and / or, A touch operation that involves sliding from the displacement control to the first position.
4. The method according to claim 1, characterized in that, The step of identifying and displaying at least one second position between the current position of the virtual character in the game scene and the first position includes: Based on the maximum displacement distance of the virtual character without consuming virtual resources for each displacement, or based on the displacement distance that the virtual character can successfully displace each time, at least one second position is marked and displayed between the current position and the first position of the virtual character in the game scene. The displacement distance that the virtual character can successfully displace each time refers to the displacement distance when the virtual resource is not zero when the virtual character moves from the current position to the second position.
5. The method according to claim 1, characterized in that, After identifying and displaying at least one second position between the current position of the virtual character in the game scene and the first position, and a second quantity of virtual resources required to move from the current position of the virtual character to the second position, the method further includes: In response to the selection operation of a first safe position in at least one second position, the virtual character is controlled to move from the current position to the first safe position.
6. The method according to claim 1, characterized in that, The first control operation in response to a first position in the game scene, displaying at the first position a first quantity of virtual resources required to move from the virtual character's current position to the first position, includes: In response to a first control operation targeting a first position in the game scene, the relative position difference between the current position of the virtual character and the first position is determined; Based on the relative position difference and the virtual resources required for the virtual character to move one unit, calculate the first quantity of virtual resources required to move from the current position of the virtual character to the first position, and display the first quantity at the first position.
7. The method according to claim 5, characterized in that, If the second position includes multiple locations, the step of controlling the virtual character to move from its current location to the first safe location in response to the selection operation of a first safe location among at least one second location includes: In response to a successive selection operation of at least two first safe positions among a plurality of second positions, the virtual character is controlled to move sequentially from the current position to each of the first safe positions according to the selection time corresponding to each first safe position.
8. The method according to claim 5, characterized in that, The method further includes: If no selection operation is received within the preset time period, then any safe location is determined from at least one of the second locations as the first safe location, and the virtual character is controlled to move from the current location to the first safe location.
9. The method according to claim 7, characterized in that, After controlling the virtual character to move from its current position to the first safe position corresponding to the selection operation, the method further includes: In response to a second control operation, the virtual character is controlled to move from the first safe position to the second safe position corresponding to the second control operation.
10. The method according to claim 1, characterized in that, The response to the first control operation for the first position in the game scene further includes: The displacement direction of the virtual character is determined based on the current position of the virtual character and the first position; The type of virtual resources required by the virtual character is determined based on the displacement direction.
11. The method according to claim 5, characterized in that, The method further includes: Obtain the quantity of virtual resources held by the virtual character; If it is determined that the number of virtual resources corresponding to the selection operation is greater than the number of virtual resources held by the virtual character, a preset prompt message is displayed, which is used to indicate that the number of virtual resources held by the virtual character is insufficient.
12. A virtual character control device, characterized in that, A graphical user interface is provided via a terminal device, the graphical user interface including at least one virtual character in a game scene, the device comprising: A response module is configured to respond to a first control operation for a first position in the game scene, and to identify and display at the first position a first quantity of virtual resources required to move from the current position of the virtual character to the first position; An identification module is configured to, if the first quantity is not less than a preset quantity threshold, identify and display at least one second position and a second quantity of virtual resources required to move from the current position of the virtual character to the second position in the game scene between the current position of the virtual character and the first position; wherein the second quantity is less than the preset quantity threshold.
13. An electronic device, characterized in that, include: The device includes a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the virtual character control method as described in any one of claims 1-11.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the virtual character control method as described in any one of claims 1-11.
Citation Information
Patent Citations
Game character control method and game character control device
CN110465088A
Virtual object control method and device, terminal and storage medium
CN111589135A