Virtual item discarding method, device, electronic device and storage medium

By obtaining the volume parameters and position of virtual props and automatically discarding them at virtual objects, the problem of cumbersome discarding operations of virtual props in the game is solved, rapid discarding and hidden discarding are achieved, and the game experience is improved.

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

Patent Information

Application Number
CN202111509140.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-10
Publication Date
2024-10-01
Estimated Expiration
2041-12-10

AI Technical Summary

Technical Problem

In the game, the operation for players to discard virtual props is cumbersome and complicated, which affects the efficiency of players to quickly discard virtual props.

Method used

By providing a graphical user interface, the target volume parameters and current position of the target virtual prop are obtained, the candidate virtual object is determined, and the virtual prop is automatically discarded when the virtual object is close to the target position, simplifying the discard operation.

Benefits of technology

It realizes the rapid discarding of virtual props, reduces the complexity of user operations, and discards them in hidden locations to avoid being discovered by other users, thereby enhancing the fun of the game.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114159785B_ABST
    Figure CN114159785B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a method, device, electronic device and storage medium for discarding virtual props; the embodiment of the present application responds to a first operation on the inventory, obtains a target volume parameter of a target virtual prop corresponding to the inventory; obtains the current position of the virtual object; determines a candidate virtual object according to the target volume parameter and the current position; responds to a second operation on the candidate virtual object, determines the target virtual object; when the current position of the virtual object and the target position meet a preset relationship, automatically discards the target virtual prop in the inventory to the target position. Actively search for the position that can block the target virtual prop through the target volume parameter to avoid users repeatedly searching for the discard position, and automatically discard the target virtual prop when the user approaches the selected target position, thereby simplifying the operation of discarding the virtual prop and realizing automatic and rapid discarding of the virtual prop.
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, electronic device and storage medium for discarding virtual props. Background Art

[0002] Currently, in many games, players can obtain virtual props in the game scene by picking up, fighting, etc., where virtual props can include consumables such as food, medicine, etc., and equipment such as weapons, clothing, etc. Players may obtain some virtual props they do not need in the game, and they can discard these virtual props to reserve a larger virtual backpack space to carry more virtual props needed by players.

[0003] However, when a player wants to discard a virtual item, the operation is cumbersome and complicated, which is not conducive to the player discarding the virtual item quickly. Summary of the invention

[0004] The embodiments of the present application provide a method, device, electronic device and storage medium for discarding virtual props, which are simple and convenient to operate and can quickly discard virtual props.

[0005] An embodiment of the present application provides a method for discarding a virtual prop, which provides a graphical user interface through a terminal, wherein the content displayed by the graphical user interface at least partially includes a virtual scene and a virtual object therein, and the graphical user interface provides an inventory. The method includes: in response to a first operation acting on the inventory, obtaining a target volume parameter of a target virtual prop corresponding to the inventory, wherein the target volume parameter is used to characterize the spatial volume occupied by the target virtual prop to be discarded in the virtual scene; obtaining a current position of the virtual object in the virtual scene; determining a candidate virtual object according to the target volume parameter and the current position; in response to a second operation on the candidate virtual object, determining a target virtual object from the candidate virtual objects; and when the current position of the virtual object satisfies a preset relationship with the target position, discarding the target virtual prop in the inventory to the target position, wherein the target position is the position of the target virtual object in the virtual scene.

[0006] The embodiment of the present application further provides a virtual prop discarding device, which provides a graphical user interface through a terminal, wherein the content displayed by the graphical user interface at least partially includes a virtual scene and virtual objects therein, and the graphical user interface provides an inventory, and the device includes:

[0007] A parameter acquisition module, for responding to a first operation on the inventory, to acquire a target volume parameter of a target virtual item corresponding to the inventory, the target volume parameter being used to characterize the spatial volume occupied by the target virtual item to be discarded in the virtual scene; a position acquisition module, for acquiring a current position of the virtual object in the virtual scene; a candidate module, for determining a candidate virtual object based on the target volume parameter and the current position; a determination module, for responding to a second operation on the candidate virtual object, to determine a target virtual object from the candidate virtual objects; and a discarding module, for discarding the target virtual item in the inventory to the target position when the current position of the virtual object satisfies a preset relationship with the target position, the target position being the position of the target virtual object in the virtual scene.

[0008] In some embodiments, the parameter acquisition module also includes a discard quantity acquisition unit, a single volume parameter acquisition unit, and a calculation unit; the discard quantity acquisition unit is used to obtain the discard quantity of the target virtual prop; the single volume parameter acquisition unit is used to obtain the single volume parameter of the target virtual prop; the calculation unit is used to calculate the target volume parameter of the target virtual prop corresponding to the inventory based on the discard quantity and the single volume parameter.

[0009] In some embodiments, the discard quantity acquisition unit is further used to display an adjustment control, where the adjustment control is used to adjust the discard quantity of the target virtual item; and in response to an adjustment operation on the adjustment control, the discard quantity of the target virtual item is acquired.

[0010] In some embodiments, the candidate module also includes a target area determination unit, a volume parameter acquisition unit, and a candidate virtual object determination unit; the target area determination unit is used to determine the target area according to the current position; the volume parameter acquisition unit is used to obtain the volume parameters corresponding to all virtual objects in the target area; the candidate virtual object determination unit is used to determine the candidate virtual object according to the size relationship between the target volume parameters and the volume parameters corresponding to the virtual object.

[0011] In some embodiments, the candidate virtual object determining unit is further configured to determine the virtual object corresponding to the volume parameter as a candidate virtual object when the volume parameter is greater than or equal to the target volume parameter.

[0012] In some embodiments, the determination module is also used to display the identifier and selection control of the candidate virtual object, and the selection control corresponds one-to-one to the identifier of the candidate virtual object; when a second operation is detected, the selection control acted upon by the second operation is determined as the target selection control; and the candidate virtual object referred to by the candidate virtual object identifier corresponding to the target selection control is determined as the target virtual object.

[0013] In some embodiments, the discarding module also includes a target position determination unit, a straight-line distance acquisition unit, a to-be-discarded position determination unit and a discarding unit; the target position determination unit is used to obtain the position of the target virtual prop in the virtual scene as the target position; the straight-line distance acquisition unit is used to obtain the straight-line distance between the current position and the target position; the to-be-discarded position determination unit is used to determine that the target position whose straight-line distance is less than or equal to a preset distance is a to-be-discarded position, and obtain the number of the to-be-discarded positions; the discarding unit is used to discard the target virtual prop to the to-be-discarded position if the number of the to-be-discarded positions is 1.

[0014] In some embodiments, the discarding unit is also used to obtain the volume parameters of the target virtual objects at the positions to be discarded if the number of the positions to be discarded is greater than 1; determine the priority of the positions to be discarded according to the volume parameters; and discard the target virtual props to the position to be discarded with the highest priority.

