Method, device, equipment and storage medium for controlling virtual props in games

By providing methods for placing controls and responding to touch operations in the game, the process of placing virtual props is simplified, the problems of complex operations and low accuracy in the existing technology are solved, and the game experience is improved.

CN113680067BActive Publication Date: 2024-10-18NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110954909.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-19
Publication Date
2024-10-18
Estimated Expiration
2041-08-19

AI Technical Summary

Technical Problem

In combat games, the placement operation of virtual props is complex and has low accuracy, which affects the player's gaming experience.

Method used

Provides a method for controlling virtual props in the game. By determining whether the virtual character has a target virtual prop, and providing placement controls on the user interface, it generates and adjusts the preview placement position of the virtual prop in response to the player's touch operation, and finally determines and places the virtual prop. The location of props, including placing them in place, moving them, and displaying preset signs to indicate where they cannot be placed.

Benefits of technology

It simplifies the placement process of virtual props, improves the convenience and accuracy of operation, reduces interference to the player's gaming experience, and improves the gaming experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113680067B_ABST
    Figure CN113680067B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, equipment and storage medium for controlling virtual props in a game, and relates to the field of game technology. The method includes: determining whether a virtual character has a target virtual prop; if so, providing a placement control associated with the target virtual prop in a user interface; in response to a first touch operation on the placement control, generating a preview placement position of the target virtual prop in the current game scene as an initial placement position; adjusting the preview placement position of the target virtual prop relative to the initial placement position according to the positional relationship between the touch point and the placement control of a second touch operation continuous with the first touch operation on the user interface; in response to the final touch point of the second touch operation, determining the preview placement position corresponding to the final touch point as the target placement position, and placing the target virtual prop at the target placement position. The present method can conveniently and accurately realize the placement of virtual props, and improve the player's gaming experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of game technology, and in particular to a method, device, equipment and storage medium for controlling virtual props in a game. Background Art

[0002] In some fighting games, the use of virtual props is usually involved, and the placement of virtual props in the game scene is very critical.

[0003] In the prior art, the placement of virtual props usually requires opening a backpack or a shortcut bar, clicking a placement control, selecting a placement location, and confirming the placement to successfully place the virtual props.

[0004] However, the above-mentioned operation of placing virtual props is extremely complicated and cumbersome, which affects the game experience of players on the one hand, and fails to meet the demand for precise placement on the other hand. Summary of the invention

[0005] The purpose of this application is to provide a method, device, equipment and storage medium for controlling virtual props in a game in order to solve the problems in the prior art that the virtual prop placement operation is complex and has low accuracy, resulting in poor player gaming experience.

[0006] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:

[0007] In a first aspect, an embodiment of the present application provides a method for controlling a virtual prop in a game, wherein the game includes a game scene and a virtual character located in the game scene, wherein at least a portion of the game scene is displayed in a user interface of a user terminal, and the method includes:

[0008] Determining whether the virtual character has a target virtual item;

[0009] If yes, providing a placement control associated with the target virtual prop in the user interface;

[0010] In response to a first touch operation on the placement control, generating a preview placement position of the target virtual prop in the current game scene as an initial placement position;

[0011] adjusting the preview placement position of the target virtual item relative to the initial placement position according to a positional relationship between a touch point on the user interface and the placement control of a second touch operation that is continuous with the first touch operation;

[0012] In response to a final touch point of the second touch operation, a preview placement position corresponding to the final touch point is determined as a target placement position, and the target virtual prop is placed at the target placement position.

[0013] Optionally, in response to the final touch point of the second touch operation, determining the preview placement position corresponding to the final touch point as the target placement position, and placing the target virtual prop at the target placement position, comprises:

[0014] If the distance between the target placement position and the initial placement position is less than a first preset distance, the virtual character is controlled to place the target virtual prop at the target placement position in situ.

[0015] Optionally, in response to the final touch point of the second touch operation, determining the preview placement position corresponding to the final touch point as the target placement position, and placing the target virtual prop at the target placement position, comprises:

[0016] If the target placement position is greater than a first preset distance and less than a second preset distance from the initial placement position, the virtual character is automatically controlled to move to within a preset range of the target placement position, and the target virtual prop is placed at the target placement position, wherein the second preset distance is greater than the first preset distance.

[0017] Optionally, in response to the final touch point of the second touch operation, determining the preview placement position corresponding to the final touch point as the target placement position, and placing the target virtual prop at the target placement position, comprises:

[0018] If the distance between the target placement position and the initial placement position is greater than a second preset distance, a preset mark is displayed at the target placement position, and the preset mark is used to remind the player that the virtual prop cannot be placed at the current position;

[0019] The target virtual prop is restored to be displayed at the initial placement position.

[0020] Optionally, in response to the final touch point of the second touch operation, after determining the preview placement position corresponding to the final touch point as the target placement position, and placing the target virtual prop at the target placement position, the method further includes:

[0021] In response to a first touch operation on the placement control, generating a preview placement position of a new target virtual prop in the current game scene as an initial placement position;

[0022] adjusting the preview placement position of the new target virtual item relative to the initial placement position according to a positional relationship between a touch point on the user interface and the placement control of a second touch operation that is continuous with the first touch operation;

