A method, apparatus, electronic device, computer-readable storage medium, and computer program product for collaborative interaction of virtual characters.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-28
- Publication Date
- 2026-08-14
AI Technical Summary
应用本申请实施例,在进行协作动作的交互场景中,通过在预设感知范围内显示多个协作空位,并将玩家的准心瞄准操作与空位状态切换及加入控件的显示进行联动,克服了相关技术中缺乏空间位置引导、依赖固定打卡点、或繁琐的串行邀请应答机制等缺陷,将相关技术中的经验性对位升级为高精度坐标对齐,实现了无感、极简化且实时“面对面”的社交交互,显著降低了多人在空间和操作层面的协作沟通成本;同时,通过控制第二虚拟角色加入后执行子动作并实时将空位状态更新为占用状态的闭环控制,实现了针对高并发抢位行为的冲突检测与锁定机制,保障了多用户交互时底层逻辑与渲染状态的一致性,避免了角色模型重叠等异常表现;最后,在所有协作空位均为占用状态下接收同步展示指令来展示参与协作的各虚拟角色的子动作,这不仅确保了分布式网络环境下各玩家端在时间轴上的动画对齐,消除了由于设备性能差异或网络抖动导致的动作帧断层和视觉穿插瑕疵,极大地增强了多人协作动作在游戏内的叙事连贯性与空间社交的沉浸感。
Smart Images