[0015] In some embodiments, the discarding unit is further used to obtain the straight-line distance between each of the to-be-discarded positions and the current position if the number of the to-be-discarded positions is greater than 1; and discard the target virtual prop to the to-be-discarded position with the shortest straight-line distance.

[0016] In some embodiments, the virtual prop discarding device also includes a change module. After the target virtual prop in the inventory is discarded to the target position, the change module is used to control the display state of the inventory from a first display state to a second display state. The first display state is the state before discarding the target virtual prop, and the second display state is the state after discarding the target virtual prop.

[0017] An embodiment of the present application also provides an electronic device, including a memory storing multiple instructions; the processor loads instructions from the memory to execute the steps in any one of the virtual prop discarding methods provided in the embodiments of the present application.

[0018] The embodiment of the present application also provides a computer-readable storage medium, which stores a plurality of instructions, and the instructions are suitable for a processor to load to execute the steps in any one of the virtual prop discarding methods provided in the embodiment of the present application.

[0019] In the embodiment of the present application, when the user triggers the discarding of the target virtual prop, by obtaining the total volume of the target virtual prop to be discarded, the virtual object that can hide the target virtual prop to be discarded is searched near the virtual object based on the total volume, and the virtual object is provided to the user for selection, thereby avoiding the user from searching for the location that can hide the target virtual prop to be discarded. The target virtual object selected by the user is obtained; when the virtual object moves near the target virtual object, the target virtual prop is automatically discarded at the target virtual object, which simplifies the user's operation of discarding the virtual prop and realizes the quick discarding of the virtual prop. In addition, the virtual prop can be discarded at a location where the virtual prop can be hidden to avoid being discovered by other users, thereby enhancing the fun of the game.

[0020] In the present application, the target volume parameters and the current position of the virtual object can be used to actively find the position of the virtual prop that can block the target, so as to avoid the user repeatedly searching for the discarding position, and the target virtual prop is automatically discarded when the user approaches the selected target position. Thus, the operation of discarding the virtual prop is simplified and the automatic and rapid discarding of the virtual prop is realized. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 It is a flowchart of a method for discarding virtual props provided in an embodiment of the present application;

[0023] Figure 2 is a schematic diagram of an interface for displaying an item list provided in an embodiment of the present application;

[0024] Figure 3 is a schematic diagram of an interface of a display adjustment control provided in an embodiment of the present application;

[0025] Figure 4 is a flowchart of a method for discarding virtual props provided by another embodiment of the present application;

[0026] Figure 5 This is a schematic diagram of a target area provided in an embodiment of the present application;

[0027] Figure 6 is another schematic diagram of a target area provided in an embodiment of the present application;

[0028] Figure 7 is a schematic diagram of an interface for displaying identifications of candidate virtual objects and selection controls provided in an embodiment of the present application;

[0029] Figure 8 This is a schematic diagram of an interface when there are multiple locations to be discarded provided in an embodiment of the present application;

[0030] Fig. 9 is a schematic diagram of an interface for discarding a target virtual item provided in an embodiment of the present application;

[0031] Fig.10 is a schematic diagram of the structure of a virtual prop discarding device provided in an embodiment of the present application;

[0032] Fig.11 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0033] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0034] Embodiments of the present application provide a method, device, electronic device, and storage medium for discarding virtual props.

[0035] The virtual item discarding method can be integrated into an electronic device, which can be a terminal, a server, etc. The terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, or a personal computer (PC), etc. The server can be a single server or a server cluster composed of multiple servers.

[0036] In some embodiments, the virtual item discarding method may also be integrated into multiple electronic devices. For example, the virtual item discarding method may be integrated into multiple servers, and the virtual item discarding method of the present application may be implemented by multiple servers.

[0037] In some embodiments, the server may also be implemented in the form of a terminal.

[0038] For example, in some embodiments, the electronic device may be a mobile terminal, in which a game client is running. The game client provides a graphical user interface through the terminal. The content displayed by the graphical user interface at least partially includes a game scene and game objects therein. The graphical user interface provides an inventory. The embodiment may respond to a first operation on the inventory to obtain a target volume parameter of a target virtual item corresponding to the inventory; obtain a current position of the virtual object in the virtual scene; determine a candidate position based on the target volume parameter and the current position; respond to a second operation on the candidate virtual object to determine the target position from the candidate positions; and when the current position of the virtual object and the target position satisfy a preset relationship, discard the target virtual item in the inventory to the target position.

[0039] In one embodiment disclosed in the present application, a method for discarding a virtual item can be run on a terminal device or a server. The terminal device can be a local terminal device. When the method for discarding a virtual item is run on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.

[0040] In some embodiments, various cloud applications can be run under the cloud interaction system, such as cloud games. Taking cloud games as an example, cloud games refer to a game mode based on cloud computing. In the operation mode of cloud games, the operating body of the game program and the main body of the game screen presentation are separated, the storage and operation of the character control method are completed on the cloud game server, and the role of the client device is used for receiving and sending data and presenting the game screen. For example, the client device can be a display device with data transmission function close to the user side, such as a terminal, a TV, a computer, a handheld computer, etc.; but the terminal device for character control is a cloud game server in the cloud. When playing the game, the user operates the client device to send an operation instruction to the cloud game server, such as a touch operation instruction. The cloud game server runs the game according to the operation instruction, encodes and compresses the game screen and other data, and returns it to the client device through the network. Finally, the client device decodes and outputs the game screen.

[0041] In some embodiments, the terminal device may be a local terminal device. Taking a game as an example, the local terminal device stores a game program and is used to present a game screen. The local terminal device is used to interact with the user through a graphical user interface, that is, the game program is downloaded and installed by an electronic device and run conventionally. The local terminal device may provide the graphical user interface to the user in a variety of ways, for example, it may be rendered and displayed on a display screen of the terminal, or provided to the user through a holographic projection. For example, the local terminal device may include a display screen and a processor, the display screen is used to present a graphical user interface, the graphical user interface includes a game screen, and the processor is used to run the game, generate a graphical user interface, and control the display of the graphical user interface on the display screen.

[0042] The game scene (or virtual scene) is a virtual scene displayed (or provided) when the application is running on a terminal or server. Optionally, the virtual scene is a simulation environment of the real world, or a semi-simulation and semi-fictitious virtual environment, or a purely fictitious virtual environment. The virtual scene is any one of a two-dimensional virtual scene and a three-dimensional virtual scene. The virtual environment can be the sky, land, ocean, etc., wherein the land includes environmental elements such as deserts and cities. Among them, the virtual scene is a scene with complete game logic of virtual objects such as user control. For example, in a sandbox 3D shooting game, the virtual scene is a 3D game world for users to control virtual objects for battle. Exemplary virtual scenes may include: at least one element of mountains, plains, rivers, lakes, oceans, deserts, skies, plants, buildings, and vehicles.