[0023] In response to a final touch point of the second touch operation, determining a preview placement position corresponding to the final touch point as a target placement position;

[0024] If it is determined that a virtual prop is currently placed at the target placement position, a preview of the placement effect of the virtual prop is displayed, and the new target virtual prop is superimposed on the virtual prop.

[0025] Optionally, if the virtual character has multiple virtual props, the icon of the placed control is displayed as an identifier of a virtual prop that meets the requirements among the multiple virtual props.

[0026] Optionally, if the virtual character has multiple virtual props, the placement control further includes a switching control; and the method further includes:

[0027] In response to a confirmation operation on the switching control, determining a target virtual prop from the plurality of virtual props;

[0028] The icon of the placed control is switched to be displayed as the logo of the target virtual prop.

[0029] Optionally, in response to the first touch operation on the placement control, generating a preview placement position of the target virtual prop in the current game scene as an initial placement position includes:

[0030] In response to a pressing operation on the placement control, a preview placement position of the target virtual prop is generated in the current game scene as an initial placement position, and a pressing duration of the pressing operation satisfies a preset duration.

[0031] Optionally, the target virtual props include: a virtual ammunition box.

[0032] Optionally, the target virtual prop is used as any one of a virtual obstacle, a virtual baffle, a virtual jumping fulcrum, and a virtual ladder.

[0033] In a second aspect, an embodiment of the present application further provides a device for controlling virtual props in a game, wherein the game includes a game scene and a virtual character located in the game scene, wherein at least a portion of the game scene is displayed in a user interface of a user terminal, and the device includes: a judgment module, a display module, a generation module, an adjustment module, and a placement module;

[0034] The judging module is used to judge whether the virtual character has a target virtual item;

[0035] The display module is configured to provide, if available, a placement control associated with the target virtual item on the user interface;

[0036] The generating module is configured to generate a preview placement position of the target virtual item as an initial placement position in the current game scene in response to a first touch operation on the placement control;

[0037] The adjustment module is used to adjust the preview placement position of the target virtual prop relative to the initial placement position according to the positional relationship between the touch point of the second touch operation on the user interface and the placement control that is continuous with the first touch operation;

[0038] The placement module is used to respond to the final touch point of the second touch operation, determine the preview placement position corresponding to the final touch point as the target placement position, and place the target virtual prop at the target placement position.

[0039] Optionally, the placement module is specifically configured to control the virtual character to place the target virtual prop at the target placement position if the target placement position is less than a first preset distance from the initial placement position.

[0040] Optionally, the placement module is specifically used to automatically control the virtual character to move to within a preset range of the target placement position and place the target virtual prop at the target placement position if the target placement position is greater than a first preset distance and less than a second preset distance from the initial placement position, wherein the second preset distance is greater than the first preset distance.

[0041] Optionally, the placement module is specifically used to display a preset mark at the target placement position if the target placement position is greater than a second preset distance from the initial placement position, and the preset mark is used to prompt the player that the virtual prop cannot be placed at the current position; and restore the display of the target virtual prop at the initial placement position.

[0042] Optionally, the device further comprises: a determination module;

[0043] The generating module is further configured to generate a preview placement position of a new target virtual item as an initial placement position in the current game scene in response to a first touch operation on the placement control;

[0044] The adjustment module is further configured to adjust the preview placement position of the new target virtual prop relative to the initial placement position according to a positional relationship between a touch point on the user interface and the placement control of a second touch operation that is continuous with the first touch operation;

[0045] The determining module is configured to determine, in response to a final touch point of the second touch operation, a preview placement position corresponding to the final touch point as a target placement position;

[0046] The placement module is further configured to display a preview of the placement effect of the virtual prop if it is determined that a virtual prop is currently placed at the target placement position, and to superimpose the new target virtual prop on the virtual prop.

[0047] Optionally, if the virtual character has multiple virtual props, the icon of the placed control is displayed as an identifier of a virtual prop that meets the requirements among the multiple virtual props.

[0048] Optionally, if the virtual character has multiple virtual props, the placement control further includes a switching control; the device further includes: a switching module;

[0049] The determination module is further configured to determine a target virtual prop from the plurality of virtual props in response to a confirmation operation on the switching control;

[0050] The switching module is used to switch the icon of the placed control to the logo of the target virtual prop.

[0051] Optionally, the placement module is specifically used to generate a preview placement position of the target virtual prop as an initial placement position in the current game scene in response to a pressing operation on the placement control, and the pressing duration of the pressing operation satisfies a preset duration.

[0052] Optionally, the target virtual props include: a virtual ammunition box.

[0053] Optionally, the target virtual prop is used as any one of a virtual obstacle, a virtual baffle, a virtual jumping fulcrum, and a virtual ladder.

[0054] In a third aspect, an embodiment of the present application 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. When the electronic device is running, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to perform the steps of the method provided in the first aspect.

[0055] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method provided in the first aspect are executed.

[0056] The beneficial effects of this application are:

