Virtual prop position adjustment method and device, electronic equipment, computer readable storage medium and computer program product
Patent Information
- Application Number
- CN202611122463.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-27
- Publication Date
- 2026-10-30
AI Technical Summary
用户需极其精确地对齐落点边缘,极易因微小偏差导致直接判定互换失败,人机交互容错率低且操作效率低下
本申请在第一虚拟道具的占用区域与候选虚拟道具的占用区域相交即可触发相交提示并执行道具互换,相较于相关技术中仅当虚拟道具占用区域完全重叠才可触发互换、微小落点偏差便判定替换失败的严苛判定,本申请不再强制要求道具网格完整重合,仅需二者区域相交即可进入后续空间校验流程,减少了用户反复拖拽对齐道具产生的多次交互指令与重复网格检测运算,在满足第一存储区域可容纳第二虚拟道具、第二存储区域可容纳第一虚拟道具的空间约束条件下直接完成二者位置互换,有效提高了人机交互效率,缩短了交互指令的处理耗时。
Smart Images

Figure CN122998736A_ABST
Abstract
Description
Technical Field
[0001] This application relates to computer technology, and more particularly to a method, apparatus, electronic device, computer-readable storage medium, and computer program product for adjusting the position of a virtual prop. Background Technology
[0002] In related technologies, when determining whether to swap the positions of virtual props, the drag point must completely overlap with the area occupied by the existing prop. Users need to align the edges of the drag point with extreme precision, and even slight deviations can easily lead to a failed swap determination, resulting in low human-computer interaction tolerance and low operational efficiency. Summary of the Invention
[0003] This application provides a method, apparatus, electronic device, computer-readable storage medium, and computer program product for adjusting the position of virtual props, thereby improving the efficiency of human-computer interaction.
[0004] The technical solution of this application embodiment is implemented as follows: This application provides a method for adjusting the position of a virtual item, the method comprising: The storage interface for virtual items displays a first virtual item and M candidate virtual items; wherein the first virtual item is associated with a first storage area, and the M candidate virtual items are respectively associated with a second storage area, where M is a positive integer; In response to a movement operation on the first virtual item, control the first virtual item to move within the storage interface; If the area occupied by the first virtual item intersects with the areas occupied by N candidate virtual items, an intersection prompt for the second virtual item is displayed, where N is a positive integer less than or equal to M; When the intersection prompt indicates that the second virtual item exists among the N candidate virtual items, in response to the release operation for the first virtual item, the first virtual item is controlled to move to the second storage area, and the second virtual item is controlled to move to the first storage area; The first storage area can accommodate the second virtual item, and the second storage area associated with the second virtual item can accommodate the first virtual item.
[0005] This application embodiment provides a virtual prop position adjustment device, the device comprising: The display module is used to display a first virtual item and M candidate virtual items in the storage interface of the virtual items; wherein the first virtual item is associated with a first storage area, and the M candidate virtual items are respectively associated with a second storage area, and M is a positive integer; A movement module is configured to control the first virtual item to move within the storage interface in response to a movement operation on the first virtual item. The display module is further configured to display an intersection prompt for the second virtual prop when the occupied area of the first virtual prop intersects with the occupied areas of N candidate virtual props, wherein N is a positive integer less than or equal to M; The interchange module is configured to, in response to a release operation on the first virtual item, control the first virtual item to move to the second storage area and control the second virtual item to move to the first storage area when the intersection prompt indicates that the second virtual item exists among the N candidate virtual items; wherein the first storage area is capable of accommodating the second virtual item, and the second storage area associated with the second virtual item is capable of accommodating the first virtual item.
[0006] In the above scheme, the first storage area includes the initial occupied area occupied by the first virtual prop before it moves. The virtual prop position adjustment device further includes: a determining module, used to determine the third virtual prop as the second virtual prop when there is a third virtual prop among the N candidate virtual props; wherein, the third virtual prop is a virtual prop whose occupied area is the same as the area of the initial occupied area among the N candidate virtual props, and whose occupied area has the same shape as the initial occupied area; the interchange module is also used to control the first virtual prop to move to the occupied area of the third virtual prop, and control the third virtual prop to move to the initial occupied area.
[0007] In the above scheme, the determining module is further configured to, when there is no third virtual item among the N candidate virtual items and there is at least one fourth virtual item among the N candidate virtual items, traverse each of the fourth virtual items in descending order of the area of the occupied area; when a fourth virtual item that satisfies the exchange condition is encountered, the fourth virtual item that satisfies the exchange condition is determined as the second virtual item; wherein, the fourth virtual item is a candidate virtual item whose occupied area is greater than the area of the initial occupied area; the exchange condition includes that the first storage area can accommodate the fourth virtual item and that the second storage area associated with the fourth virtual item can accommodate the first virtual item.
[0008] In the above scheme, the display module is further configured to display a first intersection prompt for the second virtual item when the swap condition is met, the first intersection prompt indicating that the second virtual item exists among the N candidate virtual items; wherein, the swap condition includes the first storage area being able to accommodate the second virtual item and the second storage area associated with the second virtual item being able to accommodate the first virtual item; when the swap condition is not met, a second intersection prompt for the second virtual item is displayed, the second intersection prompt indicating that the second virtual item does not exist among the N candidate virtual items.
[0009] In the above scheme, the storage interface includes multiple grid cells; the display module is further configured to display an intersection prompt for the second virtual item when the number of overlapping grid cells is greater than or equal to 1, the number of overlapping grid cells is less than the number of grid cells occupied by the area occupied by the first virtual item, and less than the number of grid cells occupied by the areas occupied by the N candidate virtual items; wherein, the overlapping grid cell is a grid cell in which the area occupied by the first virtual item overlaps with the area occupied by the N candidate virtual items.
[0010] In the above scheme, the first storage area includes the initial occupied area occupied by the first virtual item before it moves. The swapping module is further configured to, under at least one of the following conditions: when the area of the occupied area of the second virtual item is different from the area of the initial occupied area, or when the shape of the occupied area of the second virtual item is different from the shape of the initial occupied area, control the first virtual item to move to the occupied area of the second virtual item and control the second virtual item to move to the initial occupied area and the blank associated area in the first storage area; when the initial occupied area can accommodate the second virtual item, control the first virtual item to move to the occupied area of the second virtual item and the blank associated area in the second storage area, and control the second virtual item to move to the initial occupied area; when the initial occupied area cannot accommodate the second virtual item, and the occupied area of the second virtual item cannot accommodate the first virtual item, control the first virtual item to move to the occupied area of the second virtual item and the blank associated area in the second storage area, and control the second virtual item to move to the initial occupied area and the blank associated area in the first storage area.
[0011] In the above scheme, the virtual prop position adjustment device further includes: a cancellation module, used to control the first virtual prop to move to the second storage area, and after controlling the second virtual prop to move to the first storage area, display a cancellation control; in response to the trigger operation of the cancellation control, control the first virtual prop to move back to the first storage area, and control the second virtual prop to move back to the second storage area.
[0012] In the above scheme, the display module is further configured to display a cancellation prompt message in the associated area of the cancellation control, the cancellation prompt message being used to prompt the cancellation of the exchange between the first virtual item and the second virtual item; when the display duration of the cancellation control reaches a preset duration, the display of the cancellation control and the cancellation prompt message is canceled.
[0013] In the above scheme, the display module is further configured to, when the intersection prompt indicates that there is a second virtual item among the N candidate virtual items, determine a first placement area in the first storage area for placing the second virtual item, and determine a second placement area in the second storage area for placing the first virtual item; highlight the first placement area and the second placement area using a first display style; the swapping module is further configured to, in response to a release operation on the first virtual item, control the first virtual item to move to the second placement area, and control the second virtual item to move to the first placement area.
[0014] In the above scheme, the display module is further configured to display a switching switch before controlling the first virtual item to move to the second storage area and controlling the second virtual item to move to the first storage area; when the switching switch is in the closed state, in response to the opening operation of the switching switch, switch the state of the switching switch from the closed state to the open state; the switching module is further configured to, when the switching switch is in the open state, in response to the release operation of the first virtual item, control the first virtual item to move to the second storage area and control the second virtual item to move to the first storage area.
[0015] In the above scheme, the virtual prop position adjustment device further includes: a selection module, used to control multiple candidate virtual props that can be interchanged to be in an optional state when N is a positive integer greater than 1 and the number of candidate virtual props that can be interchanged with the first virtual prop is multiple; based on the optional state, in response to the selection operation performed on the multiple candidate virtual props that can be interchanged, the selected candidate virtual prop is determined as the second virtual prop.
[0016] In the above scheme, the display module is further configured to, in response to a release operation on the first virtual item, control the first virtual item to move back to the first storage area and display at least one of the following when the intersection prompt indicates that the second virtual item does not exist among the N candidate virtual items, and display at least one of the following: swap failure prompt information and recommendation prompt information; wherein, the swap failure prompt information is used to indicate the reason for the swap failure, and the recommendation prompt information is used to recommend at least one of the following: candidate virtual items that can be swapped with the first virtual item, and the storage location in the storage interface that can hold the first virtual item.
[0017] In the above scheme, the virtual prop position adjustment device further includes: a combination module, used to combine the multiple virtual props in response to a combination operation for multiple consecutive adjacent virtual props before displaying the first virtual prop, and display the combined multiple virtual props, wherein the combined multiple virtual props respond to the movement operation as a whole; and to determine the combined multiple virtual props as the first virtual prop.
[0018] In the above scheme, the virtual prop position adjustment device further includes: a determining module, used to determine a second virtual prop from the fifth virtual prop when N is a positive integer greater than 1 and there is a candidate virtual prop in a locked state among the N candidate virtual props; wherein, the fifth virtual prop is the candidate virtual prop other than the candidate virtual prop in the locked state among the N candidate virtual props.
[0019] In the above scheme, the display module is further configured to adjust the display transparency of the first virtual prop to a first transparency during the movement of the first virtual prop; and to adjust the display transparency of the second virtual prop to a second transparency when the occupied area of the first virtual prop intersects with the occupied area of the second virtual prop, wherein the first transparency is lower than the second transparency.
[0020] In the above scheme, the display module is further configured to display the item information of the first virtual item, the item information of the second virtual item, and the item difference information between the first virtual item and the second virtual item when the intersection prompt indicates that there is a second virtual item among the N candidate virtual items; wherein, the item difference information includes at least one of item type difference, occupied area difference, item quality difference, and item value difference.
[0021] In the above scheme, the display module is further configured to display a first trajectory, a second trajectory, and trajectory prompt information when the intersection prompt indicates that a second virtual item exists among the N candidate virtual items; wherein, the trajectory prompt information is used to prompt the first virtual item to move along the first trajectory to the second storage area, and the second virtual item to move along the second trajectory to the first storage area; the swapping module is further configured to control the first virtual item to move along the first trajectory to the second storage area, and control the second virtual item to move along the second trajectory to the first storage area.
[0022] In the above scheme, the swapping module is further configured to, in response to a release operation on the first virtual item, display an unlock prompt when the second virtual item is in a locked state, the unlock prompt being used to indicate whether to unlock the locked state; in response to an unlock command triggered based on the unlock prompt, unlock the second virtual item; and when the second virtual item is unlocked, control the first virtual item to move to the second storage area, and control the second virtual item to move to the first storage area.
[0023] In the above scheme, the virtual prop position adjustment device further includes: an execution module, used to perform at least one of the following when the intersection prompt indicates that there is a second virtual prop among the N candidate virtual props: output vibration feedback and play a prompt sound effect; wherein, the vibration feedback and the prompt sound effect are used to prompt that the first virtual prop and the second virtual prop can be interchanged in the storage interface.
[0024] In the above scheme, the swapping module is further configured to, when the intersection prompt indicates that there is no second virtual item among the N candidate virtual items, highlight the sixth virtual item using a second display style, wherein the sixth virtual item is a virtual item that occupies a blank associated area in the first storage area or the second storage area and causes the swapping condition to be not met; wherein the swapping condition includes that the first storage area can accommodate the second virtual item and that the second storage area associated with the second virtual item can accommodate the first virtual item; if there is a third storage area in the storage interface that can accommodate the sixth virtual item, then a movement control is displayed and the third storage area is highlighted; in response to a trigger operation on the movement control, the sixth virtual item is moved to the third storage area; wherein, after the sixth virtual item is moved to the third storage area, the intersection prompt indicates that there is a second virtual item among the N candidate virtual items; control the first virtual item to move to the second storage area, and control the second virtual item to move to the first storage area.
[0025] In the above scheme, the display module is further configured to display a swapping effect corresponding to the item type of the first virtual item in the second storage area when the first virtual item moves to the second storage area; and to display a swapping effect corresponding to the item type of the second virtual item in the first storage area when the second virtual item moves to the first storage area; wherein the swapping effects corresponding to different item types are different.
[0026] In the above scheme, the display module is further configured to enlarge the second storage area associated with the N candidate virtual props when the occupied area of the first virtual prop intersects with the occupied areas of the N candidate virtual props, and to highlight the second storage area associated with the second virtual prop in the second storage area using a third display style.
[0027] This application provides an electronic device, including: Memory is used to store executable instructions or computer programs. The processor, when executing computer-executable instructions or computer programs stored in the memory, implements the virtual prop position adjustment method provided in the embodiments of this application.
[0028] This application provides a computer-readable storage medium storing computer-executable instructions or computer programs, which, when executed by a processor, implement the virtual item position adjustment method provided in this application.
[0029] This application provides a computer program product, including computer-executable instructions or a computer program. When the computer-executable instructions or the computer program are executed by a processor, they implement the virtual prop position adjustment method provided in this application.
[0030] The embodiments of this application have the following beneficial effects: This application triggers an intersection prompt and executes item swapping simply by the intersection of the occupied areas of the first virtual item and the occupied areas of the candidate virtual item. Compared to related technologies, which only trigger swapping when the occupied areas of virtual items completely overlap and determine replacement failure even with slight deviations in landing points, this application no longer requires complete overlap of the item grids. It only requires the two areas to intersect to enter the subsequent spatial verification process. This reduces the number of interaction commands and repetitive grid detection calculations generated by users repeatedly dragging and aligning items. Under the spatial constraints that the first storage area can accommodate the second virtual item and the second storage area can accommodate the first virtual item, the swapping of the two positions is completed directly, effectively improving human-computer interaction efficiency and shortening the processing time of interaction commands. Attached Figure Description
[0031] Figure 1 This is a schematic diagram of the structure of the virtual prop position adjustment system provided in the embodiments of this application; Figure 2 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application; Figure 3 This is a first flowchart illustrating the method for adjusting the position of virtual props provided in this application embodiment; Figure 4 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 1 ; Figure 5 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 2 ; Figure 6 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 3 ; Figure 7 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 4 ; Figure 8 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 5 ; Figure 9 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 6 ; Figure 10 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 7 ; Figure 11 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 8 ; Figure 12 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 9 ; Figure 13 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 10 ; Figure 14 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 10 one; Figure 15 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 10 two; Figure 16 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 10 three; Figure 17 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 10 Four; Figure 18 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 10 five; Figure 19 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 10 six; Figure 20 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 10 seven; Figure 21 This is a second flowchart illustrating the method for adjusting the position of virtual props provided in this application embodiment. Detailed Implementation
[0032] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0033] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0034] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0035] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0036] Unless otherwise defined, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in the embodiments of this application is for the purpose of describing the embodiments of this application only and is not intended to limit this application.
[0037] In the implementation of this application, the collection and processing of relevant data should strictly comply with the requirements of relevant laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.
[0038] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.
[0039] 1) In response to, used to indicate the conditions or states on which the operation performed depends. When the conditions or states on which it depends are met, one or more operations performed may be performed in real time or with a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations are performed.
[0040] 2) Client, also known as user terminal, refers to the program that provides local services to users in contrast to the server. Except for some applications that can only run locally, it is generally installed on the terminal and needs to work with the server. That is, there needs to be a corresponding server and service program on the network to provide the corresponding services. Thus, a specific communication connection needs to be established between the client and the server to ensure the normal operation of the application.
[0041] 3) Virtual props: In a virtual scene, users can control virtual objects to interact with other virtual objects in a competitive manner using virtual props. For example, the virtual prop can be a throwable virtual prop such as a hand grenade, cluster grenade, or sticky hand grenade, or it can be a shooting virtual prop.
[0042] 4) A virtual scene is a virtual scene displayed (or provided) by an application when it runs on a terminal. This virtual scene can be a simulation of the real world, a semi-simulated / semi-fictional virtual environment, or a purely fictional virtual environment. A virtual scene can be any of a two-dimensional, 2.5-dimensional, or three-dimensional virtual scene; this application does not limit the dimension of the virtual scene. For example, the virtual scene may include sky, land, ocean, etc., and the land may include environmental elements such as deserts and cities. Users can control virtual objects to move within the virtual scene.
[0043] During the research process, the inventors discovered the following technical problems in the relevant technology: In related technologies, when swapping the positions of virtual props, the swap operation can only be initiated when the dragged prop and the target prop's occupied area completely overlap. Once the prop area only partially intersects after dragging, the swap is directly determined to be unexecutable. Users must repeatedly adjust the drag point to achieve complete alignment of the prop area. Frequent and repeated drag operations increase the number of interactive operation steps, resulting in poor human-computer interaction fault tolerance and low human-computer interaction efficiency.
[0044] Based on this, embodiments of this application provide a method, apparatus, electronic device, computer-readable storage medium, and computer program product for adjusting the position of virtual props, thereby improving the efficiency of human-computer interaction.
[0045] See Figure 1 , Figure 1 This is a schematic diagram of the structure of the virtual prop position adjustment system provided in the embodiments of this application. Figure 1 The virtual prop position adjustment system 100 shown is designed to support the position adjustment application of a virtual prop. The terminal 400 is connected to the server 200 through the network 300, which can be a wide area network, a local area network, or a combination of both.
[0046] Terminal 400 is used to respond to a movement operation for the first virtual item and a release operation when the intersection prompt indicates the presence of a second virtual item. It sends a virtual item position swap request to server 200 through network 300. The position swap request carries the identification information of the first virtual item and the second virtual item. Server 200 is used to receive location swap requests. Based on the identification information of the first virtual item and the second virtual item, it verifies whether the first storage area associated with the first virtual item can accommodate the second virtual item and whether the second storage area associated with the second virtual item can accommodate the first virtual item. After the verification is passed, it returns a swap success instruction to the terminal 400 through the network 300. Terminal 400 is also used to receive a successful swap instruction, control the first virtual item to move to the second storage area, and control the second virtual item to move to the first storage area.
[0047] In some embodiments, the virtual item position adjustment method provided in this application can also be implemented independently by a terminal. The terminal has a client installed that can implement the virtual item position adjustment method. The client displays a first virtual item and M candidate virtual items in the virtual item storage interface. The first virtual item is associated with a first storage area, and the M candidate virtual items are respectively associated with second storage areas, where M is a positive integer. In response to a movement operation on the first virtual item, the client controls the first virtual item to move within the storage interface. If the area occupied by the first virtual item intersects with the areas occupied by the N candidate virtual items, an intersection prompt for the second virtual item is displayed, where N is a positive integer less than or equal to M. If the intersection prompt indicates that the second virtual item exists among the N candidate virtual items, in response to a release operation on the first virtual item, the client controls the first virtual item to move to the second storage area and controls the second virtual item to move to the first storage area. The first storage area can accommodate the second virtual item, and the second storage area associated with the second virtual item can accommodate the first virtual item.
[0048] A virtual item position adjustment plugin can also be embedded in the client running on the terminal to implement the virtual item position adjustment method locally on the client. For example, in the virtual item storage interface, the terminal displays a first virtual item and M candidate virtual items; wherein the first virtual item is associated with a first storage area, and the M candidate virtual items are respectively associated with second storage areas, where M is a positive integer; in response to a movement operation on the first virtual item, the first virtual item is controlled to move in the storage interface; if the occupied area of the first virtual item intersects with the occupied areas of the N candidate virtual items, an intersection prompt for the second virtual item is displayed, where N is a positive integer less than or equal to M; if the intersection prompt indicates that the second virtual item exists among the N candidate virtual items, in response to a release operation on the first virtual item, the first virtual item is controlled to move to the second storage area, and the second virtual item is controlled to move to the first storage area; wherein the first storage area can accommodate the second virtual item, and the second storage area associated with the second virtual item can accommodate the first virtual item.
[0049] In some embodiments, server 200 may be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Terminal 400 may be a smartphone, tablet, laptop, desktop computer, set-top box, smart voice interaction device, smart home appliance, virtual reality device, vehicle terminal, aircraft, portable music player, personal digital assistant, dedicated messaging device, portable gaming device, smart speaker, and smartwatch, but is not limited thereto. Terminals and servers can be directly or indirectly connected via wired or wireless communication, which is not limited in this embodiment.
[0050] The electronic device that implements the virtual prop position adjustment method provided in the embodiments of this application will be described next. See Figure 2 , Figure 2 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. In practical applications, the electronic device can be implemented as various types of terminals such as laptops, tablets, desktop computers, smartphones, smart speakers, smartwatches, smart TVs, and vehicle terminals. It can also be implemented as a server or as a device cluster composed of servers and terminals. Figure 2 The illustrated electronic device includes at least one processor 510, a memory 550, at least one network interface 520, and a user interface 530. The various components of the electronic device are coupled together via a bus system 540. It is understood that the bus system 540 is used to implement communication between these components. In addition to a data bus, the bus system 540 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in… Figure 2 The general labeled all buses as Bus System 540.
[0051] The processor 510 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.
[0052] User interface 530 includes one or more output devices 531 that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 530 also includes one or more input devices 532, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0053] The memory 550 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 550 may optionally include one or more storage devices physically located away from the processor 510.
[0054] The memory 550 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 550 described in this application embodiment is intended to include any suitable type of memory.
[0055] In some embodiments, memory 550 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.
[0056] Operating system 551 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, and driver layer, for implementing various basic business functions and handling hardware-based tasks.
[0057] The network communication module 552 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 520, exemplary network interfaces 520 including Bluetooth, WiFi, and Universal Serial Bus (USB).
[0058] Presentation module 553 enables the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 531 associated with user interface 530 (e.g., a display screen, a speaker, etc.).
[0059] The input processing module 554 is used to detect one or more user inputs or interactions from one or more input devices 532, and to translate the detected inputs or interactions.
[0060] In some embodiments, the virtual prop position adjustment device provided in this application can be implemented in software. Figure 2 A virtual prop position adjustment device 555 stored in memory 550 is shown. This device can be software in the form of programs and plugins, and includes the following software modules: a display module 5551, a movement module 5552, and a swapping module 5553. These modules are logically connected and can therefore be arbitrarily combined or further separated according to the functions they implement. The functions of each module will be described below.
[0061] In some embodiments, the terminal or server can implement the virtual item position adjustment method provided in this application by running a computer program. For example, the computer program can be a native program or software module in an operating system; it can be a native application (APP), i.e., a local client, i.e., a program that needs to be installed in the operating system to run, such as an instant messaging APP or a web browser APP; it can also be a mini-program, i.e., a program that only needs to be downloaded into a browser environment to run; or it can be a mini-program that can be embedded in any APP. In short, the above-mentioned computer program can be any form of client, module, or plugin.
[0062] Below, based on the electronic device and system provided in the embodiments of this application, the method for adjusting the position of virtual props provided in the embodiments of this application will be described.
[0063] See Figure 3 , Figure 3 This is a first flowchart illustrating the method for adjusting the position of virtual props provided in this application embodiment. In practical applications, this method can be implemented by the terminal or the server alone, or by the terminal and the server working together. The following example uses a terminal implementation and will be combined with... Figure 3 The steps shown illustrate the method for adjusting the position of virtual props provided in the embodiments of this application.
[0064] In step 101, the first virtual item and M candidate virtual items are displayed in the storage interface of the virtual items.
[0065] In practical applications, the terminal has a game application installed. The game can be any of the following: open-world game, multiplayer online role-playing game, first-person shooter, third-person shooter, multiplayer online tactical battle royale game, virtual reality application, 3D map application, or multiplayer interactive survival game. Games can also be categorized into role-playing, simulation, competitive, and adventure / puzzle genres, etc., as illustrated here.
[0066] For single-player offline games, the game application's interface can be displayed in response to a trigger action. For multiplayer online games, the terminal can send a data retrieval request to the server in response to a trigger action, and the server can send data to the terminal to display the game application's interface, thus allowing the interface to be displayed on the terminal. This interface can be a storage interface for virtual items.
[0067] Among them, the triggering operation refers to the behavior of the user to trigger a certain function or event by interacting with the display interface of the terminal. The triggering operation can include one or more of the following: single click operation, double click operation, long press operation, drag operation, swipe operation, hover operation, shortcut key, voice control, and gesture operation. The triggering operations provided in the embodiments of this application can be referred to the above description, and will not be repeated hereafter.
[0068] It should be noted that the virtual item storage interface is a visual page used to display various virtual items and allow users to drag and drop them. The storage interface can update the arrangement and space occupancy status of all virtual items in real time. The storage interface can be a grid-based interactive interface, such as an in-game inventory interface, an out-of-game warehouse interface, or an equipment slot interface for the target object. In the aforementioned grid-based storage interface, the entire available storage space is divided into several standard-sized cells (i.e., grid units), each cell being the same size. The corresponding virtual items, based on their set physical area and shape attributes, occupy one or more consecutive cells within the storage interface to form an occupied area, thereby achieving the geometric arrangement and space storage of virtual items within the storage interface in the form of grid occupancy.
[0069] In some embodiments, the storage interface for virtual items can be presented as a composite visual management page, capable of simultaneously displaying multiple independent storage containers belonging to different logical affiliations within the same display viewport. For example, it can simultaneously display the in-game backpack interface, the out-of-game global warehouse interface, or the external loot box interface. Based on this composite display format, the swapping of the positions of the first and second virtual items can occur not only within a single container but also across containers. That is, the first storage area associated with the first virtual item and the second storage area associated with the second virtual item can belong to two completely different independent storage containers (e.g., the first storage area is located in the in-game backpack, and the second storage area is located in the out-of-game warehouse), thereby supporting users to directly drag and drop between different containers, enabling quick swapping of virtual items across regions.
[0070] It is understandable that the first virtual item is the selected virtual item to be swapped in position, and the M candidate virtual items are all virtual items in the storage interface that can participate in the position swapping operation, excluding the first virtual item.
[0071] The first virtual item is associated with the first storage area, and the M candidate virtual items are associated with the second storage area respectively, where M is a positive integer.
[0072] It should be noted that the first storage area refers to a local area within the storage interface of the virtual item used to represent the spatial state of the first virtual item. The first storage area includes not only the area currently occupied by the first virtual item, but also the associated blank area that does not contain any virtual items and, together with the aforementioned occupied area, forms a continuous available space capable of accommodating the second virtual item. In a gridded implementation scenario, the first storage area is represented as a spatial collection composed of multiple grid units. The first storage area includes the occupied area consisting of a continuous set of grid units occupied by the first virtual item itself, and the blank area consisting of several unoccupied grid units that are continuously connected to the aforementioned occupied area in grid coordinates to jointly meet the size and shape requirements of the second virtual item. The occupied area and the associated blank area together constitute the overall spatial environment of the first storage area during position swapping operations.
[0073] Correspondingly, the second storage area refers to the spatial range within the storage interface of virtual items, which is bound to the candidate virtual item and used to define the local location environment of the candidate virtual item. The second storage area is also composed of the occupied area where the candidate virtual item itself is located and the associated blank area that does not store virtual items and extends continuously in space with the aforementioned occupied area to jointly form the space required to accommodate the candidate virtual item. In the scenario of a gridded storage interface, the second storage area is manifested as the set of grid coordinates where the candidate virtual item is located and the continuous grid environment extending outward from the specific candidate virtual item. Specifically, the second storage area includes the occupied area composed of several continuous cells covered by the candidate virtual item according to its own shape attributes, and the blank area composed of empty cells that are in an unoccupied state and are interconnected with the aforementioned occupied area in grid arrangement to jointly meet the first virtual item grid storage standard.
[0074] In actual implementation, in response to the selection operation for the first virtual item, the first virtual item is controlled to be in a selected state. Based on the selected state, in response to the movement operation for the first virtual item, the first virtual item is controlled to move in the storage interface.
[0075] In step 102, in response to a movement operation on the first virtual item, the first virtual item is controlled to move in the storage interface.
[0076] In step 103, if the occupied area of the first virtual item intersects with the occupied areas of N candidate virtual items, an intersection prompt is displayed for the second virtual item.
[0077] Where N is a positive integer less than or equal to M.
[0078] It should be noted that intersection refers to a partial overlap between the geometric boundaries of the area occupied by the first virtual prop and the geometric boundaries of the areas occupied by the N candidate virtual props already existing in the storage interface, in the virtual space coordinate system, during the movement of the first virtual prop's position. Specifically, the grid cells constituting the area occupied by the first virtual prop overlap with the grid cells constituting the areas occupied by the N candidate virtual props. The area occupied by the N candidate virtual props refers to the area jointly formed by the areas occupied by each of the N candidate virtual props.
[0079] The second virtual prop is selected from N candidate virtual props that intersect in space and is chosen as the target for the final position swap determination. When N is 1, the second virtual prop is the only candidate virtual prop that intersects with the first virtual prop; when N is greater than 1, the second virtual prop is the candidate virtual prop chosen as the target for the final position swap determination based on the area and shape attributes of the N candidate virtual props.
[0080] It should be noted that the intersection hint is used to indicate whether a second virtual item exists among N candidate virtual items.
[0081] In step 104, if the intersection prompt indicates that there is a second virtual item among the N candidate virtual items, in response to the release operation for the first virtual item, the first virtual item is moved to the second storage area, and the second virtual item is moved to the first storage area.
[0082] The first storage area can accommodate the second virtual item, and the second storage area associated with the second virtual item can accommodate the first virtual item. The first virtual item is moved to the second storage area, and the second virtual item is moved to the first storage area, so that the positions of the first and second virtual items are swapped in the storage interface.
[0083] In actual implementation, the reference positioning point corresponding to the area occupied by the second virtual prop in the second storage area is extracted. The first virtual prop is placed completely using this reference positioning point as the placement reference, extending outward according to the outline of the first virtual prop. Simultaneously, the reference positioning point corresponding to the area occupied by the first virtual prop in the first storage area is extracted, and the second virtual prop is placed completely using this reference positioning point as the placement reference, extending outward according to the outline of the second virtual prop. The display positions of the two sets of virtual props in the storage interface are updated synchronously to complete the position swap. For example, the upper left corner of the space occupied by the second virtual prop is used as the reference positioning point in the second storage area, and the first virtual prop is placed in the second storage area with its outline fully extended using this upper left corner point as the placement reference. Similarly, the upper left corner of the space occupied by the first virtual prop is used as the reference positioning point in the first storage area, and the second virtual prop is placed in the first storage area with its outline fully extended using this upper left corner point as the placement reference. Even if the length and width of the space occupied by the two sets of virtual props are different, the placement swap is only completed according to the reference point of the other's original occupied area.
[0084] It should be noted that when the area occupied by the first virtual item partially intersects with the areas occupied by the N candidate virtual items, the final determined second virtual item is not limited to a single candidate virtual item. The second virtual item can also be a combination object formed by splicing P candidate virtual items out of the N candidate virtual items in the storage interface, where P is a positive integer greater than 1 and less than or equal to N. Specifically, when the first virtual item interferes with the N candidate virtual items during a movement operation, the P adjacent candidate virtual items among the N candidate virtual items are regarded as a unified set of replacement targets, and the replacement target set containing the P candidate virtual items is determined as the second virtual item for which the position is swapped. In response to the release operation on the first virtual item, the first virtual item is controlled to move to the second storage area associated with the second virtual item composed of the P candidate virtual items. At the same time, the P candidate virtual items are controlled as a whole to move synchronously to the first storage area associated with the first virtual item according to the relative spatial arrangement before the swap. The positions of the remaining candidate virtual items among the N candidate virtual items other than the P candidate virtual items in the storage interface remain unchanged.
[0085] In some embodiments, the first storage area includes the initial occupied area before the first virtual item moves. When a third virtual item exists among the N candidate virtual items, the third virtual item is determined as the second virtual item. The third virtual item is a virtual item whose occupied area is the same as the area of the initial occupied area and whose shape is the same as the shape of the initial occupied area. Accordingly, controlling the first virtual item to move to the second storage area and controlling the second virtual item to move to the first storage area can be achieved by controlling the first virtual item to move to the occupied area of the third virtual item and controlling the third virtual item to move to the initial occupied area.
[0086] It is understandable that the initial occupied area is the fixed space range occupied within the storage interface before the first virtual prop starts moving. It is an area composed of occupied grid cells. The initial occupied area is a component of the first storage area, which in addition to the initial occupied area, also includes connected blank areas.
[0087] The area occupied by the third virtual prop being the same as the area of the initial occupied area means that the size of the space completely covered by the third virtual prop is exactly the same as the size of the space occupied by the first virtual prop before it moved. This can mean that the number of grid cells corresponding to the occupied areas of the two is the same. The shape of the occupied area being the same as the shape of the initial occupied area means that the horizontal length and vertical width of the occupied area of the third virtual prop correspond one-to-one with the horizontal length and vertical width of the initial occupied area, respectively, with only the spatial coordinates of the two within the storage interface being different.
[0088] For example, in the gridded storage interface, the initial occupied area of the first virtual prop before it moves is a rectangular area consisting of two consecutive grids, one horizontal and one vertical. The horizontal length and vertical width of the initial occupied area are fixed. The occupied area of the third virtual prop among the N candidate virtual props is also a rectangular grid combination of two horizontal and one vertical. The total number of grids and the length and width arrangement of the occupied area of the third virtual prop are completely consistent with the initial occupied area. The two have the same area and the same shape. When the position is swapped, the first virtual prop is directly placed into the two grid positions originally occupied by the third virtual prop, and the third virtual prop is simultaneously placed into the two grid positions corresponding to the initial occupied area to complete the swap.
[0089] In actual implementation, when there is only one third virtual item among N candidate virtual items, the third virtual item is directly identified as the second virtual item, and the positions of the first and third virtual items are swapped. When there are two or more third virtual items among N candidate virtual items, they are sorted in order of the number of overlapping grids between the preview area occupied by the first virtual item and the area occupied by each third virtual item during dragging, from most to least, and the third virtual item with the most overlapping grids is selected as the second virtual item. If the number of overlapping grids between the area occupied by different third virtual items and the preview area occupied by the first virtual item is equal, the third virtual item closest to the initial area occupied by the first virtual item is selected as the second virtual item. For example, in the gridded storage interface, the initial area occupied by the first virtual prop is a grid combination of 2 horizontal grids and 1 vertical grid. Among the N candidate virtual props, there are two third virtual props that meet the conditions of having the same area and the same shape. The area occupied by the first third virtual prop overlaps with the drag preview area of the first virtual prop by 3 grids, and the area occupied by the second third virtual prop overlaps with the drag preview area of the first virtual prop by 1 grid. At this time, the first third virtual prop with more overlapping grids is selected as the second virtual prop. If the number of overlapping grids of the two third virtual props is 3, the coordinate distance between the area occupied by the two third virtual props and the initial area is compared, and the third virtual prop with the smaller distance is selected to complete the position swap.
[0090] As an example, see Figure 4 , Figure 4 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 1 When N is an integer greater than 1, if the occupied area of the first virtual item indicated by the dashed box 401 intersects with the occupied areas of candidate virtual items 402, 403, and 404, then candidate virtual item 403 (third virtual item) is determined as the second virtual item, the first virtual item is controlled to move to the occupied area of the third virtual item, and the third virtual item is controlled to move to the initial occupied area 405.
[0091] As another example, see Figure 5 , Figure 5 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 2 When N is 1, if the occupied area 501 of the first virtual item intersects with the occupied area of the candidate virtual item 502, the candidate virtual item 502 (the third virtual item) is determined as the second virtual item, the first virtual item is controlled to move to the occupied area of the third virtual item, and the third virtual item is controlled to move to the initial occupied area 503.
[0092] In this way, props that perfectly match in area and shape are prioritized for exchange. When exchanging props, they only need to fill the original area occupied by each other. There is no need to check the overall capacity of the blank areas in the two types of storage areas, which greatly reduces the amount of space matching calculation. After dragging and releasing, the position can be exchanged immediately, and the interaction response speed is improved. At the same time, the storage interface space is arranged neatly after exchanging props of the same size.
[0093] In some embodiments, when there is no third virtual item among the N candidate virtual items and there is at least one fourth virtual item among the N candidate virtual items, the fourth virtual items are traversed sequentially according to the area of their occupied regions from largest to smallest. When a fourth virtual item that satisfies the exchange condition is encountered, it is determined as the second virtual item. The fourth virtual item is a candidate virtual item whose occupied region area is larger than the area of the initial occupied region. The exchange condition includes that the first storage region can accommodate the fourth virtual item and that the second storage region associated with the fourth virtual item can accommodate the first virtual item.
[0094] In practice, all N candidate virtual items can be traversed, and the candidate virtual item that satisfies the exchange condition can be used as the second virtual item.
[0095] The occupied area represents the total space completely covered by the virtual item within the storage interface. It is calculated using the overall horizontal and vertical spans of the occupied area and is used to compare the size differences in the space occupied by different virtual items. In a gridded implementation scenario, the occupied area directly corresponds to the total number of grid cells occupied by the virtual item, allowing for a direct distinction in the size differences in the space occupied by different virtual items based on the number of grid cells.
[0096] It should be noted that during the traversal of the fourth virtual props in descending order of their occupied area, not only can they be sorted based on area values in a single dimension, but the shape attributes of the fourth virtual props can also be combined to optimize the traversal priority and the selection logic for swap targets. Specifically, the outline features of the occupied area where the first virtual prop is located are extracted simultaneously (e.g., the proportion of grid cells in the length and width directions), and the outline features of the occupied areas where each fourth virtual prop is located are extracted separately. For multiple fourth virtual props with equal areas, the fourth virtual prop whose outline features are closest to those of the first virtual prop is selected first to perform the conditional judgment of bidirectional space accommodation, thereby prioritizing the replacement of the target that is most similar to the first virtual prop in geometric shape, so as to maximize the regularity of the remaining space after replacement.
[0097] Among these, the closest shape contour features refer to the optimal shape similarity state obtained by quantitatively calculating shape parameters when comparing the geometric shapes of different virtual props. Specifically, the proportion of grid cells in the initial occupied area of the first virtual prop in the length and width directions is calculated, as well as the proportion of grid cells in the occupied areas of each fourth virtual prop with equal area in the length and width directions. Then, the absolute difference between the proportion of the first virtual prop and the proportion of each fourth virtual prop with equal area is calculated. The fourth virtual prop with the smallest absolute difference is determined to have the closest shape contour features to the first virtual prop.
[0098] For example, suppose the initial area occupied by the first virtual prop is a 2x2 grid matrix, and the ratio of the number of grid cells in the length and width directions of the first virtual prop is 1.0. When local spatial intersection occurs, there are two fourth virtual props, each occupying an area of 8 grid cells. The first fourth virtual prop occupies a 2x4 rectangular grid matrix, with a ratio of 2.0, while the second fourth virtual prop occupies a 1x8 strip grid matrix, with a ratio of 8.0. Through underlying calculations, the absolute difference between the ratios of the first and second fourth virtual props is 1.0, and the absolute difference is 7.0. Since the absolute difference for the first fourth virtual prop is smaller, the electronic device determines that the outline features of the first fourth virtual prop are most similar to those of the first virtual prop. Therefore, the first fourth virtual prop is prioritized in the descending order judgment queue to perform the spatial accommodation condition judgment for position swapping.
[0099] As an example, see Figure 6 , Figure 6 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 3 The area occupied by the first virtual item indicated by the dashed box 601 intersects with the areas occupied by the candidate virtual items indicated by the solid boxes 602, 603, and 604. There is a fourth virtual item (the candidate virtual item indicated by the solid box 604). The fourth virtual item satisfies the swap condition. The fourth virtual item that satisfies the swap condition is determined as the second virtual item. The first virtual item is controlled to move to the second storage area, and the second virtual item is controlled to move to the first storage area.
[0100] In this way, items with larger area are prioritized for traversal verification. The second storage area corresponding to items with larger area contains more blank areas, making bidirectional accommodation verification easier to meet. Traversal ends when the first item that meets the swap conditions is found, reducing the number of space matching calculations and improving the response speed of swap operations.
[0101] In some embodiments, displaying an intersection prompt for the second virtual item can be implemented as follows: when the swap condition is met, a first intersection prompt for the second virtual item is displayed, the first intersection prompt indicating that the second virtual item exists among N candidate virtual items; wherein, the swap condition includes that a first storage area can accommodate the second virtual item and a second storage area associated with the second virtual item can accommodate the first virtual item; when the swap condition is not met, a second intersection prompt for the second virtual item is displayed, the second intersection prompt indicating that the second virtual item does not exist among N candidate virtual items.
[0102] It should be noted that the display format of intersection prompts includes two categories: static visual identifiers and dynamic visual effects. Static visual identifiers include outline borders, area background colors, marker icons, and text prompts. Dynamic visual effects include flashing lines, background color gradients, and marker floating animations. The first and second intersection prompts select different types or parameters of visual elements to create a clear distinction. Specifically, the first intersection prompt can display the occupied area of the first virtual item in a first color, or the occupied areas of N candidate virtual items in a first color, or the occupied areas of the first virtual item and the occupied areas of N candidate virtual items in a first color, or the intersection area of the first virtual item and N candidate virtual items in a first color. Correspondingly, the second intersection prompt can display the occupied area of the first virtual item in a second color, or the occupied areas of N candidate virtual items in a second color, or the occupied areas of the first virtual item and the occupied areas of N candidate virtual items in a second color, or the intersection area of the first virtual item and N candidate virtual items in a second color, where the first color and the second color are different.
[0103] As an example, see Figure 7 , Figure 7 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 4 When the first storage area of the first virtual item can accommodate the second virtual item 701, and the second storage area associated with the second virtual item 701 can accommodate the first virtual item, the occupied area 702 of the first virtual item is displayed in a first color. In response to the release operation of the first virtual item, the first virtual item is controlled to move to the second storage area, and the second virtual item 701 is controlled to move to the first storage area.
[0104] As another example, see Figure 8 , Figure 8 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 5 When the swap condition is not met, the occupied area 801 of the first virtual item is displayed in a second color, and in response to the release operation of the first virtual item, the first virtual item is controlled to move back to the first storage area.
[0105] In this way, by presenting the first intersection prompt and the second intersection prompt when the exchange conditions are met and not met respectively, the bidirectional spatial accommodation judgment result of the current target position can be visualized and fed back in real time before the user performs the release operation. This effectively avoids the user blindly trying to drag because they cannot predict the underlying spatial state, reduces the redundant calculation overhead of a large number of invalid input commands caused by position exchange failure, and enables the user to adjust the interaction action in advance based on intuitive interface guidance, thereby significantly improving the human-computer interaction efficiency and operation fault tolerance of virtual space management.
[0106] In some embodiments, the storage interface includes multiple grid cells; when the occupied area of the first virtual item intersects with the occupied areas of N candidate virtual items, an intersection prompt for the second virtual item is displayed. This can be achieved by displaying an intersection prompt for the second virtual item when the number of overlapping grid cells is greater than or equal to 1, the number of overlapping grid cells is less than the number of grid cells occupied by the occupied area of the first virtual item, and less than the number of grid cells occupied by the occupied areas of the N candidate virtual items; wherein, an overlapping grid cell is a grid cell where the occupied area of the first virtual item overlaps with the occupied areas of the N candidate virtual items.
[0107] It should be noted that the grid cell is a basic spatial measurement unit with uniform size, used to define the spatial boundaries of the area occupied by various virtual props. The occupied area and the range of area overlap can be quantified by counting the number of grid cells.
[0108] It is understood that overlapping grid cells are grid cells that simultaneously fall within the areas occupied by both the first virtual item and the candidate virtual item. Overlapping grid cells are used to quantify the size of the intersection between the two sets of occupied areas. A number of overlapping grid cells greater than or equal to 1 indicates that at least one grid cell overlaps between the first virtual item's occupied area and the candidate virtual item's occupied area, resulting in a valid intersection. A number of overlapping grid cells less than the number of grid cells occupied by the first virtual item's occupied area indicates that the overlapping grid cells do not cover all of the first virtual item's occupied grid cells, and the first virtual item still has grid cells that do not overlap with the candidate virtual item. A number of overlapping grid cells less than the number of grid cells occupied by N candidate virtual item's occupied areas indicates that the overlapping grid cells do not cover all of the corresponding candidate virtual item's occupied grid cells, and the candidate virtual item still has grid cells that do not overlap with the first virtual item.
[0109] As an example, see Figure 9 , Figure 9 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 6 There are two overlapping grid cells between the occupied area of the first virtual item indicated by dashed box 901 and the occupied area of the candidate virtual item indicated by solid box 902. Since the first storage area associated with the first virtual item can accommodate the second virtual item, and the second storage area associated with the second virtual item can accommodate the first virtual item, in response to a release operation on the first virtual item, the first virtual item is controlled to move to the second storage area, and the second virtual item is controlled to move to the first storage area.
[0110] In this way, by introducing the upper and lower limits of the number of grid units, the local overlapping state between virtual props can be accurately identified with quantitative standards, effectively avoiding interactive misoperations caused by the ambiguity of the landing point boundary, thereby improving the accuracy of space allocation judgment and the reliability of human-computer interaction.
[0111] In some embodiments, the first storage area includes an initial occupied area before the first virtual item moves. Controlling the first virtual item to move to the second storage area and controlling the second virtual item to move to the first storage area can be achieved as follows: If at least one of the following conditions is met—that the area of the second virtual item's occupied area is different from the area of the initial occupied area, or that the shape of the second virtual item's occupied area is different from the shape of the initial occupied area—then, when the occupied area of the second virtual item can accommodate the first virtual item, the first virtual item is controlled to move to the occupied area of the second virtual item, and the second virtual item is controlled to move to the first storage area. The first virtual item is moved to the initial occupied area and the blank associated area in the first storage area. When the initial occupied area can accommodate the second virtual item, the first virtual item is moved to the occupied area of the second virtual item and the blank associated area in the second storage area, and the second virtual item is moved back to the initial occupied area. When the initial occupied area cannot accommodate the second virtual item, and the occupied area of the second virtual item cannot accommodate the first virtual item, the first virtual item is moved to the occupied area of the second virtual item and the blank associated area in the second storage area, and the second virtual item is moved back to the initial occupied area and the blank associated area in the first storage area.
[0112] Here, the initial occupied area is the space occupied by the first virtual item in the first storage area before the move operation is performed.
[0113] The difference in shape between the second virtual item's occupied area and the initial occupied area means that the spatial outline of the space occupied by the second virtual item cannot completely overlap with the spatial outline of the initial occupied area; the two types of storage spaces have different external structures. When the storage interface is composed of a large number of grid units, the arrangement outline and row / column structure of the grid units covered by the second virtual item's occupied area are significantly different from those of the grid units covered by the initial occupied area, and their grid arrangement styles cannot correspond one-to-one. For example, the initial occupied area occupies 2 rows and 2 columns, totaling four grids, presenting an overall square arrangement; the second virtual item's occupied area occupies 1 row and 3 columns, totaling three grids, presenting an overall long rectangular arrangement. The difference in their grid arrangement outlines satisfies the condition that their shapes are different.
[0114] It should be noted that "the area occupied by the second virtual item can accommodate the first virtual item" means that the overall spatial boundary of the area occupied by the second virtual item can completely cover the entire space occupied by the first virtual item, and there will be no space overflow after the first virtual item is placed. According to the grid division standard of the storage interface, the number of grid units occupied by the area occupied by the second virtual item and the grid arrangement can completely accommodate all the grid units occupied by the first virtual item. The item can be placed using only this area, without the need to call on surrounding empty related areas to supplement space. For example, if the initial occupied area is a 2×2 square grid, occupying a total of four grid units, and the area occupied by the second virtual item is a 3×2 rectangular grid, which can accommodate six grid units, the space is large enough to completely accommodate the first virtual item that occupies four grid units. Therefore, it can be determined that the area occupied by the second virtual item can accommodate the first virtual item.
[0115] The initial occupied area being able to accommodate the second virtual prop means that the complete spatial boundary of the initial occupied area can completely encompass the entire occupied area of the second virtual prop, and the second virtual prop will not overflow the spatial boundary after being placed. The total number of grid units and the grid layout outline covered by the initial occupied area can completely accommodate the entire grid area occupied by the second virtual prop. The prop can be neatly placed using only the space of the initial occupied area itself, without needing to occupy surrounding blank areas to expand the placement space. For example, if the initial occupied area is arranged as a 2x2 square grid, occupying a total of four grid units; the second virtual prop only occupies a 1x2 long strip grid, and its entire spatial outline can be completely covered by the initial occupied area, requiring fewer grid units, and can be completely placed inside the initial occupied area, meeting the containment requirements.
[0116] The initial occupied area cannot accommodate the second virtual prop, and the occupied area of the second virtual prop cannot accommodate the first virtual prop. This means that the overall spatial boundary of the initial occupied area cannot completely encompass the occupied area of the second virtual prop, resulting in the second virtual prop overflowing when placed alone. Simultaneously, the spatial boundary of the occupied area corresponding to the second virtual prop cannot cover the overall space occupied by the first virtual prop, also causing space overflow after the first virtual prop is placed. The number of grids and their arrangement in each area are insufficient to individually accommodate the corresponding props; therefore, it is necessary to expand the space using surrounding empty adjacent areas to complete the swapping of the two virtual props. For example, the initial occupied area is a 2×2 square grid, totaling four grid units; the second virtual prop's occupied area is a 1×3 horizontal strip grid, occupying three grid units. The regular square space of the initial occupied area cannot accommodate the elongated shape of the second virtual prop, and the narrow space of the second virtual prop cannot accommodate the square arrangement of the first virtual prop. Neither of the two core areas can accommodate the other's props, requiring the use of adjacent empty areas to piece together space for placement.
[0117] It should be noted that the blank associated area in the first storage area is an empty grid space within the first storage area that is adjacent to and connected to the initially occupied area. This space does not contain any virtual props. If the size and outline of the initially occupied area are insufficient to fully accommodate the virtual props to be placed, the blank associated area can be seamlessly connected to the initially occupied area to form a continuous space that can jointly accommodate the virtual props, thus overcoming the placement limitations caused by the insufficient space in a single area. The blank associated area in the second storage area is an empty grid space within the second storage area that is adjacent to and connected to the occupied area of the second virtual prop. This space does not contain any virtual props. When the occupied area of the second virtual prop cannot accommodate the virtual props to be swapped in on its own, this area can be seamlessly connected and merged with it to expand a larger continuous placement space, adapting to the needs of swapping virtual props of different shapes and sizes.
[0118] In some embodiments, after controlling the first virtual item to move to the second storage area and controlling the second virtual item to move to the first storage area, an undo control is displayed; in response to a trigger operation on the undo control, the first virtual item is controlled to move back to the first storage area, and the second virtual item is controlled to move back to the second storage area.
[0119] The undo control is used to undo the swap between the first virtual item and the second virtual item.
[0120] In actual implementation, controlling the first virtual item to move back to the first storage area and controlling the second virtual item to move back to the second storage area means controlling the first virtual item to move back to the storage area before the move operation was performed, and controlling the second virtual item to move back to the storage area before the move operation was performed.
[0121] As an example, see Figure 10 , Figure 10 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 7 After controlling the first virtual item 1001 to move to the second storage area and the second virtual item 1002 to move to the first storage area, the undo control 1003 is displayed; in response to the trigger operation of the undo control 1003, the first virtual item 1001 is controlled to move back to the first storage area and the second virtual item 1002 is controlled to move back to the second storage area.
[0122] In this way, the undo control is displayed immediately after the item swap operation is completed. If the swap operation is accidentally performed, the original placement of the two sets of items can be quickly restored without the need to manually drag and adjust the item positions. The operation steps required for item layout correction are simplified, and the overall smoothness of layout management is improved.
[0123] In some embodiments, a cancellation prompt message is displayed in the associated area of the cancellation control. The cancellation prompt message is used to prompt the cancellation of the exchange between the first virtual item and the second virtual item. When the display duration of the cancellation control reaches a preset duration, the display of the cancellation control and the cancellation prompt message is canceled.
[0124] The associated region of the undo control refers to a specific visual display area that has a clear spatial binding relationship with the current display position of the undo control. Specifically, the associated region of the undo control is the interface space determined by extending outward from the center point coordinates or edge contour coordinates of the undo control, and the coordinate distance between the boundary of the associated region of the undo control and the display boundary of the undo control is less than a preset distance threshold.
[0125] In practice, a countdown timer is displayed for the undo control. When the countdown reaches zero, the undo control and the undo prompt message are removed. The countdown timer corresponds to a preset duration.
[0126] As an example, see Figure 11 , Figure 11 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 8 In the associated area of the undo control 1101, the undo prompt information indicated by the dashed box 1103 and the countdown 1102 for the undo control are displayed. When the countdown 1102 is cleared (i.e. the display duration of the undo control reaches the preset duration), the display of the undo control 1101 and the undo prompt information indicated by the dashed box 1103 are canceled.
[0127] In this way, by displaying the undo prompt in the associated area of the undo control and automatically canceling the display after a preset time, it can provide intuitive operation guidance while maintaining the cleanliness of the interface display, avoid users' cognitive biases about the current recoverable interaction state, and release the visible space occupied by temporary interactive elements in a timely manner through the automatic hiding mechanism, effectively preventing redundant controls from causing continuous visual interference to subsequent interface operations. Thus, while ensuring the fault tolerance rate of interaction, it greatly optimizes the overall layout and visual interaction experience within the limited screen area.
[0128] In some embodiments, when an intersection prompt indicates that a second virtual item exists among N candidate virtual items, a first placement area for placing the second virtual item is determined in a first storage area, and a second placement area for placing the first virtual item is determined in a second storage area; the first placement area and the second placement area are highlighted using a first display style; correspondingly, in response to a release operation on the first virtual item, the first virtual item is moved to the second storage area, and the second virtual item is moved to the first storage area, which can be implemented in the following manner: in response to a release operation on the first virtual item, the first virtual item is moved to the second placement area, and the second virtual item is moved to the first placement area.
[0129] It should be noted that the first placement area is a combination of target mesh cells or a range of target reference coordinates within the first storage area that perfectly matches the volume and shape attributes of the second virtual prop; similarly, the second placement area is a combination of target mesh cells or a range of target reference coordinates within the second storage area that perfectly matches the volume and shape attributes of the first virtual prop.
[0130] The first display style can be manifested as a specific color mask with preset transparency (such as a semi-transparent green background) covering the bottom layer of the first and second placement areas, or as generating visual indicator elements such as flowing outlines, dashed borders, and bright halos at the outer contour boundaries of the first and second placement areas; furthermore, the first display style can also be manifested as pre-rendering the shadow model of the second virtual prop in the first placement area and pre-rendering the shadow model of the first virtual prop in the second placement area, thereby providing intuitive interface feedback to help users confirm the final spatial arrangement effect of the position swap in advance.
[0131] As an example, see Figure 12 , Figure 12 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 9 When the intersection prompt indicates that there is a second virtual prop among the N candidate virtual props, the first placement area 1201 and the second placement area 1202 are highlighted using the first display style.
[0132] In this way, by using a dedicated display style to visually highlight the two target placement areas, the drag-and-drop phase can accurately lock the corresponding seating positions of the two sets of props. When the props are moved, the coordinates are matched and aligned according to the marked areas, reducing the probability of positional shift after the props are swapped. The pre-marked rendering mechanism can also reduce the interaction time caused by users repeatedly comparing positions, and improve the alignment accuracy and execution efficiency of the swapping action.
[0133] In some embodiments, before controlling the first virtual item to move to the second storage area and controlling the second virtual item to move to the first storage area, a corresponding switch is displayed; when the corresponding switch is in the closed state, in response to an opening operation of the corresponding switch, the state of the corresponding switch is switched from the closed state to the open state; correspondingly, in response to a release operation of the first virtual item, controlling the first virtual item to move to the second storage area and controlling the second virtual item to move to the first storage area can be implemented in the following way: when the corresponding switch is in the open state, in response to a release operation of the first virtual item, controlling the first virtual item to move to the second storage area and controlling the second virtual item to move to the first storage area.
[0134] It should be noted that the interactive switch is a component used to control whether to allow the first virtual item to move to the second storage area and the second virtual item to move to the first storage area when the occupied area of the first virtual item intersects with the occupied area of the candidate virtual item. The interactive switch can be displayed as a toggle slider, a checkbox button, a text / image switching button, or a drop-down menu.
[0135] In practice, the phase-change switch can be displayed in the storage interface or the settings interface.
[0136] As an example, see Figure 13 , Figure 13 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 10 The phase switch 1301 is displayed; when the phase switch 1301 is in the closed state, in response to the opening operation of the phase switch 1301, the state of the phase switch 1301 is switched from the closed state to the open state.
[0137] In this way, by relying on the intersecting switch to add an access control mechanism for the automatic swapping behavior, users can decide whether to enable the logic of intersecting triggering swapping according to their operational needs. When the switch is off, the position of the props will not be changed automatically, and the unexpected swapping behavior caused by accidental dragging is avoided. The free switching between the two operation modes can also adapt to different prop arrangement and management needs such as manual sorting and quick swapping.
[0138] In some embodiments, when N is a positive integer greater than 1, when there are multiple candidate virtual items among the N candidate virtual items that can be interchanged with the first virtual item, the multiple candidate virtual items that can be interchanged are controlled to be in an optional state; based on the optional state, in response to the selection operation performed on the multiple candidate virtual items that can be interchanged, the selected candidate virtual item is determined as the second virtual item.
[0139] In actual implementation, in response to a click operation on the target candidate virtual item, the target candidate virtual item is identified as the second virtual item, and the remaining candidate virtual items other than the target candidate virtual item among the multiple candidate virtual items that can be swapped are controlled to exit the selectable state. The target candidate virtual item is any one of the multiple candidate virtual items that can be swapped.
[0140] When a move operation is received for the first virtual item, the first virtual item is moved to the area occupied by the target candidate virtual item, which is any one of a plurality of candidate virtual items that can be swapped; in response to a release operation for the first virtual item within the area occupied by the target candidate virtual item, the target candidate virtual item is identified as the second virtual item.
[0141] When a movement operation is received for the first virtual item, the first virtual item is moved to the area occupied by the target candidate virtual item. The target candidate virtual item is any one of a plurality of candidate virtual items that can be interchanged. In response to the first virtual item staying in the area occupied by the target candidate virtual item for a preset hovering time, the target candidate virtual item is identified as the second virtual item.
[0142] When a sliding operation is received based on the current position of the first virtual prop; the sliding direction of the sliding operation is determined, and the target virtual prop in the sliding direction among multiple candidate virtual props that can be interchanged is determined as the second virtual prop.
[0143] It is understood that a candidate virtual item that can be interchanged with the first virtual item refers to a candidate virtual item that can be accommodated in the first storage area and whose associated second storage area can accommodate the first virtual item. After a candidate virtual item is made available, it can be selected.
[0144] In this way, when multiple items meet the exchange conditions at the same time, the selection permission is opened uniformly. The matching item corresponding to this exchange is determined by the human selection of the target object. This avoids the phenomenon of automatic matching object disorder in the scenario of multiple overlapping targets, reduces the probability of unnecessary position changes caused by mismatch, and improves the controllability and arrangement accuracy of the exchange operation in the scenario of multiple candidate items.
[0145] In some embodiments, when the intersection prompt indicates that there is no second virtual item among the N candidate virtual items, in response to the release operation on the first virtual item, the first virtual item is controlled to move back to the first storage area, and at least one of the following is displayed: swap failure prompt information, recommendation prompt information; wherein, the swap failure prompt information is used to indicate the reason for the swap failure, and the recommendation prompt information is used to recommend at least one of the following: candidate virtual items that can be swapped with the first virtual item, and storage locations in the storage interface where the first virtual item can be placed.
[0146] In actual implementation, the spatial coordinate offset of the first virtual prop caused by the movement operation is canceled, and the occupied area of the first virtual prop is accurately restored to the initial occupied area before the movement operation is performed through smooth animation transition effects or the visual effect of instant teleportation.
[0147] The swap failure message includes reasons for failure based on spatial dimensions, such as "The occupied area of the first virtual item is larger than the second storage area associated with the second virtual item," or "The occupied area of the candidate virtual item is larger than the first storage area associated with the first virtual item." The swap failure message can also include reasons for failure based on item attributes, such as "The current candidate virtual item is locked and swapping is prohibited." The display formats for the swap failure message include plain text, static graphic, animated, and combined text and graphic elements.
[0148] In practice, the failure message can be displayed using plain text, a static warning icon, or a dynamic reminder animation, or a combination of text and icons, or text and animation. Recommendation messages can be displayed using plain text, graphic markers, dynamic highlight animations, or icon labels, or a combination of text and graphics, text and highlighted areas, or icons and explanatory text. Specifically, specific visual rendering styles are applied to the occupied area of the candidate virtual item that can be exchanged with the first virtual item, or to the storage location where the first virtual item can be placed. For example, graphic elements and distinctive feature layers are displayed at the boundary and inside of the candidate virtual item's occupied area or storage location; floating prompt components or directional guidance symbols containing recommendation guidance semantics are displayed in the surrounding area of the candidate virtual item or storage location; and predictive preview features are presented at the recommended storage location to represent the expected form of the first virtual item after placement. Through differentiated visual feedback, the currently available target exchange object or target placement space is clearly and accurately marked to the user.
[0149] As an example, see Figure 14 , Figure 14 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 10 First, when the first virtual item 1401 intersects with the candidate virtual item 1402, in the absence of a second virtual item, in response to the release operation on the first virtual item 1401, the first virtual item 1401 is moved back to the first storage area, and the swap failure prompt message 1403 "Insufficient space around the first virtual item 1401, unable to swap!" is displayed.
[0150] In this way, when the swap verification fails to match a valid swap object, the dragged props will be automatically returned to their original storage location. At the same time, the failure reason explanation and feasible placement and swap solution guidance will be pushed to the outside world. After the prop dragging error, the user does not need to manually reset the position. The accompanying prompts shorten the operation time spent by the user to troubleshoot the fault, search for available points and swap targets, and optimize the completeness of the interaction loop in the prop sorting failure scenario.
[0151] In some embodiments, before displaying the first virtual item, in response to a combination operation for a plurality of consecutively adjacent virtual items, the plurality of virtual items are combined and the combined plurality of virtual items are displayed, and the combined plurality of virtual items are treated as a whole in response to a movement operation; the combined plurality of virtual items are determined as the first virtual item.
[0152] It should be noted that consecutive adjacent virtual items refer to two or more virtual items that occupy interconnected grid cells in the storage interface, forming an uninterrupted whole. Specifically, consecutive adjacent forms are manifested as the occupied areas of multiple virtual items being closely joined in the horizontal or vertical direction, or the occupied areas of multiple virtual items sharing at least one grid boundary. Consecutive adjacent virtual items can consist of multiple virtual items of the same type with the same functional attributes; consecutive adjacent virtual items can also consist of multiple virtual items of different types with related attributes, as long as the multiple different types of virtual items present a closely arranged continuous form in the grid coordinate system, the spatial prerequisite for performing a combination operation is met.
[0153] In actual implementation, when a continuous sliding operation is received, if the area enclosed by the sliding trajectory of the continuous sliding operation covers multiple consecutive adjacent virtual props, the multiple consecutive adjacent virtual props enclosed by the sliding trajectory are combined in response to the end of the continuous sliding operation.
[0154] Display a combination control in the storage interface. In response to a trigger operation on the combination control, control the candidate virtual items in the storage interface to be in a batch selection state. When the candidate virtual items are in a batch selection state, when a selection operation is received for virtual items among multiple consecutive adjacent virtual items, the selected virtual items are combined.
[0155] When a sliding touch operation is received that causes the area occupied by multiple consecutive adjacent virtual props to shrink inward, the multiple consecutive adjacent virtual props affected by the sliding touch operation are combined.
[0156] It is understandable that when multiple virtual props are combined and respond to a movement operation as a whole, it means that when a movement operation is received targeting any position of the multiple virtual props, the multiple virtual props are no longer treated as discrete individuals and their interface positions are refreshed independently. Instead, the relative spatial arrangement of the multiple virtual props is locked and the interface positions are updated synchronously.
[0157] In practice, the combined virtual props can be displayed in a different style than other virtual props. For example, the common grid boundaries between adjacent virtual props can be hidden, and a continuous closed highlight stroke can be rendered along the outermost outline of the combined virtual props; or, a uniform overlay of a connected background mask of the same color with a specific transparency can be applied to the bottom layer of the overall area occupied by the combined virtual props; or, a specific interactive layer or link icon used to represent the combined connection state can be rendered floating in the overall central area of the combined virtual props.
[0158] As an example, see Figure 15 , Figure 15 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 10 Second, in response to the combination operation of virtual props 1501, 1502, and 1503, virtual props 1501, 1502, and 1503 are combined, and the combined virtual props are displayed as indicated by 1504.
[0159] In this way, multiple virtual props arranged in succession can be grouped and bound to form a unified moving entity. During the overall dragging and moving process, the relative positions of each group of props remain fixed. The group as a whole can directly serve as the interchangeable entity to participate in the subsequent intersection verification and swapping process, eliminating the repetitive operation of dragging and adjusting individual props one by one. This greatly reduces the operation steps and interaction time of arranging a batch of props, and improves the smoothness of the operation of organizing a large number of props.
[0160] In some embodiments, when N is a positive integer greater than 1, and there is a candidate virtual item in a locked state among the N candidate virtual items, the second virtual item is determined from the fifth virtual item; wherein, the fifth virtual item is the candidate virtual item other than the candidate virtual item in a locked state among the N candidate virtual items.
[0161] In practice, a lock icon can be displayed at the associated location of a candidate virtual item that is in a locked state. The lock icon is used to indicate that the candidate virtual item is in a locked state.
[0162] Locked states include manually set locks, locks bound to timed tasks, locks inherent to the item system, and locks triggered by scene processes. Candidate virtual items in a locked state will have their positions locked in the storage interface and will not be swapped with other virtual items.
[0163] When all N candidate virtual items are in the locked state, in response to the release operation on the first virtual item, the first virtual item is controlled to move back to the first storage area, while keeping the positions of the N candidate virtual items in the storage interface unchanged.
[0164] As an example, see Figure 16 , Figure 16 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 10 Third, when the first virtual item indicated by the dashed box 1601 intersects with the candidate virtual item 1602 and the candidate virtual item 1603, and the candidate virtual item 1603 is in a locked state, the second virtual item is determined from the candidate virtual item 1602.
[0165] In this way, when screening candidate virtual items, objects with a locked state are automatically eliminated, and the selection of the second virtual item is completed solely based on the fifth set of virtual items. The overall unit formed by the group can participate in the entire matching process as the first virtual item, avoiding data changes caused by locked items being mistakenly selected as interchangeable objects. At the same time, it is compatible with the interchangeable use requirements of combined item units, improving the security of the item interchange matching process and the regularity of the matching screening.
[0166] In some embodiments, during the movement of the first virtual prop, the display transparency of the first virtual prop is adjusted to a first transparency; when the occupied area of the first virtual prop intersects with the occupied area of the second virtual prop, the display transparency of the second virtual prop is adjusted to a second transparency, wherein the first transparency is lower than the second transparency.
[0167] The first transparency is used to allow the underlying grid cells to show through, making the first virtual prop appear semi-transparent. First transparency refers to the specific semi-transparent visual appearance parameter rendered by the first virtual prop after it leaves its initial occupied area in response to a movement operation. By adjusting the display transparency of the first virtual prop to the first transparency, the first virtual prop visually presents a perspective effect, allowing the content of the grid cells, background layer, or other virtual props below the first virtual prop to be seen through it, thus preventing the first virtual prop from completely obscuring the underlying visual information of the storage interface during movement. The first transparency includes a gradually changing transparency value that is dynamically adjusted according to the movement speed of the first virtual prop. Specifically, the movement speed of the first virtual prop is acquired in real time. When the movement speed is greater than a preset speed threshold, the first transparency of the first virtual prop is controlled to display a first value; when the movement speed is less than or equal to the preset speed threshold, the first transparency of the first virtual prop is controlled to display a second value. This dynamic transparency feedback linked to the operation speed enhances the visual smoothness during drag-and-drop interactions.
[0168] The second transparency refers to a specific transparency rendering parameter triggered for the second virtual prop when the dynamic projection of the first virtual prop overlaps the grid area where the second virtual prop is located, thus satisfying the spatial intersection condition. The second transparency is used to accurately and independently identify the affected object currently spatially overlapping with the first virtual prop among many statically displayed virtual props through visual feedback from sudden changes in transparency. While maintaining the first virtual prop's display transparency at the first transparency level, in response to the first virtual prop's movement, when the area occupied by the first virtual prop completely separates from the area occupied by the second virtual prop, thus resolving the spatial intersection state, the second transparency rendering parameter applied to the second virtual prop is immediately canceled, and the second virtual prop's display transparency is smoothly restored to its initial opaque state before the intersection, thereby ensuring real-time synchronization between the front-end interface visual feedback and the underlying spatial interference state.
[0169] The first transparency level being lower than the second transparency level is a differentiated visual hierarchy setting applied to the first virtual prop in a floating, moving state and the second virtual prop in a state of overlapping at the bottom layer. By maintaining a clear transparency difference between the first and second virtual props, a clear interface depth relationship is constructed. Because the first transparency level is lower than the second transparency level, the first virtual prop appears more solid and has a clearer outline compared to the second virtual prop, while the second virtual prop presents a more blurred or transparent visual effect, making the first virtual prop visually clearly float above the layer of the second virtual prop. Through the limitation of the above transparency difference, electronic devices ensure that even in complex visual scenarios where two virtual props overlap spatially, users can still clearly distinguish which virtual prop is in the main moving layer and which virtual prop is in the passively overlapping layer, preventing cognitive confusion of the operating subject due to excessive fusion of visual elements.
[0170] For example, suppose in a gridded storage interface, the first virtual prop is a sword icon occupying a specific grid cell, and the second virtual prop is a shield icon occupying an adjacent grid cell. As the user drags the sword icon, its transparency is adjusted to a first transparency of 20%, giving it a slightly perspectived, floating appearance. When the dynamic projection area of the sword icon moves to the grid cell containing the shield icon and intersects with it, the transparency of the underlying shield icon is immediately adjusted to a second transparency of 80%. Because the sword icon's 20% transparency is lower than the shield icon's 80% transparency, in the final visual presentation, the sword icon maintains a relatively solid and clear main outline, while the intersecting shield icon becomes noticeably lighter and more blurred, thus intuitively showing the user the spatial layer relationship where the sword icon is absolutely floating above the shield icon.
[0171] In some embodiments, when the intersection prompt indicates that a second virtual item exists among N candidate virtual items, the item information of the first virtual item, the item information of the second virtual item, and the item difference information between the first virtual item and the second virtual item are displayed; wherein, the item difference information includes at least one of the following: item type difference, occupied area difference, item quality difference, and item value difference.
[0172] In actual implementation, when the target item difference information in the item difference information is numerical, if the target item difference information indicates that the target attribute value of the first virtual item is greater than the corresponding target attribute value of the second virtual item, a first trend indicator is displayed, which includes an arrow pointing in a first direction; if the target item difference information indicates that the target attribute value of the first virtual item is less than the corresponding target attribute value of the second virtual item, a second trend indicator is displayed, which includes an arrow pointing in a second direction; if the target item difference information indicates that the target attribute value of the first virtual item is equal to the corresponding target attribute value of the second virtual item, a maintenance indicator is displayed.
[0173] Among them, item information is a collection of various attributes and status data bound to the virtual item itself, serving as a data carrier representing the inherent characteristics and real-time operational status of the virtual item. Item information includes various data contents such as basic identification information, spatial dimension information, quality level information, value measurement information, functional attribute information, control status information, and time limit information. For example, it includes name text and abbreviated icon used to identify a specific virtual item; light effect frame or background texture of a specific color used to display the rarity of a specific virtual item; basic attribute numerical text used to quantify the business capabilities of a specific virtual item, such as specific business strength values or durability percentages; descriptive phrases used to describe the application scenarios of a specific virtual item; and additional visual badges used to reflect the current interactive limitations of a specific virtual item.
[0174] In actual implementation, the item information of the first virtual item, the item information of the second virtual item, and the item difference information between the first and second virtual items can be visualized using interface carriers such as pop-up windows, side information bars, embedded labels, floating bubbles, and bottom display cards, combined with text, icons, color block annotations, and numerical comparison charts in a single or combined form.
[0175] As an example, see Figure 17 , Figure 17 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 10 Fourth, the first virtual item 1701 and the second virtual item 1702 intersect, displaying the item information of the first virtual item 1701, the item information of the second virtual item 1702, and the item difference information between the first virtual item 1701 and the second virtual item 1702.
[0176] In this way, after identifying a usable second virtual item, the system simultaneously displays the information of both items and multi-dimensional comparison data. Users do not need to manually retrieve the parameters of the two items to complete the comparison independently. In the early stages of the swap operation, users can quickly know the differences between the two items in terms of type, occupied area, quality, and value, reducing the probability of resource imbalance caused by erroneous swap operations and improving the accuracy of item swap decisions.
[0177] In some embodiments, when the intersection prompt indicates that a second virtual item exists among N candidate virtual items, a first trajectory, a second trajectory, and trajectory prompt information are displayed; wherein, the trajectory prompt information is used to prompt the first virtual item to move along the first trajectory to the second storage area, and the second virtual item to move along the second trajectory to the first storage area; correspondingly, controlling the first virtual item to move to the second storage area and controlling the second virtual item to move to the first storage area can be implemented in the following way: controlling the first virtual item to move along the first trajectory to the second storage area and controlling the second virtual item to move along the second trajectory to the first storage area.
[0178] It should be noted that the first trajectory and the second trajectory may be the same or different. The first trajectory and the second trajectory are visual geometric lines or indicator segments used to pre-describe the dynamic displacement paths of the first and second virtual props when they swap positions. The first trajectory and the second trajectory can be straight lines, parabolic paths, arc curve paths, and multi-segment broken line paths. Specifically, the geometric shapes of the first trajectory and the second trajectory exhibit centrally symmetrical or axially symmetrical arrangement characteristics in the storage interface. For example, the first trajectory uses an upward-arching parabolic path extending to the right, while the second trajectory simultaneously uses a downward-concave parabolic path extending to the left. Through this non-overlapping spatial displacement curve path planning, it can be ensured that the first and second virtual props will not experience visual interference such as clipping between each other during the front-end animation demonstration.
[0179] In this way, when a valid second virtual prop is matched, two sets of movement paths and corresponding prompts are pre-rendered. The actual swapping action strictly follows the displayed trajectory to complete the bidirectional displacement. Users can intuitively predict the movement path and final landing point of the two props. The swapping movement process is predictable. At the same time, the unified trajectory constraint makes the prop swapping movement process more regular and uniform, avoiding the phenomenon of swapping displacement deviation and misalignment of placement points.
[0180] In some embodiments, in response to a release operation on a first virtual item, controlling the first virtual item to move to a second storage area and controlling the second virtual item to move to the first storage area can be implemented in the following manner: in response to a release operation on the first virtual item, when the second virtual item is a locked virtual item, an unlock prompt message is displayed, the unlock prompt message being used to prompt whether to unlock the locked state; in response to an unlock command triggered based on the unlock prompt message, the locked state of the second virtual item is unlocked; when the locked state of the second virtual item is unlocked, controlling the first virtual item to move to the second storage area and controlling the second virtual item to move to the first storage area.
[0181] In practice, the unlock prompt message includes an unlock control for releasing the locked state. In response to the triggering operation of the unlock control, an unlocking command for the locked state is triggered.
[0182] In addition, in response to a command to maintain the locked state triggered by the unlock prompt (e.g., the user clicks the "cancel" control in the unlock prompt), or if no command to release the locked state is received after the unlock prompt has been displayed for a preset waiting time, the unlock prompt is canceled, the first virtual item is controlled to cancel its temporary hovering waiting state, and the first virtual item is moved back to the first storage area before the first virtual item moved, either in the opposite direction of the movement trajectory or by teleportation, while the position of the second virtual item in the storage interface remains unchanged and the locked state of the second virtual item is maintained.
[0183] As an example, see Figure 18 , Figure 18 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 10 Fifth, when the second virtual item 1801 is a locked virtual item, the unlock prompt message indicated by 1802 is displayed.
[0184] In this way, by relying on prompts, operators can independently decide whether to unlock the status. Only after the lock is unlocked can two-way position migration be performed. This creates an active operation verification threshold for protected items, avoiding unintentional dragging operations that alter the storage location of controlled items. At the same time, status confirmation and permission switching are completed through centralized pop-up interaction, eliminating the cumbersome steps that users must first cancel the movement operation, manually unlock, and then re-execute the drag, thus improving the efficiency of human-computer interaction.
[0185] In some embodiments, when the intersection prompt indicates that a second virtual item exists among N candidate virtual items, at least one of the following is performed: outputting vibration feedback and playing a prompt sound effect; wherein the vibration feedback and the prompt sound effect are used to indicate that the first virtual item and the second virtual item can be swapped in the storage interface.
[0186] The vibration feedback output is a tactile signal emitted to the user by physical hardware such as a motor built into the electronic device at the instant the areas occupied by the first virtual prop and the second virtual prop intersect. The vibration feedback includes different vibration intensities or oscillation modes configured based on the differences in the quality or type of the first and second virtual props. For example, if the second virtual prop is a high-quality (first quality) virtual prop, the output is a first vibration feedback with a first vibration intensity and continuous multiple oscillations; if the second virtual prop is a low-quality (second quality) virtual prop, the output is a second vibration feedback with a second vibration intensity and a single, short oscillation, where the first vibration intensity is greater than the second vibration intensity, and the first quality is higher than the second quality.
[0187] The playback prompt sound effect refers to a specific audio segment played through the audio output module for auditory confirmation at the instant the area occupied by the first virtual prop intersects with the area occupied by the second virtual prop. The prompt sound effect includes custom audio segments tailored to the specific business attributes of the first and second virtual props, such as a crisp metallic tapping sound, a soft bubble sound, or a specific chordal sound. Furthermore, the playback parameters of the prompt sound effect can be dynamically adjusted according to the size of the overlap between the areas occupied by the first and second virtual props; for example, as the overlap area gradually increases, the electronic device controls the playback volume or pitch of the prompt sound effect to gradually increase, thus constructing an additional layer of interaction alignment progress feedback mechanism based on auditory spatial perception, beyond the visual feedback of the graphical user interface.
[0188] Thus, when the first and second virtual props meet the conditions for swapping, synchronous vibration feedback or sound effects are output, introducing non-visual perception channels of touch and hearing on top of visual interaction. This multimodal feedback mechanism breaks the limitations of relying solely on graphical interface visual presentation, enabling users to obtain real-time and accurate physical confirmation signals of successful swapping and alignment even in scenarios such as fingers obscuring the screen, line-of-sight deviation, or complex interface interference. Through the complementary and collaborative interaction of multi-channel information, the perceptual efficiency and clarity of operational feedback are significantly improved, effectively reducing the error rate and interaction confirmation cost during spatial position swapping.
[0189] In some embodiments, when the intersection prompt indicates that there is no second virtual item among the N candidate virtual items, a second display style is used to highlight a sixth virtual item. The sixth virtual item is a virtual item that occupies a blank associated area in the first storage area or the second storage area and causes the swap condition to be not met. The swap condition includes that the first storage area can accommodate the second virtual item and that the second storage area associated with the second virtual item can accommodate the first virtual item. If there is a third storage area in the storage interface that can accommodate the sixth virtual item, a movement control is displayed and the third storage area is highlighted. In response to a trigger operation on the movement control, the sixth virtual item is moved to the third storage area. After the sixth virtual item is moved to the third storage area, the intersection prompt indicates that there is a second virtual item among the N candidate virtual items. The first virtual item is controlled to move to the second storage area, and the second virtual item is controlled to move to the first storage area, so that the positions of the first virtual item and the second virtual item in the storage interface are swapped.
[0190] It should be noted that the sixth virtual prop refers to an obstacle prop that causes the space accommodation rule verification to fail when the first virtual prop and the candidate virtual prop attempt to swap positions, because the grid cell occupied by the sixth virtual prop crosses or encroaches on the necessary storage space required for the swap. The sixth virtual prop includes the first obstacle prop that encroaches on part of the grid cell in the first storage area, causing insufficient space when the second virtual prop moves to the first storage area; the sixth virtual prop also includes the second obstacle prop that encroaches on part of the grid cell in the second storage area associated with the second virtual prop, causing insufficient space when the first virtual prop moves to the second storage area.
[0191] It should be noted that the blank associated area refers to the unoccupied grid space that extends outward from the edge of the first or second storage area during the swapping operation of the first and second virtual items. This is because the occupied areas of the first and second virtual items differ in the number or shape of grids. For example, if the size of the first virtual item is larger than the size of the second virtual item, moving the first virtual item into the second storage area requires not only occupying the original grid position of the second virtual item but also additionally occupying adjacent empty grids around the second storage area. These empty adjacent grids, which provide extra capacity, constitute the blank associated area. When the sixth virtual item happens to be located on the outward extension path of the first or second storage area, thus occupying the blank associated area necessary to meet the swapping conditions, the spatial continuity check stage of the front-end interface will determine that interface element overlap interference has occurred, ultimately resulting in the swapping conditions not being met.
[0192] The use of a second display style to highlight the sixth virtual prop refers to applying a warning visual effect, distinct from the normal display state, to the identified obstacle prop. The second display style includes rendering a warning outline of a specific color (e.g., red) at the edge of the area occupied by the sixth virtual prop; it can also manifest as controlling the sixth virtual prop to exhibit a high-frequency left-right shaking animation at its current grid position, or floating a prominent spatial conflict indicator (e.g., a cross symbol or exclamation mark icon) above the center layer of the sixth virtual prop. By outputting the second display style, electronic devices can directly guide the user's visual focus to the source prop causing the spatial swap conflict within a dense storage interface.
[0193] In actual implementation, if there is no third storage area in the storage interface that can accommodate the sixth virtual item, a space shortage prompt message will be displayed in the storage interface. The space shortage prompt message is used to indicate that there is no storage area in the storage interface that can accommodate the sixth virtual item. In response to the release operation on the first virtual item, the first virtual item is controlled to move back to the first storage area, and the highlighting of the sixth virtual item using the second display style is canceled.
[0194] If there are multiple candidate blank storage areas in the storage interface that can accommodate the sixth virtual item, determine the interface display distance between the area occupied by the sixth virtual item and each candidate blank storage area; among the multiple candidate blank storage areas, the candidate blank storage area with the smallest corresponding interface display distance is determined as the third storage area.
[0195] As an example, see Figure 19 , Figure 19 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 10 6. If the intersection prompt indicates that there is no second virtual item among the N candidate virtual items, the sixth virtual item 1901 is highlighted using the second display style.
[0196] Thus, when insufficient space causes a swap to fail, highlighting the sixth virtual item, marking the third storage area, and displaying movement controls avoids directly interrupting the drag-and-drop process and eliminates the tedious step of manually moving obstacle items and re-triggering the swap. By seamlessly integrating the automatic avoidance of obstacle items with the repositioning of target items, the spatial arrangement threshold in complex grid layouts is lowered, significantly improving operational consistency and human-computer interaction efficiency.
[0197] In some embodiments, when a first virtual item moves to a second storage area, a swapping effect corresponding to the item type of the first virtual item is displayed in the second storage area; when a second virtual item moves to a first storage area, a swapping effect corresponding to the item type of the second virtual item is displayed in the first storage area; wherein, the swapping effects corresponding to different item types are different.
[0198] The swap effect refers to the instantaneous dynamic visual animation or graphic rendering layer triggered when the icon or model of a virtual prop precisely falls into the target grid position and completes spatial reorganization, confirming the successful position swap. Swap effects can include ripple aura animations spreading outwards along the grid edge of the second or first storage area, particle scattering effects bursting outwards from the center of the first or second virtual prop, a translucent, flowing light shimmering mask of a specific color covering the first or second virtual prop, and visual deformation effects such as localized oscillations or bouncing of the grid base as the virtual prop falls, thus providing users with clear physical feedback on the placement through rich graphic rendering techniques.
[0199] Item type refers to a classification label formed by dividing virtual items based on their business functions, application scenarios, or basic attribute characteristics. Different item types have distinct particle shapes, lighting effects, and animation trajectories, and the animation differences are used to identify the item type that has been swapped. For example, if the first virtual item is a virtual equipment type, the swap effect displayed in the second storage area is a metal spark splash animation and a sharp slashing light effect that accompanies the first virtual item's placement; if the first virtual item is a consumable type, the swap effect displayed in the second storage area is a soft water ripple halo or starlight particle dissipation layer that spreads outward from the first virtual item; if the first virtual item is a mission-critical item type, the swap effect displayed in the second storage area is a bright, high-contrast locking border rendered around the area occupied by the first virtual item, as well as a heavy, sunken visual deformation of the grid base.
[0200] In actual implementation, the dynamic rendering boundary of the swapping effect is determined based on the shape and number of grid cells occupied by the first virtual prop in the second storage area; within the dynamic rendering boundary, the swapping effect corresponding to the prop type of the first virtual prop is displayed so that the display area of the swapping effect completely covers the grid cells occupied by the first virtual prop.
[0201] Thus, when the first and second virtual items are respectively placed in the second and first storage areas, a differentiated swapping effect matching their respective item types is presented in the corresponding storage areas. This breaks the limitations of traditional single-target positioning animations, allowing users to intuitively and quickly verify the category attributes of the swapped objects based solely on the visual differences of the effects, without needing to revisit the text panel or details icons. By deeply integrating the confirmation of spatial repositioning with the characteristic expression of item types, the perceptual dimensions of front-end interaction are enriched, significantly improving the efficiency of information transmission and the sense of operational confirmation in scenarios involving dense item management.
[0202] In some embodiments, when the occupied area of the first virtual item intersects with the occupied areas of N candidate virtual items, the second storage area associated with the N candidate virtual items is enlarged and displayed, and the second storage area associated with the second virtual item is highlighted in the second storage area using a third display style.
[0203] It should be noted that the magnification of the second storage area associated with N candidate virtual props refers to a local visual scaling rendering mechanism triggered when the dynamic projection of the first virtual prop covers the grid cells where multiple candidate virtual props are located, for multiple overlapping second storage areas. Centered on the current touch focus of the first virtual prop, a local fisheye magnification effect is applied to the second storage areas associated with the N candidate virtual props, or all grid cells occupied by the N candidate virtual props are magnified simultaneously at a preset scaling ratio. It can also synchronously control other surrounding storage areas that do not intersect to present a slight visual receding or overall shrinking effect in the graphical user interface.
[0204] The third display style is a visual identifier independent of the normal display of the storage interface. It is specifically used to mark storage blocks that are legally eligible for swapping, clearly distinguishing them from the display status of ordinary candidate storage areas, helping users quickly locate available item swapping points. The third display style can be presented in the form of bold colored borders, highlighted block backgrounds, and looping flashing outlines. By adding a colored border mark to the target storage block within the enlarged area, users can quickly distinguish the position where a swap can be performed from multiple candidate areas.
[0205] In actual implementation, during the process of enlarging and displaying the second storage area associated with N candidate virtual props, in response to the continued movement of the occupied area of the first virtual prop, if the intersection prompt indicates that the second virtual prop among the N candidate virtual props has changed from the first target prop to the second target prop: cancel the use of the third display style to highlight the second storage area associated with the first target prop; use the third display style to highlight the second storage area associated with the second target prop.
[0206] When the second storage area associated with N candidate virtual items is enlarged, the other interface areas in the storage interface other than the second storage area associated with N candidate virtual items are adjusted to the fifth display style; wherein the display brightness of the fifth display style is lower than that of the third display style, or the display transparency of the fifth display style is higher than that of the third display style.
[0207] It should be noted that the first display style, the second display style, the third display style, the fourth display style, and the fifth display style are each a display style, and they may be the same as or different from each other.
[0208] Thus, when the first virtual prop intersects with multiple candidate virtual props in space, by enlarging the display of the second storage area associated with the N candidate virtual props and highlighting the second storage area associated with the second virtual prop using a third display style, the problem of the target area being too small and the line of sight obstruction under dense grid layout is overcome. This makes the candidate areas easier to identify and can independently identify the valid targets that finally meet the conditions. By expanding the visible area and highlighting specific target layers, visual fatigue and the probability of misjudgment are effectively reduced, and the accuracy of position alignment verification and interaction efficiency are significantly improved.
[0209] In some embodiments, a fourth display style is used to display the second virtual item, and the fourth display style is different from the display styles of the other virtual items among the N candidate virtual items.
[0210] In some embodiments, in response to a movement operation on a first virtual item, the first virtual item is controlled to move within the storage interface. If the area occupied by the first virtual item completely overlaps with the areas occupied by N candidate virtual items, an intersection prompt for a second virtual item is displayed. If the intersection prompt indicates that a second virtual item exists among the N candidate virtual items, in response to a release operation on the first virtual item, the first virtual item is controlled to move to a second storage area, and the second virtual item is controlled to move to a first storage area, thereby swapping the positions of the first and second virtual items within the storage interface. At this point, the N candidate virtual items collectively become the second virtual item.
[0211] As an example, see Figure 20 , Figure 20 This is a schematic diagram of the position adjustment of virtual props provided in the embodiments of this application. Figure 10 7. When the occupied areas of the first virtual item 2001 and the candidate virtual items 2002, 2003 and 2004 completely overlap, in response to the release operation on the first virtual item 2001, the first virtual item 2001 is moved to the second storage area, and the candidate virtual items 2002, 2003 and 2004 are moved as a whole to the first storage area as the second virtual item.
[0212] By applying the above embodiments of this application, when the first virtual prop moves and intersects with a candidate virtual prop in space, the mutual accommodation capacity of the storage areas of both virtual props is dynamically verified. When the accommodation condition is met, a position swap is directly executed. Combined with intersection prompts, transparency adjustment, magnification and highlighting effects, multi-channel feedback, and an automatic obstacle avoidance mechanism, a coherent interactive closed loop integrating spatial verification, visual guidance, and position reorganization is constructed in the graphical user interface. This direct substitution and multi-dimensional state feedback mechanism based on spatial features effectively eliminates the redundant interaction of manually finding empty spaces and moving target objects step by step, lowers the threshold for spatial organization in complex grid environments, and significantly improves the accuracy, coherence, and overall human-computer interaction efficiency of dynamic multi-prop arrangement.
[0213] The following will describe an exemplary application of the embodiments of this application in a real-world application scenario.
[0214] In related technologies, tactical competitive games of the search, attack, and withdrawal type only adopt a volume-based full-coverage prop (i.e., virtual prop) position replacement mechanism. When a player drags the prop to be placed to the container (i.e., the storage interface) and moves it to the grid area already occupied by props (i.e., the occupied area), the pre-placement verification logic will only be activated if the prop to be placed and the target prop in the container form a complete coverage relationship. The complete coverage relationship is divided into two scenarios. The first scenario is that the volume (i.e., the area of the occupied area) of the grid occupied by the prop to be placed and the target prop in the container are completely consistent, and the grid arrangement shape (i.e., the area of the occupied area) is completely the same. In this scenario, there is no need to check whether there are consecutive blank grids of the corresponding size (i.e., blank associated areas) around the prop to be placed and the target prop in the container. A green highlight prompt indicating that it can be replaced will be displayed directly. After releasing the drag operation, the positions of the two props will be directly swapped. The second scenario is that the prop to be placed and the target prop in the container form a complete volume and shape containment relationship. In this scenario, an additional pre-placement verification must be performed. A green highlight prompt indicating that it can be replaced will only be displayed if there are consecutive blank grids around the target prop in the container that can completely accommodate the size of the prop to be placed.
[0215] During implementation, the applicant discovered the following problems with the technology used to adjust the position of virtual props: First, the replacement trigger threshold set by this mechanism is too high. In typical usage scenarios where various items are closely arranged within a container, it is difficult for players to completely cover all grid cells of one or more existing items when dragging the item to be placed. Players must precisely control the drag point to match the standard of complete coverage, which significantly increases the operational cost for players and lengthens the time spent adjusting and moving items within the container. Second, this mechanism cannot adapt to interactive scenarios where the item to be placed and the target item in the container only partially overlap in grid. Even if there are enough empty grids in the container for the two items to be swapped, if the item to be placed and the target item in the container only partially overlap in grid, this mechanism will determine that the item swap operation cannot be performed, causing the item position swap operation that could have been completed smoothly to directly fail.
[0216] Based on this, this application provides a solution for dragging items to swap positions and supporting item replacement triggered by partial grid overlap. The core change in this solution is to change the triggering standard for item swapping from the traditional requirement of complete item coverage to item swapping triggered by partial grid intersection. This can significantly reduce the failure rate when players perform item swapping operations. As long as the container has corresponding blank grids that can accommodate two swappable items, the swapping of positions between the two items can be completed smoothly.
[0217] Thus, the triggering criterion for item swapping has been changed from complete item coverage to partial grid overlap, expanding the effective range for item swapping. Players no longer need to precisely align the item grid; they can simply drag the item to be placed to the approximate area of the target item to initiate an item swap. On the other hand, a new intelligent filtering logic has been added for multiple items that simultaneously overlap in grids. All items that overlap with the item to be placed are traversed in order of priority based on identical item shapes and the item's grid volume from largest to smallest. If the grid volume and arrangement of the item to be placed cannot match the grid volume and arrangement of all overlapping items, the overlapping item with the smallest grid volume difference and the highest grid arrangement shape fit will be selected for feasibility assessment, ensuring that item swapping can be executed normally in scenarios with partial grid overlap.
[0218] Next, we will continue to explain the method for adjusting the position of virtual props provided in the embodiments of this application from the product side.
[0219] The partial grid overlap (i.e., the area occupied by the first virtual item intersects with the areas occupied by N candidate virtual items) item swapping scheme is suitable for container-related interaction scenarios in search, attack, and retreat games. When players collect resources during a game or organize warehouse items after the game, they frequently move various items in the scene into their own backpacks or rearrange the positions of items in containers. The partial grid overlap item swapping scheme can simplify player operations and help players quickly complete the position swapping of items in containers.
[0220] Players initiate item swapping by dragging and dropping items (virtual items). Mobile players can use their fingers to drag the item to be moved, while PC players can use their mouse to drag it to the placement area of other items within the container. This will initiate the item swapping process.
[0221] When the preview grid of the item to be moved (i.e., the area occupied by the first virtual item after being moved) and the existing items in the container partially overlap (i.e., intersect), all items that intersect with the grid of the item to be moved will be highlighted. The feasibility of swapping items is distinguished by two different colors: The first is yellow highlight (i.e., the first intersection prompt), where the grid of the item to be moved and the target item in the container overlaps, and there are continuous blank grids around the target item (i.e., the associated storage area) that can completely accommodate the size of the target item. The feasibility check result of swapping items is feasible, and the position of the two items will be directly swapped after the drag operation is released; The second is red highlight (i.e., the second intersection prompt), where the grid of the item to be moved and the target item in the container overlaps, but there are no continuous blank grids around the target item that can completely accommodate the size of the target item. The feasibility check result of swapping items is not feasible, and the item to be moved will return to its original position before the drag operation is released.
[0222] Using the container grid as the criterion, when a player drags an item to be moved into the target container, four typical interactive scenarios that can trigger item swapping are identified based on the different states where the dragged item lands and the existing item grid inside the container intersect.
[0223] The first scenario involves a prop to be moved that overlaps with only a single prop within the container in terms of grid overlap. Both props occupy the same grid volume and have identical layout shapes. The dragging point of the prop to be moved partially overlaps with the grid of the single prop within the container, and this prop occupies the same grid volume and has the same layout shape as the prop to be moved. After this prop is moved into the original placement area of the prop to be moved, it can be directly adapted without additional space verification; the prop swapping operation will take effect immediately.
[0224] The second scenario involves a prop to be moved that overlaps with only a single prop within the container in the grid, but the two props differ in the grid volume they occupy and their arrangement. Placement space verification is required. After the prop to be moved is dragged and its landing point overlaps with a single prop of a different size within the container, it is verified whether the prop can be placed in the empty grid surrounding the original placement area of the prop to be moved. If the empty grid can accommodate the prop, the prop swap operation takes effect; if the empty grid cannot accommodate the prop, a red highlight will be displayed, indicating that the prop swap cannot be performed.
[0225] The third scenario involves two or more items within a container simultaneously overlapping each other in their meshes. The overall volume and arrangement of the mesh of all overlapping items perfectly match the item to be moved. When the dragged landing point of the item to be moved simultaneously covers the meshes of multiple existing items, and the combined mesh volume, arrangement, and specifications of the overlapping items are completely identical to those of the item to be moved, all overlapping items will be treated as a unified replacement object, and the item swap operation will take effect immediately.
[0226] The fourth scenario involves two or more items within a container simultaneously overlapping each other in their meshes. The overall volume and arrangement of the overlapping items' meshes do not match the item to be moved. In this case, a multi-item selection process is initiated. The selection process first checks if any single item among all overlapping items has a mesh volume and arrangement completely identical to the item to be moved. If a matching item is found, it is swapped first. If no matching item exists, the overlapping items are checked sequentially based on their mesh volume from largest to smallest. If no item matching the swap criteria is found after traversing all overlapping items, the swap fails and is highlighted in red. This scenario is further subdivided into three branches: In the first branch, among multiple overlapping props, there is a single prop whose mesh volume and arrangement shape are completely identical to the prop to be moved. The matching logic is directly swapped and the prop swapping operation is successful. The second branch involves multiple overlapping props where the grid volume and layout size of a single prop are larger than the prop to be moved. The empty grid in the area where the overlapping props are located within the container can accommodate the prop to be moved, and the empty grid around the original placement area of the prop to be moved can accommodate this larger prop (i.e., the first storage area can accommodate the second virtual prop, and the second storage area associated with the second virtual prop can accommodate the first virtual prop). Once both the bidirectional placement spaces meet the requirements, the prop swapping operation can be performed. The third type occurs when the grid volume and layout size of each item in a multi-overlapping set are smaller than the item to be moved. The grid of the overlapping items cannot match the specifications of the item to be moved, and there is no continuous empty grid in the container that can hold the item to be moved. The item swapping decision fails, and the item to be moved will return to its original position before being dragged.
[0227] The following section will continue to explain the method for adjusting the position of virtual props provided in the embodiments of this application from a technical perspective.
[0228] In some embodiments, see Figure 21 , Figure 21 This is a schematic diagram of the second process of the virtual prop position adjustment method provided in the embodiments of this application. The following will be combined with... Figure 21 The steps shown are explained.
[0229] In step 2101, the player drags item A to the target item area.
[0230] In step 2102, it is determined whether there is an overlap with the prop.
[0231] If yes, proceed to step 2103; otherwise, proceed to step 2106.
[0232] In step 2103, it is determined whether the volume and shape of the target prop are completely matched with prop A.
[0233] If yes, UI layer: the intersection of the target item and item A is highlighted in yellow; trigger layer: the target item and item A are directly replaced; if no, proceed to step 2104.
[0234] In step 2104, it is determined whether there is a continuous space around the target prop that satisfies the placement of prop A.
[0235] If yes, proceed to step 2105; otherwise, in the UI layer: the intersection of the target item and item A is highlighted in red, and in the trigger layer: the target item and item A cannot be swapped.
[0236] In step 2105, it is determined whether there is continuous space around prop A that satisfies the placement of the target prop.
[0237] If yes, then in the UI layer: the intersection of the target item and item A is highlighted in yellow, and in the trigger layer: the target item and item A are directly replaced; if no, then in the UI layer: the intersection of the target item and item A is highlighted in red, and in the trigger layer: the target item and item A cannot be replaced.
[0238] In step 2106, it is determined whether item A can be placed at the current location.
[0239] If yes, UI layer: target item bottom icon green, trigger layer: execute item placement logic after releasing; if no, UI layer: target item bottom icon red, trigger layer: item returns to original position after releasing.
[0240] When a player drags an item to be moved to the target placement area of the container, the first step is to check whether the preview grid of the item to be moved overlaps with any existing item in the container. If the preview grid of the item to be moved does not overlap with any existing item, the system checks whether the current position can completely place the item. If the placement conditions are met, a green highlight indicates that it can be placed directly; otherwise, a red highlight indicates that it cannot be placed.
[0241] When the grid of the item to be moved overlaps with the grid of the existing items in the container, two independent verification logics will be split according to the number of existing items that intersect with the item to be moved, corresponding to the two cases of single item intersection and multiple item intersection respectively.
[0242] The verification logic for intersecting single items consists of two layers of judgment steps. The first layer is specification matching verification. If the grid volume occupied by the intersecting single item and the layout shape are completely identical to the item to be moved, there is no need to verify the blank grid around the two items, and the positions of the two items are directly swapped. If there are differences in the grid volume and layout shape between the intersecting single item and the item to be moved, the second layer of blank grid verification is performed. The second layer is space capacity verification. It searches for continuous blank grids around the original placement area of the item to be moved and the placement area of the intersecting single item, respectively, to confirm that there are continuous blank grids in both areas that can accommodate the corresponding swapped item specifications. Only when all space conditions are met can the item swap be completed. If any area lacks continuous blank grids of the appropriate specifications, the item swap cannot be performed.
[0243] When multiple items intersect, the corresponding verification logic will filter the target items that can be swapped according to a fixed priority order. The priority sorting standard is arranged from high to low according to the degree of matching between the grid shape of the item and the item to be moved. The first priority is that the grid volume, layout shape and the item to be moved are completely consistent (including the case of matching after the item is rotated). The second priority is items with similar grid layout ratio and grid volume larger than the item to be moved.
[0244] In addition, priority is given to matching intersecting props that have the exact same grid size as the prop to be moved. When swapping these props, no additional check of blank grids is required, and the positions of the two props can be directly swapped. Secondly, intersecting props with similar shapes and larger volumes are matched to increase the probability of the prop swap check passing. As long as there are continuous blank grids around the original placement area of the prop to be moved that can accommodate the size of the intersecting prop, the prop swap operation can be completed.
[0245] By applying the above embodiments of this application, a complete processing solution is formed by integrating three logics: partial overlap triggering swap, optimal selection of multiple intersecting items, and pre-verification of placement space. This solution can reduce the failure of item swaps from the root. The triggering standard for item swaps has been changed from complete coverage to partial grid intersection. Many swap operations that cannot be completed under traditional rules can be executed normally. When the grid volume of the moving item and the target item are similar, the swap can be completed as long as the placement space pre-verification is passed. Players do not need to precisely align all grid edges of the item to achieve complete coverage. They can simply drag the item to the vicinity of the target item and release it to initiate the swap. This shortens the operation time for collecting resources on the battlefield and reduces the possibility of being ambushed while organizing the backpack. Traditional rules require players to calculate the placement points that can be completely covered and the items that can be swapped. This solution automatically completes the entire process of grid intersection recognition, swap item selection, and placement feasibility verification. Players can convey operation requirements simply by dragging and releasing the item, which greatly reduces the understanding threshold and operation difficulty of item organization.
[0246] The following description continues to illustrate the exemplary structure of the virtual prop position adjustment device 555 provided in the embodiments of this application as a software module. In some embodiments, such as Figure 2 As shown, the software modules of the virtual prop position adjustment device 555 may include: a display module 5551, a movement module 5552, and a swapping module 5553.
[0247] Display module 5551 is used to display a first virtual item and M candidate virtual items in the storage interface of virtual items; wherein, the first virtual item is associated with a first storage area, and the M candidate virtual items are respectively associated with a second storage area, and M is a positive integer; The movement module 5552 is used to control the first virtual prop to move in the storage interface in response to a movement operation on the first virtual prop; The display module 5551 is further configured to display an intersection prompt for the second virtual prop when the occupied area of the first virtual prop intersects with the occupied areas of N candidate virtual props, wherein N is a positive integer less than or equal to M; The interchange module 5553 is configured to, in response to a release operation on the first virtual item, control the first virtual item to move to the second storage area and control the second virtual item to move to the first storage area when the intersection prompt indicates that the second virtual item exists among the N candidate virtual items; wherein the first storage area is capable of accommodating the second virtual item, and the second storage area associated with the second virtual item is capable of accommodating the first virtual item.
[0248] In some embodiments, the first storage area includes an initial occupied area occupied by the first virtual prop before it moves. The virtual prop position adjustment device further includes: a determining module, configured to determine the third virtual prop as the second virtual prop when there is a third virtual prop among the N candidate virtual props; wherein the third virtual prop is a virtual prop whose occupied area is the same as the area of the initial occupied area among the N candidate virtual props, and whose occupied area has the same shape as the initial occupied area; the interchange module 5553 is further configured to control the first virtual prop to move to the occupied area of the third virtual prop, and control the third virtual prop to move to the initial occupied area.
[0249] In some embodiments, the determining module is further configured to: when there is no third virtual item among the N candidate virtual items, and there is at least one fourth virtual item among the N candidate virtual items, traverse each of the fourth virtual items in descending order of the area of the occupied region; when a fourth virtual item that satisfies the exchange condition is encountered, determine the fourth virtual item that satisfies the exchange condition as the second virtual item; wherein, the fourth virtual item is a candidate virtual item whose occupied region area is greater than the area of the initial occupied region; the exchange condition includes that the first storage area can accommodate the fourth virtual item, and the second storage area associated with the fourth virtual item can accommodate the first virtual item.
[0250] In some embodiments, the display module 5551 is further configured to display a first intersection prompt for the second virtual item when the swap condition is met, the first intersection prompt indicating that the second virtual item exists among the N candidate virtual items; wherein the swap condition includes the first storage area being able to accommodate the second virtual item and the second storage area associated with the second virtual item being able to accommodate the first virtual item; when the swap condition is not met, a second intersection prompt for the second virtual item is displayed, the second intersection prompt indicating that the second virtual item does not exist among the N candidate virtual items.
[0251] In some embodiments, the storage interface includes a plurality of grid cells; the display module 5551 is further configured to display an intersection prompt for the second virtual item when the number of overlapping grid cells is greater than or equal to 1, the number of overlapping grid cells is less than the number of grid cells occupied by the first virtual item's occupied area, and less than the number of grid cells occupied by the N candidate virtual items' occupied areas; wherein, the overlapping grid cell is a grid cell in which the occupied area of the first virtual item overlaps with the occupied areas of the N candidate virtual items.
[0252] In some embodiments, the first storage area includes an initial occupied area occupied by the first virtual item before it moves. The swapping module 5553 is further configured to, when at least one of the following conditions is met: the area of the occupied area of the second virtual item is different from the area of the initial occupied area, or the shape of the occupied area of the second virtual item is different from the shape of the initial occupied area, control the first virtual item to move to the occupied area of the second virtual item and control the second virtual item to move to the initial occupied area and the blank associated area in the first storage area; when the initial occupied area can accommodate the second virtual item, control the first virtual item to move to the occupied area of the second virtual item and the blank associated area in the second storage area, and control the second virtual item to move to the initial occupied area; when the initial occupied area cannot accommodate the second virtual item, and the occupied area of the second virtual item cannot accommodate the first virtual item, control the first virtual item to move to the occupied area of the second virtual item and the blank associated area in the second storage area, and control the second virtual item to move to the initial occupied area and the blank associated area in the first storage area.
[0253] In some embodiments, the virtual prop position adjustment device further includes: a cancellation module, configured to display a cancellation control after controlling the first virtual prop to move to the second storage area and controlling the second virtual prop to move to the first storage area; and in response to a trigger operation on the cancellation control, control the first virtual prop to move back to the first storage area and control the second virtual prop to move back to the second storage area.
[0254] In some embodiments, the display module 5551 is further configured to display a cancellation prompt message in the associated area of the cancellation control, the cancellation prompt message being used to prompt the cancellation of the exchange between the first virtual item and the second virtual item; when the display duration of the cancellation control reaches a preset duration, the display of the cancellation control and the cancellation prompt message is canceled.
[0255] In some embodiments, the display module 5551 is further configured to, when the intersection prompt indicates that a second virtual item exists among the N candidate virtual items, determine a first placement area in the first storage area where the second virtual item is placed, and determine a second placement area in the second storage area where the first virtual item is placed; highlight the first placement area and the second placement area using a first display style; the swapping module 5553 is further configured to, in response to a release operation on the first virtual item, control the first virtual item to move to the second placement area, and control the second virtual item to move to the first placement area.
[0256] In some embodiments, the display module 5551 is further configured to display a switching switch before controlling the first virtual item to move to the second storage area and controlling the second virtual item to move to the first storage area; when the switching switch is in the closed state, in response to an opening operation of the switching switch, switch the state of the switching switch from the closed state to the open state; the switching module 5553 is further configured to, when the switching switch is in the open state, in response to a release operation of the first virtual item, control the first virtual item to move to the second storage area and control the second virtual item to move to the first storage area.
[0257] In some embodiments, the virtual item position adjustment device further includes: a selection module, configured to control multiple interchangeable candidate virtual items to be in an optional state when N is a positive integer greater than 1 and the number of candidate virtual items that can be interchanged with the first virtual item among the N candidate virtual items is multiple; and based on the optional state, in response to a selection operation performed on the multiple interchangeable candidate virtual items, determine the selected candidate virtual item as the second virtual item.
[0258] In some embodiments, the display module 5551 is further configured to, in response to a release operation on the first virtual item, control the first virtual item to move back to the first storage area and display at least one of the following: a swap failure message and a recommendation message, when the intersection prompt indicates that the second virtual item does not exist among the N candidate virtual items; wherein the swap failure message is used to indicate the reason for the swap failure, and the recommendation message is used to recommend at least one of the following: candidate virtual items that can be swapped with the first virtual item, and a storage location in the storage interface where the first virtual item can be placed.
[0259] In some embodiments, the virtual prop position adjustment device further includes: a combination module, configured to, before displaying the first virtual prop, in response to a combination operation for consecutively adjacent virtual props, combine the multiple virtual props and display the combined multiple virtual props, wherein the combined multiple virtual props respond to the movement operation as a whole; and determine the combined multiple virtual props as the first virtual prop.
[0260] In some embodiments, the virtual prop position adjustment device further includes: a determining module, configured to determine a second virtual prop from a fifth virtual prop when N is a positive integer greater than 1 and there is a locked candidate virtual prop among the N candidate virtual props; wherein the fifth virtual prop is a candidate virtual prop other than the locked candidate virtual prop among the N candidate virtual props.
[0261] In some embodiments, the display module 5551 is further configured to adjust the display transparency of the first virtual prop to a first transparency during the movement of the first virtual prop; and to adjust the display transparency of the second virtual prop to a second transparency when the occupied area of the first virtual prop intersects with the occupied area of the second virtual prop, wherein the first transparency is lower than the second transparency.
[0262] In some embodiments, the display module 5551 is further configured to display, when the intersection prompt indicates that a second virtual item exists among the N candidate virtual items, the item information of the first virtual item, the item information of the second virtual item, and the item difference information between the first virtual item and the second virtual item; wherein the item difference information includes at least one of item type difference, occupied area difference, item quality difference, and item value difference.
[0263] In some embodiments, the display module 5551 is further configured to display a first trajectory, a second trajectory, and trajectory prompt information when the intersection prompt indicates that a second virtual item exists among the N candidate virtual items; wherein the trajectory prompt information is used to prompt the first virtual item to move along the first trajectory to the second storage area, and the second virtual item to move along the second trajectory to the first storage area; the interchange module 5553 is further configured to control the first virtual item to move along the first trajectory to the second storage area, and control the second virtual item to move along the second trajectory to the first storage area.
[0264] In some embodiments, the interchange module 5553 is further configured to, in response to a release operation on the first virtual item, display an unlock prompt when the second virtual item is in a locked state, the unlock prompt being used to prompt whether to unlock the locked state; in response to an unlock command triggered based on the unlock prompt, unlock the second virtual item; and, if the second virtual item is unlocked, control the first virtual item to move to the second storage area and control the second virtual item to move to the first storage area.
[0265] In some embodiments, the virtual prop position adjustment device further includes: an execution module, configured to, when the intersection prompt indicates that a second virtual prop exists among the N candidate virtual props, perform at least one of the following: output vibration feedback and play a prompt sound effect; wherein the vibration feedback and the prompt sound effect are used to prompt that the first virtual prop and the second virtual prop can be interchanged in the storage interface.
[0266] In some embodiments, the swapping module 5553 is further configured to, when the intersection prompt indicates that there is no second virtual item among the N candidate virtual items, highlight a sixth virtual item using a second display style, wherein the sixth virtual item is a virtual item that occupies a blank associated area in the first storage area or the second storage area and causes the swapping condition to be unsatisfied; wherein the swapping condition includes that the first storage area can accommodate the second virtual item and that the second storage area associated with the second virtual item can accommodate the first virtual item; if there is a third storage area in the storage interface that can accommodate the sixth virtual item, then a movement control is displayed and the third storage area is highlighted; in response to a trigger operation on the movement control, the sixth virtual item is moved to the third storage area; wherein, after the sixth virtual item is moved to the third storage area, the intersection prompt indicates that there is a second virtual item among the N candidate virtual items; control the first virtual item to move to the second storage area, and control the second virtual item to move to the first storage area.
[0267] In some embodiments, the display module 5551 is further configured to display a swapping effect corresponding to the item type of the first virtual item in the second storage area when the first virtual item moves to the second storage area; and to display a swapping effect corresponding to the item type of the second virtual item in the first storage area when the second virtual item moves to the first storage area; wherein the swapping effects corresponding to different item types are different.
[0268] In some embodiments, the display module 5551 is further configured to, when the occupied area of the first virtual prop intersects with the occupied areas of the N candidate virtual props, enlarge the display of the second storage area associated with the N candidate virtual props, and highlight the second storage area associated with the second virtual prop in the second storage area using a third display style.
[0269] This application provides a computer program product, which includes a computer program or computer-executable instructions. When the computer-executable instructions or the computer program are executed by a processor, the processor will execute the virtual item position adjustment method provided in this application embodiment. For example, ... Figure 3 The method is illustrated above. The processor of the electronic device reads the computer program or computer-executable instructions from a computer-readable storage medium, and executes the computer program or computer-executable instructions, causing the electronic device to perform the virtual prop position adjustment method described in the embodiments of this application.
[0270] This application provides a computer-readable storage medium storing computer-executable instructions or a computer program. When the computer-executable instructions or the computer program are executed by a processor, the processor will execute the virtual item position adjustment method provided in this application. For example, ... Figure 3 The methods shown are as follows.
[0271] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.
[0272] In some embodiments, computer-executable instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.
[0273] As an example, computer-executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple co-located files (e.g., files that store one or more modules, subroutines, or code sections).
[0274] As an example, computer-executable instructions can be deployed to execute on a single electronic device, or on multiple electronic devices located at one location, or on multiple electronic devices distributed across multiple locations and interconnected via a communication network.
[0275] In summary, by dynamically verifying the mutual capacity of the storage areas of both virtual props when the first virtual prop moves and intersects with the space of a candidate virtual prop, and directly swapping positions when the capacity conditions are met, a coherent interactive loop integrating spatial verification, visual guidance, and position reorganization is constructed in the graphical user interface by combining intersection prompts, transparency adjustment, magnification and highlighting effects, multi-channel feedback, and an automatic obstacle avoidance mechanism. This direct substitution and multi-dimensional state feedback mechanism based on spatial features effectively eliminates the redundant interaction of manually finding empty spaces and moving target objects step by step, lowers the threshold for spatial organization in complex grid environments, and significantly improves the accuracy, coherence, and overall human-computer interaction efficiency of dynamic arrangement of multiple props.
[0276] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. A method for adjusting the position of a virtual prop, characterized in that, The method includes: The virtual item storage interface displays the first virtual item and M candidate virtual items; Wherein, the first virtual item is associated with the first storage area, and the M candidate virtual items are respectively associated with the second storage area, where M is a positive integer; In response to a movement operation on the first virtual item, control the first virtual item to move within the storage interface; If the area occupied by the first virtual item intersects with the areas occupied by N candidate virtual items, an intersection prompt for the second virtual item is displayed, where N is a positive integer less than or equal to M; When the intersection prompt indicates that the second virtual item exists among the N candidate virtual items, in response to the release operation for the first virtual item, the first virtual item is controlled to move to the second storage area, and the second virtual item is controlled to move to the first storage area; The first storage area can accommodate the second virtual item, and the second storage area associated with the second virtual item can accommodate the first virtual item.
2. The method according to claim 1, characterized in that, The first storage area includes the initial occupied area before the first virtual item moves. When a third virtual item exists among the N candidate virtual items, the method further includes: The third virtual item is identified as the second virtual item; The third virtual prop is a virtual prop among the N candidate virtual props whose area of the occupied region is the same as the area of the initial occupied region, and whose shape of the occupied region is the same as the shape of the initial occupied region; The step of controlling the first virtual item to move to the second storage area and controlling the second virtual item to move to the first storage area includes: Control the first virtual item to move to the area occupied by the third virtual item, and control the third virtual item to move to the initial occupied area.
3. The method according to claim 2, characterized in that, When the third virtual item is not present among the N candidate virtual items, and at least one fourth virtual item is present among the N candidate virtual items, the method further includes: The fourth virtual props are traversed in descending order of the area occupied. When the fourth virtual item that satisfies the swap condition is encountered during the traversal, the fourth virtual item that satisfies the swap condition is determined as the second virtual item; The fourth virtual item is a candidate virtual item whose occupied area is larger than the area of the initial occupied area; the exchange conditions include that the first storage area can accommodate the fourth virtual item and that the second storage area associated with the fourth virtual item can accommodate the first virtual item.
4. The method according to claim 1, characterized in that, The display of the intersection prompt for the second virtual item includes: When the swap condition is met, a first intersection prompt is displayed for the second virtual item. The first intersection prompt is used to indicate that the second virtual item exists among the N candidate virtual items. The exchange conditions include that the first storage area can accommodate the second virtual item, and the second storage area associated with the second virtual item can accommodate the first virtual item. When the swap condition is not met, a second intersection prompt is displayed for the second virtual item. The second intersection prompt is used to indicate that the second virtual item does not exist among the N candidate virtual items.
5. The method according to claim 1, characterized in that, The storage interface includes multiple grid cells; the method of displaying an intersection prompt for the second virtual item when the occupied area of the first virtual item intersects with the occupied areas of the N candidate virtual items includes: If the number of overlapping grid cells is greater than or equal to 1, the number of overlapping grid cells is less than the number of grid cells occupied by the area occupied by the first virtual prop, and less than the number of grid cells occupied by the areas occupied by the N candidate virtual props, then an intersection prompt for the second virtual prop is displayed. The overlapping grid cell is a grid cell in which the occupied area of the first virtual prop overlaps with the occupied areas of the N candidate virtual props.
6. The method according to claim 1, characterized in that, The first storage area includes the initial occupied area occupied by the first virtual item before it moves. The step of controlling the first virtual item to move to the second storage area and controlling the second virtual item to move to the first storage area includes: [The steps are as follows:] If at least one of the following conditions is met: the area of the occupied area of the second virtual item is different from the area of the initial occupied area, or the shape of the occupied area of the second virtual item is different from the shape of the initial occupied area, then the step of controlling the first virtual item to move to the second storage area and controlling the second virtual item to move to the first storage area includes: When the area occupied by the second virtual item can accommodate the first virtual item, control the first virtual item to move to the area occupied by the second virtual item, and control the second virtual item to move to the initial occupied area and the blank associated area in the first storage area; When the initial occupied area can accommodate the second virtual item, control the first virtual item to move to the occupied area of the second virtual item and the blank associated area in the second storage area, and control the second virtual item to move to the initial occupied area; When the initial occupied area cannot accommodate the second virtual item, and the occupied area of the second virtual item cannot accommodate the first virtual item, the first virtual item is controlled to move to the occupied area of the second virtual item and the blank associated area in the second storage area, and the second virtual item is controlled to move to the initial occupied area and the blank associated area in the first storage area.
7. The method according to claim 1, characterized in that, After controlling the first virtual item to move to the second storage area and controlling the second virtual item to move to the first storage area, the method further includes: Display the undo control; In response to a trigger operation on the undo control, the first virtual item is controlled to move back to the first storage area, and the second virtual item is controlled to move back to the second storage area.
8. The method according to claim 7, characterized in that, The method further includes: In the associated area of the undo control, an undo prompt message is displayed, which is used to prompt the undo of the swap between the first virtual item and the second virtual item; When the display duration of the undo control reaches the preset duration, the display of the undo control and the undo prompt message will be cancelled.
9. The method according to claim 1, characterized in that, The method further includes: If the intersection prompt indicates that the second virtual item exists among the N candidate virtual items, a first placement area for placing the second virtual item is determined in the first storage area, and a second placement area for placing the first virtual item is determined in the second storage area. The first placement area and the second placement area are highlighted using a first display style; The step of responding to a release operation on the first virtual item by controlling the first virtual item to move to the second storage area and controlling the second virtual item to move to the first storage area includes: In response to a release operation on the first virtual item, the system controls the first virtual item to move to the second placement area, and controls the second virtual item to move to the first placement area.
10. The method according to claim 1, characterized in that, Before controlling the first virtual item to move to the second storage area and controlling the second virtual item to move to the first storage area, the method further includes: Display phase-change switch; When the phase-change switch is in the closed state, in response to the opening operation of the phase-change switch, the state of the phase-change switch is switched from the closed state to the open state; The step of responding to a release operation on the first virtual item by controlling the first virtual item to move to the second storage area and controlling the second virtual item to move to the first storage area includes: When the phase switching switch is in the open state, in response to the release operation of the first virtual item, the first virtual item is controlled to move to the second storage area, and the second virtual item is controlled to move to the first storage area.
11. The method according to claim 1, characterized in that, The method further includes: When N is a positive integer greater than 1, and there are multiple candidate virtual items among the N candidate virtual items that can be interchanged with the first virtual item, the multiple candidate virtual items that can be interchanged are controlled to be in an optional state. Based on the selectable state, in response to a selection operation performed on a plurality of candidate virtual items that can be interchanged, the selected candidate virtual item is determined as the second virtual item.
12. The method according to claim 1, characterized in that, The method further includes: If the intersection prompt indicates that the second virtual item does not exist among the N candidate virtual items, in response to the release operation for the first virtual item, the first virtual item is controlled to move back to the first storage area, and at least one of the following is displayed: swap failure prompt message, recommendation prompt message; The exchange failure message is used to indicate the reason for the exchange failure, and the recommendation message is used to recommend at least one of the following: a candidate virtual item that can be exchanged with the first virtual item, and a storage location in the storage interface where the first virtual item can be placed.
13. The method according to claim 1, characterized in that, Before displaying the first virtual item, the method further includes: In response to a combination operation for multiple consecutive adjacent virtual props, the multiple virtual props are combined and the combined multiple virtual props are displayed, and the combined multiple virtual props respond to the movement operation as a whole; The combined virtual items are designated as the first virtual item.
14. The method according to claim 1, characterized in that, The method further includes: When N is a positive integer greater than 1, and there is a locked candidate virtual item among the N candidate virtual items, the second virtual item is determined from the fifth virtual item; The fifth virtual item is the candidate virtual item other than the candidate virtual item that is in a locked state among the N candidate virtual items.
15. The method according to claim 1, characterized in that, The method further includes: During the movement of the first virtual prop, the display transparency of the first virtual prop is adjusted to the first transparency. When the area occupied by the first virtual prop intersects with the area occupied by the second virtual prop, the display transparency of the second virtual prop is adjusted to the second transparency, where the first transparency is lower than the second transparency.
16. The method according to claim 1, characterized in that, The method further includes: When the intersection prompt indicates that the second virtual item exists among the N candidate virtual items, the item information of the first virtual item, the item information of the second virtual item, and the item difference information between the first virtual item and the second virtual item are displayed. The item difference information includes at least one of the following: item type difference, occupied area difference, item quality difference, and item value difference.
17. The method according to claim 1, characterized in that, The method further includes: When the intersection prompt indicates that the second virtual prop exists among the N candidate virtual props, the first trajectory, the second trajectory, and trajectory prompt information are displayed; The trajectory prompt information is used to prompt the first virtual item to move along the first trajectory to the second storage area, and the second virtual item to move along the second trajectory to the first storage area; The step of controlling the first virtual item to move to the second storage area and controlling the second virtual item to move to the first storage area includes: Control the first virtual prop to move along the first trajectory to the second storage area, and control the second virtual prop to move along the second trajectory to the first storage area.
18. The method according to claim 1, characterized in that, The step of responding to a release operation on the first virtual item by controlling the first virtual item to move to the second storage area and controlling the second virtual item to move to the first storage area includes: In response to the release operation on the first virtual item, when the second virtual item is a locked virtual item, an unlock prompt message is displayed, which is used to prompt whether to unlock the locked state; In response to the unlock command triggered based on the unlock prompt information, the second virtual item is unlocked. When the second virtual item is unlocked, control the first virtual item to move to the second storage area, and control the second virtual item to move to the first storage area.
19. The method according to claim 1, characterized in that, The method further includes: If the intersection prompt indicates that the second virtual item does not exist among the N candidate virtual items, the sixth virtual item is highlighted using the second display style. The sixth virtual item is a virtual item that occupies a blank associated area in the first storage area or the second storage area and causes the swap condition to be not met. The exchange conditions include that the first storage area can accommodate the second virtual item, and the second storage area associated with the second virtual item can accommodate the first virtual item. If a third storage area exists in the storage interface that can accommodate the sixth virtual item, then a movement control is displayed, and the third storage area is highlighted. In response to a trigger operation on the movement control, the sixth virtual item is moved to the third storage area; Wherein, after the sixth virtual item moves to the third storage area, the intersection prompt indicates that the second virtual item exists among the N candidate virtual items; Control the first virtual item to move to the second storage area, and control the second virtual item to move to the first storage area.
20. The method according to claim 1, characterized in that, The method further includes: When the first virtual item moves to the second storage area, a swapping effect corresponding to the item type of the first virtual item is displayed in the second storage area; When the second virtual item moves to the first storage area, a swapping effect corresponding to the item type of the second virtual item is displayed in the first storage area; The interchange effects vary depending on the type of item mentioned.
21. The method according to claim 1, characterized in that, The method further includes: When the area occupied by the first virtual item intersects with the areas occupied by the N candidate virtual items, the second storage area associated with the N candidate virtual items is enlarged and displayed, and the second storage area associated with the second virtual item is highlighted in the second storage area using a third display style.
22. A device for adjusting the position of a virtual prop, characterized in that, The device includes: The display module is used to display a first virtual item and M candidate virtual items in the storage interface of the virtual items; wherein the first virtual item is associated with a first storage area, and the M candidate virtual items are respectively associated with a second storage area, and M is a positive integer; A movement module is configured to control the first virtual item to move within the storage interface in response to a movement operation on the first virtual item. The display module is further configured to display an intersection prompt for the second virtual prop when the occupied area of the first virtual prop intersects with the occupied areas of N candidate virtual props, wherein N is a positive integer less than or equal to M; The interchange module is configured to, in response to a release operation on the first virtual item, control the first virtual item to move to the second storage area and control the second virtual item to move to the first storage area when the intersection prompt indicates that the second virtual item exists among the N candidate virtual items; wherein the first storage area is capable of accommodating the second virtual item, and the second storage area associated with the second virtual item is capable of accommodating the first virtual item.
23. An electronic device, characterized in that, The electronic device includes: Memory is used to store executable instructions or computer programs. A processor, when executing computer-executable instructions or computer programs stored in the memory, implements the virtual prop position adjustment method according to any one of claims 1 to 21.
24. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that, When the computer-executable instructions or computer program are executed by the processor, the method for adjusting the position of virtual props as described in any one of claims 1 to 21 is implemented.
25. A computer program product comprising computer-executable instructions or a computer program, characterized in that, When the computer-executable instructions or computer program are executed by the processor, the method for adjusting the position of virtual props as described in any one of claims 1 to 21 is implemented.