[0043] The game interface refers to the interface corresponding to the application provided or displayed through the graphical user interface, which includes the graphical user interface for users to interact with and the game screen, which is the screen of the game scene.

[0044] In some embodiments, the UI interface may include various game elements (such as a status bar, task avatars, etc.), indicator signs (such as direction indicator signs, character indicator signs, etc.), information display areas (such as number of kills, game time, etc.), or game setting controls (such as system settings, stores, gold coins, etc.).

[0045] For example, in some embodiments, a status bar may be included in the graphical user interface.

[0046] In an optional implementation, the game screen is a display screen corresponding to a terminal device displaying a virtual scene, and the game screen may include virtual objects such as game objects, NPC characters, AI characters, etc. that execute game logic in the virtual scene.

[0047] For example, in some embodiments, the content displayed in the graphical user interface at least partially includes a game scene, wherein the game scene includes at least one game object.

[0048] In some embodiments, the game objects in the game scene include virtual objects controlled by players, namely user objects.

[0049] Game objects refer to virtual objects in a virtual scene, including game characters. Game characters are dynamic objects that can be controlled, i.e., dynamic virtual objects. Optionally, the dynamic objects can be virtual characters, virtual animals, cartoon characters, etc. The virtual object is a character controlled by the user through an input device, or an artificial intelligence (AI) set in a virtual environment through training, or a non-virtual character (NPC) set in a virtual scene battle.

[0050] Optionally, the virtual object is a virtual character competing in a virtual scene. Optionally, the number of virtual objects in the virtual scene battle is preset, or dynamically determined according to the number of clients joining the battle, which is not limited in the embodiment of the present application.

[0051] In one possible implementation, the user can control the virtual object to perform game behaviors in the virtual scene. Game behaviors may include movement, casting skills, using props, and conversations. For example, the user can control the virtual object to run, jump, crawl, etc., and can also control the virtual object to use the skills and virtual props provided by the application to fight with other virtual objects.

[0052] The virtual camera is a necessary component for presenting the game scene screen. One game scene corresponds to at least one virtual camera. Depending on actual needs, there can be two or more virtual cameras. They serve as the game rendering window to capture and present the game world's screen content to the user. By setting the parameters of the virtual camera, the user's perspective of viewing the game world can be adjusted, such as the first-person perspective and the third-person perspective.

[0053] In an optional implementation, an embodiment of the present invention provides a character control method, which provides a graphical user interface through a terminal device, wherein the terminal device can be the local terminal device mentioned above, or can be a client device in the cloud interaction system mentioned above.

[0054] In this embodiment, a virtual prop discarding method is provided, such as Figure 1 As shown, the specific process of the virtual prop discarding method may include S110 to S150.

[0055] S110. In response to a first operation on the inventory, a target volume parameter of a target virtual prop corresponding to the inventory is obtained, where the target volume parameter is used to represent a spatial volume occupied by the target virtual prop to be discarded in the virtual scene.

[0056] The first operation may include touch, slide, swipe, long press, short press, double click, click, end slide, etc. For example, in some embodiments, the first operation may be a short press operation; in some embodiments, the first operation may be a long press operation; in some embodiments, the first operation may be a slide operation.

[0057] In some implementations, the inventory displayed on the graphical user interface may be displayed on the graphical user interface by a trigger operation acting on a trigger control.

[0058] In some implementations, when the number of virtual items in the backpack meets certain conditions, the display on the graphical user interface may be automatically triggered.

[0059] After the inventory is displayed on the graphical user interface, the target volume parameter of the target virtual prop corresponding to the inventory can be obtained in response to the first operation acting on the inventory. It can be understood that one inventory corresponds to one target virtual prop. For example, medicines can include medicine A, which is used to increase the health of the virtual object by 10 points; and medicine B, which is used to increase the health of the virtual object by 50 points. Among them, medicine A corresponds to one inventory column, and medicine B corresponds to one inventory column, that is, one medicine can be stored in one inventory column. For details, please refer to Figure 2 , showing a schematic diagram of the interface of the displayed inventory. Figure 2 In the example, one item column 201 is displayed. In some implementations, multiple item columns 201 may be displayed.

[0060] Virtual props refer to props that can be used by virtual objects in virtual scenes, including attack props, food props, medical props, etc. Attack props can include virtual bows and arrows, virtual swords, virtual guns, virtual ammunition, etc. Food props can include apples, fish, etc. Medical props can include various potions, pills, bandages, etc.

[0061] The target volume parameter refers to the space volume occupied by the target virtual prop to be discarded in the virtual scene, and the target volume parameter is related to the target virtual prop and the discarded quantity of the target virtual prop.

[0062] In some embodiments, when the first operation acting on the inventory is detected, the default discard quantity can be directly obtained, and the default discard quantity can be set in advance by the user or set by the system by default. The specific value of the default discard quantity can be a fixed value, for example, the default discard quantity is 2, indicating that 2 target virtual props are discarded; the default discard quantity can also be a default ratio based on the total number of target virtual props owned by the virtual object, for example, it can be 1 / 2 of the total number of target virtual props. If the total number of target virtual props is 6, it means that 3 of the target virtual props are discarded.

[0063] In some embodiments, the discard quantity can be selected by the user. When the first operation acting on the inventory is detected, an adjustment control can be displayed; in response to the adjustment operation acting on the adjustment control, the discard quantity of the target virtual prop is obtained. The adjustment control is used to adjust the discard quantity of the target virtual prop. The adjustment operation can include touch, slide, swipe, long press, short press, double click, click, end sliding, numerical input and other operations. The user can adjust the discard quantity of the target virtual item through the adjustment operation, so that the electronic device can respond to the adjustment operation on the adjustment control to obtain the discard quantity set by the user. For details, please refer to Figure 3 , shows a schematic diagram of the interface of the display adjustment control. Figure 3 In the example, the adjustment control 202 is displayed on the left side of the item bar 201. Of course, the display position of the adjustment control 202 can also be on the right side, the upper side, etc. of the item bar 201, which can be set according to actual needs. The adjustment control 202 is composed of an adjustment line 2021 and a pointer 2022. The user can drag the pointer 2022 to slide on the adjustment line 2021 to adjust the discard quantity.

[0064] After obtaining the discarded number, the monomer volume parameter of the target virtual prop can be obtained; according to the discarded number and the monomer volume parameter, the target volume parameter of the target virtual prop is calculated.

[0065] The single volume parameter refers to the volume parameter of a target virtual prop, and the target volume parameter refers to the volume parameter of the target virtual prop to be discarded. It can be understood that when the number of target virtual props to be discarded is 1, the target volume parameter is equal to the single volume parameter. The volume parameter is the space volume occupied by the virtual prop in the virtual scene. The volume parameter can include the length, width, height, volume, etc. of the virtual prop.

[0066] S120: Obtain a current position of the virtual object in the virtual scene.