[0057] The present application provides a method, device, equipment and storage medium for controlling virtual props in a game, the method comprising: determining whether a virtual character has a target virtual prop; if so, providing a placement control associated with the target virtual prop on a user interface; in response to a first touch operation on the placement control, generating a preview placement position of the target virtual prop in the current game scene as an initial placement position; adjusting the preview placement position of the target virtual prop relative to the initial placement position according to the positional relationship between the touch point and the placement control of a second touch operation continuous with the first touch operation on the user interface; in response to the final touch point of the second touch operation, determining the preview placement position corresponding to the final touch point as the target placement position, and placing the target virtual prop at the target placement position. In the method, when it is determined that the virtual character has a virtual prop that can be placed, a corresponding placement control can be provided on the user interface, and according to the association between the placement control and the virtual prop, the placement of the virtual prop in the game scene can be more conveniently and accurately realized through the touch operation of the placement control, so as to reduce interference with the player's execution of the game during the placement of the virtual prop, thereby improving the player's gaming experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0059] Figure 1 Schematic diagram of the method for controlling virtual props in a game provided in an embodiment of the present application Figure 1 ;

[0060] Figure 2 A schematic diagram of a user interface provided in an embodiment of the present application;

[0061] Figure 3 Schematic diagram of the method for controlling virtual props in a game provided in an embodiment of the present application Figure 2 ;

[0062] Figure 4 Schematic diagram of the method for controlling virtual props in a game provided in an embodiment of the present application Figure 3 ;

[0063] Figure 5 A schematic diagram of another user interface provided in an embodiment of the present application;

[0064] Figure 6 Schematic diagram of the method for controlling virtual props in a game provided in an embodiment of the present application Figure 4 ;

[0065] Figure 7 A schematic diagram of another user interface provided in an embodiment of the present application;

[0066] Figure 8 A schematic diagram of a device for controlling virtual props in a game provided by an embodiment of the present application;

[0067] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0068] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0069] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0070] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0071] Figure 1 Schematic diagram of the method for controlling virtual props in a game provided in an embodiment of the present application Figure 1; The execution subject of this method can be a terminal device or a server. When the execution subject is a terminal device, the terminal device can respond to the user's operation to process the data and display the processing results on the display screen of the terminal device; when the execution subject is a server, the terminal device can respond to the user's operation and send the operation data to the server. The server processes the data and sends the processing results to the terminal device, so that the terminal device displays the processing results on the display screen.

[0072] Optionally, the game involved in the present application may include a game scene and a virtual character located in the game scene, wherein at least a portion of the game scene is displayed in a user interface of a user terminal, such as Figure 1 As shown, the method may include:

[0073] S101: Determine whether the virtual character has a target virtual item.

[0074] Virtual props are items used by virtual characters in the game to resist opponents, attack wild monsters, or upgrade exploration, such as virtual ammunition, virtual guns, virtual bulletproof vests, etc. Virtual characters can obtain game coins by defeating opponents or completing game tasks, and then purchase the required virtual props.

[0075] Optionally, whether the target virtual prop is present may be determined based on all virtual props currently in the virtual character's backpack. The target virtual props corresponding to the virtual character may be different for different game types or game scenes.

[0076] S102: If yes, provide a placement control associated with the target virtual prop in the user interface.

[0077] Figure 2 A schematic diagram of a user interface provided in an embodiment of the present application; optionally, when it is determined that a virtual character has a target virtual prop, a placement control may pop up in the user interface, wherein the placement control may be independently set from the operation control for controlling the virtual character in the game scene, so as to facilitate user use. Figure 2 Of course, in some embodiments, any control in the operation controls of the virtual character already in the game scene can also be directly marked as a placement control to perform the placement function.

[0078] Among them, the properties of the placement control can be configured to be associated with the target virtual props, and the sliding direction and sliding distance of the touch operation starting from the placement control have a corresponding relationship with the moving direction and moving distance of the target virtual props. For example: starting from the placement control, sliding 1 cm or 100 units of pixels to the left on the screen displaying the user interface can correspond to moving the target virtual props 1 meter to the left in the game scene, etc. The specific corresponding relationship can be configured according to the functions and requirements to be realized.

[0079] S103: In response to a first touch operation on a placement control, a preview placement position of a target virtual prop is generated in a current game scene as an initial placement position.

[0080] In some embodiments, in response to a first touch operation input by the player for placing a control, a target virtual prop can be generated in the game scene currently displayed on the user interface, and the current location of the target virtual prop is used as a preview placement position, wherein the preview placement position is not used as the final placement position but as an initial placement position, so that the player can preview and check whether the generated target virtual prop is the virtual prop that needs to be placed, so as to ensure that the player can accurately place the virtual prop that needs to be placed and avoid misplacement.

[0081] Optionally, the preview placement position of the target prop can be located at any position in the game scene so as not to block the operation controls. Figure 2 As shown, it can be preferably located in the middle of the game scene to facilitate the player's movement control.

[0082] The first touch operation may be a click operation or a press operation on the placed control, or may be implemented through a physical control of the user terminal, for example, the first touch operation may be input through a volume key or a power key of the user terminal. Of course, in actual applications, the first touch operation may also be replaced by a voice control operation or a floating operation.

[0083] S104: Adjust the preview placement position of the target virtual prop relative to the initial placement position according to the positional relationship between the touch point of the second touch operation on the user interface and the placement control that is continuous with the first touch operation.