Figure CN122558068A_ABST
Abstract
Description
Technical Field
[0001] This application relates to human-computer interaction technology, and more particularly to a collaborative interaction method, device, electronic device, computer-readable storage medium, and computer program product for virtual characters. Background Technology
[0002] In related technologies, collaborative group photos of virtual characters typically employ the following methods: multiple players coordinate and trigger individual actions of the characters to create a visually combined effect; or an invitation and response confirmation mechanism is used to achieve interaction between two virtual characters. Additionally, there are location-based check-ins at fixed preset locations, or manual addition of participants from a user list in a fixed scenario to control multiple virtual characters to execute preset animations at designated coordinates. Summary of the Invention
[0003] This application provides a method, apparatus, electronic device, computer-readable storage medium, and computer program product for collaborative interaction of virtual characters, which can improve the efficiency and flexibility of multi-person collaborative interaction.
[0004] The technical solution of this application embodiment is implemented as follows: This application provides a collaborative interaction method for virtual characters, including: When a collaboration prompt is received from the first virtual character in response to a collaborative action, and the second virtual character enters the preset perception range, multiple available collaboration slots are displayed in the field of view of the second virtual character. In response to the second virtual character's crosshair aligning with the target empty space among the plurality of collaborative empty spaces, the target empty space is updated from the optional state to the selected state, and the add control corresponding to the target collaborative action is displayed; In response to the trigger operation of the add control, the second virtual character is controlled to perform a sub-action after being added to the target empty space, and the target empty space is updated from the selected state to the occupied state; In response to a synchronization display instruction received when all said collaborative slots are occupied, the sub-actions performed by the first virtual character and the virtual characters that have joined each of the said collaborative slots are displayed.
[0005] This application provides a collaborative interaction device for virtual characters, including: The vacancy display module is used to display multiple available collaboration vacancy slots in the field of view of the second virtual character when the second virtual character receives a collaboration prompt message triggered by the first virtual character in response to the target collaboration action and the second virtual character enters the preset perception range. The empty space addition module is used to respond to the addition operation of the target empty space among the multiple collaborative empty spaces, control the second virtual character to perform a sub-action after joining the target empty space, and update the target empty space from the selected state to the occupied state; A synchronous display module is used to respond to a synchronous display instruction received when all the collaborative slots are occupied, and to display the sub-actions performed by the first virtual character and the virtual characters that have joined each of the collaborative slots.
[0006] 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 collaborative interaction method for virtual characters provided in the embodiments of this application.
[0007] This application provides a computer-readable storage medium storing computer-executable instructions or computer programs, which, when executed by a processor, implement the collaborative interaction method for virtual characters provided in this application.
[0008] This application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, they implement the collaborative interaction method for virtual characters provided in this application.
[0009] The embodiments of this application have the following beneficial effects: By applying the embodiments of this application, in interactive scenarios involving collaborative actions, multiple collaborative empty spaces are displayed within a preset perception range. The player's aiming operation is linked to the switching of empty space states and the display of added controls. This overcomes the shortcomings of related technologies, such as lack of spatial guidance, reliance on fixed checkpoints, or cumbersome serial invitation and response mechanisms. It upgrades the empirical alignment in related technologies to high-precision coordinate alignment, achieving seamless, simplified, and real-time "face-to-face" social interaction, significantly reducing the cost of collaborative communication among multiple people at both spatial and operational levels. Simultaneously, by controlling a second virtual character to join and execute sub-actions, and by real-time updating the empty space status... The closed-loop control of updating the state to the occupied state realizes the conflict detection and locking mechanism for high-concurrency preemption behavior, ensuring the consistency of the underlying logic and rendering state during multi-user interaction and avoiding abnormal behaviors such as character model overlap. Finally, the synchronous display command is received to display the sub-actions of each virtual character participating in the collaboration when all collaborative slots are in the occupied state. This not only ensures the animation alignment of each player's terminal on the timeline in the distributed network environment, but also eliminates the action frame discontinuity and visual interlacing flaws caused by differences in device performance or network jitter, greatly enhancing the narrative coherence and immersive spatial social experience of multi-player collaborative actions in the game. Attached Figure Description
[0010] Figure 1 This is a schematic diagram of the architecture of the collaborative interaction system 100 for virtual characters provided in this application embodiment; Figure 2 This is a schematic diagram of the structure of the electronic device 500 provided in the embodiments of this application; Figure 3 This is a flowchart illustrating the collaborative interaction method for virtual characters provided in an embodiment of this application; Figure 4 This is an interactive diagram illustrating the collaborative actions provided in the embodiments of this application; Figure 5 This is a schematic diagram of the collaborative empty space provided in the embodiments of this application. Figure 1 ; Figure 6 This is a schematic diagram of the collaborative empty space provided in the embodiments of this application. Figure 2 ; Figure 7 This is a schematic diagram showing the addition control provided in an embodiment of this application; Figure 8 This is a schematic diagram showing the station identification provided in an embodiment of this application; Figure 9 This is a schematic diagram illustrating participation in collaborative actions provided in an embodiment of this application; Figure 10 This is a schematic diagram of perspective switching provided in an embodiment of this application; Figure 11 This is a schematic diagram of the collaborative interaction interruption function area provided in the embodiments of this application; Figure 12 This is a schematic diagram of the generation of a target group photo provided in an embodiment of this application. Figure 1 ; Figure 13 This is a schematic diagram of the generation of a target group photo provided in an embodiment of this application. Figure 2 ; Figure 14 This is a schematic diagram illustrating the synchronous display of the target collaborative actions provided in the embodiments of this application; Figure 15 This is a schematic diagram showing the location identifier of the collaborative empty space provided in the embodiments of this application; Figure 16 This is a flowchart illustrating the collaborative interaction method for virtual characters provided in the embodiments of this application. Detailed Implementation
[0011] 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.
[0012] It is understood that in the embodiments of this application, data such as user information are involved. When the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with relevant laws, regulations and standards.
[0013] 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.
[0014] In the following description, the terms “first, second…” are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that “first, second…” 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.
[0015] 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.
[0016] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0017] 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.
[0018] 1) Client: An application that runs on a terminal and provides various services, such as a video playback client or a game client.
[0019] 2) In response, 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.
[0020] 3) 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.
[0021] 4) Virtual characters: These are interactive images of people and objects within a virtual scene, or movable objects within that scene. These movable objects can be virtual characters, virtual animals, anime characters, etc., such as people or animals displayed in a virtual scene. A virtual character can be a virtual avatar representing the user within that scene. A virtual scene can include multiple virtual characters, each with its own shape and volume, occupying a portion of the virtual scene's space. Virtual characters can also be game characters controlled by the user (or player).
[0022] This application provides a method, apparatus, electronic device, computer-readable storage medium, and computer program product for collaborative interaction of virtual characters, which can improve the efficiency and flexibility of multi-person collaborative interaction. The following describes exemplary applications of the electronic device provided in this application. The electronic device provided in this application can be implemented as various types of user terminals such as laptops, tablets, desktop computers, set-top boxes, mobile devices (e.g., mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable gaming devices), smartphones, smart speakers, smartwatches, smart TVs, in-vehicle terminals, augmented reality (AR) devices, and virtual reality (VR) devices, or it can be implemented as a server. The following will describe exemplary applications when the device is implemented as a terminal.
[0023] See Figure 1 , Figure 1This is a schematic diagram of the architecture of the virtual character collaborative interaction system 100 provided in the embodiments of this application. In order to support an exemplary application, the terminal (terminal 400-1 and terminal 400-2 are shown as examples) connects to the server 200 through the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two.
[0024] In some embodiments, the terminal is equipped with a client, such as a video playback client, an instant messaging client, a game client, a live streaming client, etc. Server 200 is the backend server corresponding to the client. It can be an independent 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 (CDN), and big data and artificial intelligence platforms. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited in this embodiment.
[0025] In practical applications, taking the first virtual character as the initiator, terminal 400-1 as the first virtual character's side terminal (i.e., the initiator terminal), the second virtual character as the participant, and terminal 400-2 as the second virtual character's side terminal (i.e., the participant terminal) as an example, when terminal 400-1 receives a trigger operation from the first virtual character for a target collaborative action, it sends a collaborative interaction request to server 200. Server 200 generates and pushes collaborative invitation information for the target collaborative action to the terminals of virtual characters interacting with the first virtual character (which can be friendly virtual characters who are friends with the first virtual character, or adversarial virtual characters who are adversaries with the second virtual character). Simultaneously, by detecting the distance between each virtual character and the first virtual character in the virtual scene, it determines whether each virtual character has entered the preset perception range to execute the target collaborative action. If a virtual character is found whose distance is less than or equal to the preset visual distance (for example, the second virtual character, i.e., the second virtual character has entered the preset perception range), a display command for a collaborative empty space is sent to the second virtual character's side terminal 400-2. Terminal 400-2 displays the positions occupied by the first virtual character and multiple available collaborative slots in the second virtual character's field of view. When the second virtual character's crosshair aligns with a target slot among the multiple collaborative slots, terminal 400-2 updates the target slot from available to selected and displays the corresponding join control for the target collaborative action. When the second virtual character triggers the join control, terminal 400-2 controls the second virtual character to join the target slot and execute a sub-action, updating the target slot to occupied. When server 200 detects that all collaborative slots are occupied, it sends a synchronization display command to the terminals of each virtual character participating in the target collaborative action (including terminals 400-1 and 400-2) to display the sub-actions executed by the first virtual character and the virtual characters that have joined each collaborative slot on each terminal.
[0026] See Figure 2 , Figure 2 This is a schematic diagram of the structure of the electronic device 500 provided in the embodiments of this application, with the electronic device 500 as an example. Figure 1 Taking the terminal in the middle as an example, Figure 2 The illustrated electronic device 500 includes at least one processor 510, a memory 550, at least one network interface 520, and a user interface 530. The various components in the electronic device 500 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, ... Figure 2 The general labeled all buses as Bus System 540.
[0027] 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.
[0028] 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. Memory 550 may optionally include one or more storage devices physically located away from processor 510.
[0029] 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.
[0030] Operating system 551 includes system programs for handling various basic system services and performing hardware-related tasks, such as framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks; 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 include: Bluetooth, WiFi, and Universal Serial Bus (USB), etc.
[0031] In some embodiments, the collaborative interaction device for virtual characters provided in this application can be implemented in software. The collaborative interaction device for virtual characters provided in this application can be provided in various software embodiments, including various forms such as applications, software, software modules, scripts or code. Figure 2 A collaborative interaction device 555 for virtual characters stored in memory 550 is shown. It can be software in the form of programs and plug-ins, and includes a series of modules, including an empty space display module 5551, an empty space selection module 5552, an empty space addition module 5553, and a synchronous display module 5554. These modules are logically related and can therefore be arbitrarily combined or further split according to the functions they implement. The functions of each module will be described below.
[0032] In some embodiments, the terminal or server can implement the collaborative interaction method of the virtual character provided in this application by running various computer-executable instructions or computer programs. For example, computer-executable instructions can be microprogram-level commands, machine instructions, or software instructions. Computer programs can be native programs or software modules in an operating system; they can be native applications (APPs), i.e., programs that need to be installed in the operating system to run, such as instant messaging APPs and live streaming APPs; or they can be applets that can be embedded in any APP, i.e., programs that only need to be downloaded to a browser environment to run. In summary, the aforementioned computer-executable instructions can be any form of instruction, and the aforementioned computer programs can be any form of application, module, or plugin.
[0033] As mentioned above, the collaborative interaction method for virtual characters provided in this application can be implemented by various types of electronic devices, such as... Figure 1 Any one of the terminals 400-1, 400-2, and server 200 can be executed independently, or it can be executed by... Figure 1 Terminal 400-1, terminal 400-2, and server 200 work together to execute the commands. Next, [the following will be performed by...] Figure 1 The following description uses the example of the second virtual character side terminal 400-2 independently executing the collaborative interaction method of the virtual character provided in this application embodiment. See also... Figure 3 , Figure 3 This is a flowchart illustrating the collaborative interaction method for virtual characters provided in this application embodiment, which will be combined with... Figure 3 The steps shown are explained.
[0034] Step 101: When the second virtual character side terminal receives the empty space prompt information triggered by the first virtual character for the target collaborative action, and the second virtual character enters the preset perception range, it displays multiple collaborative empty spaces in the field of view of the second virtual character.
[0035] In collaborative interaction methods for virtual characters, a target collaborative action refers to a group posture or movement performed by multiple virtual characters (such as two or more players at any preset visual distance) in a virtual scene, arranged according to a preset position. A target collaborative action includes sub-actions to be performed by one initiator and sub-actions to be performed by multiple participants. For example, a target collaborative action could be a "four-person street dance" or a "three-person group photo" action.
[0036] The first virtual character, acting as the initiator of the target collaborative action and occupying a core position in the collaborative interaction, is responsible for selecting and triggering the target collaborative action, serving as the origin for spatial coordinate calculations during the execution of the target collaborative action. For example, in a shooting game, the player character who clicks the action wheel and selects the "Four-Person Street Dance" action is the first virtual character. After selecting the target collaborative action, the first virtual character automatically joins a position in the corresponding formation (the origin for spatial coordinate calculations) of the target collaborative action. Subsequently, the terminal on the first virtual character's side switches the first virtual character's perspective from the current combat perspective to the formation perspective, so that the player of the first virtual character can clearly see the sub-actions that their controlled first virtual character is performing, as well as the overall shape formed by combining with other participating virtual characters, rather than remaining in the combat perspective direction before joining.
[0037] When the first virtual character's terminal responds to the player's operation by sending a collaboration initiation request to the server, which includes a target collaboration action identifier and the first virtual character's real-time coordinates, the server verifies the first virtual character's current state. If the first virtual character's current state is a legal state of being neither in combat nor under attack, the server determines the positions of other collaboration slots (i.e., collaboration slots available for other virtual characters to participate in) based on the first virtual character's real-time position and the preset positioning offset parameters for the target collaboration action.
[0038] For example, the server reads the preset position offset parameters for the target collaborative action and calculates the world coordinates of multiple collaborative empty positions (total number of players minus one). Since the world coordinates of the collaborative empty positions are dynamically calculated based on the real-time position of the first virtual character, collaborative interaction is no longer limited to fixed static points on the map or a photo system. It supports players to initiate face-to-face real-time interactions in any safe area in the virtual scene, greatly enhancing the flexibility, expressiveness, and personalized aesthetic experience of social interaction in the virtual scene.
[0039] The server distributes the calculated world coordinates of the collaborative empty space to other virtual character terminals (including the second virtual character terminal) in the virtual scene via collaborative prompts. Upon receiving the collaborative prompts, the second virtual character terminal checks in each logical frame whether it has entered the preset perception range corresponding to the target collaborative action. The preset perception range refers to the boundary of the maximum distance threshold at which the second virtual character can perceive and see the collaborative empty space corresponding to the target collaborative action. Since the target collaborative action is initiated by the first virtual character, the preset perception range is typically a circular area centered on the first virtual character with a preset visible distance as its radius. Therefore, by calculating whether the real-time distance between the second and first virtual characters is less than or equal to the preset visible distance, it is determined whether the second virtual character has entered the preset perception range corresponding to the target collaborative action. If the distance between the second virtual character and the first virtual character is less than or equal to the preset visual distance (which is the maximum distance threshold that limits the visibility of the collaborative space, and also the maximum distance threshold that triggers the collaborative space to respond to the second virtual character or synchronize its state, and can be set according to actual needs, such as 30 meters), it is considered that the second virtual character has entered the preset perception range corresponding to the execution target collaborative action. In this case, the second virtual character's side terminal renders the collaborative space in the field of view as an optional space.
[0040] In this context, a collaborative empty space refers to an interactive coordinate position or virtual space area pre-configured for a virtual character to perform specific actions within a virtual scene. An optional state refers to the visual state of a collaborative empty space when it is not occupied by any virtual character and is awaiting interaction; for example, a collaborative empty space may appear as a green halo or a semi-transparent preview model in the virtual scene. If the distance between the second virtual character and the first virtual character is greater than a preset viewing distance, the collaborative empty space controlled by the second virtual character's terminal will not be visible in the viewpoint.
[0041] It should be noted that if the server distributes the calculated world coordinates of the collaborative slots to other virtual character terminals within a preset range around the first virtual character (such as an area with the first virtual character as the center and a preset visible distance as the radius) through collaborative prompt information, then after receiving the collaborative prompt information, the other virtual character terminals can directly display multiple collaborative slots that are available.
[0042] See Figure 4 , Figure 4This is an interactive diagram of the collaborative action provided in this application embodiment. In a shooting game, the player opens the action wheel through the first virtual character side terminal (the initiator's terminal) and triggers a target collaborative action (such as a 4-person action) 401. In response to the triggering of the target collaborative action, the first virtual character side terminal controls the first virtual character (the initiator) to automatically move to the initiating position 403 in the position arrangement 402 corresponding to the target collaborative action and execute a sub-action waiting for collaboration (such as a sitting posture). At the same time, when the distance between the second virtual character and the first virtual character is less than or equal to a preset visual distance (i.e., the second virtual character enters a preset perception range), three selectable collaborative empty positions 404 are automatically rendered and displayed on the three-dimensional virtual scene ground in the second virtual character's field of vision (i.e., the screen displayed on the participant's terminal). For example, the three selectable collaborative empty positions are displayed as a green halo effect in the position arrangement 403.
[0043] Step 102: In response to the second virtual character's crosshair aligning with the target empty space among multiple collaborative empty spaces, update the target empty space from the selectable state to the selected state, and display the corresponding target collaborative action add control.
[0044] In practical applications, when the second virtual character enters a preset interactive distance, the second virtual character's terminal performs raycasting detection in each logical frame. Raycasting emits a physical ray along the viewport from the center of the second virtual character's camera or the center of the virtual shooting prop it holds. If the raycast hits a physical collider in a target empty space, the second virtual character's terminal triggers the target empty space's state change logic, updating the target empty space from an optional state to a selected state, and displaying a join control at the associated location of the target empty space. The join control is an interactive button displayed on the second virtual character's terminal screen for the player to trigger and join the target cooperative action. If the raycast does not hit any cooperative empty space collider, the second virtual character's terminal keeps all cooperative empty spaces in an optional state and does not display the join control.
[0045] In some embodiments, in response to the second virtual character's crosshair moving away from the target empty space, the second virtual character's terminal controls the target empty space to return from a selected state to an optional state, and hides the join control. That is, after the second virtual character's crosshair leaves the target empty space, the crosshair ray no longer hits the physical collider of the target empty space. In this case, the second virtual character's terminal triggers the target empty space's state change logic, controlling the target empty space to update from a selected state to an optional state, and hiding the join control displayed at the associated position of the target empty space. In this way, timely updating the state of the target empty space allows other players to select and join unselected target empty spaces, which helps improve the efficiency of achieving cooperative actions.
[0046] Step 103: In response to the trigger operation for adding the control, control the second virtual character to add the target empty space and execute the sub-action, and update the target empty space from the selected state to the occupied state.
[0047] In practical applications, in response to a player triggering the join control operation, the second virtual character's terminal sends a participation request to the server, carrying the target empty slot identifier and timestamp. Upon receiving the participation request, the server verifies the real-time status of the target empty slot based on atomic operations in the database. If the target empty slot is found to be unoccupied, the server performs an atomic lock, marking the target empty slot as occupied, binding the second virtual character's identifier to the target empty slot, returning a successful occupancy command to the second virtual character's terminal, and broadcasting the target empty slot occupancy update to other surrounding virtual character terminals. The second virtual character's terminal controls the second virtual character to automatically perform a displacement operation pointing to the target empty slot's coordinates, causing the second virtual character to automatically attach and move to the corresponding coordinates. After reaching the coordinates, the second virtual character begins executing the corresponding sub-action, updating the target empty slot to an occupied state. An occupied state indicates that the target empty slot has been successfully locked and bound by a specific participating virtual character. Target empty slots in an occupied state will be closed to remaining external characters and will no longer accept new join requests. At the same time, the second virtual character side terminal automatically switches the camera view of the second virtual character to the preset view parameters (such as automatically switching the camera view in the second virtual character's field of view from the conventional first-person combat view to the preset position view for the target empty space).
[0048] If the server detects that the target slot has been occupied by another virtual character, it returns an error code indicating that the slot is occupied to the terminal of the second virtual character and hides the add control.
[0049] Thus, by using state detection and atomic operations for exclusive locking, data redundancy caused by multiple player terminals simultaneously sending requests to the same empty space is prevented. Real-time updates and broadcasting of position occupancy status ensure consistency in logic and rendering across all terminals.
[0050] Step 104: In response to the synchronization display instruction received when all collaborative slots are occupied, display the sub-actions performed by the first virtual character and the virtual characters that have joined each collaborative slot.
[0051] In practical applications, multiple participating roles successively join the remaining collaborative slots. When all collaborative slots are occupied, the server sends a synchronization display command to the terminals of the first virtual role and all participating virtual roles. In this way, the terminals can display the sub-actions performed by the first virtual role and the virtual roles that have joined each collaborative slot based on the synchronization display command.
[0052] For example, the collaborative interaction method of virtual characters is applied to a four-player team victory pose interaction scene in a multiplayer online shooting game. Player A controls the first virtual character to open the action wheel and select the multiplayer coordinated action (i.e., the target coordinated action) marked with "character silhouette and number 4". The first virtual character automatically stands in the center of the starting position. Player B controls the second virtual character, positioned 10 meters away from the first virtual character. Since 10 meters is less than or equal to the preset visible distance of 30 meters, three green aura effects arranged in a circle and in a selectable state (corresponding to three cooperative empty positions) are immediately rendered and displayed in Player B's field of view around the first virtual character. Player B rotates the mouse to adjust the view, precisely pointing the crosshair at the target empty position on the right. The green aura effect of the target empty position detects the crosshair ray hitting, and the aura color smoothly transitions from green to yellow within 0.2 seconds (entering the selected state). At the same time, a "Join Co-op" control with the text "Join Co-op" pops up in the center of Player B's field of view. Player B clicks the "Join the Collaboration" button. The second virtual character automatically moves and snaps to the center of the yellow circle in the target empty space, performing the sub-action to prepare for victory. After the second virtual character is in place, the yellow circle in the target empty space goes out, entering an occupied state. Simultaneously, Player B's camera automatically switches to a preset third-person camera position, observing the characters from a preset 45-degree overhead view. When the other two players in the team, Player C and Player D, control their respective virtual characters to click "Join" and fill the remaining collaborative empty spaces using the same aiming operation, the server triggers a synchronization display command, sending a synchronization display command with a unified timestamp to all players. The terminals of all four players in the team begin playing a continuous victory dance animation at the exact same moment, perfectly achieving the purpose of a face-to-face social group photo.
[0053] Through the above methods, collaborative spaces are dynamically generated in the virtual scene based on the position offset parameters, and deeply linked with the aiming of the crosshair in the field of view and the animation effects of the selectable and chosen states, providing participants with precise and intuitive 3D spatial position guidance. Compared with related technologies, users do not need to determine their positions through verbal communication, eliminating frequent fine-tuning operations when aligning positions and avoiding collisions or model penetration defects caused by inaccurate estimations. The one-step interaction of "crosshair alignment - direct click" replaces the cumbersome serial process of "initiating invitation - waiting for response - secondary confirmation" in related technologies. Even in scenarios with multiple nodes interacting concurrently, such as three or four players, multiple confirmations are not required, greatly shortening the preparation time for collaborative interaction and ensuring that high-frequency combat in shooting games is not interrupted. By using the unified animation start frame timestamp carried in the synchronized playback command for aligned playback, the problem of screen asynchrony caused by differences in the hardware performance of each player's terminal or network transmission jitter is eliminated, ensuring the overall visual presentation quality of multi-player combined actions.
[0054] In some embodiments, in addition to triggering the selected slot state through crosshair ray collision detection, a quick join mechanism based on interface spatial interaction is also included. Specifically, in response to the distance between the second virtual character and each cooperative slot being less than or equal to a preset interactive distance, the second virtual character-side terminal displays a quick join control associated with multiple cooperative slots in the selectable state in the field of view. In response to receiving a trigger operation for the quick join control, the second virtual character-side terminal reads the current world coordinates of the second virtual character and the world coordinates of each cooperative slot in the selectable state; calculates the physical distance between the second virtual character and each cooperative slot in the selectable state using a spatial Euclidean distance algorithm; sorts the results based on the physical distance calculation, and automatically determines the cooperative slot with the smallest physical distance as the target slot; subsequently, automatically binds the identifier of the second virtual character to the target matching slot; if the server verifies that the target slot is not occupied, controls the second virtual character to perform an automatic displacement operation pointing to the target slot, and updates the target matching slot from the selectable state to the occupied state.
[0055] The above method provides a direct addressing and joining mechanism that does not rely on 3D aiming, while rendering scene empty space effects. In scenarios with multiple concurrent empty spaces and limited field of view, it can automatically allocate the nearest available interactive space to the requesting user based on physical distance weights, thus providing an efficient and accidental touch-resistant position occupancy determination logic in mobile devices or complex combat interface environments.
[0056] The technical details involved in steps 101-104 will be explained further below.
[0057] In some embodiments, step 101, "displaying multiple available cooperative spaces in the view of the second virtual character," can be achieved as follows: displaying multiple apertures of a first color in the view of the second virtual character; wherein, one aperture corresponds to one cooperative space, and the first color indicates that the cooperative space corresponding to the corresponding aperture is in an available state; correspondingly, step 102, "updating the target space from an available state to a selected state," can be achieved as follows: controlling the material color of the target aperture corresponding to the target space to be updated from the first color to the second color, where the second color indicates that the target space is in a selected state.
[0058] In the collaborative interaction method for virtual characters, the first color (e.g., green) is used as a first visual indicator to represent that the collaborative empty space is unoccupied and available for joining, providing global positional guidance to the user and indicating the interactive range. The second color (e.g., yellow) is used as a second visual indicator to represent that the collaborative empty space has been selected by the crosshair and can be joined at any time. The target aperture refers to the specific aperture marker (corresponding to the aperture of the target empty space) currently undergoing ray collision detection in the crosshair direction of the second virtual character.
[0059] In a shooting game match, a second virtual character moves within the virtual environment. When the distance between the second and first virtual characters meets a preset visual distance, the second virtual character's terminal receives a cooperative prompt message from the server, containing the world coordinates of available cooperative spots. On the virtual environment ground corresponding to the world coordinates of each available cooperative spot, the second virtual character's terminal instantiates, loads, and renders multiple rings of a first color (e.g., green). Each ring on the virtual environment ground appears as a glowing green ring-shaped edge effect, indicating multiple available cooperative spots to the player.
[0060] As the player adjusts the camera viewport orientation, the processor on the second virtual character side terminal fires a physical ray from the crosshair in the center of the screen, traversing the 3D virtual scene, in each logical frame, performing ray collision detection. When the physical ray hits a physical collider of the target aperture (i.e., the crosshair is aligned with the target aperture), the second virtual character side terminal initiates a smooth color gradient logic. The processor modifies the color channel values in the shader property block of the target aperture, controlling the material color of the target aperture to smoothly gradient from a first color (green) to a second color (yellow) within a preset transition time parameter (e.g., 0.2 seconds), creating a visually high-contrast color focus feedback. Furthermore, in response to the target aperture's material color changing from the first color to the second color, the second virtual character side terminal can control the target aperture to perform a breathing light-like brightness fluctuation effect, or play a prompt sound effect to indicate that the target empty space has been locked.
[0061] Simultaneously, the second virtual character side terminal displays an add control (add button) at the associated position of the target aperture (such as below the crosshair). If the physical ray does not hit the physical collider of the target aperture, or if the physical ray moves away from the physical collider of the target aperture, the second virtual character side terminal uses an interpolation algorithm to control the material color of the target aperture to smoothly transition from the second color (yellow) to the first color (green) within a preset transition time parameter (such as 0.2 seconds), indicating that the target empty space has been restored from the selected state to the selectable state, and the add control is hidden.
[0062] For example, see Figure 5 , Figure 5This is a schematic diagram of the collaborative empty space provided in the embodiments of this application. Figure 1 The first virtual character triggers a target collaborative action (such as a four-person synchronized action). The second virtual character is positioned 3 meters away from the first virtual character (i.e., the distance between the second and first virtual characters is less than or equal to the preset visual distance). The second virtual character's terminal screen renders the added first virtual character 501 and multiple green circles (collaboration empty spaces) 502 on the ground. When the second virtual character points the crosshair 503 of the virtual shooting tool at the target circle 504, the color of the target circle 504 changes from green to yellow, and the add control 505 appears. When the second virtual character moves the crosshair 503 of the virtual shooting tool away from the target circle 504, the color of the target circle 504 changes from yellow to green, and the add control 505 disappears.
[0063] By visualizing the collaborative space as a specific colored aperture and deeply binding the aiming operation with the transition update of material colors, a visual feedback mechanism highly consistent with the intuitive operation of first-person shooter games is achieved. The smooth transition of the aperture color from the first color (green) to the second color (yellow) within 0.2 seconds provides users with precise interactive focus feedback. Users can clearly perceive the current aiming selection status without needing to read complex text, avoiding misjudgments during intense combat and improving the efficiency and accuracy of human-computer interaction.
[0064] In some embodiments, step 101, "displaying multiple available collaborative spaces in the view of the second virtual character," can be achieved as follows: displaying multiple character models with a first transparency in the view of the second virtual character; wherein, one character model corresponds to one collaborative space, and the first transparency indicates that the collaborative space corresponding to the corresponding character model is in an available state; correspondingly, step 102, "updating the target space from an available state to a selected state," can be achieved as follows: controlling the transparency of the target character model corresponding to the target space to be updated from the first transparency to the second transparency, where the second transparency indicates that the target space is in a selected state.
[0065] In the collaborative interaction method for virtual characters, the first transparency is used to render the character model in an selectable state, controlling the transparency value of the character model to appear as a semi-transparent shadow. The first transparency can be set according to actual needs, such as 0.3. The second transparency is used to render the character model when the crosshair is selected, controlling the increase of the character model's material transparency to indicate a specific transparency value of the selected state, such as the second transparency corresponding to shadow highlighting (e.g., the second transparency is 0.8). The character model refers to the preview model positioned in the collaborative empty world coordinates, posing in a preset posture. The posture presented by the character model can be the preset first frame action posture of the corresponding position in the target collaborative action.
[0066] When the conditions for displaying collaborative spaces are met, the second virtual character side terminal receives collaborative prompt information from the server, including action posture identifiers and world coordinates. At the world coordinates of each collaborative space, the second virtual character side terminal instantiates and loads a 3D mesh model corresponding to the action posture identifier, serving as multiple character models (e.g., a light blue character phantom model). The second virtual character side terminal calls a preset transparent material shader, controlling the initialization of the channel transparency values in the material properties of multiple character models to the first transparency (e.g., 0.3), presenting a semi-transparent state. In each logical frame, the processor of the second virtual character side terminal emits a physical ray from the camera center along the viewport direction for collision detection. When a physical ray hits the physical collider of the target character model corresponding to the target space, the second virtual character side terminal initiates an attribute smoothing interpolation algorithm, controlling the material channel transparency value of the target character model to smoothly increase from the first transparency (e.g., 0.3) to the second transparency (e.g., 0.8) within a preset time period, making the target character model visually appear as a solidified focus feedback, and generating an added control at the edge of the crosshair in the field of view. If the physical ray no longer hits the physical collider of the target character model, the second virtual character side terminal controls the material channel transparency value of the target character model to smoothly decrease from the second transparency (e.g., 0.8) back to the first transparency (e.g., 0.3), and hides the added control.
[0067] For example, see Figure 6 , Figure 6 This is a schematic diagram of the collaborative empty space provided in the embodiments of this application. Figure 2The first virtual character triggers a target collaborative action (such as a four-person synchronized action). The second virtual character is 3 meters away from the first virtual character (i.e., the distance between the second and first virtual characters is less than or equal to the preset viewing distance). In the second virtual character's field of vision, the character model (opaque) of the first virtual character (601) and three semi-transparent character models (such as light blue character phantom models, each with its own sub-actions or poses) appear. When the player of the second virtual character aims at the target character model (603) with the crosshair (602), the phantom of the target character model becomes brighter and more solid (i.e., the transparency changes from the first transparency of 0.3 to the second transparency of 0.8), and the join control (604) pops up on the screen, allowing the player to intuitively confirm that they will become a participant in the target collaborative action after joining.
[0068] By introducing character models with preset transparency and smoothly controlling the transparency of these models from the first level of transparency (optional state) to the second level of transparency (selected state), expressive 3D spatial action and posture guidance is provided to players while ensuring rendering performance overhead. Players can not only perceive the physical location of empty spaces but also intuitively predict the posture of virtual characters before joining, solving the problems of single positioning and lack of information depth in related technologies, and significantly improving the participation enthusiasm and configuration selection accuracy of social actions.
[0069] In some embodiments, the "displaying the join control for the corresponding target collaborative action" in step 102 can be implemented as follows: at the associated position of the target empty slot, the join control for the corresponding target collaborative action is displayed, wherein the join control includes at least one of the following elements: text guiding the joining of the target empty slot; an entry icon that triggers the target collaborative action, the entry icon including a character silhouette and the total number of virtual characters required to complete the target collaborative action; and, if the target collaborative action is triggered by the first virtual character among multiple collaborative actions recommended based on the target theme, the theme element of the target theme.
[0070] The text guiding players to join a target co-op slot refers to the text embedded within the join control, used to directly instruct the player of the second virtual character to perform the action of joining a specific co-op slot. Examples include, but are not limited to, words like "Join" or "Team Up." The entry icon is a pre-configured graphic symbol in the action wheel interface or join control, visually representing the type of the target co-op action, including but not limited to a combination of "character silhouette + number." The character silhouette is a simplified human silhouette graphic used within the entry icon to visually represent the virtual character entity. The target theme is a specific holiday or seasonal event associated with the current operating cycle of the virtual scene, such as a Spring Festival event or a Halloween event. The theme elements are customized visual elements specific to the target theme, such as a red lantern border for a Spring Festival theme or a pumpkin symbol for a Halloween theme.
[0071] In practical applications, when the second virtual character side terminal detects a target empty space collider, it obtains the screen coordinates of the target empty space in the 3D virtual scene. The second virtual character side terminal then calculates the offset of these screen coordinates to determine the rendering coordinates of the added control on the 2D canvas layer. From its local configuration database, based on the identifier of the target collaborative action, the second virtual character side terminal queries the total number of virtual characters required for the target collaborative action (e.g., N=4) and the associated theme category. If the associated theme category is a regular theme, the second virtual character side terminal calls a regular added control template, dynamically rendering the preset text guiding the addition of the target empty space ("Add") and a regular entry icon (containing N character silhouettes and a texture resource of the number N) into the added control. If the associated theme category is a target theme (e.g., a Spring Festival theme), the second virtual character side terminal calls a theme control template with theme elements, combining the customized guiding text, the target theme's theme elements (such as a Spring Festival red border texture), and the entry icon with the theme texture into the added control, and rendering it to the determined rendering coordinates.
[0072] For example, see Figure 7 , Figure 7These are schematic diagrams of the "Join" control provided in the embodiments of this application. Example 1 uses basic text and icons to guide the display of the "Join" control. The "Join" control displays text guiding users to join the target empty space, with the text content being "Join" or "Team Up". In Example 2, the "Join" control serves as the entry icon for triggering the target collaborative action. It uses a combination of character silhouettes and a number representing the total number of virtual characters required to complete the target collaborative action. For example, when the target collaborative action is a four-person collaborative action, the entry icon displays four side-by-side character silhouettes labeled with the number "4", allowing users to understand the required number of collaborators without reading the text. In Examples 3 and 4, specific theme elements are integrated into the display of the "Join" control. In Example 3, during the Spring Festival activities in the virtual scene, the first virtual character triggers a Spring Festival-limited group photo collaborative action recommended based on the Spring Festival target theme. In response to the second virtual character's crosshair aligning with the target empty space, the "Join" control, which incorporates Spring Festival red lantern ornaments and other theme elements, is displayed in the second virtual character's field of vision. The "Join" control displays the text "Team Up" within a border with Spring Festival theme elements. Example 4 incorporates Halloween-themed elements (such as pumpkin lanterns) and the word "Join" into a control during a Halloween event in a virtual setting, creating a visually engaging and interactive experience for the second virtual character that fits the current festive atmosphere.
[0073] By integrating guiding text, character silhouettes, and entry icons combining the total number of virtual characters, along with customized target theme elements, into the control, the originally monotonous and tedious text prompts are upgraded to a high-dimensional graphic and color guidance system. This solves the problems of limited information and low operational efficiency in related technologies. The combination of character silhouettes and numbers allows players to instantly understand the required number of players for a collaborative action (e.g., four or three) with a simple glance, eliminating the cognitive delay caused by reading lengthy texts and enhancing players' intuitive recognition capabilities in tactical environments. When a collaborative action is associated with a specific target theme, the control automatically and dynamically assembles theme elements, ensuring that players' social group photo behavior is visually highly unified with the current season's activities. This not only enriches the content expression of game operations but also enhances the fun of player interaction and their willingness to share on social media.
[0074] In some embodiments, after the add control is displayed in step 102, in response to the trigger operation for the add control, if the target empty space has been occupied by a third virtual character, a position occupancy prompt message is displayed, the add control is hidden, and the target empty space is restored from the selected state to the selectable state, or the sub-action performed by the third virtual character is displayed in the target empty space.
[0075] In this context, the third virtual character is an external participant other than the second virtual character, and is another virtual character that initiates a position-claiming request to the server within the same interaction time window. The third virtual character is used in multi-user interactions to generate and verify position-claiming conflicts. For example, in a shooting game, when player A (the first virtual character) initiates a cooperative action, player B (the second virtual character) and player C (the third virtual character) simultaneously point to the same green circle; player C is the third virtual character.
[0076] A location occupancy notification is a graphical or text-based message that pops up on the user interface of the second virtual character when the target location has already been successfully occupied by a third virtual character. The message, such as "Location already occupied," provides clear feedback to the user, indicating that the joining attempt failed due to a location conflict.
[0077] In practical applications, when the second virtual character terminal's crosshair is aligned with the target empty space collider and a trigger operation for the join control is received, a join request data packet is generated. The join request data packet carries the identifier of the target empty space and the local timestamp of the second virtual character terminal. The second virtual character terminal then sends the join request data packet to the server.
[0078] When the server receives the join request data packet from the second virtual character's terminal, it verifies the locking status of the target empty slot using the underlying server's authoritative state machine, such as by using atomic operations to check the occupancy value of the target empty slot. If the occupancy value of the target empty slot is zero, indicating that the target empty slot is not occupied, the server performs an atomic write, setting the occupancy value of the target empty slot to one, indicating that the target empty slot has been occupied by the second virtual character, and binding the identifier of the second virtual character to the target empty slot. The server returns a successful occupancy command to the second virtual character's terminal and broadcasts a status update packet for the target empty slot to the remaining terminals within the virtual scene.
[0079] If the server receives the join request data packet from the third virtual character first within the same network logic frame, and has already determined that the target empty space has been occupied by the third virtual character, the server rejects the join request data packet from the second virtual character's terminal and returns an error code indicating that the space is occupied to the second virtual character's terminal. Upon receiving the error code, the second virtual character's terminal triggers the following three parallel underlying rendering and logic reset operations: Operation 1: Creates and displays a space occupancy prompt in the two-dimensional layer of the view, containing the text "Spot occupied". Operation 2: Calls the interface management component to hide and destroy the join control from the view, releasing the memory resources occupied by the join control. Operation 3: By modifying the material shader property block, controls the material color of the target empty space's aperture effect to smoothly transition from yellow to the first color (green) within 0.2 seconds, restoring the target empty space from a selected state to an selectable state, and re-enabling the crosshair ray detection function to allow the user to control the view and select the remaining unoccupied target empty space.
[0080] In some embodiments, when the second virtual character-side terminal receives a state update packet broadcast by the server indicating that the target empty space has been occupied by a third virtual character, it does not execute the state restoration logic mentioned above. Instead, it triggers a passive rendering update: the second virtual character-side terminal calls the object pool to instantiate and load the mesh model and material resources of the third virtual character at the 3D world coordinates corresponding to the target empty space. Through spatial interpolation, it controls the mesh model of the third virtual character to automatically align to the standing coordinates of the target empty space and calls the animation controller to control the mesh model of the third virtual character to start playing the corresponding sub-action animation. At the same time, the second virtual character-side terminal destroys the special effects of the target empty space, completing the change to the occupied state.
[0081] In some embodiments, after a position contention occurs, in order to improve the player's operational efficiency and avoid manual re-aiming, the cooperative interaction method may further include the following redirection selection step: in response to receiving an error code that the target empty space has been occupied by a third virtual character, the second virtual character's terminal automatically performs distance weight calculation to find the remaining cooperative empty spaces around the first virtual character that are currently available; in response to finding that there is a target candidate empty space with the closest physical distance among the remaining cooperative empty spaces in the available state, the second virtual character is controlled to automatically perform a displacement operation towards the target candidate empty space and update the target candidate empty space to an occupied state.
[0082] In some embodiments, when network latency is high, if the second virtual character has started to move automatically towards the target empty space, but the server subsequently determines that the third virtual character has successfully occupied it, the collaborative interaction method further includes the following emergency termination steps: in response to receiving a status update that the target empty space has been occupied by the third virtual character during the automatic movement towards the target empty space, the terminal on the second virtual character side immediately interrupts the automatic displacement operation pointing to the target empty space, so that the second virtual character remains stationary at the current virtual world coordinates; in response to the interruption of the automatic displacement operation, a text prompt indicating that the position has been occupied is displayed in the field of view, and the camera view currently locked by the second virtual character is smoothly reset to the normal combat view state.
[0083] In some examples, Player A, controlling the first virtual character, initiates a cooperative "tactical alert" action on a hillside requiring three players to cooperate. The game system dynamically generates two selectable target vacancies around the first virtual character, represented by two glowing green circles on the ground. Player B controls a second virtual character, and Player C controls a third virtual character, both within the alert range of the first virtual character. Player B, controlling the second virtual character, rotates their view and aligns their crosshair with the target vacancies (the right vacancy) within the two green circles. The right vacancy is hit by the crosshair ray, and the circle color changes from green to yellow within 0.2 seconds, switching from selectable to selected. Simultaneously, a join control with the text "Join the Match" pops up below Player B's crosshair. Player B clicks the join control, sending a placeholder request to the server. Within the same time frame, Player C also sees the right vacancy and clicks join first. Due to Player C's lower network latency, the server receives Player C's request first and successfully locks and assigns the right vacancy to Player C through an atomic operation. When the server processes Player B's request to reserve a spot, it finds that the empty spot on the right is already occupied by Player C and returns a failure error code to Player B's terminal. Upon receiving the error code, Player B's terminal displays a text message box in the center of Player B's screen stating "Spot already occupied," while simultaneously hiding the "Join Match" button below the crosshair. The previously selected yellow circle smoothly fades back to green within 0.2 seconds, allowing Player B to re-aim at the remaining empty spot on the left.
[0084] In other examples, after player B's terminal receives the server's synchronized update on the status of the empty space on the right, player C's model is directly rendered in player B's field of view, sliding into the empty space on the right and performing a sub-action animation of crouching and holding a gun. At the same time, the glowing halo effect of the empty space on the right is turned off, so as to visually indicate to player B that the empty space on the right has been successfully occupied by teammate player C.
[0085] By introducing server-side atomic detection and client-side position occupancy verification logic, the above method ensures that in an extremely high-concurrency environment where multiple players frequently compete for the same position coordinates, only one request can be successfully executed and the state locked. This fundamentally eliminates character collisions, logic stagnation, or screen model penetration defects caused by state conflicts between multiple player terminals due to network latency, and eliminates logical anomalies and rendering misalignments caused by concurrent position-grabbing conflicts.
[0086] In some embodiments, the step 101 of "displaying multiple available collaborative spaces in the view of the second virtual character" can be achieved as follows: displaying a target area for performing the target collaborative action in the view of the second virtual character; displaying a first virtual character performing a sub-action in a first position in the target area, and displaying multiple available collaborative spaces in multiple second positions in the target area; wherein the distribution of the first position and the multiple second positions corresponds to the position of each sub-action in the target collaborative action.
[0087] The target area is a specific virtual local space within the virtual scene, defined based on the first virtual character's position and orientation, after the first virtual character triggers the target collaborative action. This space serves to accommodate the entire collaborative action formation and its performance. The first position is a preset coordinate point within the target area specifically assigned to the first virtual character as the initiator, where they automatically position themselves, move, and play sub-actions; this is also known as the "initiating position." The second position is a preset coordinate point within the target area, located outside the first position, specifically assigned to each participating virtual character to join and take their positions. Each second position corresponds to one collaborative empty space.
[0088] In practical applications, when the terminal of the first virtual character detects that a player has triggered a target collaborative action, it sends an initiation request containing the world coordinates P and orientation angle O of the first virtual character to the server. After verifying the validity of the initiation request, the server defines a three-dimensional local space around the world coordinates P in the virtual scene as the target region. The server constructs a local affine transformation matrix Rotation(O) with world coordinates P as the origin and orientation angle O as the reference orientation. Then, when calculating the coordinates of the first and second positions, the server reads the configuration file corresponding to the target collaborative action and obtains the preset first offset Offset for the initiator. host And a preset second offset Offset_i for each participant (where i∈{1,2,…,N-1}, and N is the total number of collaborators). The server performs matrix multiplication based on the local affine transformation matrix: calculating the world coordinates of the first position as P. host =P + Rotation(O) * Offset host ; Calculate the world coordinates of each second position as P slot_i=P + Rotation(O) * Offset_i. The server distributes the coordinates of the first position and multiple second positions to the surrounding virtual character terminals via collaboration prompts. After receiving the coordinates of the first position, the first virtual character terminal uses spatial interpolation to control the movement of its physical collider to align with the first position, and puts it into a sub-action state ready for collaboration. The second virtual character terminal receives the collaboration prompts containing the coordinates of multiple second positions. On the virtual scene ground corresponding to the world coordinates of each second position, it instantiates, loads, and renders collaboration space effects (such as a green halo or a transparent character model), completing the multi-point guided display in the second virtual character's field of view.
[0089] For example, in a shooting game, the first virtual character selects and triggers a target cooperative action (such as a four-person group photo) on the action wheel interface. In response to receiving the command to initiate the target cooperative action, the first virtual character's side terminal automatically moves its model to the first position in the target area. The first position is located in the upper part of the target area. Simultaneously, when the second virtual character is at least at a preset viewing distance from the first virtual character, multiple selectable cooperative positions are rendered in the second virtual character's field of vision at several second positions in the target area (located to the lower left, lower right, and rear of the first position). These multiple cooperative positions are presented as multiple glowing green circles on the virtual scene ground. The spatial distribution of the first position and the multiple second positions highly corresponds to the preset positions of each sub-action in the target cooperative action, visually presenting a complete four-person group photo formation directly to the second virtual character, allowing the player to intuitively understand the spatial distribution of each cooperative position.
[0090] By automatically aligning the first virtual character to a first position within the target area and precisely aligning and displaying multiple selectable collaborative slots in multiple second positions, the spatial geometric distribution of the first and multiple second positions perfectly matches the preset formation of the target collaborative action. This method solves the technical pain point of related technologies where the lack of spatial guidance in multiplayer interaction leads to disordered character positioning. It allows players to understand the overall multiplayer formation solely through visual perception, thus establishing a precise world coordinate reference benchmark at the outset of collaboration. This provides reliable technical support for high-precision motion animation splicing and physical position alignment, effectively avoiding model clipping and overlapping phenomena.
[0091] In some embodiments, after performing "displaying multiple available collaborative spaces in the field of view of the second virtual character" in step 101, when the second virtual character enters the preset interaction range corresponding to each collaborative space, a corresponding position identifier can be displayed at the associated position of each collaborative space; wherein, the preset interaction range is within the preset perception range, and the position identifier indicates the position and sub-action of the collaborative space in the target collaborative action.
[0092] The preset interaction range refers to the maximum physical distance boundary that limits the interaction between the second virtual character and the collaborative empty space. For a given collaborative empty space, the preset interaction range can be a circular area centered on the collaborative empty space with a preset interactive distance as its radius. The preset interactive distance refers to the maximum physical distance that the second virtual character (participant character) is allowed to interact with the collaborative empty space. This distance can be set according to actual needs, such as 5 meters. The position indicator is a graphical marker displayed at the associated location of the collaborative empty space. It can be a silhouette icon used to highlight and indicate the position and corresponding sub-action posture of the target collaborative empty space in the target collaborative action (multi-person synchronized action).
[0093] For each collaborative empty space, the second virtual character side terminal calculates the real-time distance between the second virtual character and the collaborative empty space in each logical frame during operation. When the real-time distance is greater than the preset interactive distance (e.g., 5 meters) but less than or equal to the preset viewing distance (30 meters), the second virtual character side terminal only renders the collaborative empty space representing the selectable state (e.g., a green halo) at the 3D world coordinates, without rendering any position markers. When the real-time distance decreases to less than or equal to the preset interactive distance (5 meters), the second virtual character side terminal retrieves the corresponding position marker (e.g., a character silhouette icon) from the animation configuration database based on the action marker of the target collaborative action, and highlights the position marker (e.g., a character silhouette icon) in the target empty space. The corresponding sub-action is represented by highlighting the body skeletal lines of the specific character silhouette icon, achieving overlay rendering of the position markers.
[0094] For example, see Figure 8 , Figure 8This is a schematic diagram of the position markers provided in this application embodiment. In a shooting game, the first virtual character (the initiator character) triggers a target cooperative action and generates multiple green circles (i.e., cooperative empty spaces) on the surrounding ground. For each cooperative empty space, the distance between the second virtual character's position and the cooperative empty space is 15 meters, satisfying the conditions of being less than a preset visible distance of 30 meters and greater than a preset interactive range of 5 meters. The second virtual character can only see the green circle 801 on the ground in its field of vision. When the second virtual character moves forward, shortening the physical distance between the second virtual character and the cooperative empty space to less than or equal to the preset interactive range (5 meters), the corresponding character silhouette icon 802 is automatically superimposed and displayed at the associated position in each green circle in the second virtual character's field of vision. The character silhouette icon highlights a specific body outline, directly indicating to the player of the second virtual character the corresponding position of the current cooperative empty space in the final group photo (e.g., the position of the character model highlighted in the target empty space is the position corresponding to the target empty space) and the corresponding sub-action (e.g., the kneeling sub-action). When the distance to the second virtual character exceeds the preset interactive range again, the character silhouette icon will automatically disappear.
[0095] By using the above method, after the second virtual character enters the preset interactive range, a position marker (character silhouette icon) is dynamically overlaid and displayed. This deeply associates the physical location of the cooperative empty space (synchronized empty space) with the specific role allocation and sub-action form, solving the technical problems of ambiguous cooperative empty space information and the need for verbal negotiation in related technologies. This allows players to know "where they are and which action they are performing" in seconds when they approach the interaction point, greatly improving the flexibility and decision-making efficiency of cooperative formation configuration.
[0096] In some embodiments, after performing "displaying multiple available collaboration slots in the view of the second virtual character" in step 101, upon receiving a collaboration cancellation notification triggered when the first virtual character interrupts collaboration, all available collaboration slots in the view are removed, and the second virtual character is restored to its initial state before the first virtual character triggered the target collaboration action.
[0097] Among them, the collaboration interruption behavior refers to the abnormal behavior triggered by the first virtual character during the preparation or playback of the collaborative interaction, which causes the collaborative environment to no longer meet the normal playback conditions of the target collaborative action, including at least one of the following: the first virtual character leaves the position when the target collaborative action is triggered during the collaboration process (i.e., leaving the trigger position causes the displacement to be interrupted); the first virtual character enters a knocked-down state due to the health value being reduced to a preset threshold (referring to the first virtual character entering an operation-restricted state or a non-standing posture after its health value is reduced to a preset threshold due to enemy attack, such as a dying state awaiting rescue or an eliminated state); the first virtual character executes an operation command that conflicts with the target collaborative action (such as firing, switching props, clicking the cancel button, or performing other single-player actions); the first virtual character enters a stun state after being hit (unable to perform actions); the scene environment where the first virtual character is located undergoes abnormal changes (such as a sudden change in the height of the supporting plane where the first virtual character is located (the virtual terrain collapses), or the first virtual character has a physical conflict with other virtual objects to a preset degree (physical compression or model penetration)).
[0098] In practical applications, the server polls the survival and physical space status of the first virtual character in real time. If the server detects that the first virtual character's world coordinate offset exceeds 0.5 meters during collaboration, or its health drops to zero and it enters a downed state awaiting rescue, or the server receives a fire or weapon-switching command from the first virtual character, or the first virtual character's physical collider experiences a preset level of physical conflict with other virtual objects (clipping anomaly), or the supporting plane on which the first virtual character is located undergoes a sudden change in height (virtual terrain collapse), the server determines that the first virtual character has triggered a collaboration interruption. The server immediately destroys the current collaboration instance and sends a collaboration cancellation notification to all participating virtual character terminals (including the second virtual character terminal). After receiving the collaboration cancellation notification, the second virtual character's terminal executes the following cleanup and reset logic: First, unload and remove all aperture effects rendered in the current field of view; Second, forcibly switch the second virtual character's animation controller from the sub-action state back to the basic combat state tree; Third, unlock the system lock of the second virtual character's camera view, restore the camera to the normal free view of the corresponding field of view, and reset the rendering visibility of the prop model (making it re-display); Fourth, re-enable the second virtual character's physical displacement detection and input control logic, so that the second virtual character returns to its initial state.
[0099] For example, in a shooting game, the first virtual character is in a waiting-for-cooperation state, while the second virtual character has joined the target's empty space and started playing a sub-action. If the first virtual character experiences a cooperative interruption (e.g., the first virtual character's world coordinates shift by more than 0.5 meters horizontally, or it is attacked and falls to the ground awaiting rescue, or it fires, or the bridge platform it's on collapses, causing a sudden change in height), the second virtual character's client receives a cooperative cancellation notification from the server. In response to the cancellation notification, all green and yellow aura effects in the second virtual character's view are instantly cleared and removed, the second virtual character automatically interrupts its current sub-action animation, the shooting item model is re-displayed, the combat interface in the center of the screen is fully restored, and control is returned to the player of the second virtual character, restoring the second virtual character to its initial combat state before the first virtual character triggered the target cooperative action.
[0100] In addition, in response to the second virtual character's terminal receiving a collaboration cancellation notification, a location occupancy prompt message with the text "Initiator's status is abnormal, collaboration canceled" pops up in the field of view, providing clear feedback; in response to the location occupancy prompt message being displayed, the location occupancy prompt message is automatically closed after a preset time to avoid continuously obstructing the field of view.
[0101] By establishing a multi-dimensional collaborative interruption behavior judgment mechanism and simultaneously issuing collaborative cancellation notifications through the above methods, the real-time anomaly self-healing capability of the multi-player interactive system is realized. This solves the technical problem of participants being stuck for a long time due to the abnormal state of the initiator in related technologies. It ensures that under complex battlefield changes, the terminal of the participating character can reset the character state machine, release operation permissions and camera lens in milliseconds, which greatly guarantees the fairness and smoothness of the competitive game.
[0102] In some embodiments, the "controlling the second virtual character to join the target empty space and then execute a sub-action" in step 103 can be achieved as follows: control the second virtual character to perform a displacement operation pointing to the target empty space; when the second virtual character reaches the target empty space, switch the second virtual character's perspective from the combat perspective of the corresponding field of view to the standing perspective corresponding to the target empty space, and control the second virtual character to execute the sub-action corresponding to the target empty space in the standing perspective.
[0103] Among them, the combat perspective corresponding to the field of view refers to the conventional first-person or third-person perspective when the second virtual character is in normal game combat, which is freely controlled by the player through the input device. The positioning perspective refers to the fixed observation perspective parameters (camera position / preset perspective parameters) that are deeply bound to the target's empty space world coordinates and are pre-configured to show specific sub-actions and multi-person combination postures.
[0104] In practical applications, after receiving a successful occupation command from the server, the second virtual character terminal calculates the displacement trajectory from the current coordinates of the second virtual character to the center point coordinates of the target empty space, and drives the second virtual character to perform smooth movement (character displacement) along the displacement trajectory. When the second virtual character terminal detects that the Euclidean distance between the real-time physical coordinates of the second virtual character and the center point coordinates of the target empty space is less than or equal to a preset distance threshold (e.g., 0.1 meters), it determines that the second virtual character has reached the target empty space. The second virtual character terminal immediately blocks the input control chain of the second virtual character, interrupts the regular camera control logic, and the processor reads the preset positional viewpoint parameters (including the absolute coordinate offset of the camera in three-dimensional local space, the Euler angle of orientation, and the lens field of view) for the target empty space marker. Through a smooth interpolation function, the camera of the second virtual character is controlled to switch and align from the combat viewpoint of the corresponding field of view to the determined positional viewpoint parameters within a preset transition time (e.g., 0.25 seconds). Simultaneously, the second virtual character is controlled to play the sub-action loop animation corresponding to the target empty space, completing the adaptive fusion rendering of the camera and character movements.
[0105] Furthermore, in some embodiments, in response to the camera switching from a combat viewpoint to a stationary viewpoint, the second virtual character's terminal makes the crosshair transparent and hides it in the field of view; in response to the completion of the sub-action corresponding to the target empty position, the camera of the second virtual character is released from the system lock state. In other embodiments, in response to the camera aligning to the stationary viewpoint, depth detection and anti-occlusion ray detection (spherical ray detection) are activated; if an obstacle is detected in the scene on the camera's movement trajectory, the camera is controlled to automatically advance to a safe distance (e.g., 0.05 meters) in front of the scene obstacle to avoid clipping.
[0106] For example, see Figure 9 , Figure 9 This is a schematic diagram of the collaborative action provided in the embodiment of this application. After the second virtual character aims at the target empty space 901, the player of the second virtual character triggers the join control 902. In response to the join control being triggered, the terminal on the second virtual character side controls the second virtual character to automatically perform a smooth displacement pointing to the target empty space and walk into the corresponding target empty space 901 to display the joined second virtual character 903.
[0107] join Figure 10 , Figure 10This is a schematic diagram of perspective switching provided in an embodiment of this application. When the second virtual character reaches the center coordinates of the target empty space and stands still, the second virtual character's side terminal takes over camera control, restricting the player's free control of perspective input. The second virtual character's camera smoothly rotates from the combat perspective of the corresponding field of view (such as a conventional first-person perspective) and pulls back and upward, automatically switching to the preset standing perspective of the target empty space (such as a side-rear close-up camera position). Under the switched standing perspective, the overall model of the second virtual character is clearly displayed in the field of view, and it begins to execute the sub-action animation corresponding to the target empty space, thereby allowing the player to observe the corresponding combination posture with preset camera parameters.
[0108] By employing the above methods, an automated and smooth transition from the field of view to the preset standing position perspective is achieved, solving the technical problem of shooting games having a single perspective and being unable to observe the characters' collaborative performance. Utilizing the synchronized control of perspective changes and action triggers, close-up shots (synchronized standing position perspective) with artistic tension are presented to the user, significantly enhancing the sensory expressiveness and viewing experience of social interaction in 3D scenes.
[0109] In some embodiments, after the sub-actions performed by the first virtual character and the virtual characters that have joined each cooperative slot have been displayed, the camera controlling the second virtual character is restored from the standing view to the combat view, and all cooperative slots in the field of view are removed.
[0110] In practical applications, during the process of displaying the sub-actions performed by the first virtual character and the virtual characters that have joined each collaborative slot, the server continuously polls the current animation playback frame. When it is determined that the sub-actions performed by the first virtual character and the virtual characters that have joined each collaborative slot have been displayed synchronously (that is, the first virtual character and all participating virtual characters have played the combined pose animation together and reached the last frame), the server sends a cleanup command to the terminals of all participating virtual characters (clearing all slot information of the combined instance). Upon receiving the cleanup command, the second virtual character's terminal triggers local cleanup and state restoration logic: First, it calls the special effects destruction component to remove and destroy all collaborative empty space effects (such as ground aperture effects) rendered in the field of view from the scene objects, thus reclaiming memory; Second, it unlocks the camera's system lock and, through a smooth interpolation method, resets the second virtual character's camera from a standing perspective (preset perspective parameters) to a combat perspective (such as a regular first-person perspective); Third, it forcibly switches the second virtual character's animation controller from facial expression state back to a normal combat state and re-displays it in the prop models that were hidden during playback; Fourth, it removes the simple shielding of the second virtual character's input control chain, completely restoring the operation permissions for movement, jumping, and firing inputs, so that the second virtual character is fully restored to its initial state (referring to the normal combat posture in which the second virtual character was before participating in multi-person collaborative interaction, allowing the user to move freely and fire normally).
[0111] For example, when the alert formation of multiple characters finishes being displayed in the second virtual character's field of vision, in response to the logic event indicating completion, all green and yellow aura effects (cooperative empty spaces) rendered on the ground in the second virtual character's field of vision are instantly cleared and removed, restoring a clean ground scene. Simultaneously, the second virtual character's camera smoothly zooms in from a close-up standing perspective (side-back close-up), resetting to the corresponding combat perspective (normal first-person combat perspective). The second virtual character automatically retracts its formation and switches to a normal idle posture, previously hidden virtual items reappear, the player regains control of the second virtual character's movement, and the second virtual character is fully restored to its initial state before the formation.
[0112] Through the above methods, the camera view is automatically reset, ground effects are destroyed, and control is returned after the collaborative display is completed. This constructs a complete logical closed loop for multi-person collaborative interaction from initiation and interaction to safe exit. It solves the technical problem that it is difficult to reset the scene and state after the interaction ends. The millisecond-level state restoration ensures a seamless switch between social gameplay and hardcore combat, protects the player's survival probability in the competitive environment, and maintains a highly consistent game combat flow.
[0113] In some embodiments, after executing step 103, "controlling the second virtual character to join the target empty space and then perform a sub-action", in response to the second virtual character leaving the target empty space before receiving the synchronization display instruction, the display of the sub-action performed by the second virtual character in the target empty space is interrupted, and the target empty space is switched from an occupied state to an optional state.
[0114] In practical applications, after the second virtual character enters the target empty space and updates it to an occupied state, the second virtual character's terminal and the server maintain real-time state synchronization. Before receiving a synchronization display command, the second virtual character's terminal continuously detects the second virtual character's displacement input. If the detected displacement input causes the second virtual character's world coordinates to deviate from the target empty space's position coordinates by more than a preset distance threshold (e.g., 0.5 meters), the second virtual character's terminal determines that the second virtual character has actively left the target empty space. The second virtual character's terminal sends a position release request to the server. Upon receiving the position release request, the server verifies that the target collaborative action has not yet triggered synchronization display and performs a release operation, such as changing the target empty space's state from occupied to idle (optional), releasing the binding relationship between the second virtual character's identifier and the target empty space, and broadcasting the target empty space's update information to all virtual character's terminals within range. After receiving the update information, the second virtual character's terminal and the remaining virtual character's terminals within range re-instantiate and render the target empty space in an optional state (e.g., a green halo or a character model with first transparency) at the target empty space's world coordinates, completing the reset switch from occupied to optional state.
[0115] For example, after the second virtual character successfully enters the target empty space by clicking the join control, the glowing circle around the target empty space turns off from yellow, and the second virtual character performs a sub-action waiting animation within the target empty space. Before the server issues a synchronization display command, the second virtual character moves away from the target empty space due to combat needs. In response to the aforementioned departure, the sub-action waiting animation performed by the second virtual character in the target empty space is forcibly interrupted, and the second virtual character resumes free combat movement. At the same time, the previously extinguished target empty space reappears on the ground and returns to a green glowing circle, that is, it switches from an occupied state to an selectable state, allowing external virtual characters to re-aim and join.
[0116] By introducing a position rollback and reset mechanism for virtual characters leaving early, the technical problem of multiple players being locked in the preparation phase and unable to flexibly exit is solved. Real-time detection of displacement and triggering of state rollback broadcasts ensure logical consistency in a distributed state, allowing empty positions to be reopened to remaining players, thus improving the function's fault tolerance and flexibility in tactical environments.
[0117] In some embodiments, during the display of sub-actions performed by the first virtual character and the virtual characters that have joined each collaborative slot, in response to the trigger command of the second virtual character for a preset function key, the display of each sub-action is interrupted, and the second virtual character is controlled to return to the initial state before the first virtual character triggered the target collaborative action.
[0118] Among them, the preset function keys are pre-configured multiple regular combat operation keys that can trigger a forced interruption of cooperative actions and restore normal operation permissions. These include any input control used to control the virtual character to perform state changes, displacement, or trigger interface calls, such as at least one of the following: action wheel key, jump key, prone key, crouch key, attack key, throw key, sprint key, and aim key.
[0119] In practical applications, during the display of sub-actions, while the second virtual character side terminal blocks regular positional input, it continuously polls for input signals from preset function keys such as the action wheel, jump, prone, crouch, attack, throw, sprint, and aim. Upon detecting input signal from any preset function key, the second virtual character side terminal immediately interrupts local animation playback and sends an emergency interruption request to the server. Upon receiving the emergency interruption request, the server sets the state of the corresponding synchronized instance to destroyed and sends a linkage cancellation command to the first virtual character and the remaining participating virtual character side terminals. Simultaneously with sending the emergency interruption request, the second virtual character side terminal executes reset logic locally: it calls the animation controller to forcibly switch the character's action state to the basic motion tree, restores the rendering of hidden prop models, reactivates the regular first-person camera perspective logic, and removes input blocking, restoring the second virtual character to its initial state.
[0120] For example, see Figure 11 , Figure 11 This is a schematic diagram of the interrupt operation function area for collaborative interaction provided in this application embodiment. During the synchronous display of multi-person combined posture animation, the second virtual character's field of view renders the actions of each virtual character from a preset display position. At this time, if the player of the second virtual character clicks any preset function button in the interrupt operation function area, the second virtual character's side terminal instantly cuts off the current synchronous action display, and the viewpoint controlling the second virtual character immediately smoothly zooms in from a close-up view (such as the standing view mentioned above) and resets to the normal first-person view (i.e., combat view). At the same time, the second virtual character's character model (such as a character model carrying a prop backpack) reappears in the hands of the second virtual character, and the character animation jumps directly from the executed sub-action to the normal idle posture. The character's displacement and shooting control rights are instantly returned to the player, restoring the second virtual character to its initial state.
[0121] By providing a complete list of key interruption responses covering common operations (jumping, attacking, sprinting, etc.), a rapid and seamless "interrupt-combat" transition mechanism is achieved. This solves the pain points of related technical actions being locked and unable to cope with sudden attacks, ensuring that users can instantly switch back to the initial state and launch a counterattack when encountering danger, which significantly protects the player's survival probability in competitive situations.
[0122] In some embodiments, the "displaying the sub-actions performed by the first virtual character and the virtual characters that have joined each collaborative slot" in step 104 can be implemented as follows: when the synchronous display instruction is a timed instruction that includes the display start time, and the local system time has reached the display start time, the sub-actions performed by the first virtual character and the virtual characters that have joined each collaborative slot are displayed.
[0123] In practical applications, after participating virtual characters join a collaborative slot and execute a sub-action, the server continuously monitors the occupancy status of all collaborative slots corresponding to the target collaborative action. When the server detects that all collaborative slots are occupied (i.e., the number of participants has reached the preset number for the target collaborative action), it generates a synchronized display instruction carrying a unified display start time (i.e., a unified animation start frame timestamp). This synchronized display instruction is a timed instruction containing a display start time, instructing all participating virtual characters to display their respective sub-actions at the unified display start time. This instruction is then distributed to the first virtual character's side terminal, the second virtual character's side terminal, and other participating character's side terminals. Upon receiving the synchronized display instruction, the second virtual character's side terminal parses the unified animation start frame timestamp and compares it with its local system time. At the instant its local system time reaches the unified animation start frame timestamp (i.e., when its local system time reaches the display start time included in the timed instruction), it calls the animation controller to synchronously play the combined posture animation corresponding to the target collaborative action. This displays the sub-actions jointly executed by the first virtual character and the participating virtual characters who have joined each collaborative slot, thus presenting the combined posture animation corresponding to the target collaborative action.
[0124] To compensate for network latency differences in regular clients, a certain buffer delay can be preset. This buffer delay, added to the current local system time, yields the display start timestamp. For example, considering a four-player collaborative action, the server issues a synchronization display command at 20:00:00, carrying a display start timestamp of 20:00:00:150 milliseconds. Player B, with a good network connection, receives the synchronization display command at 20:00:00:20; Player C, with a poor network connection, receives the command at 20:00:00:120. However, both players' clients trigger the action playback instantaneously at 20:00:00:150, thus achieving perfect synchronization.
[0125] Furthermore, upon receiving the synchronization display instruction, while the local system time has not yet reached the display start time, the second virtual character terminal can preload character animations and lock resources. If the network connection is interrupted while waiting for the display start time, the second virtual character terminal can discard the synchronization display instruction and perform state restoration.
[0126] By introducing a unified display start time into the synchronous display command, alignment compensation based on global time is achieved, overcoming the problem of animation playback out-of-sync caused by physical network latency and terminal performance differences in related technologies. This ensures high-precision alignment of multi-person collaborative actions at the visual level, eliminates clipping and misalignment defects, and significantly improves the display accuracy and rendering quality of 3D combined poses.
[0127] For multi-person social actions with sequential or sequential narrative relationships (such as domino-like dances or progressively en-closing close-ups), if the sub-actions of each participating virtual character can only be started simultaneously, it will be impossible to present a narrative performance with a chronological order and a progression of importance, thus limiting the expressive depth and visual aesthetics of the social actions. Therefore, in some embodiments, the sub-actions performed by the first virtual character and the virtual characters joining each collaborative position can be displayed as follows: when the synchronous display instruction contains a preset display order for each sub-action in the target collaborative action, the sub-actions performed by the first virtual character and the virtual characters joining each collaborative position are displayed according to the preset display order (a list configured in the target collaborative action data structure specifying the sequential start order and delay duration of the sub-actions corresponding to each position on the timeline).
[0128] In practical applications, the second virtual character terminal parses the display start time and the preset display order data packets for each sub-action from the synchronization display instructions sent by the server. The preset display order data packets contain the start delay duration corresponding to each position. The second virtual character terminal determines the position identifier of the currently bound target empty position and obtains the corresponding start delay duration. The second virtual character terminal calculates the execution time of the corresponding sub-action (display start timestamp + start delay duration corresponding to the position). When the local system's current time reaches the execution time, the second virtual character terminal calls the animation controller to play the corresponding sub-action, while participating virtual characters whose execution time has not yet arrived remain in a waiting standby state until their respective execution time arrives, thus reproducing the preset sequential playback logic on the distributed system.
[0129] Furthermore, in some embodiments, in response to displaying each sub-action in a preset display order, the second virtual character side terminal can control the camera view of the second virtual character to smoothly follow the currently active character. In other embodiments, in response to the playback of the action of the previous position being interrupted prematurely due to an anomaly, the second virtual character side terminal automatically performs timeline alignment to smoothly accelerate the playback sequence of subsequent sub-actions.
[0130] For example, when a multi-person collaborative action begins to be displayed, the server does not control all virtual characters to dance at the same instant, according to the preset display order carried in the synchronization display instruction. For instance, firstly, the first virtual character performs the starting dance move in the center position; then, according to the preset display order intervals, the second virtual character, joining the left collaborative position, successively performs the following dance moves in the corresponding field of view; finally, the participating virtual characters in the right collaborative position continuously display the finishing dance moves, thus visually presenting a continuous, wave-like, or sequential sequence of actions.
[0131] By introducing preset display order control parameters into the synchronous display instructions, the distributed animation synchronization technology is upgraded from a single synchronous start-up to sequential control that supports time-series streaming playback. This method greatly enriches the narrative dimension of multiplayer social interaction, enabling actions to generate an organic logical sequence and coherent temporal expression, thereby enhancing the artistic expressiveness of multiplayer collaborative actions in the game.
[0132] After the group action is displayed, the current technology requires users to manually adjust the camera and find the screenshot button to capture the group photo. This method easily misses the most representative keyframe moments of the multi-person action. Furthermore, manual screenshotting often leaves behind complex interface elements such as battle icons, health bars, and maps, significantly impacting the aesthetics of the group photo. The key challenge in enhancing the social sharing value lies in automatically hiding the interface and capturing specific moments from the optimal preset angle without requiring manual player intervention, while providing convenient saving and social sharing mechanisms.
[0133] Therefore, in some embodiments, after the sub-actions performed by the first virtual character and the virtual characters that have joined each collaborative space have been displayed, the terminal automatically captures a target group photo containing the first virtual character and the virtual characters that have joined each collaborative space performing the sub-actions at a preset angle.
[0134] Among them, the target group photo is a screenshot image file of the action captured after the display is completed, using a preset cinematic camera angle and automatically hiding the game interface. It can be saved to the virtual album corresponding to the second virtual character, or shared to social media platforms by the player account corresponding to the second virtual character.
[0135] In practical applications, the processor of the second virtual character side terminal continuously monitors the current animation playback progress during operation. Upon detecting that all sub-actions have been displayed and the preset closing frame has been reached, the second virtual character side terminal pauses the current animation playback, makes all non-combat elements of the control interface rendering canvas layer invisible, adjusts the camera's matrix parameters to the preset viewing angle in the configuration file, calls the screenshot component of the graphics interface, reads the pixel data of the current frame buffer, and encodes and generates an image file of a specific format as the target group photo. Furthermore, in response to automatically capturing the target group photo, the second virtual character side terminal can automatically read the scene lighting parameters and automatically overlay the current match's season art watermark onto the target group photo.
[0136] After obtaining the target group photo, the second virtual character side terminal can automatically save the target group photo to the virtual album corresponding to the second virtual character (which is an album configured in the player's personal game system, used to store and display photos of the player's cooperative interaction moments in each game offline) or the local album of the second virtual character side terminal, and obtain the corresponding player account identifier, generate a sharing link data packet and send it to the social platform.
[0137] For example, see Figure 12 , Figure 12 This is a schematic diagram of the generation of a target group photo provided in an embodiment of this application. Figure 1 Taking a four-player cooperative action as an example, when the team's four-player cooperative action is completed and reaches its final curtain frame, at the moment of curtain call, the terminal automatically hides all non-game world interface elements in the field of view, such as health bars, maps, and crosshairs. The camera view in the field of view is automatically aligned to a preset angle, and a high-definition group photo of the target is automatically captured. A preview window of the group photo pops up in the lower right corner of the interface, displaying the "Save to Group Photo Album" and "Share to Social Media" buttons. Users can click to save or publish the group photo offline.
[0138] By introducing a hidden interface, movie camera alignment, and automatic encoding and cropping process after the animation finishes playing, the above method realizes the automated production of social interaction content. It solves the technical defects of manual screenshots, such as poor timeliness and easy retention of cluttered interfaces. It ensures that every group photo has a very beautiful composition and clean image quality, which greatly facilitates users' saving and secondary dissemination.
[0139] In some embodiments, during the process of displaying the sub-actions performed by the first virtual character and the virtual characters that have joined each collaborative space, in response to the trigger operation of entering the photo mode, a parameter adjustment control corresponding to the photo mode is displayed; in response to the parameter adjustment operation triggered by the parameter adjustment control, the rendering parameters indicating the adjustment of the parameter adjustment operation are displayed, and the rendering parameters include at least one of the following: camera angle (camera spatial rotation matrix), filter parameters (filter tone map), and special effects parameters (such as additional particle effects or sticker element parameters); in response to the photo trigger command, the captured display screen containing the first virtual character and the virtual characters that have joined each collaborative space performing sub-actions is rendered based on the rendering parameters to obtain the target group photo.
[0140] In practical applications, during the display of sub-actions, when the second virtual character side terminal detects a trigger command to enter photo mode, it controls the currently playing animation sequence to loop within a specific interval. The second virtual character side terminal loads and renders parameter adjustment controls on the interface canvas layer. When the player operates the parameter adjustment controls, the processor of the second virtual character side terminal modifies at least one of the following underlying rendering pipeline parameters: 1. Changing the affine transformation matrix of the main camera, causing the camera angle to translate or rotate; 2. Updating the tone mapping map of the post-processing volume and updating filter parameters; 3. Loading and running a specific particle system above the virtual character, updating special effects parameters. In response to the photo trigger command, the renderer calls the currently modified rendering pipeline parameters, performs pixel shading and post-processing effect overlay operations on the current frame buffer, and encodes and generates a customized target group photo file.
[0141] Furthermore, in response to entering photo mode, the second virtual character side terminal can automatically suspend in-game combat logic and send a "Do Not Disturb" signal to surrounding Kia virtual characters. Alternatively, in response to parameter adjustment operations exceeding preset safe physical limits, the second virtual character side terminal performs coordinate edge collision correction to restrict the camera from passing through walls.
[0142] For example, see Figure 13 , Figure 13 This is a schematic diagram of the generation of a target group photo provided in an embodiment of this application. Figure 2 Taking a four-person collaborative action as an example, during the synchronized action display by the team, the second virtual character clicks the camera icon on the side of the screen, responding to the operation of entering photo mode. The display animation enters a loop standby, and parameter adjustment controls slide out from both sides of the screen. Players can adjust the camera angle by sliding the slider, and the field of view rotates smoothly accordingly; players can switch filters, and the color tone changes from cool to warm yellow festive colors; players can also click the special effects control to add fireworks explosion effects to the participating virtual characters. After the player clicks the shutter, the terminal renders based on the aforementioned rendering parameters, generating a unique and personalized group photo.
[0143] By integrating interactive parameter adjustment controls into the demonstration process, the static viewing of actions is transformed into a photography system with a high degree of creative freedom, breaking the homogenization caused by uniform photography in related technologies. This allows users to fine-tune the image using post-processing and particle technology, creating unique group photos and significantly enhancing the personalization, artistic depth, and community engagement of the player collaboration experience.
[0144] In some embodiments, scoring parameters for the target group photo are determined, including at least one of the following: the number of virtual characters participating in the target group photo (i.e., the number of people), the completeness of each virtual character's execution of sub-actions in the target group photo, and the accuracy of each virtual character's position in the target group photo (the absolute error between the character's physical coordinates and the preset coordinates of the empty space); based on the scoring parameters, the target group photo is scored to obtain the target score.
[0145] In practical applications, after generating the target group photo, the second virtual character side terminal calls the scoring algorithm component to determine scoring parameters. For example, it reads the group photo instance data distributed by the server to obtain the total number of currently bound participating virtual characters as the participation quantity parameter; it checks the animation playback frames of the current first virtual character and participating virtual characters through a state machine, calculating the ratio of actual playback frames to the total number of animation frames as the completeness parameter; it calculates the distance deviation between the real-time world coordinates of each participating virtual character and the corresponding collaborative empty space's position coordinates, calculating the weighted reciprocal as the position accuracy parameter. The scoring algorithm component uses a preset weighted scoring formula to perform mathematical calculations to obtain the target score. After calculation, the second virtual character side terminal uploads the target score to the server to trigger the reward distribution logic. If the target score exceeds a preset maximum threshold, the second virtual character side terminal triggers a server-wide announcement and generates a limited watermark on the target group photo; if the target score is below the passing line, the second virtual character side terminal displays a realignment shooting suggestion on the interface.
[0146] That is, after automatically or manually capturing the target group photo, a rating animation pops up above the preview frame of the target group photo in the second virtual character's field of view. The rating system begins to scan and analyze the target group photo. First, the number of people scan shows a full participation bonus; next, the positioning accuracy scan shows a 99% alignment rate; finally, the perfect group photo rating lights up in the center of the interface, displaying the target score, while simultaneously awarding the second virtual character exclusive activity points and social badges on the side of the screen.
[0147] For example, taking a collaborative action involving four people as an example, the players completed a perfect four-person jigsaw puzzle photo. After the screenshot was generated, it was calculated that: the number of participating virtual characters was the full four, the sub-action playback progress reached 100%, and the physical error between the feet of all participating virtual characters and the center of the empty space was within 1 centimeter. The target score of 99 points was displayed on the screen, and each team member was rewarded with 50 social vouchers.
[0148] By introducing a multi-dimensional scoring mechanism and outputting a target score in the target group photo, an objective assessment and evaluation system driven by image and physical space logic is realized. This solves the problem of the lack of positive technical feedback and incentive mechanisms in social group photo gameplay in related technologies. It organically binds the simple aesthetic entertainment behavior with numerical rewards, significantly improving players' enthusiasm and sense of accomplishment in multiplayer collaborative gameplay.
[0149] In competitive or social scenarios involving multiple players on the same screen using related technologies, the number of empty seats is limited. When non-participating players view the aforementioned collaborative group photos, they can only watch from a distance with a normal free observation perspective, making it impossible to see the details clearly. This reduces the public entertainment value and reach of the collaborative interaction.
[0150] Therefore, in some embodiments, after the terminal controls the second virtual character to join the target empty space and execute a sub-action, in response to the second virtual character leaving the target empty space, the view of the second virtual character is switched from the view of the corresponding standing position to the view of watching the target collaborative action; accordingly, when the fourth virtual character joins the target empty space, the sub-actions executed by the first virtual character and the virtual characters that have joined each collaborative empty space can be displayed in the following manner: in the view, the sub-actions executed by the first virtual character and the virtual characters that have joined each collaborative empty space are displayed.
[0151] The fourth virtual character is one of the other virtual characters who is not the first virtual character and did not successfully occupy the target empty space after the second virtual character left the target empty space. The viewing angle is a special cinematic spectator position designed specifically for non-participants, anchored at the overall geometric center of the synchronized instance, and capable of providing a panoramic view of the sub-action playback and combined formations of all participating virtual characters.
[0152] After the second virtual character exits the target empty space, the second virtual character's terminal communicates with the server to unbind the second virtual character and release the target empty space to an idle state (i.e., selectable state). The second virtual character's terminal does not execute the usual view reset logic (i.e., it does not restore the view from a standing view to a combat view). Instead, it reads the viewing view parameters from the local configuration table (the viewing view is positioned at a preset distance in front of the first virtual character and looking down at the origin of the group photo coordinates). Through camera interpolation control, it switches and locks the second virtual character's camera to the viewing view. The server receives the fourth virtual character's join request packet. If the occupancy is successful, it resets the target empty space to an occupied state, binds the fourth virtual character's identifier, and triggers a synchronous display command when all cooperative empty spaces are occupied. While in the viewing view state, the second virtual character's terminal does not play local sub-actions but maintains mesh rendering. It renders the sub-action animation data packets received from the server, forwarded by the first, fourth, and remaining participating virtual characters, in real-time from the viewing view, displaying the entire synchronized playback process of the combined pose.
[0153] See Figure 14 , Figure 14 This is a schematic diagram illustrating the synchronized display of a target collaborative action provided in this application embodiment. Taking a four-person collaborative action as an example, during the preparation period for the four-person group photo action, the second virtual character enters the target empty space (corresponding to the standing position perspective) and then exits the target empty space. In response to the operation of exiting the target empty space, the terminal on the second virtual character's side controls the second virtual character to resume a free movement state. However, the camera of the second virtual character does not revert to the conventional first-person combat perspective, but smoothly zooms out and switches to a viewing perspective that can take in the whole panorama. Subsequently, when the fourth virtual character actively joins the target empty space, and all collaborative empty spaces have virtual characters joining, the second virtual character's field of vision displays, in real time, a close-up viewing perspective, the continuous and synchronized sub-action screen jointly performed by the first virtual character, the fourth virtual character, and the remaining fifth and sixth virtual characters.
[0154] By switching to a special spectator perspective when participants exit or do not directly participate in the interaction, the audience for collaborative actions is expanded from participants only to all non-participants in the game. This solves the limitations of related technologies, such as obstructed spectator perspectives and non-participants' inability to view group photos of others. It significantly enhances the in-game spectator interactivity and the reach of social content, providing solid technical support for game content creation and spectator systems.
[0155] The following will describe an exemplary application of the embodiments of this application in a real-world scenario. Taking the collaborative implementation of the initiator terminal, participant terminals, and server as an example, the collaborative interaction method of virtual characters provided in the embodiments of this application will continue to be described.
[0156] See Figure 16 , Figure 16 This is a flowchart illustrating a collaborative interaction method for virtual characters provided in an embodiment of this application. The method includes: Step 201: In response to the selection operation for the target collaborative action, the initiator terminal generates and sends a collaboration initiation request to the server.
[0157] In a shooting game match, the player controlling the first virtual character (the initiator) opens the action wheel through the initiator terminal (i.e. the first virtual character side terminal mentioned above), and triggers the target cooperative action (such as a 4-person cooperative action) in the action wheel that requires multiple people to cooperate. Then, the initiator terminal generates and sends a cooperative initiation request to the server, carrying the action identifier of the target cooperative action and the real-time coordinates of the first virtual character.
[0158] Step 202: The server generates multiple collaborative spaces around the first virtual character based on the real-time location of the first virtual character and the preset position offset parameters for the target collaborative action, and distributes the multiple collaborative spaces to the participants' terminals through collaborative prompt information.
[0159] Here, after receiving a collaboration request, the server verifies the current state of the first virtual character. If the first virtual character is in a legal state of being neither in combat nor under attack, the server determines the target collaboration action based on the action identifier carried in the collaboration request, creates a collaboration instance for the target collaboration action, and obtains the preset position offset parameters for the target collaboration action. Then, based on the real-time coordinates of the first virtual character and the position offset parameters (i.e., the coordinate offset of each empty space relative to the initiator), the server determines the world coordinates of the remaining 3 collaboration empty spaces, and generates 3 collaboration empty spaces around the first virtual character according to the calculated world coordinates. Finally, the determined collaboration empty spaces are distributed to other virtual character terminals in the virtual scene (which can be player terminals of the same lineup or player terminals of different lineups) through collaboration prompt information.
[0160] It should be noted that when the initiator (i.e. the first virtual character) leaves or falls down during the execution of the target collaborative action, the server immediately cancels the collaborative instance for the target collaborative action and sends a cancellation notification to all participating terminal terminals. After receiving the cancellation notification, the participating terminal removes all collaborative slots and restores the participants to their initial state (i.e., combat state).
[0161] Step 203: The participant's terminal determines whether the distance between the second virtual character and the first virtual character is less than or equal to the preset visual distance.
[0162] Here, after the server distributes the collaborative space to other virtual character side terminals in the virtual scene through collaborative prompt information, taking the second virtual character side terminal as an example of a participant terminal, the second virtual character side terminal determines whether the real-time distance between the second virtual character and the first virtual character is less than or equal to the preset visible distance (which refers to the maximum distance threshold that limits the visibility of the collaborative space, and can be set according to actual needs, such as 30 meters).
[0163] If the distance between the second virtual character and the first virtual character is greater than the preset viewing distance, then proceed to step 204; if the distance between the second virtual character and the first virtual character is less than or equal to the preset viewing distance, then proceed to step 205.
[0164] Step 204: The participant's terminal hides the collaborative empty space in the second virtual character's field of view and controls the movement of the second virtual character.
[0165] That is, when the distance between the second virtual character and the first virtual character is greater than the preset viewing distance, the collaborative actions controlled by the terminal on the first virtual character side are invisible in the field of view of the second virtual character. At the same time, as the game progresses, the terminal on the first virtual character side controls the second virtual character to move in the game scene, and detects in real time whether the distance between the second virtual character and the first virtual character is less than or equal to the preset viewing distance.
[0166] Step 205: The participant's terminal displays the available collaborative slots in the view of the second virtual character.
[0167] The optional state refers to the visual state when the collaborative space is not occupied by any virtual character and is in an optional state. For example, the visual state of a collaborative space in an optional state is displayed as a green halo or a character model with a preset first transparency (such as 0.3) in the virtual scene.
[0168] In addition, the participant's terminal can also determine whether the distance between the second virtual character and each collaborative empty space is less than or equal to the preset interactive distance (which refers to the maximum physical distance at which the second virtual character is allowed to interact with the collaborative empty space, usually less than the preset visual distance, and can be set according to actual needs, such as 5 meters). When the distance between the second virtual character and the collaborative empty space is less than or equal to the preset interactive distance, a position identifier (such as a character silhouette icon) is displayed in that collaborative empty space to indicate which position in the target collaborative action the collaborative empty space corresponds to.
[0169] For example, see Figure 15 , Figure 15This is a schematic diagram of the display of the position identifier of the collaborative space provided in the embodiment of this application. Taking the aperture to represent the collaborative space as an example, if the distance between the second virtual character and the collaborative space is less than or equal to the preset interactive distance, the corresponding character silhouette icon of the collaborative space is highlighted as the position identifier of the collaborative space.
[0170] Step 206: The participant's terminal determines whether the crosshair of the second virtual character is aligned with the target empty space.
[0171] When the second virtual character enters a preset interactive distance, the second virtual character's terminal performs a crosshair ray detection in each logical frame. The crosshair ray detection emits a physical ray along the viewport from the center of the second virtual character's camera or the center of the virtual shooting prop it holds, to determine the physical collider of the crosshair ray hitting the target empty space (which is any one of multiple cooperative empty spaces).
[0172] If the crosshair ray does not hit the physical collider of the target empty space, it is considered that the crosshair of the second virtual character is not aligned with the target empty space. Then, step 205 is executed. That is, if the crosshair ray does not hit any cooperative empty space collider, the terminal control of the second virtual character side will keep all cooperative empty spaces in the selectable state and will not display the add control.
[0173] If the crosshair ray hits a physical collider in the empty space of the target, it is assumed that the crosshair of the second virtual character is aligned with the empty space of the target, and then step 207 is executed.
[0174] Step 207: The participant's terminal controls the target empty space to change from an optional state to a selected state, and displays the add control.
[0175] Here, when the crosshair of the second virtual character is aligned with the target empty space, the terminal on the second virtual character side triggers the state change logic of the target empty space, controlling the target empty space to be updated from the optional state to the selected state within a preset transition time (configurable, such as 0.2 seconds).
[0176] For example, using an aperture to represent a target empty space, when the crosshair of the second virtual character is aligned with the target empty space, the material color of the aperture corresponding to the target empty space smoothly transitions from green (indicating an optional state) to yellow (indicating a selected state) within 0.2 seconds, thus updating the target empty space from an optional state to a selected state. Similarly, when using a character model with preset transparency to represent a target empty space, controlling the transparency of the character model to smoothly transition from a first transparency (e.g., 0.3) to a second transparency (e.g., 0.8) within 0.2 seconds, thus updating the target empty space from an optional state to a selected state.
[0177] At the same time, a join control pops up in the center of the screen. The join control is an interactive button that is displayed on the second virtual character terminal screen and can be triggered by the player to join the target cooperative action.
[0178] Understandably, when the second virtual character's crosshair ray does not hit any cooperative empty space, all cooperative empty spaces remain selectable, such as still representing each cooperative empty space with a green aperture or a character model with the first level of transparency. When the second virtual character's crosshair ray hits a target empty space and then moves away from it, the target empty space is updated from selected to selectable (e.g., the material color of the aperture representing the target empty space is changed from yellow to green, or the transparency of the character model representing the target empty space is changed from the second level of transparency to the first level of transparency), while the displayed join control is hidden.
[0179] Step 208: In response to the triggering operation of the join control, the participant terminal sends a participation collaboration request to the server.
[0180] Here, when the distance between the second virtual character and the target empty space is less than or equal to the preset interactive distance, the player of the second virtual character performs a valid trigger operation on the join control. The terminal on the second virtual character side responds to the trigger operation by sending a participation collaboration request carrying the target empty space identifier and collaboration timestamp to the server.
[0181] Step 209: The server determines whether the target empty space has been occupied.
[0182] After receiving a collaboration request, the server verifies the real-time status of the target empty slot based on the target empty slot identifier and collaboration timestamp carried in the collaboration request, as well as atomic operations in the database. If the verification shows that the target empty slot is already occupied, proceed to step 210. If the verification shows that the target empty slot is not occupied, proceed to step 212.
[0183] Step 210: The server returns a "location already in use" error code to the participant's terminal.
[0184] Step 211: The participant's terminal displays a prompt that the target empty space has been occupied, and hides the join control.
[0185] Here, after the participant's terminal receives an error code from the server indicating that the target slot is already occupied, a message pops up on the screen indicating that the slot is already taken, and the join control is hidden. In this case, the second virtual character can continue to try to aim at and join other cooperative slots.
[0186] Step 212: The server performs atomic locking, marks the target empty slot as occupied, binds the identifier of the second virtual role to the target empty slot, and returns a successful occupancy instruction to the participant's terminal.
[0187] Here, if the server verifies that the target empty slot is not occupied, it performs an atomic lock, marks the target empty slot as occupied, binds the identifier of the second virtual character to the target empty slot, returns a successful occupancy command to the second virtual character's terminal, and broadcasts the target empty slot occupancy update to other virtual character terminals in the vicinity.
[0188] Step 213: The participant's terminal controls the second virtual character to move to the target empty space and then executes a sub-action, updating the target empty space from the selected state to the occupied state.
[0189] Here, after receiving the successful occupancy command, the second virtual character's terminal automatically performs a displacement operation pointing to the target empty space's coordinates. This causes the second virtual character to automatically move to the target empty space. Once there, the second virtual character begins executing the corresponding sub-action, updating the target empty space from a selected state to an occupied state. The occupied state indicates that the target empty space has been successfully locked and bound by the second virtual character. An occupied target empty space will be closed to other virtual characters, no longer accepting new join requests. In this way, the real-time location occupancy detection mechanism effectively prevents abnormal behavior caused by multiple people simultaneously occupying the same location, ensuring the stability and consistency of the collaboration process.
[0190] At the same time, the second virtual character side terminal automatically switches the camera view of the second virtual character to the preset view parameters (such as automatically switching the camera view in the second virtual character's field of view from the conventional first-person combat view to the preset position view for the target empty space).
[0191] Through steps 203 to 213 above, the second virtual character successfully joined the target empty slot.
[0192] It should be noted that if the second virtual character who joins the target empty slot leaves the target empty slot before the target collaborative action is displayed, the server will re-mark the target empty slot as unoccupied (that is, update the target empty slot from occupied to available) and broadcast the update, and the target empty slot can be rejoined by other virtual characters.
[0193] Step 214: Once the server determines that all available collaborative slots are occupied, it sends a synchronization display command to the participants' terminals.
[0194] Here, the server continuously monitors whether all remaining collaboration slots are occupied. If it detects that some collaboration slots are still unoccupied (i.e., the number of participants has not reached the total number required for the target collaboration action), it continues to wait for participating virtual characters to join the unoccupied collaboration slots. When it detects that all collaboration slots are occupied (i.e., the number of participants has reached the total number required for the target collaboration action), the server sends a synchronization display command to all participant terminals (including the initiator terminal). The synchronization display command carries a unified animation start frame timestamp.
[0195] Step 215: The participant's terminal responds to the synchronous display command and displays all the sub-actions performed by the participating virtual characters.
[0196] Here, after receiving the synchronization display command, the terminals of each participating virtual character load the corresponding sub-action animation resources according to their respective position identifiers. After aligning with a unified timestamp, the sub-action animations executed by all participating virtual characters (including the first virtual character as the initiator and the other three virtual characters as participants) are displayed synchronously. After the animation playback is complete, the server clears all empty space information of the target collaborative action instance, the empty space effects are removed from the participant terminals, and the participant characters are restored to their state before synchronization.
[0197] Through steps 201-215 above, the participation and display of multi-person collaborative actions are realized.
[0198] By introducing multiplayer action categorization and ground space visualization mechanisms into the action wheel, players can intuitively initiate and join multiplayer cooperative actions from a first-person perspective in shooting games. Participants can clearly see where they should stand, significantly reducing communication costs and operational barriers for multiplayer cooperative actions, and solving the problem of lack of spatial guidance in related technologies. The design of triggering interaction upon aiming fully utilizes the existing aiming habits of shooting game players, making cooperative action interaction operations require no additional learning cost, maintaining consistency with the core game operation logic, and lowering the learning curve. The process of "initiating an invitation → waiting for confirmation" in related technologies is simplified to a one-step operation of "seeing an empty space → aiming → clicking to join," greatly improving the smoothness of multiplayer cooperative interaction.
[0199] Furthermore, this application's embodiments employ a decoupled technical architecture based on dynamic retrieval of server configuration tables and spatial matrix calculation when constructing and rendering collaborative spaces. For any total number (denoted as N) of target collaborative actions, the underlying logic does not need to hardcode the absolute physical coordinate nodes of each collaborative action. Instead, it dynamically obtains the preset total number of participants threshold N for the target collaborative action and N-1 local position offset parameters for each participant by reading the configuration file corresponding to the target collaborative action when triggering a collaborative initiation request. During operation, the processor uses only the real-time world coordinates of the first virtual character (initiator) as the calculation origin, combines it with its current orientation angle to construct a local affine transformation matrix, and then uses matrix multiplication to calculate the world coordinates of the required number of N-1 collaborative spaces in real time. Finally, the terminal's animation controller dynamically loads and matches N sub-action skeletal animation resources based on the position identifiers corresponding to each collaborative space. Because the above-mentioned spatial array generation mechanism for collaborative spaces is highly parameterized and relies entirely on the dynamically issued offset array length and animation resource identifiers for instantiation. Therefore, when new multiplayer pose combinations need to be added, developers or configuration personnel only need to add or modify offset entries and corresponding action identifiers in the action configuration table on the server side. The client-side underlying ray detection, atomic state locking, and timestamp-based synchronization pipeline can automatically handle the spatial arrangement expansion from 2 players, 3 players to any number of players. This achieves the technical effect of flexible configuration and zero-cost expansion of various pose combinations from 2 players to multiple players without modifying the underlying core logic code. It has good scalability; by configuring different number of participants, empty space coordinates, and action animations, various pose combinations can be supported, enriching the forms of social interaction within the game, enhancing the collaborative experience and emotional connection between players, and playing a positive role in improving the game's social stickiness and user retention. It also provides rich expressiveness and long-term operational content expansion space for the game's social system.
[0200] The exemplary application and implementation of the electronic device provided in the embodiments of this application have been used to illustrate the collaborative interaction method of virtual characters provided in the embodiments of this application. The following will continue to describe the cooperation of various modules in the collaborative interaction device 555 of virtual characters provided in the embodiments of this application to realize the collaborative interaction scheme of virtual characters.
[0201] The empty space display module 5551 is used to respond to a collaboration prompt message triggered for a first virtual character to initiate a target collaboration action, and to display multiple available collaboration empty spaces in the field of view of the second virtual character when the second virtual character enters a preset perception range; the empty space selection module 5552 is used to align the crosshair of the second virtual character with the target empty space among the multiple collaboration empty spaces, update the target empty space from the available state to the selected state, and display the add control corresponding to the target collaboration action; the empty space addition module 5553 is used to respond to a trigger operation on the add control, control the second virtual character to add the target empty space and execute a sub-action, and update the target empty space from the selected state to the occupied state; the synchronous display module 5554 is used to respond to a synchronous display instruction received when all the collaboration empty spaces are in the occupied state, and to display the sub-actions executed by the first virtual character and the virtual characters added to each of the collaboration empty spaces.
[0202] In some embodiments, the empty space display module 5551 is further configured to display multiple halos of a first color in the field of view of the second virtual character; wherein, one halos corresponds to one cooperative empty space, and the first color indicates that the cooperative empty space corresponding to the corresponding halos is in an selectable state; the empty space addition module 5553 is further configured to control the material color of the target halos corresponding to the target empty space to be updated from the first color to the second color, and the second color indicates that the target empty space is in a selected state.
[0203] In some embodiments, the empty space display module 5551 is further configured to display multiple character models with a first transparency in the field of view of the second virtual character; wherein, one character model corresponds to one cooperative empty space, and the first transparency indicates that the cooperative empty space corresponding to the corresponding character model is in an selectable state; the empty space addition module 5553 is further configured to control the transparency of the target character model corresponding to the target empty space to be updated from the first transparency to the second transparency, and the second transparency indicates that the target empty space is in a selected state.
[0204] In some embodiments, the empty space selection module 5552 is further configured to display a join control corresponding to the target collaborative action at the associated position of the target empty space, wherein the join control includes at least one of the following elements: text guiding the joining of the target empty space; an entry icon for triggering the target collaborative action, the entry icon including a character silhouette and the total number of virtual characters required to complete the target collaborative action; and the theme element of the target theme when the target collaborative action is triggered by the first virtual character among multiple collaborative actions recommended based on the target theme.
[0205] In some embodiments, after the addition control associated with the target empty space is displayed, the empty space selection module 5552 is used to control the target empty space to return from the selected state to the selectable state in response to the crosshair of the second virtual character moving away from the target empty space, and to hide the addition control.
[0206] In some embodiments, the empty space selection module 5552 is further configured to respond to a trigger operation on the add control, and to display a position occupancy prompt, hide the add control, and restore the target empty space from the selected state to the selectable state when the target empty space has been occupied by the third virtual character, or to display the sub-action performed by the third virtual character in the target empty space.
[0207] In some embodiments, the empty space display module 5551 is further configured to display a target area for performing the target collaborative action in the field of view of the second virtual character; display the first virtual character performing the sub-action at a first position in the target area, and display multiple collaborative empty spaces at multiple second positions in the target area; wherein the distribution of the first position and the multiple second positions corresponds to the standing position of each sub-action in the target collaborative action.
[0208] In some embodiments, after multiple collaborative spaces are displayed in the field of view of the second virtual character, the space display module 5551 is further configured to display a corresponding position identifier at the associated position of each collaborative space when the second virtual character enters the preset interaction range corresponding to each collaborative space; wherein the preset interaction range is located within the preset perception range, and the position identifier indicates the position and sub-action of the collaborative space in the target collaborative action.
[0209] In some embodiments, after multiple cooperative empty slots are displayed in the field of view of the second virtual character, the device further includes: a cooperative cancellation module, configured to remove all the cooperative empty slots in the field of view and control the second virtual character to return to the initial state before the first virtual character triggered the target cooperative action when a cooperative cancellation notification is received when the first virtual character performs a cooperative interruption; wherein the cooperative interruption includes at least one of the following: the first virtual character leaves the position where the target cooperative action was triggered during the cooperative process; the first virtual character enters a knocked-down state due to its health value decreasing to a preset threshold; the first virtual character executes an operation command that conflicts with the target cooperative action; the first virtual character enters a stun state after being hit; or the scene environment in which the first virtual character is located undergoes abnormal changes.
[0210] In some embodiments, the empty space addition module 5553 is further configured to control the second virtual character to perform a displacement operation pointing to the target empty space; when the second virtual character reaches the target empty space, the view of the second virtual character is switched from the combat view corresponding to the field of view to the standing view corresponding to the target empty space, and the second virtual character is controlled to perform the sub-action corresponding to the target empty space under the standing view.
[0211] In some embodiments, the device further includes: a state recovery module, configured to, after the sub-actions performed by the first virtual character and the virtual characters that have joined each of the cooperative slots have been displayed, control the camera of the second virtual character to be restored from the standing view to the combat view, and remove all the cooperative slots in the field of view.
[0212] In some embodiments, after the second virtual character joins the target empty space and performs a sub-action, the device further includes: a collaboration exit module, configured to interrupt the display of the sub-action performed by the second virtual character in the target empty space and switch the target empty space from an occupied state to an optional state in response to the second virtual character leaving the target empty space before receiving the synchronization display instruction.
[0213] In some embodiments, the state recovery module is further configured to, during the process of displaying the sub-actions performed by the first virtual character and the virtual characters that have joined each of the collaborative slots, respond to a trigger command from the second virtual character to a preset function key, interrupt the display of each of the sub-actions, and control the second virtual character to return to the initial state before the first virtual character triggered the target collaborative action; wherein, the preset function key includes any input control for controlling the second virtual character to perform state changes, displacement, or trigger interface calls.
[0214] In some embodiments, the synchronization display module 5554 is further configured to display the sub-actions performed by the first virtual character and the virtual characters that have joined each of the collaborative slots when the synchronization display instruction is a timed instruction that includes a display start time and the local system time reaches the display start time.
[0215] In some embodiments, the synchronization display module 5554 is further configured to display the sub-actions performed by the first virtual character and the virtual characters that have joined each of the collaboration slots in accordance with the preset display order when the synchronization display instruction is an instruction that includes a preset display order for each sub-action in the target collaborative action.
[0216] In some embodiments, the device further includes: a screenshot processing module, configured to automatically capture a target group photo containing the first virtual character and the virtual characters that have joined each of the cooperative slots performing the sub-actions at a preset angle after the sub-actions performed by the first virtual character and the virtual characters that have joined each of the cooperative slots have been displayed; wherein the target group photo is to be saved to the virtual album corresponding to the second virtual character, or to be shared to a social platform by the player account corresponding to the second virtual character.
[0217] In some embodiments, the device further includes: a photo processing module, configured to, during the process of displaying the sub-actions performed by the first virtual character and the virtual characters added to each of the collaborative spaces, in response to a trigger operation to enter a photo mode, display parameter adjustment controls corresponding to the photo mode; in response to a parameter adjustment operation triggered based on the parameter adjustment controls, display rendering parameters indicated by the parameter adjustment operation, the rendering parameters including at least one of the following: camera angle, filter parameters, and special effects parameters; and in response to a photo trigger command, render the captured display screen containing the first virtual character and the virtual characters added to each of the collaborative spaces performing sub-actions based on the rendering parameters to obtain a target group photo.
[0218] In some embodiments, the apparatus further includes: a collaborative evaluation module, configured to determine scoring parameters for the target group photo, the scoring parameters including at least one of the following: the number of virtual characters participating in the target group photo, the completeness of each virtual character in the target group photo performing the sub-action, and the accuracy of the positioning of each virtual character in the target group photo; and to score the target group photo based on the scoring parameters to obtain a target score.
[0219] In some embodiments, after the second virtual character joins the target empty space and performs a sub-action, the synchronous display module 5554 is further configured to, in response to the second virtual character leaving the target empty space, switch the second virtual character's perspective from a standing perspective to a viewing perspective for watching the target collaborative action; when a fourth virtual character joins the target empty space, the sub-actions performed by the first virtual character and the virtual characters that have joined each of the collaborative empty spaces are displayed in the viewing perspective.
[0220] This application provides a computer program product, which includes a computer program or computer-executable instructions stored in a computer-readable storage medium. The processor of an electronic device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, causing the electronic device to perform the virtual character collaborative interaction method described above in this application.
[0221] 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 collaborative interaction method for virtual characters provided in this application. For example, ... Figure 3 The collaborative interaction method of the virtual characters is shown.
[0222] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, 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.
[0223] 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.
[0224] 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 HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple co-located files (e.g., a file that stores one or more modules, subroutines, or code sections).
[0225] 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.
[0226] 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 collaborative interaction method for virtual characters, characterized in that, The method includes: When a collaboration prompt is received from the first virtual character in response to a collaborative action, and the second virtual character enters the preset perception range, multiple available collaboration slots are displayed in the field of view of the second virtual character. In response to the second virtual character's crosshair aligning with the target empty space among the plurality of collaborative empty spaces, the target empty space is updated from the optional state to the selected state, and the add control corresponding to the target collaborative action is displayed; In response to the trigger operation of the add control, the second virtual character is controlled to perform a sub-action after being added to the target empty space, and the target empty space is updated from the selected state to the occupied state; In response to a synchronization display instruction received when all said collaborative slots are occupied, the sub-actions performed by the first virtual character and the virtual characters that have joined each of the said collaborative slots are displayed.
2. The method according to claim 1, characterized in that, The multiple available cooperative slots displayed in the view of the second virtual character include: In the field of view of the second virtual character, multiple halos of a first color are displayed; wherein, one halos corresponds to one cooperative slot, and the first color indicates that the cooperative slot corresponding to the halos is available. The step of updating the target empty space from the optional state to the selected state includes: The material color of the target aperture corresponding to the target empty space is updated from the first color to the second color, and the second color indicates that the target empty space is selected.
3. The method according to claim 1, characterized in that, The multiple available cooperative slots displayed in the view of the second virtual character include: In the field of view of the second virtual character, multiple character models with a first transparency are displayed; wherein, one character model corresponds to one cooperative slot, and the first transparency indicates that the cooperative slot corresponding to the corresponding character model is in an selectable state; The step of updating the target empty space from the optional state to the selected state includes: The transparency of the target character model corresponding to the target empty space is updated from the first transparency to the second transparency, whereby the second transparency indicates that the target empty space is selected.
4. The method according to claim 1, characterized in that, The control that displays the joining action corresponding to the target collaborative action includes: At the associated location of the target empty space, a join control corresponding to the target collaborative action is displayed, wherein the join control includes at least one of the following elements: Guide the text to be added to the target empty space; An entry icon that triggers the target collaborative action, the entry icon including a character silhouette and the total number of virtual characters required to complete the target collaborative action; When the target collaborative action is triggered by the first virtual character among multiple collaborative actions recommended based on the target theme, the theme element of the target theme.
5. The method according to claim 1, characterized in that, After displaying the join control associated with the target empty space, the method further includes: In response to the second virtual character's crosshair moving away from the target empty space, the target empty space is controlled to return from the selected state to the selectable state, and the add control is hidden.
6. The method according to claim 1, characterized in that, The method further includes: In response to a trigger operation on the add control, if the target empty space is already occupied by a third virtual character, display a position occupancy prompt, hide the add control, and restore the target empty space from the selected state to the selectable state, or display the sub-action performed by the third virtual character in the target empty space.
7. The method according to claim 1, characterized in that, The multiple available cooperative slots displayed in the view of the second virtual character include: The target area for performing the target collaborative action is displayed in the view of the second virtual character; The first virtual character performing the sub-action is displayed at a first position in the target area, and multiple cooperative slots in an optional state are displayed at multiple second positions in the target area; The distribution of the first position and the plurality of second positions corresponds to the standing position of each sub-action in the target collaborative action.
8. The method according to claim 1, characterized in that, After displaying multiple available cooperative slots in an selectable state in the second virtual character's field of view, the method further includes: When the second virtual character enters the preset interaction range corresponding to each of the collaborative spaces, the corresponding position identifier is displayed at the associated position of each of the collaborative spaces; The preset interaction range is located within the preset perception range, and the position identifier indicates the position and sub-action of the collaborative space in the target collaborative action.
9. The method according to claim 1, characterized in that, After displaying multiple available cooperative slots in an selectable state in the second virtual character's field of view, the method further includes: Upon receiving a collaboration cancellation notification triggered when the first virtual character interrupts collaboration, remove all empty collaboration slots in the field of view and restore the second virtual character to its initial state before the first virtual character triggered the target collaboration action; The collaboration interruption behavior includes at least one of the following: The first virtual character leaves the position where it was when the target collaborative action was triggered during the collaboration process; The first virtual character falls to the ground due to its health points dropping to a preset threshold. The first virtual character executed an operation command that conflicted with the target's collaborative action; The first virtual character enters a stunned state upon being hit; The environment in which the first virtual character is located has undergone abnormal changes.
10. The method according to claim 1, characterized in that, The step of controlling the second virtual character to join the target empty slot and then execute a sub-action includes: Control the second virtual character to perform a displacement operation pointing towards the target empty space; When the second virtual character reaches the target empty space, the perspective of the second virtual character is switched from the combat perspective corresponding to the field of view to the standing perspective corresponding to the target empty space, and the second virtual character is controlled to perform the sub-action corresponding to the target empty space under the standing perspective.
11. The method according to claim 10, characterized in that, The method further includes: After the first virtual character and the virtual characters that have joined each of the cooperative slots have finished performing the sub-actions, the camera controlling the second virtual character is restored from the standing view to the combat view, and all the cooperative slots in the field of view are removed.
12. The method according to claim 1, characterized in that, After the second virtual character joins the target empty space and executes a sub-action, the method further includes: In response to the second virtual character leaving the target empty space before receiving the synchronization display instruction, the display of the sub-action performed by the second virtual character in the target empty space is interrupted, and the target empty space is switched from the occupied state to the selectable state.
13. The method according to claim 1, characterized in that, The method further includes: During the process of displaying the sub-actions performed by the first virtual character and the virtual characters that have joined each of the cooperative slots, in response to the trigger command of the second virtual character for the preset function key, the display of each of the sub-actions is interrupted, and the second virtual character is controlled to return to the initial state before the first virtual character triggered the target cooperative action. The preset function keys include any input control used to control the second virtual character to perform state changes, displacement, or trigger interface calls.
14. The method according to claim 1, characterized in that, The sub-actions performed by the first virtual character and the virtual characters joining each of the cooperative slots include: When the synchronization display instruction is a timed instruction that includes a display start time, and the local system time reaches the display start time, the sub-actions performed by the first virtual character and the virtual characters that have joined each of the cooperative slots are displayed.
15. The method according to claim 14, characterized in that, The sub-actions performed by the first virtual character and the virtual characters joining each of the cooperative slots include: When the synchronous display instruction includes a preset display order for each sub-action in the target collaborative action, the sub-actions performed by the first virtual character and the virtual characters added to each of the collaborative slots are displayed according to the preset display order.
16. The method according to claim 1, characterized in that, The method further includes: After the sub-actions performed by the first virtual character and the virtual characters added to each of the cooperative spaces have been displayed, a target group photo containing the first virtual character and the virtual characters added to each of the cooperative spaces performing the sub-actions is automatically captured at a preset angle. The target group photo can be saved to the virtual album corresponding to the second virtual character, or shared to a social media platform by the player account corresponding to the second virtual character.
17. The method according to claim 1, characterized in that, The method further includes: During the process of displaying the sub-actions performed by the first virtual character and the virtual characters that have joined each of the cooperative slots, in response to the trigger operation of entering the photo mode, the parameter adjustment controls corresponding to the photo mode are displayed. In response to a parameter adjustment operation triggered by the parameter adjustment control, the rendering parameters to be adjusted by the parameter adjustment operation are displayed, the rendering parameters including at least one of the following: camera angle, filter parameters, and special effects parameters; In response to the photo-taking trigger command, the captured display screen containing the first virtual character and the virtual characters added to each of the cooperative spaces is rendered based on the rendering parameters to obtain the target group photo.
18. The method according to claim 16 or 17, characterized in that, The method further includes: Determine the scoring parameters for the target group photo, the scoring parameters including at least one of the following: the number of virtual characters participating in the target group photo, the completeness of each virtual character in the target group photo performing the sub-action, and the accuracy of the positioning of each virtual character in the target group photo; Based on the scoring parameters, the target group photo is scored to obtain the target score.
19. The method according to claim 1, characterized in that, After the second virtual character joins the target empty space and executes a sub-action, the method further includes: In response to the second virtual character leaving the target empty space, the second virtual character's perspective is switched from a standing perspective to a viewing perspective of watching the target's collaborative actions; When a fourth virtual character joins the target empty slot, the sub-actions performed by the first virtual character and the virtual characters joining each of the cooperative empty slots include: From the viewing perspective, the sub-actions performed by the first virtual character and the virtual characters that join each of the cooperative slots are displayed.
20. A collaborative interaction device for virtual characters, characterized in that, The device includes: The vacancy display module is used to display multiple available collaboration vacancy slots in the field of view of the second virtual character when the second virtual character receives a collaboration prompt message triggered by the first virtual character in response to the target collaboration action and the second virtual character enters the preset perception range. The empty space selection module is used to align the crosshair of the second virtual character with the target empty space among the multiple cooperative empty spaces, update the target empty space from the optional state to the selected state, and display the add control corresponding to the target cooperative action; The empty slot addition module is used to respond to the trigger operation of the addition control, control the second virtual character to perform a sub-action after adding the target empty slot, and update the target empty slot from the selected state to the occupied state; A synchronous display module is used to respond to a synchronous display instruction received when all the collaborative slots are occupied, and to display the sub-actions performed by the first virtual character and the virtual characters that have joined each of the collaborative slots.
21. An electronic device, characterized in that, include: 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 collaborative interaction method of virtual characters as described in any one of claims 1 to 19.
22. A computer-readable storage medium, characterized in that, The device stores computer-executable instructions or computer programs, which, when executed by a processor, implement the collaborative interaction method for virtual characters as described in any one of claims 1 to 19.
23. A computer program product, comprising a computer program or computer-executable instructions, characterized in that, When the computer program or computer-executable instructions are executed by the processor, the collaborative interaction method of the virtual character as described in any one of claims 1 to 19 is implemented.