[0067] A virtual object refers to an object that can move in a virtual scene. Here, the virtual object refers to a virtual character manipulated by a user. The user can manipulate the virtual object to move in the virtual scene to change the position of the virtual object in the virtual scene. After detecting the first operation acting on the inventory, the current position of the virtual object in the virtual scene can be obtained.

[0068] S130: Determine a candidate virtual object according to the target volume parameter and the current position.

[0069] The candidate virtual object refers to a virtual object that can hide the target virtual prop to be discarded, that is, the target virtual prop to be discarded is discarded at the location where the candidate virtual object is located, and is not easily discovered.

[0070] Virtual objects refer to objects that cannot be actively moved in a virtual scene, such as houses, stones, trees, grass, pools, etc. Each virtual object has its own shape and volume in the virtual scene and occupies a part of the space of the virtual scene.

[0071] When determining the candidate virtual objects according to the target volume parameters and the current position, the target area can be determined according to the current position; the volume parameters corresponding to all virtual objects in the target area are obtained; and the candidate virtual objects are determined according to the size relationship between the target volume parameters and the volume parameters corresponding to the virtual objects.

[0072] Specifically, after the current position of the virtual object is obtained, the target area can be determined according to the current position. The target area can be a closed area composed of any shape, such as a rectangle, a circle, a polygon, an irregular shape, etc.

[0073] In some embodiments, the virtual object may not be included in the target area. The target area may be an area of ​​a fixed size at a preset distance from the virtual object in a preset direction of the virtual object.

[0074] In some embodiments, the virtual object may be contained in a target area. The target area may be an area centered on the current position of the virtual object.

[0075] After determining the target area, all virtual objects in the target area can be determined. After determining all virtual objects in the target area, the volume parameters corresponding to each virtual object can be obtained. The volume parameters of each virtual object are compared with the target volume parameters to determine the size relationship. According to the size relationship, the virtual objects that can cover the target virtual props to be discarded are screened out from the virtual objects in the target area as candidate virtual objects.

[0076] S140: In response to a second operation on the candidate virtual objects, determine a target virtual object from the candidate virtual objects.

[0077] After determining the candidate virtual objects, in order to facilitate the user to select the target virtual object from the candidate virtual objects, the identifiers of the candidate virtual objects can be displayed. When displaying the identifiers of the candidate virtual objects, the identifiers of the candidate virtual objects and the selection controls can be displayed simultaneously, wherein the selection controls correspond to the identifiers of the candidate virtual objects one by one.

[0078] In some implementations, the identifier of the candidate virtual object and the selection control may be displayed as one. For example, the selection control may be displayed, and the identifier of the virtual object may be displayed in the selection control.

[0079] In some implementations, the identifier of the candidate virtual object and the selection control may be displayed separately. For example, the identifier of the candidate virtual object may be displayed, and a corresponding selection control may be provided near the identifier of the candidate virtual object.

[0080] The selection control may be expressed in the form of a rectangular control or a character, such as “√”.

[0081] S150: When the current position of the virtual object and the target position satisfy a preset relationship, discard the target virtual prop in the inventory to the target position, where the target position is the position of the target virtual object in the virtual scene.

[0082] When the user selects the target virtual object, it means that the target virtual item to be discarded will be discarded to the location where the target virtual object is located. Specifically, the location of the target virtual item in the virtual scene can be determined as the target location. Since the virtual object is an object that can move in the virtual scene, after the user selects the target virtual object, the target virtual item can be automatically discarded at the target virtual object when the virtual object is close to the target virtual object. Specifically, the current location of the virtual object can be obtained again, and when the current location of the virtual object and the target location meet the preset relationship, the target virtual item to be discarded can be discarded at the target location.

[0083] As an optional implementation, after the target virtual object is determined, a prompt may be given at the target location of the target virtual object to inform the user of the location where the target virtual item can be discarded.

[0084] Among them, when judging whether the current position of the virtual object and the target position satisfy a preset relationship, the straight-line distance between the current position of the virtual object and the target position can be first obtained; and whether the straight-line distance is greater than or equal to the preset distance is judged; if the straight-line distance is less than or equal to the preset distance, it can be considered that the current position of the virtual object and the target position satisfy the preset relationship; if the straight-line distance is greater than the preset distance, it can be considered that the current position of the virtual object and the target position do not satisfy the preset relationship.

[0085] Specifically, when the current position of the virtual object and the target position satisfy a preset relationship, discarding the target virtual prop in the inventory to the target position may include the following steps: obtaining the position of the target virtual prop in the virtual scene as the target position; obtaining the straight-line distance between the current position and the target position; determining the target position whose straight-line distance is less than or equal to the preset distance as the position to be discarded, and obtaining the number of the positions to be discarded; if the number of positions to be discarded is 1, discarding the target virtual prop to the position to be discarded.

[0086] The preset distance may be a preset fixed value, such as 2m, that is, when the current position and the target position of the virtual object are less than 2m, it indicates that the current position and the target position of the virtual object meet the preset relationship. In a virtual scene, multiple target virtual objects may be included, and there are multiple target positions. It is possible that the current position of the virtual object and multiple target positions all meet the preset relationship. That is, if the number of positions to be discarded is greater than 1, it indicates that there are multiple target positions where the target virtual props can be discarded, and the priority of the positions to be discarded can be determined; based on the priority, the final discard position of the target virtual props is determined.

[0087] As an implementation method, if the number of positions to be discarded is greater than 1, the volume parameters of the target virtual objects at the positions to be discarded can be obtained; the priority of the positions to be discarded is determined according to the volume parameters; and the target virtual props are discarded to the position to be discarded with the highest priority.

[0088] As an implementation mode, if the number of positions to be discarded is greater than 1, the straight-line distance between each position to be discarded and the current position may be obtained; and the target virtual prop may be discarded to the position to be discarded with the shortest straight-line distance.

[0089] After discarding the target virtual prop, the status bar can change from the first display state to the second display state, the first display state refers to the state before discarding the target virtual prop, and the second display state refers to the state after discarding the virtual prop. In some embodiments, the first display state of the status bar may be that the status bar contains the target virtual prop, and the second display state may be that the status bar is empty, or the number of target virtual props contained in the status bar is reduced. For example, in the first display state, 2 target virtual props are displayed in the status bar, and after discarding some virtual props, 1 target virtual prop is displayed in the status bar.

[0090] The virtual prop discarding method provided in the embodiment of the present application, when the user triggers to discard the target virtual prop, by obtaining the total volume of the target virtual prop to be discarded, searching for a virtual object that can hide the target virtual prop to be discarded near the virtual object based on the total volume, and providing it to the user for selection, and obtaining the target virtual object selected by the user; when the virtual object moves near the target virtual object, the target virtual prop is automatically discarded at the target virtual object, which simplifies the user's operation of discarding the virtual prop and realizes the quick discarding of the virtual prop. In addition, the virtual prop that the user wants to discard can be discarded at a location where the virtual prop can be hidden, which can avoid being discovered by other users and enhance the fun of the game.