[0084] In one feasible manner, after responding to the first touch operation, a second touch operation can be continuously responded to without the finger leaving the user interface to determine the touch point of the second touch operation on the user interface, wherein the touch point can also be understood as the end point of the second touch operation.

[0085] like Figure 2As shown, after the touch point is determined, the moving direction and moving distance of the placed control can be determined according to the positional relationship between the touch point and the placed control, and then the initial placement position of the target virtual prop can be adjusted based on the above-mentioned movement correspondence between the placed control and the target virtual prop.

[0086] S105 . In response to the final touch point of the second touch operation, determine the preview placement position corresponding to the final touch point as the target placement position, and place the target virtual prop at the target placement position.

[0087] Optionally, the position of the final touch point can be determined in response to the final touch point of the second touch operation on the user interface. In one achievable manner, it can be in response to the instruction of the second touch operation input by the user to leave the user interface, and the position of the second touch operation of the user on the interface when leaving the user interface is determined as the position of the final touch point, wherein it can be the position when the user's finger leaves the user interface. In another achievable manner, it can be in response to the instruction of the second touch operation input by the user to stay on the user interface for a preset time length, and the position where the second touch operation stays on the user interface is determined as the position of the final touch point. Or it can also be in response to the click instruction of the second touch operation input by the user on the user interface, such as double-click or single-click, and the position where the click operation is performed is determined as the position of the final touch point. Of course, the actual application is not limited to the several implementation methods listed, and it is only described here as an example.

[0088] Based on the determined position of the final touch point, the position of the final touch point may be used as a target placement position.

[0089] In some embodiments, during the process of placing the target virtual prop from the preview placement position to the target placement position, the moving picture of the target virtual prop can be displayed step by step in real time according to the execution of the second touch operation, or the target virtual prop at the preview placement position can be hidden and directly displayed at the target placement position. Preferably, the display effect of the real-time display of the moving picture is more realistic and can enhance the player's experience.

[0090] In summary, the method for controlling virtual props in a game provided by this embodiment includes: determining whether a virtual character has a target virtual prop; if so, providing a placement control associated with the target virtual prop on a user interface; in response to a first touch operation on the placement control, generating a preview placement position of the target virtual prop in the current game scene as an initial placement position; adjusting the preview placement position of the target virtual prop relative to the initial placement position according to the positional relationship between the touch point and the placement control of a second touch operation on the user interface that is continuous with the first touch operation; in response to the final touch point of the second touch operation, determining the preview placement position corresponding to the final touch point as the target placement position, and placing the target virtual prop at the target placement position. In this method, when it is determined that the virtual character has a virtual prop that can be placed, a corresponding placement control can be provided on the user interface, and according to the association between the placement control and the virtual prop, the placement of the virtual prop in the game scene can be realized more conveniently and accurately through the touch operation of the placement control, so as to reduce interference with the player's execution of the game during the placement of the virtual prop, thereby improving the player's gaming experience.

[0091] Optionally, in step S105, in response to the final touch point of the second touch operation, determining the preview placement position corresponding to the final touch point as the target placement position, and placing the target virtual prop at the target placement position, may include: if the target placement position is less than a first preset distance from the initial placement position, controlling the virtual character to place the target virtual prop at the target placement position in situ.

[0092] Usually, the placement position of virtual props in the game scene is limited to a certain range, and in order to increase the realism of the placement effect, after the target placement position of the target virtual prop is determined, the target virtual prop can be placed at the target placement position by controlling the virtual character to perform the corresponding placement action, thereby making the effect of the target virtual prop being placed in the game scene more realistic.

[0093] In some embodiments, when it is determined that the target placement position is less than the first preset distance from the initial placement position, the first preset distance may be a distance that causes the target virtual prop to move relatively small in the game scene. Since the movement of the target virtual prop is relatively small, the relative position of the target virtual prop and the virtual character is also relatively small, and the virtual character may be controlled to perform a placement action in situ to place the target virtual prop at the target placement position. The placement action may be controlling the virtual character to bend or squat toward the target placement position, or to make a preset gesture toward the target placement position.

[0094] Optionally, in step S105, in response to the final touch point of the second touch operation, determining the preview placement position corresponding to the final touch point as the target placement position, and placing the target virtual prop at the target placement position, may include: if the target placement position is greater than a first preset distance and less than a second preset distance from the initial placement position, automatically controlling the virtual character to move within a preset range of the target placement position, and placing the target virtual prop at the target placement position, wherein the second preset distance is greater than the first preset distance.

[0095] In other embodiments, when the target placement position and the initial placement position are greater than a first preset distance but less than a second preset distance, at this time, it can be considered that the target placement position is far away from the initial placement position, and the target placement position is also relatively far away from the virtual character. In this case, if the virtual character is controlled to place the target virtual prop at the target placement position in situ, then due to the long distance between the virtual character and the target virtual prop, the picture presented to the player is that the virtual character performs the placement action in situ, and at the same time, a target virtual prop appears at a very far target placement position, which will produce an unreal game picture and the player's experience will be poor.

[0096] In this case, the virtual character may be automatically controlled to move to within a preset range of the target placement position, thereby controlling the virtual character to perform a placement action within the preset range to place the target virtual prop at the target placement position.

[0097] In addition, the virtual character may also be controlled to move to a preset range of the target placement position through a virtual character operation control in the user interface.