[0091] See also Figure 4 The embodiment of the present application provides a method for discarding virtual props. Based on the above embodiment, the process of determining candidate virtual objects and automatically discarding them is described in detail. The specific process of the method for discarding virtual props may include S210 to S270.

[0092] S210: In response to a first operation on the inventory, a target volume parameter of a target virtual prop corresponding to the inventory is obtained, where the target volume parameter is used to represent a spatial volume occupied by the target virtual prop to be discarded in the virtual scene.

[0093] S220: Obtain a current position of the virtual object in the virtual scene.

[0094] S210 to S220 may refer to the corresponding parts of the aforementioned embodiment and will not be described in detail here.

[0095] S230: Determine a target area according to the current position.

[0096] After obtaining the current position of the virtual object in the virtual scene, the target area can be determined based on the current position. It is understandable that the target area may not be displayed on the user graphical interface, or may be displayed on the user graphical interface according to actual needs.

[0097] In some embodiments, the virtual object may be included in the target area. Specifically, when the target area is determined based on the current position, it may be an area formed with the current position as the center. For example, a circular area formed with the current position as the center and a preset value as the radius. For example, the target area is a rectangle, and the current position is at the center of the rectangle. For example, see Figure 5 , showing a schematic diagram of the target area. Figure 5 In the example, a closed circular area is formed around the virtual object with the current position of the virtual object as the center and the preset value as the radius ( Figure 5 The circular area shown by the dotted line is the target area.

[0098] In some embodiments, the virtual object may not be included in the target area. Specifically, when determining the target area according to the current position, a point at a preset distance from the current position may be determined in a preset direction of the virtual object, so that the point is located on the boundary of the target area.

[0099] In some embodiments, the preset direction may be a preset default direction, for example, in the west, east, or sight direction of the virtual object. Figure 6 , shows another schematic diagram of the target area. Figure 6 In the above example, a point in a preset direction and a preset distance from the current position is determined as point O, and point O is located on the boundary of the target area. Figure 6 The circle indicated by the dotted line is the target area.

[0100] S240: Obtain volume parameters corresponding to all virtual objects in the target area.

[0101] S250: Determine a candidate virtual object according to a size relationship between the target volume parameter and a volume parameter corresponding to the virtual object.

[0102] After the target area is determined, there may be multiple virtual objects in the target area, and thus, all virtual objects in the target area can be determined, and the volume parameters corresponding to each virtual object can be obtained.

[0103] After obtaining the volume parameter of each virtual object, the target volume parameter can be compared with the volume parameter to determine whether the volume parameter is greater than or equal to the target volume parameter. If the volume parameter is greater than or equal to the target volume parameter, it indicates that the virtual object corresponding to the volume parameter can block the target virtual prop to be discarded; if the volume parameter is less than the target volume parameter, it indicates that the virtual object corresponding to the volume parameter cannot block the target virtual prop to be discarded. When the volume parameter is greater than or equal to the target volume parameter, the virtual object corresponding to the volume parameter can be determined as a candidate virtual object for user selection. For example, there are virtual objects a, b, c, and d in the target area, and the volume parameter of virtual object a is a1, the volume parameter of virtual object b is b1, the volume parameter of virtual object c is c1, and the volume parameter of virtual object d is d1, wherein a1, c1, and d1 are all greater than the target volume parameter, and b1 is less than the target volume parameter, thereby virtual objects a, c, and d can be determined as candidate virtual objects.

[0104] In some implementations, the volume parameter may be a numerical value, and when determining the size of the volume parameter and the target volume parameter, the numerical values ​​of the two may be directly compared.

[0105] In some embodiments, the volume parameter may be a set of values, respectively representing length, width, and height. When judging the size of the volume parameter and the target volume parameter, the length, width, and height may be compared respectively. When the length, width, and height in the volume parameter are all greater than or equal to the length, height, and width in the target volume parameter, the volume parameter may be considered greater than or equal to the target volume parameter; otherwise, the volume parameter may be considered less than the target volume parameter.

[0106] S260: In response to a second operation on the candidate virtual objects, determine a target virtual object from the candidate virtual objects.

[0107] After the candidate virtual objects are determined, the determined candidate virtual objects can be displayed for user selection. When the number of candidate virtual objects is large, if all the candidate virtual objects are displayed one by one, the display effect is not good. In order to ensure that the displayed content is concise and beautiful, the types of candidate virtual objects can be displayed for user selection. As described in the previous example, virtual object a, virtual object c and virtual object d are determined as candidate virtual objects, among which the types of virtual object a and virtual object c are grass, and the type of virtual object d is house. Therefore, the type of candidate virtual object can be used as the identifier of the candidate virtual object and displayed on the user graphical interface. For example, please refer to Figure 7 , Figure 7 A schematic diagram of an interface showing the identification of candidate virtual objects and selection controls is shown. Figure 7 In the example, the identifier 203 of the candidate virtual object and the selection control 204 are displayed separately, and one selection control corresponds to one identifier of the candidate virtual object.

[0108] When a selection operation acting on the selection control is detected, the candidate virtual object indicated by the identifier of the candidate virtual object may be determined as the target virtual object.

[0109] S270: When the current position of the virtual object and the target position satisfy a preset relationship, discard the target virtual item in the inventory to the target position.

[0110] The target virtual object may represent a virtual object. As described in the previous example, if the user selects a house as the target virtual object, then the target virtual object is virtual object d.

[0111] The target virtual object may represent multiple virtual objects. As described in the previous example, if the user selects grass as the target virtual object, the target virtual object includes virtual object a and virtual object c. Therefore, the target position may also be multiple.

[0112] The target position refers to the position of the target virtual object in the virtual scene. When the virtual object moves to the vicinity of the target position, the target virtual prop to be discarded is automatically discarded at the target position.

[0113] At this time, the current position of the virtual object can be obtained again, and the straight-line distance between the current position and the target position can be obtained, and the target position whose straight-line distance is less than or equal to the preset distance is determined as the position to be discarded. The position to be discarded refers to the position where the target prop to be discarded can be discarded. When the positions to be discarded are obtained, the number of the positions to be discarded can be counted.

[0114] If the number of positions to be discarded is 1, it indicates that there is a position near the current position of the virtual object where the target virtual item to be discarded can be automatically discarded. The position to be discarded can be determined as the target discarding position, so that the target virtual item to be discarded can be directly discarded at the target discarding position.

[0115] If the number of positions to be discarded is greater than 1, it indicates that there are at least two positions near the current position of the virtual object where the target virtual prop to be discarded can be automatically discarded. Therefore, it is necessary to determine a target discarding position from at least two positions to be discarded. The target discarding position refers to the position where the target virtual prop is discarded. Figure 8 , shows a schematic diagram of the interface when there are multiple locations to be discarded. Figure 8 There are 3 positions to be discarded, and the target discarding position needs to be determined from these 3 positions to be discarded.

[0116] In some embodiments, if the number of positions to be discarded is greater than 1, the volume parameter of the target virtual object at the position to be discarded is obtained; the priority of the position to be discarded is determined according to the volume parameter; and the target virtual prop is discarded to the position to be discarded with the highest priority. Specifically, when determining the priority of the position to be discarded according to the volume parameter, the priority of the position to be discarded where the target virtual object with the largest volume parameter is located can be determined as the highest. For example, the target virtual object at position to be discarded 1 is virtual object e, the target virtual object at position to be discarded 2 is virtual object f, and the target virtual object at position to be discarded 3 is virtual object g, wherein the volume parameter of virtual object f is greater than the volume parameter of virtual object g, and the volume parameter of virtual object g is greater than the volume parameter of virtual object e, the priority of the position to be discarded where virtual object f is located can be determined as the highest, the priority of position to be discarded 2 is higher than that of position to be discarded 3, and the priority of position to be discarded 3 is higher than that of position to be discarded 1, that is, position to be discarded 2 is the target discarding position. Thus, the target virtual prop to be discarded can be discarded at position to be discarded 2.

[0117] In some embodiments, if the number of positions to be discarded is greater than 1, the straight-line distance between each position to be discarded and the current position is obtained; the target virtual prop is discarded to the position to be discarded with the shortest straight-line distance. For example, the straight-line distance between position 1 to be discarded and the current position is distance 1, the straight-line distance between position 2 to be discarded and the current position is distance 2, and the straight-line distance between position 3 to be discarded and the current position is distance 3, and distance 2 is greater than distance 1, and distance 1 is greater than distance 3. That is, the straight-line distance between position 3 to be discarded and the current position is the smallest, so that the target virtual prop to be discarded can be discarded at position 3 to be discarded, and position 3 to be discarded is the target discarding position.

[0118] In some implementations, if the number of the to-be-discarded positions is greater than 1, one of the to-be-discarded positions may be randomly determined as the target discarding position.

[0119] After determining the target drop position, a prompt signal can be displayed at the target drop position to prompt the user that the target virtual prop has been automatically dropped at the prompt signal position, so that when the target virtual prop is dropped by mistake, the virtual object can be controlled to move to the prompt signal position and pick up the target virtual prop again. The prompt signal can be a light column, highlight, etc., which is not specifically limited here.

[0120] After dropping the target virtual item at the drop location, the display of the inventory can change. Fig. 9 , shows a schematic diagram of an interface in which the target virtual props to be automatically discarded are discarded at the to-be-discarded position 2 when the to-be-discarded position 2 is the target discarding position. Among them, the items in the item bar 201 are discarded at the to-be-discarded position 2.

[0121] It can be understood that when the user needs to discard the virtual props, the user can perform the first operation on the inventory. Figure 2 In the interface shown, the first operation is used to operate the inventory, and the interface can change to Figure 7 , the user can select any one as the drop location. After the user selects, the virtual object can be controlled to move in the virtual scene. When the virtual object approaches the selected drop location, the target virtual item is automatically dropped, that is, the Fig. 9 The interface shown. Figure 3 The interface shown can be displayed selectively. If the user is required to choose the discard quantity, it can be displayed first. Figure 2 The interface shown in the figure shows that when receiving the first operation of the user acting on the inventory, Figure 3 The interface shown, then display Figure 7 The interface shown shows that when the virtual object is close to the selected position, Fig. 9 The interface shown.

[0122] The virtual props discarding scheme provided in the embodiment of the present application can be applied in various game scenarios. With the scheme provided in the embodiment of the present application, the user slides the item bar to trigger the discarding of the target virtual props corresponding to the item bar, and displays the identification of the candidate virtual object for the user to select a suitable position to discard the target virtual props. The user does not need to find the discarding position by himself. When the virtual object is close to the selected discarding position, the target virtual props can be automatically discarded, and when the virtual object is close to multiple discarding positions, one can be automatically selected as the target position based on the priority of the discarding position. Without the user's secondary operation, the target virtual props can be quickly discarded, which further reduces the operation when discarding the virtual props, so that the entire operation of discarding the virtual props is convenient, and the virtual props can be discarded quickly.

[0123] In order to better implement the above method, the embodiment of the present application also provides a virtual prop discarding device, which can be integrated in an electronic device, and the electronic device can be a terminal, a server, etc. Among them, the terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, a personal computer, etc.; the server can be a single server or a server cluster composed of multiple servers.

[0124] For example, in this embodiment, the method of the embodiment of the present application will be described in detail by taking the virtual prop discarding device being specifically integrated into an electronic device as an example.

[0125] For example, Fig.10 As shown, the virtual item discarding device 300 may include a parameter acquisition module 310 , a position acquisition module 320 , a candidate module 330 , a determination module 340 and a discarding module 350 .

[0126] A parameter acquisition module 310 is used to respond to the first operation on the inventory column and acquire a target volume parameter of a target virtual prop corresponding to the inventory column, wherein the target volume parameter is used to represent the space volume occupied by the target virtual prop to be discarded in the virtual scene;

[0127] A position acquisition module 320, used to acquire the current position of the virtual object in the virtual scene;

[0128] A candidate module 330, configured to determine a candidate virtual object according to the target volume parameter and the current position;

[0129] A determination module 340, configured to determine a target virtual object from the candidate virtual objects in response to a second operation on the candidate virtual objects;

[0130] The discarding module 350 is used to discard the target virtual prop in the inventory to the target position when the current position of the virtual object satisfies a preset relationship with the target position, and the target position is the position of the target virtual object in the virtual scene.

[0131] In some embodiments, the parameter acquisition module 310 also includes a discard quantity acquisition unit, a single volume parameter acquisition unit, and a calculation unit; the discard quantity acquisition unit is used to obtain the discard quantity of the target virtual prop; the single volume parameter acquisition unit is used to obtain the single volume parameter of the target virtual prop; the calculation unit is used to calculate the target volume parameter of the target virtual prop corresponding to the inventory based on the discard quantity and the single volume parameter.

[0132] In some implementations, the discard quantity acquisition unit is further configured to display an adjustment control, wherein the adjustment control is configured to adjust the discard quantity of the target virtual item; and in response to an adjustment operation applied to the adjustment control, the discard quantity of the target virtual item is acquired.

[0133] In some embodiments, the candidate module 330 also includes a target area determination unit, a volume parameter acquisition unit, and a candidate virtual object determination unit; the target area determination unit is used to determine the target area according to the current position; the volume parameter acquisition unit is used to obtain the volume parameters corresponding to all virtual objects in the target area; the candidate virtual object determination unit is used to determine the candidate virtual object according to the size relationship between the target volume parameter and the volume parameter corresponding to the virtual object.

[0134] In some implementations, the candidate virtual object determining unit is further configured to determine the virtual object corresponding to the volume parameter as a candidate virtual object when the volume parameter is greater than or equal to the target volume parameter.

[0135] In some embodiments, the determination module 340 is also used to display the identifier and selection control of the candidate virtual object, and the selection control corresponds one-to-one to the identifier of the candidate virtual object; when a second operation is detected, the selection control acted upon by the second operation is determined as the target selection control; and the candidate virtual object referred to by the candidate virtual object identifier corresponding to the target selection control is determined as the target virtual object.

[0136] In some embodiments, the discarding module 350 also includes a target position determination unit, a straight-line distance acquisition unit, a to-be-discarded position determination unit, and a discarding unit; the target position determination unit is used to obtain the position of the target virtual prop in the virtual scene as the target position; the straight-line distance acquisition unit is used to obtain the straight-line distance between the current position and the target position; the to-be-discarded position determination unit is used to determine that the target position whose straight-line distance is less than or equal to a preset distance is a to-be-discarded position, and obtain the number of the to-be-discarded positions; the discarding unit is used to discard the target virtual prop to the to-be-discarded position if the number of the to-be-discarded positions is 1.

[0137] In some embodiments, the discarding unit is also used to obtain the volume parameters of the target virtual objects at the positions to be discarded if the number of the positions to be discarded is greater than 1; determine the priority of the positions to be discarded according to the volume parameters; and discard the target virtual props to the position to be discarded with the highest priority.

[0138] In some embodiments, the discarding unit is further used to obtain the straight-line distance between each of the to-be-discarded positions and the current position if the number of the to-be-discarded positions is greater than 1; and discard the target virtual prop to the to-be-discarded position with the shortest straight-line distance.

[0139] In some embodiments, the virtual prop discarding device also includes a change module. After the target virtual prop in the inventory is discarded to the target position, the change module is used to control the display state of the inventory from a first display state to a second display state, wherein the first display state is the state before discarding the target virtual prop, and the second display state is the state after discarding the target virtual prop.

[0140] In specific implementation, the above modules or units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above modules or units can refer to the previous method embodiments, which will not be repeated here.

[0141] As can be seen from the above, when the virtual prop discarding device of this embodiment detects the first operation acting on the inventory, it obtains the target volume parameter of the target virtual prop; based on the target volume parameter and the current position of the virtual object, it searches for a candidate virtual object that can hide the target virtual prop; it provides the candidate virtual object to the user to select the target virtual object; when the virtual object is close to the target virtual object, it automatically discards the target virtual prop at the position of the target virtual object. The operation of discarding virtual props by the user is simplified, and the virtual props can be discarded quickly. In addition, the virtual props that the user wants to discard can be discarded at a position where the virtual props can be hidden, which can avoid being discovered by other users and enhance the fun of the game.

[0142] Correspondingly, an embodiment of the present application also provides an electronic device, which may be a terminal or a server, and the terminal may be a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer, a personal digital assistant (PDA), or other terminal devices.

[0143] like Fig.11 As shown, Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, wherein the electronic device 400 includes a processor 401 having one or more processing cores, a memory 402 having one or more computer-readable storage media, and a computer program stored in the memory 402 and executable on the processor. The processor 401 is electrically connected to the memory 402. It will be understood by those skilled in the art that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or arrange components differently.

[0144] The processor 401 is the control center of the electronic device 400. It uses various interfaces and lines to connect various parts of the entire electronic device 400, executes various functions of the electronic device 400 and processes data by running or loading software programs and / or modules stored in the memory 402, and calling data stored in the memory 402, thereby monitoring the electronic device 400 as a whole.

[0145] In the embodiment of the present application, the processor 401 in the electronic device 400 will load instructions corresponding to the processes of one or more application programs into the memory 402 according to the following steps, and the processor 401 will run the application programs stored in the memory 402 to implement various functions:

[0146] In response to a first operation on the inventory, obtaining a target volume parameter of a target virtual prop corresponding to the inventory, wherein the target volume parameter is used to characterize a spatial volume occupied by the target virtual prop to be discarded in the virtual scene;

[0147] Obtaining a current position of the virtual object in the virtual scene;

[0148] Determining a candidate virtual object according to the target volume parameter and the current position;

[0149] In response to a second operation on the candidate virtual objects, determining a target virtual object from the candidate virtual objects;

[0150] When the current position of the virtual object satisfies a preset relationship with the target position, the target virtual prop in the inventory is discarded to the target position, where the target position is the position of the target virtual object in the virtual scene.

[0151] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0152] Optional, such as Fig.11 As shown, the electronic device 400 further includes: a touch screen 403, a radio frequency circuit 404, an audio circuit 405, an input unit 406, and a power supply 407. The processor 401 is electrically connected to the touch screen 403, the radio frequency circuit 404, the audio circuit 405, the input unit 406, and the power supply 407, respectively. Those skilled in the art can understand that Fig.11 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0153] The touch display screen 403 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. The touch display screen 403 may include a display panel and a touch panel. Among them, the display panel may be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device, and these graphical user interfaces may be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-Emitting Diode) and the like. The touch panel may be used to collect the user's touch operation on or near it (such as the user using any suitable object or attachment such as a finger, a stylus, etc. on the touch panel or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 401, and can receive the command sent by the processor 401 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 401 to determine the type of touch event, and then the processor 401 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 403 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 403 can also be used as a part of the input unit 406 to realize the input function.

[0154] In the embodiment of the present application, the processor 401 executes the game application to generate a graphical user interface on the touch screen 403. The virtual scene on the graphical user interface includes at least one skill control area, and the skill control area includes at least one skill control. The touch screen 403 is used to present the graphical user interface and receive operation instructions generated by the user acting on the graphical user interface.

[0155] The radio frequency circuit 404 may be used to send and receive radio frequency signals, so as to establish wireless communication with a network device or other electronic devices through wireless communication, and to send and receive signals with the network device or other electronic devices.

[0156] The audio circuit 405 can be used to provide an audio interface between the user and the electronic device through a speaker and a microphone. The audio circuit 405 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 405 and converted into audio data, and then the audio data is output to the processor 401 for processing, and then sent to another electronic device through the radio frequency circuit 404, or the audio data is output to the memory 402 for further processing. The audio circuit 405 may also include an earplug jack to provide communication between an external headset and an electronic device.

[0157] The input unit 406 may be used to receive input numbers, character information or user feature information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0158] The power supply 407 is used to supply power to various components of the electronic device 400. Optionally, the power supply 407 can be logically connected to the processor 401 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The power supply 407 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0159] although Fig.11 Not shown, the electronic device 400 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.

[0160] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0161] As can be seen from the above, the electronic device provided in this embodiment can obtain the target volume parameter of the target virtual prop when detecting the first operation acting on the inventory; based on the target volume parameter and the current position of the virtual object, find a candidate virtual object that can hide the target virtual prop; provide the candidate virtual object to the user to select the target virtual object; when the virtual object is close to the target virtual object, automatically discard the target virtual prop at the position of the target virtual object. The operation of discarding virtual props by the user is simplified, and the virtual props can be discarded quickly. In addition, the virtual props that the user wants to discard can be discarded at a position where the virtual props can be hidden, which can avoid being discovered by other users and enhance the fun of the game.