[0098] Figure 3 Schematic diagram of the method for controlling virtual props in a game provided in an embodiment of the present application Figure 2 Optionally, in step S105, in response to the final touch point of the second touch operation, determining the preview placement position corresponding to the final touch point as the target placement position, and placing the target virtual prop at the target placement position may include:

[0099] S301. If the distance between the target placement position and the initial placement position is greater than a second preset distance, a preset mark is displayed at the target placement position, and the preset mark is used to prompt the player that the virtual prop cannot be placed at the current position.

[0100] In some embodiments, when the target placement position is greater than a second preset distance from the initial placement position, the target placement position may be at a position such as the edge of the game scene displayed on the current user interface, or at some preset positions where virtual props are not allowed to be placed. At this time, a preset mark may be displayed at the target placement position, wherein the preset mark may be a highlight display of the target placement position, or a preset pattern displayed at the target placement position, or an information prompt box displayed to prompt the player that the virtual prop cannot be placed at the target placement position at present.

[0101] S302: Restore the display of the target virtual prop at the initial placement position.

[0102] Optionally, since the target virtual prop cannot be placed at the currently selected target placement position, the target virtual prop can be restored to be displayed at the initial placement position, so that the player can re-determine the target placement position and re-place the target virtual prop.

[0103] Figure 4 Schematic diagram of the method for controlling virtual props in a game provided in an embodiment of the present application Figure 3 Optionally, in step S105, in response to the final touch point of the second touch operation, determining the preview placement position corresponding to the final touch point as the target placement position, and placing the target virtual prop at the target placement position, the method of the present application may further include:

[0104] S401: In response to a first touch operation on a placement control, a preview placement position of a new target virtual prop is generated in a current game scene as an initial placement position.

[0105] In some embodiments, after the target virtual prop has been successfully placed at the target placement position by executing the above method, the above steps may be repeated to generate a new preview placement position of the target virtual prop in the current game scene in response to a first touch operation on the placement control as the initial placement position of the new target virtual prop.

[0106] It should be noted that the new target virtual prop can be the same virtual prop as the above target virtual prop, or a different virtual prop, and the preview placement position of the new target virtual prop can be set to be the same as the preview placement position of the above target virtual prop, or a newly set preview placement position.

[0107] S402: Adjust the preview placement position of the new target virtual prop relative to the initial placement position according to the positional relationship between the touch point of the second touch operation on the user interface and the placement control that is continuous with the first touch operation.

[0108] Similarly, based on the positional relationship between the touch point on the user interface of a second touch operation continuous with the first touch operation and the placement control, the initial placement position of the new target virtual prop can be adjusted, wherein the setting of the movement correspondence between the placement control and the new target virtual prop can be the same as the movement correspondence between the placement control and the target virtual prop, or in other words, for the same virtual prop, its movement correspondence with the placement control can be set to be the same, and for different virtual props, they can be personalized to be different, or can also be set to be the same.

[0109] S403: In response to the final touch point of the second touch operation, determine the preview placement position corresponding to the final touch point as the target placement position.

[0110] For example: when determining the final touch point in response to the second touch operation, the finger is at the final touch point, and in response to the operation of the finger leaving the user interface at the final touch point, the position corresponding to the final touch point on the user interface can be determined as the target placement position.

[0111] S404: If it is determined that a virtual prop is currently placed at the target placement position, a preview of the placement effect of the virtual prop is displayed, and the new target virtual prop is superimposed on the virtual prop.

[0112] Figure 5 A schematic diagram of another user interface provided for an embodiment of the present application. In some embodiments, if a virtual prop has been placed at the target placement position corresponding to the determined new target virtual prop, that is, it needs to be placed repeatedly at the same position, a preview placement effect of the virtual prop can be displayed at the target placement position, wherein the displayed preview placement effect is the placement effect of the virtual prop that already exists at the position, so that the player can view what virtual prop is currently at the target placement position and in what posture the virtual prop is placed, and then the new target virtual prop can be superimposed on the existing virtual prop.

[0113] It should be noted that in some cases, a new target virtual prop is superimposed on an existing virtual prop to form a virtual springboard or a virtual obstacle, which can be used as a support springboard or as a shield for self-defense during the player's game execution.

[0114] Optionally, if the virtual character has multiple virtual props, the icon where the control is placed is displayed as an identifier of a virtual prop that meets the requirements among the multiple virtual props.

[0115] In some embodiments, a virtual character may have multiple virtual props at the same time, and the multiple virtual props may include virtual props of different types or virtual props of the same type. When there are multiple target virtual props that need to be placed among the multiple virtual props, the multiple target virtual props may have some differences in performance, etc. For example, when the target virtual prop is an ammunition box, the power of ammunition in different ammunition boxes is different, and the remaining amount of ammunition in different ammunition boxes is also different; for another example, when the target virtual prop is a gun, different models of guns have different shooting ranges and shooting capabilities.

[0116] Optionally, when it is determined that the virtual character has multiple target virtual props, when providing a placement control on the user interface, the icon of the placement control can be displayed as the logo of the target virtual prop that meets the requirements. Preferentially, the logo of the target virtual prop with the best quality and the best quality can be displayed to improve the player's game combat effectiveness. Of course, it can also be selected and displayed according to other set requirements. For example, when the target virtual prop is a virtual ammunition box, the logo of the ammunition box with the greatest ammunition power and the least ammunition can be displayed. Among them, since the number of ammunition boxes used to accommodate the ammunition of the virtual character is limited, the purpose of selecting the ammunition box with the least ammunition can be to use up the ammunition in the ammunition box as soon as possible, so as to use the empty ammunition box to accommodate new ammunition and ensure that the player has sufficient ammunition.

[0117] Optionally, the above-mentioned display of the icon of the placed control as the logo of the target virtual prop can be implemented in different ways, for example: displaying the logo of the target virtual prop with a simulated image of the target virtual prop, or displaying the logo of the target virtual prop in the form of a textual description of the name of the target virtual prop. The specific display form is not limited.

[0118] Figure 6 Schematic diagram of the method for controlling virtual props in a game provided in an embodiment of the present application Figure 4 ; Figure 7 A schematic diagram of another user interface provided by an embodiment of the present application. Optionally, in the above steps, if the virtual character has multiple virtual props, placing the control may also include switching the control; the method of the present application may also include:

[0119] S601: In response to a confirmation operation on a switching control, determining a target virtual prop from a plurality of virtual props.

[0120] like Figure 7 As shown in (a), a switch control can be independently set above the placed control. The switch control can be a triangular arrow mark as shown in the figure, or it can also be a mark of other shapes.

[0121] In addition, icon switching may be implemented not in the form of switching controls, but directly by placing controls, for example, responding to other operations other than the first touch operation and the second touch operation on the placed control to implement the icon switching function.

[0122] Optionally, in response to a confirmation operation on the switching control, the confirmation operation may be a click operation or a press operation, such as Figure 7 (a) shows all different types of target virtual props possessed by the virtual character, so that the player can select a target virtual prop from multiple target virtual props.

[0123] S602: Switch the icon of the placed control to display as the logo of the target virtual prop.

[0124] Optionally, in response to a confirmation operation on the selected target virtual item, for example, clicking on the logo or image of the displayed target virtual item, Figure 7 (b), the icon of the placed control can be switched to display as the identification of the target virtual prop, for example, the image of the target virtual prop, or the number of the target virtual prop, etc. At the same time, the display of other unselected target virtual props can be folded.

[0125] Optionally, in step S103, in response to the first touch operation for placing the control, generating a preview placement position of the target virtual prop in the current game scene as the initial placement position, may include: in response to a press operation for placing the control, generating a preview placement position of the target virtual prop in the current game scene as the initial placement position, and the pressing duration of the press operation satisfies a preset duration.

[0126] In one feasible manner, the first touch operation may be a pressing operation on the placement control, wherein the pressing operation may be a long press operation with a pressing duration satisfying a preset duration. For example, in response to a continuous pressing operation for 3 seconds on the placement control, a preview placement position of the target virtual prop may be generated in the current game scene as the initial placement position.

[0127] Of course, the first touch operation may be not limited to a press operation, but may also be two interval clicks, etc. By setting it to a long press or an interval click, it can be distinguished from a normal press operation or a click operation to prevent misidentification of the operation and affect the player's game.

[0128] Optionally, the target virtual props include: a virtual ammunition box. Optionally, the target virtual props can be used as any one of a virtual obstacle, a virtual baffle, a virtual jumping fulcrum, and a virtual ladder.

[0129] In this embodiment, the target virtual props are mainly virtual ammunition boxes. When it is a virtual ammunition box, in addition to carrying ammunition, it can also be used as a virtual obstacle in the game process to block opponents; or as a virtual baffle to help the virtual character resist invasion; or as a virtual jumping fulcrum to make a transition through a virtual jumping fulcrum, a virtual ladder, etc., to help the virtual character reach a higher place, etc.

[0130] Of course, in the actual game, the target virtual props can be any props, such as virtual guns, virtual bows and arrows, etc. Similarly, when the target virtual props are other props, they can also be used for other functions in the game, which are specifically set according to the actual performance of the virtual props.

[0131] In summary, the method for controlling virtual props in a game provided by this embodiment includes: determining whether a virtual character has a target virtual prop; if so, providing a placement control associated with the target virtual prop on a user interface; in response to a first touch operation on the placement control, generating a preview placement position of the target virtual prop in the current game scene as an initial placement position; adjusting the preview placement position of the target virtual prop relative to the initial placement position according to the positional relationship between the touch point and the placement control of a second touch operation continuous with the first touch operation on the user interface; in response to the final touch point of the second touch operation, determining the preview placement position corresponding to the final touch point as the target placement position, and placing the target virtual prop at the target placement position. In this method, when it is determined that the virtual character has a virtual prop that can be placed, a corresponding placement control can be provided on the user interface, and according to the association between the placement control and the virtual prop, the virtual prop can be placed in the game scene more conveniently and accurately through the touch operation of the placement control, so as to reduce interference with the player's execution of the game during the placement of the virtual prop, thereby improving the player's gaming experience.

[0132] The following describes the apparatus, device, storage medium, etc. used to execute the method for controlling virtual props in the game provided by the present application. The specific implementation process and technical effects are described above and will not be repeated below.