[0162] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0163] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of computer programs are stored, and the computer program can be loaded by a processor to execute the steps in any of the virtual item discarding methods provided in the embodiments of the present application. For example, the computer program can execute the following steps:

[0164] In response to a first operation on the inventory, obtaining a target volume parameter of a target virtual prop corresponding to the inventory, wherein the target volume parameter is used to characterize a spatial volume occupied by the target virtual prop to be discarded in the virtual scene;

[0165] Obtaining a current position of the virtual object in the virtual scene;

[0166] Determining a candidate virtual object according to the target volume parameter and the current position;

[0167] In response to a second operation on the candidate virtual objects, determining a target virtual object from the candidate virtual objects;

[0168] When the current position of the virtual object satisfies a preset relationship with the target position, the target virtual prop in the inventory is discarded to the target position, where the target position is the position of the target virtual object in the virtual scene.

[0169] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0170] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0171] Since the computer program stored in the storage medium can execute the steps in any one of the virtual prop discarding methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the virtual prop discarding methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0172] The above is a detailed introduction to a virtual prop discarding method, device, electronic device and storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for discarding virtual props, characterized in that: A graphical user interface is provided through a terminal, wherein the content displayed by the graphical user interface at least partially includes a virtual scene and virtual objects therein, and the graphical user interface provides an inventory, and the method includes: In response to a first operation on the inventory, obtaining a target volume parameter of a target virtual prop corresponding to the inventory, wherein the target volume parameter is used to characterize a spatial volume occupied by the target virtual prop to be discarded in the virtual scene; Obtaining a current position of the virtual object in the virtual scene; Determine a candidate virtual object according to the target volume parameter and the current position, wherein the candidate virtual object refers to a virtual object used to hide the target virtual prop to be discarded; In response to a second operation on the candidate virtual objects, determining a target virtual object from the candidate virtual objects; When the current position of the virtual object satisfies a preset relationship with a target position, the target virtual item in the inventory is automatically dropped to the target position, where the target position is the position of the target virtual object in the virtual scene, and the preset relationship includes the virtual object being close to the target virtual object.