[0133] Figure 8 The following is a schematic diagram of a device for controlling virtual props in a game provided by an embodiment of the present application. The functions implemented by the device for controlling virtual props in the game correspond to the steps performed by the above method. Figure 8 As shown, the device may include: a determination module 810, a display module 820, a generation module 830, an adjustment module 840, and a placement module 850;

[0134] The judging module 810 is used to judge whether the virtual character has the target virtual prop;

[0135] A display module 820, for providing a placement control associated with the target virtual prop in the user interface, if any;

[0136] A generating module 830, configured to generate a preview placement position of a target virtual item as an initial placement position in the current game scene in response to a first touch operation on a placement control;

[0137] An adjustment module 840, configured to adjust the preview placement position of the target virtual item relative to the initial placement position according to a positional relationship between a touch point on the user interface and the placement control of a second touch operation that is continuous with the first touch operation;

[0138] The placement module 850 is configured to, in response to the final touch point of the second touch operation, determine the preview placement position corresponding to the final touch point as the target placement position, and place the target virtual prop at the target placement position.

[0139] Optionally, the placement module 850 is specifically configured to control the virtual character to place the target virtual prop at the target placement position if the target placement position is less than a first preset distance from the initial placement position.

[0140] Optionally, the placement module 850 is specifically used to automatically control the virtual character to move to within a preset range of the target placement position and place the target virtual prop at the target placement position if the target placement position is greater than a first preset distance and less than a second preset distance from the initial placement position, wherein the second preset distance is greater than the first preset distance.

[0141] Optionally, the placement module 850 is specifically used to display a preset mark at the target placement position if the target placement position is greater than a second preset distance from the initial placement position, and the preset mark is used to prompt the player that the virtual prop cannot be placed at the current position; and restore the display of the target virtual prop at the initial placement position.

[0142] Optionally, the device further includes: a determination module;

[0143] The generating module 830 is further configured to generate a preview placement position of a new target virtual item as an initial placement position in the current game scene in response to a first touch operation on the placement control;

[0144] The adjustment module 840 is further used to adjust the preview placement position of the new target virtual prop relative to the initial placement position according to the position relationship between the touch point and the placement control of the second touch operation continuous with the first touch operation on the user interface;

[0145] a determination module, configured to determine, in response to a final touch point of the second touch operation, a preview placement position corresponding to the final touch point as a target placement position;

[0146] The placement module 850 is further configured to display a preview of the placement effect of the virtual prop if it is determined that a virtual prop is currently placed at the target placement position, and to superimpose the new target virtual prop on the virtual prop.

[0147] Optionally, if the virtual character has multiple virtual props, the icon where the control is placed is displayed as an identifier of a virtual prop that meets the requirements among the multiple virtual props.

[0148] Optionally, if the virtual character has multiple virtual props, the placement control further includes a switching control; the device further includes: a switching module;

[0149] The determination module is further used to determine a target virtual prop from the plurality of virtual props in response to a confirmation operation on the switching control;

[0150] The switching module is used to switch the icon of the placed control to the logo of the target virtual prop.

[0151] Optionally, the placement module 850 is specifically configured to generate a preview placement position of the target virtual prop as an initial placement position in the current game scene in response to a pressing operation on the placement control, and the pressing duration of the pressing operation satisfies a preset duration.

[0152] Optionally, the target virtual props include: a virtual ammunition box.

[0153] Optionally, the target virtual prop is used as any one of a virtual obstacle, a virtual baffle, a virtual jumping fulcrum, and a virtual ladder.

[0154] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0155] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital singnal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0156] The above modules can be connected or communicated with each other via a wired connection or a wireless connection. The wired connection may include a metal cable, an optical cable, a hybrid cable, etc., or any combination thereof. The wireless connection may include a connection in the form of a LAN, a WAN, Bluetooth, a ZigBee, or NFC, or any combination thereof. Two or more modules may be combined into a single module, and any one module may be divided into two or more units. Those skilled in the art will clearly understand that for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application.

[0157] It should be noted that the above modules can be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital singnal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module above is implemented in the form of a processing element scheduling program code, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call program codes. For another example, these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0158] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, wherein the terminal may be a computing device with data processing capabilities.

[0159] The device may include: a processor 801 and a memory 802 .

[0160] The memory 802 is used to store programs, and the processor 801 calls the programs stored in the memory 802 to execute the above method embodiment. The specific implementation method and technical effect are similar and will not be repeated here.

[0161] The memory 802 stores program codes, and when the program codes are executed by the processor 801, the processor 801 executes various steps of the method according to various exemplary embodiments of the present application described in the above “Exemplary Method” section of this specification.

[0162] Processor 801 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor (DigitalSignal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as a hardware processor to be executed, or a combination of hardware and software modules in the processor can be executed.

[0163] The memory 802 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 802 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0164] Optionally, the present application also provides a program product, such as a computer-readable storage medium, including a program, which is used to execute the above method embodiment when executed by a processor.

[0165] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0166] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0167] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0168] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.

Claims