2. The method according to claim 1, characterized in that The step of obtaining a target volume parameter of a target virtual item corresponding to the inventory includes: Obtaining the discarded quantity of the target virtual item; Obtaining a single volume parameter of the target virtual prop; According to the discarded quantity and the monomer volume parameter, a target volume parameter of the target virtual item corresponding to the inventory is calculated.

3. The method according to claim 2, characterized in that The obtaining the discarded quantity of the target virtual props includes: Displaying an adjustment control, wherein the adjustment control is used to adjust the discard quantity of the target virtual prop; In response to the adjustment operation acting on the adjustment control, the discarded quantity of the target virtual item is obtained.

4. The method according to claim 1, characterized in that: The step of determining a candidate virtual object according to the target volume parameter and the current position includes: determining a target area according to the current position; Obtaining volume parameters corresponding to all virtual objects in the target area; A candidate virtual object is determined according to a size relationship between the target volume parameter and a volume parameter corresponding to the virtual object.

5. The method according to claim 4, characterized in that The step of determining a candidate virtual object according to the size relationship between the target volume parameter and the volume parameter includes: When the volume parameter is greater than or equal to the target volume parameter, the virtual object corresponding to the volume parameter is determined as a candidate virtual object.

6. The method according to claim 1, characterized in that The step of determining a target virtual object from the candidate virtual objects in response to a second operation on the candidate virtual objects includes: Displaying the identifiers of the candidate virtual objects and selection controls, wherein the selection controls correspond one to one with the identifiers of the candidate virtual objects; When a second operation is detected, determining the selection control acted upon by the second operation as a target selection control; The candidate virtual object indicated by the candidate virtual object identifier corresponding to the target selection control is determined as the target virtual object.

7. The method according to claim 1, characterized in that When the current position of the virtual object satisfies a preset relationship with the target position, the target virtual item in the inventory is automatically discarded to the target position, including: Acquire the position of the target virtual prop in the virtual scene as the target position; Obtaining the straight-line distance between the current position and the target position; Determine the target positions whose straight-line distance is less than or equal to the preset distance as positions to be discarded, and obtain the number of the positions to be discarded; If the number of the positions to be discarded is 1, the target virtual item is discarded to the positions to be discarded.

8. The method according to claim 7, characterized in that After determining that the target positions whose straight-line distance is less than or equal to the preset distance are positions to be discarded, and obtaining the number of positions to be discarded, the method further includes: If the number of the positions to be discarded is greater than 1, obtaining volume parameters of the target virtual objects at the positions to be discarded; Determining the priority of the to-be-discarded location according to the volume parameter; The target virtual item is discarded to the discarding position with the highest priority.

9. The method according to claim 7, characterized in that: After determining that the target positions whose straight-line distance is less than or equal to the preset distance are positions to be discarded, and obtaining the number of positions to be discarded, the method further includes: If the number of the positions to be discarded is greater than 1, obtain the straight-line distance between each of the positions to be discarded and the current position; The target virtual prop is discarded to the to-be-discarded position with the shortest straight-line distance.

10. The method according to any one of claims 1 to 9, characterized in that: After automatically discarding the target virtual item in the inventory to the target location, the method further includes: The display state of the inventory is controlled to change from a first display state to a second display state, wherein the first display state is a state before the target virtual item is discarded, and the second display state is a state after the target virtual item is discarded.

11. A virtual item discarding device, characterized in that: A graphical user interface is provided through a terminal, wherein the content displayed by the graphical user interface at least partially includes a virtual scene and virtual objects therein, and the graphical user interface provides an inventory, and the device includes: a parameter acquisition module, configured to respond to a first operation on the inventory column and acquire a target volume parameter of a target virtual prop corresponding to the inventory column, wherein the target volume parameter is used to characterize a space volume occupied by the target virtual prop to be discarded in the virtual scene; A position acquisition module, used to acquire the current position of the virtual object in the virtual scene; A candidate module, used to determine a candidate virtual object according to the target volume parameter and the current position, wherein the candidate virtual object refers to a virtual object used to hide the target virtual prop to be discarded; a determination module, configured to determine a target virtual object from the candidate virtual objects in response to a second operation on the candidate virtual objects; A discarding module is used to automatically discard the target virtual prop in the inventory to the target position when the current position of the virtual object satisfies a preset relationship with the target position, wherein the target position is the position of the target virtual object in the virtual scene, and the preset relationship includes the virtual object being close to the target virtual object.

12. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps in the method for discarding a virtual item as claimed in any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the virtual item discarding method according to any one of claims 1 to 10.