1. A method for controlling virtual props in a game, characterized in that: The game includes a game scene and a virtual character located in the game scene, wherein at least a portion of the game scene is displayed in a user interface of a user terminal, and the method includes: Determining whether the virtual character has a target virtual item; If yes, providing a placement control associated with the target virtual prop in the user interface; the property of the placement control is configured to be associated with the target virtual prop; In response to a first touch operation on the placement control, generating a preview placement position of the target virtual prop in the current game scene as an initial placement position; adjusting the preview placement position of the target virtual item relative to the initial placement position according to a positional relationship between a touch point on the user interface and the placement control of a second touch operation that is continuous with the first touch operation; In response to the final touch point of the second touch operation, the preview placement position corresponding to the final touch point is determined as the target placement position, and the target virtual prop is placed at the target placement position; the sliding direction of the second touch operation starting from the placement control has a corresponding relationship with the moving direction of the target virtual prop; the sliding distance of the second touch operation starting from the placement control has a corresponding relationship with the moving distance of the target virtual prop.

2. The method according to claim 1, characterized in that In response to the final touch point of the second touch operation, determining the preview placement position corresponding to the final touch point as the target placement position, and placing the target virtual prop at the target placement position, including: If the distance between the target placement position and the initial placement position is less than a first preset distance, the virtual character is controlled to place the target virtual prop at the target placement position in situ.

3. The method according to claim 1, characterized in that: In response to the final touch point of the second touch operation, determining the preview placement position corresponding to the final touch point as the target placement position, and placing the target virtual prop at the target placement position, including: If the target placement position is greater than a first preset distance and less than a second preset distance from the initial placement position, the virtual character is automatically controlled to move to within a preset range of the target placement position, and the target virtual prop is placed at the target placement position, wherein the second preset distance is greater than the first preset distance.

4. The method according to claim 1, characterized in that: In response to the final touch point of the second touch operation, determining the preview placement position corresponding to the final touch point as the target placement position, and placing the target virtual prop at the target placement position, including: If the distance between the target placement position and the initial placement position is greater than a second preset distance, a preset mark is displayed at the target placement position, and the preset mark is used to remind the player that the virtual prop cannot be placed at the current position; The target virtual prop is restored to be displayed at the initial placement position.

5. The method according to any one of claims 1 to 4, characterized in that: After, in response to the final touch point of the second touch operation, determining the preview placement position corresponding to the final touch point as the target placement position, and placing the target virtual prop at the target placement position, the method further includes: In response to a first touch operation on the placement control, generating a preview placement position of a new target virtual prop in the current game scene as an initial placement position; adjusting the preview placement position of the new target virtual item relative to the initial placement position according to a positional relationship between a touch point on the user interface and the placement control of a second touch operation that is continuous with the first touch operation; In response to a final touch point of the second touch operation, determining a preview placement position corresponding to the final touch point as a target placement position; If it is determined that a virtual prop is currently placed at the target placement position, a preview of the placement effect of the virtual prop is displayed, and the new target virtual prop is superimposed on the virtual prop.

6. The method according to any one of claims 1 to 4, characterized in that: If the virtual character has multiple virtual props, the icon of the placed control is displayed as an identifier of a virtual prop that meets the requirements among the multiple virtual props.

7. The method according to claim 6, characterized in that If the virtual character has multiple virtual props, the placement control also includes a switching control; the method also includes: In response to a confirmation operation on the switching control, determining a target virtual prop from the plurality of virtual props; The icon of the placed control is switched to be displayed as the logo of the target virtual prop.

8. The method according to claim 1, characterized in that In response to the first touch operation on the placement control, generating a preview placement position of the target virtual prop in the current game scene as an initial placement position, includes: In response to a pressing operation on the placement control, a preview placement position of the target virtual prop is generated in the current game scene as an initial placement position, and a pressing duration of the pressing operation satisfies a preset duration.

9. The method according to any one of claims 1 to 4, characterized in that: The target virtual props include: a virtual ammunition box.

10. The method according to any one of claims 1 to 4, characterized in that: The target virtual prop is used as any one of a virtual obstacle, a virtual baffle, a virtual jumping fulcrum, and a virtual ladder.

11. A device for controlling virtual props in a game, characterized in that: The game includes a game scene and a virtual character located in the game scene, wherein at least a part of the game scene is displayed in a user interface of a user terminal, and the device includes: a judgment module, a display module, a generation module, an adjustment module, and a placement module; The judging module is used to judge whether the virtual character has a target virtual item; The display module is configured to provide, if present, a placement control associated with the target virtual prop on the user interface; the property of the placement control is configured to be associated with the target virtual prop; The generating module is configured to generate a preview placement position of the target virtual item as an initial placement position in the current game scene in response to a first touch operation on the placement control; The adjustment module is used to adjust the preview placement position of the target virtual prop relative to the initial placement position according to the positional relationship between the touch point of the second touch operation on the user interface and the placement control that is continuous with the first touch operation; The placement module is used to respond to the final touch point of the second touch operation, determine the preview placement position corresponding to the final touch point as the target placement position, and place the target virtual prop at the target placement position; the sliding direction of the second touch operation starting from the placement control has a corresponding relationship with the moving direction of the target virtual prop; the sliding distance of the second touch operation starting from the placement control has a corresponding relationship with the moving distance of the target virtual prop.

12. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores program 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 program instructions to perform the steps of any method described in claims 1 to 10.

13. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are executed.