Array animation generation method and device, storage medium, equipment and program product

By using a central processing unit to solve and generate array animations in parallel, the problem of insufficient mobile hardware was solved, achieving high compatibility and a good gaming experience.

CN121767519APending Publication Date: 2026-03-31NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-03
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

The inconsistent quality of mobile hardware makes it impossible to display the formation change animations of large numbers of clustered units, affecting the gaming experience for players.

Method used

The array switching information is processed by the central processing unit to generate position point information, and the array animation is generated by parallel processing using the graphics processing unit, reducing the dependence on hardware.

Benefits of technology

It improves mobile compatibility and gaming experience, and can display complex formation transformation animations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121767519A_ABST
    Figure CN121767519A_ABST
Patent Text Reader

Abstract

The invention discloses an array animation generation method and device, a storage medium, equipment and a program product, and the method comprises the steps: obtaining formation switching information of a game object, and resolving and processing the formation switching information to obtain position point information which can be used for accommodating cluster units, and the game object comprises a plurality of cluster units; according to the position point information, performing normalization processing on the object information of the game object and the formation switching information to obtain formation switching texture data of the game object; and performing parallel analysis and matrix operation processing on the formation switching texture data to obtain a transformation matrix, and generating an array animation according to the transformation matrix. According to the method, the requirement of mobile terminal hardware can be lowered, higher compatibility is achieved, and higher game experience is provided for game players.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of game technology, specifically to a method, apparatus, storage medium, device, and program product for generating array animations. Background Technology

[0002] Particle-driven technology relies on hardware-based computational shaders, but mobile hardware quality varies, sometimes resulting in poor performance and an inability to display large amounts of resources. For formation-changing animations of clustered units (such as spaceship formations), inferior mobile devices cannot display the movement of a large number of units, significantly impacting the gaming experience. Summary of the Invention

[0003] This application provides a method, apparatus, storage medium, device, and program product for generating array animations. It can directly obtain array animations displaying the actual positions of ships using a graphics processor with parallel processing capabilities, without the need for hardware-side computational shaders. Therefore, it reduces the requirements for mobile hardware, has higher compatibility, and ensures an improved gaming experience for players.

[0004] On one hand, embodiments of this application provide a method for generating array animations. The method includes: acquiring formation switching information of a game object, and processing the formation switching information to obtain position point information that can accommodate cluster units, wherein the game object includes multiple cluster units; normalizing the object information of the game object and the formation switching information according to the position point information to obtain formation switching texture data of the game object; performing parallel parsing and matrix operation processing on the formation switching texture data to obtain a transformation matrix, and generating an array animation according to the transformation matrix.

[0005] On the other hand, embodiments of this application provide an array animation generation apparatus, the apparatus comprising a first obtaining unit, a second obtaining unit, and a third obtaining unit. The first obtaining unit is configured to acquire formation switching information of a game object and process the formation switching information to obtain position point information suitable for accommodating cluster units, wherein the game object includes multiple cluster units; the second obtaining unit is configured to normalize the object information of the game object and the formation switching information based on the position point information to obtain formation switching texture data of the game object; the third obtaining unit is configured to perform parallel parsing and matrix operation processing on the formation switching texture data to obtain a transformation matrix, and generate an array animation based on the transformation matrix.

[0006] On the other hand, embodiments of this application provide a computer-readable storage medium storing a computer program adapted for loading by a processor to execute the array animation generation method as described in any of the above embodiments.

[0007] On the other hand, embodiments of this application provide a computer device, the computer device including a processor and a memory, the memory storing a computer program, the processor executing the array animation generation method as described in any of the above embodiments by calling the computer program stored in the memory.

[0008] On the other hand, embodiments of this application provide a computer program product, including computer instructions, which, when executed by a processor, implement the array animation generation method as described in any of the above embodiments.

[0009] The array animation generation method provided in this application, after obtaining the formation switching information of a game object, can process the formation switching information through a central processing unit to obtain position point information that can accommodate cluster units. The game object (such as a fleet) includes multiple cluster units, and the position point information includes point information that can accommodate these units. Therefore, based on the position point information, the object information and formation switching information of the game object are normalized to obtain the formation switching texture data of the game object. The formation switching texture data can display the positions of all cluster units. Then, a graphics processor with parallel processing capabilities performs parallel parsing and matrix operation processing on the texture data to obtain a transformation matrix, and generates an animation based on the transformation matrix. This application can directly obtain an array animation displaying the actual positions of ships in the graphics processor without using hardware-side computational shaders, thus reducing the requirements for mobile hardware, providing higher compatibility, and ensuring an improved gaming experience for players. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 This is a schematic diagram of an example game system provided in an embodiment of this application.

[0012] Figure 2 This is a flowchart illustrating the method for generating array animations provided in an embodiment of this application.

[0013] Figure 3This is a simplified schematic diagram of the array switching logic provided in the embodiments of this application.

[0014] Figure 4 This is a schematic diagram of the structure of the array animation generation device provided in the embodiments of this application.

[0015] Figure 5 A schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0016] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0017] This application provides a method, apparatus, storage medium, device, and program product for generating array animations. Specifically, the array animation generation method of this application can be executed by a computer device, which can be a terminal or a server. The terminal can be a smartphone, tablet, laptop, smart TV, wearable smart device, smart vehicle terminal, etc. The terminal can also include a client, which can be a game client, browser client, instant messaging client, or mini-program, etc. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides 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.

[0018] For example, when the method for generating the array animation runs on a terminal device, the terminal device may include a display screen and a processor. The display screen is used to present game visuals and receive commands generated by the player interacting with the game visuals. The game visuals may include a portion of a virtual game scene, which is a virtual world where virtual characters move. The processor is used to store the game application, run the game, generate game visuals, respond to commands, and control the display of the game visuals on the display screen. When the player interacts with the game visuals through the display screen, the game visuals can control the local content of the terminal device in response to the received operation commands. The terminal device can provide the graphical user interface to the player in various ways, such as rendering the display on the terminal device's screen or presenting the graphical user interface through holographic projection.

[0019] For example, when the array animation generation method runs on a server, it can be implemented and executed based on a cloud gaming system. A cloud gaming system refers to a gaming method based on cloud computing. A cloud gaming system includes servers and client devices. The main body running the game application and the main body presenting the game screen are separate. The storage and execution of the array animation generation method are completed on the server. The game screen presentation is completed on the client, which is mainly used for receiving and sending game data and presenting the game screen. For example, the client can be a display device with data transmission capabilities close to the player, such as a mobile terminal, television, computer, PDA, personal digital assistant, head-mounted display device, etc. However, the terminal device for processing game data is the server in the cloud. During gameplay, the player operates the client to send commands to the server. The server controls the game operation according to the commands, encodes and compresses game screen data, returns it to the client via the network, and finally, the client decodes and outputs the game screen.

[0020] It should be noted that, in this embodiment, the execution entity of the array animation generation method can be a terminal device or a server. The terminal device can be a local terminal device or a client device in the aforementioned cloud gaming. This embodiment does not limit the type of execution entity.

[0021] For example, in conjunction with the above description, Figure 1 This application illustrates a game system 1000 for implementing a method for generating array animations, as provided in an embodiment of this application. The game system 1000 may include at least one terminal 1001, at least one server 1002, at least one database 1003, and a network. The user-held terminal 1001 can connect to different servers via the network. The terminal is any device with computing hardware capable of supporting and executing software applications corresponding to the game.

[0022] In the aforementioned game system 1000, terminal 1001 is used to install and run the game application. In some cases, the game application may not need to be pre-installed on terminal 1001, and players can directly access the game through a browser or other client. Players log in to the game application using their registered game account to control the virtual character corresponding to that account and participate in the game. When a player logs in to the game application, terminal 1001 sends a login request to server 1002. Server 1002 verifies the game account used by the player and determines the game mechanics corresponding to the game account based on the login request. If the verification is successful, a login success notification is returned to terminal 1001. During the player's participation in the game through the game application, terminal 1001 and server 1002 exchange data. Terminal 1001 sends various information to server 1002. Server 1002 determines the display data for terminal 1001 based on the stored game mechanics and the received information, and sends the display data back to terminal 1001 so that terminal 1001 can display the display data sent by server 1002 to the player.

[0023] In possible application scenarios, different terminals 1001 may be served by different servers 1002. Therefore, in order to distinguish the servers 1002 corresponding to different game terminals 1001, the embodiments of this application will use the terms "first" and "second" to describe them. In fact, the servers 1002 corresponding to different game terminals 1001 can be the same server 1002. Therefore, without distinguishing between "first" and "second", it can be understood that the terminals 1001 corresponding to virtual characters in the same game scene are served by the same server 1002.

[0024] Furthermore, when the game system 1000 includes multiple terminals, multiple servers, and multiple networks, different terminals can connect to each other through different networks and servers. The network can be a wireless network or a wired network; for example, wireless networks include Wi-Fi, LAN, cellular networks, 2G, 3G, 4G, and 5G networks. Additionally, different terminals can also connect to other terminals or servers using their own Bluetooth networks or hotspot networks. Moreover, the system 100 can include multiple databases coupled to different servers, and can continuously store game-related information in the databases while different users are playing multiplayer games online.

[0025] It should be noted that in this embodiment, multiple terminal devices are running the same virtual game. Therefore, data interaction between the multiple terminal devices can be achieved through the virtual game's server. Thus, sending data from terminal device 1 to terminal device 2 can be understood as: terminal device 1 sends data to the virtual game's server, and the server sends the data to terminal device 2. Receiving data from terminal device 2 can be understood as: terminal device 1 receives data sent by the virtual game's server, which is the data sent by terminal device 2 to the server. Alternatively, there may be no game server, and terminal device 1 directly sends game data to terminal device 2.

[0026] It should be noted that, Figure 1 The game system diagram shown is merely an example. The game system 1000 described in this application embodiment is intended to more clearly illustrate the technical solutions of this application embodiment and does not constitute a limitation on the technical solutions provided in this application embodiment. As those skilled in the art will know, with the evolution of game systems and the emergence of new business scenarios, the technical solutions provided in this application embodiment are also applicable to similar technical problems.

[0027] It should be noted that the triggering operations mentioned in the subsequent detailed description of the array animation generation method provided in the embodiments of this application can all be regarded as triggering operations performed by the player through a finger or by controlling a medium such as a mouse, keyboard, or stylus. The specific medium used can be determined according to the type of computer device. For example, when the computer device is a touch screen device such as a mobile phone, tablet, or game console, the player can operate on the touch screen using any suitable object or accessory such as a finger or stylus. When the terminal device is a non-touch screen terminal device such as a desktop computer or laptop, the player can operate using an external device such as a mouse or keyboard.

[0028] The technical solution of this application will be described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0029] In this embodiment of the application, a graphical user interface is provided through a terminal device. The graphical user interface includes at least a portion of the virtual scene and at least one virtual character.

[0030] The aforementioned virtual scene can be a game scene, which can be understood as a simulation of the real world within a game, a semi-simulated / semi-fictional virtual environment, or a purely fictional virtual environment. A game scene can be any of the following: two-dimensional, 2.5-dimensional, or three-dimensional virtual scenes. A virtual scene typically includes multiple scene elements, which are the various elements required to constitute the virtual scene. For example, these may include, but are not limited to, at least one of the following: virtual character elements, virtual item elements, virtual building elements, virtual terrain elements, and virtual vegetation elements. Virtual terrain elements may include, but are not limited to, natural landforms such as land, ocean, lakes, and rivers. A virtual scene is a scenario where players control virtual characters to complete game logic.

[0031] As can be understood, a virtual character is a game character controlled by the player in a game. The player manipulates this virtual character to perform various game activities within the game environment, such as picking up items, engaging in combat, exploring, or solving puzzles. This virtual character can represent the player's image, and each virtual character can be implemented using a 3D or 2D virtual model; this embodiment does not specifically limit this. Virtual characters include, but are not limited to, at least one of the following: virtual human, virtual animal, and virtual machine.

[0032] Please see Figures 2 to 4 , Figure 2 This is a schematic flowchart illustrating the array animation generation method provided in an embodiment of this application. Figure 3 This is a simplified schematic diagram of the formation switching logic provided in the embodiments of this application. It should be noted that the steps shown may be executed in a different logical order than that shown in the flowchart. The method provides a graphical user interface through a terminal device. The graphical user interface includes at least a partial virtual scene and at least one virtual character. The method may include the following steps: Step 02: Obtain the formation switching information of the game object, and process the formation switching information to obtain the position point information that can be used to accommodate the cluster units. The game object includes multiple cluster units. Step 03: Based on the position point information, normalize the object information and formation switching information of the game object to obtain the formation switching texture data of the game object; Step 04: Perform parallel parsing and matrix operation processing on the pattern switching texture data to obtain the transformation matrix, and generate array animation based on the transformation matrix.

[0033] Specifically, please combine Figure 3 The array switching logic involved in the embodiments of this application can be... Figure 3For example, when a game object performs mining, combat / blockade / operation, assault, warp movement, construction, and communication / stationary / movement, the game object's formation will undergo a series of changes. Therefore, it is necessary to generate a series of formation change animations based on the changes in the game object's formation.

[0034] Specifically, game objects are clusters composed of multiple independent units, each of which can also be referred to as a cluster unit. Step 02 is to transform the dynamic trajectory of the game object's formation switching into a specific sequence of spatial coordinate points, providing a physical spatial basis for subsequent animation generation. Formation switching information refers to the dynamic path planning data of the game object as it transforms from its current formation (such as a square array) to a target formation (such as a cone-shaped assault formation). Formation switching information is essentially a set of mathematical parameters describing the cluster's movement trajectory, which may include key parameters such as starting coordinates, turning angle, and velocity curves. It is similar to keyframe data in skeletal animation. By parsing a preset skeletal animation (such as a game object motion template created by an artist), the path parameters are extracted and converted into a geometric path that the algorithm can process.

[0035] Specifically, the central processing unit's computation can include curve fitting and parametric processing. Curve fitting fits discrete path points into a continuous motion trajectory curve (such as a Bézier curve or a B-spline curve), generating a sequence of key path points for smooth transitions. This is consistent with the principle of achieving smooth keyframe transitions through interpolation in skeletal animation. Parametric processing dynamically samples the path curve based on the ship's speed, generating a sequence of position coordinates containing timestamps to ensure that each cluster unit corresponds to a unique coordinate at a specific time point. This process must avoid coordinate conflicts (such as two ships being assigned to the same coordinates), which can be achieved by checking and correcting path points using preset conditions (such as collision detection). This process will be explained in more detail below.

[0036] Specifically, step 03 encodes the game object attributes and motion path data into a texture format that can be efficiently read by the graphics processor, enabling lightweight data transfer from the central processing unit (CPU) to the graphics processor. Object information includes a unit identifier and a unit size. The unit identifier uniquely identifies each unit, such as the number (e.g., ID) of each ship, and is used by the graphics processor to distinguish different instances. The unit size is the dimensions of each unit itself, such as the physical dimensions of a ship model (e.g., length, width, and height), and is used to calculate the scaling ratio during subsequent matrix transformations.

[0037] Specifically, normalization refers to normalizing values ​​such as position coordinates and unit size to the [0,1] range, compressing them into low-precision floating-point numbers (e.g., 4 bits). This processing method can significantly reduce video memory usage. After compression, the four RGBA channels of the texture can be used to store different attributes. For example, the R channel is used to store the unit identifier, the G channel is used to store the unit size that the position coordinates can accommodate, and the B and A channels are used to accommodate the formation switching route. For example, after normalization, we get AS(1-4-7), where A represents the unit identifier, S represents the unit size, and (1-4-7) represents the formation switching route, switching from position point 1 to position point 4 and then to position point 7.

[0038] Specifically, step 04 is used to generate the ship transformation matrix in real time using the parallel computing capabilities of the graphics processor, driving the cluster animation rendering. This process can calculate the ship position in the current frame by performing linear or curvilinear interpolation between key path points based on the animation progress coefficient (e.g., 0%~100% of the timeline). This process will be explained in detail below.

[0039] Understandably, this application provides a method for generating array animations. After obtaining the formation switching information of a game object, the central processing unit (CPU) processes the formation switching information to obtain position point information that can accommodate cluster units. The game object includes multiple cluster units, and the position point information includes the point information that can accommodate these units. Therefore, based on the position point information, the object information and formation switching information of the game object are normalized to obtain the formation switching texture data of the game object. The formation switching texture data can display the positions of all cluster units. Then, the graphics processing unit (GPU) parses and performs matrix operations on the texture data to obtain a transformation matrix, and generates an array animation based on the transformation matrix. This application can directly obtain an array animation displaying the actual position of the ship in the graphics processing unit without using a hardware-side computational shader, thus reducing the requirements for mobile hardware, having higher compatibility, and ensuring an improved gaming experience for players.

[0040] Please see Figure 2 In some implementations, step 02 can be embodied by the following steps 021 and 022.

[0041] Step 021: Obtain the preset skeletal animation and perform path parsing on the preset skeletal animation to obtain formation switching information, which includes the formation switching path of the game object; Step 022: Calculate and process the array switching path to obtain the location point information, which includes the location coordinates. Each location coordinate corresponds to at most one cluster unit.

[0042] Specifically, step 021 is used to extract the geometric trajectory information of game object formation switching from the skeletal animation resources produced by the artists. The preset skeletal animation refers to the game object motion template (such as formation transition animation) pre-designed by the artists; its essence is a set of motion keyframes built based on the principle of skeletal drive. In traditional character animation, bones drive the deformation of model vertices through a hierarchical structure (taking game objects as an example, such as flagship bones → frigate bones). However, in the game object animation scenario provided in this application, the movement trajectory of the bones is abstracted as the motion path of cluster units. For example, when changing from a square formation to a wedge formation, the displacement path of the flagship bone defines the motion trend of the entire game object, while the sub-bones constrain the following trajectory of each frigate.

[0043] Specifically, step 022 transforms the formation switching path into discrete and conflict-free spatial coordinate points, ensuring that each cluster unit is assigned a unique target position. The central processing unit uses a polynomial function to fit the discrete path keypoints, transforming the jump-like keyframes in the skeletal animation into smooth, continuous motion trajectory curves (such as B-spline curves). This process eliminates the mechanical feel of the art keyframes, making the ship's movement conform to physical continuity and avoiding instantaneous displacement distortion. The final output position point information is a set of spatiotemporal four-dimensional data, which can also be data in a three-dimensional coordinate system or data in a two-dimensional coordinate system. Please see Figure 2 In some implementations, step 022 can be embodied by the following steps 0221 and 0223.

[0044] Step 0221: Perform curve fitting on the formation switching path to obtain the key path point sequence; Step 0223: Perform parameterization on the critical path point sequence to obtain location point information.

[0045] Specifically, in step 0221, the path corresponding to the formation switching path corresponds to the motion trajectory of the preset skeletal animation (such as the displacement keyframes of the flagship skeleton). The formation switching path can be a discrete point sequence (keyframes created by the art team), and these discrete point sequences are connected to form a broken line, thus forming the formation switching path. Curve fitting is the process by which the central processing unit uses algorithms to fit discrete path points into a smooth geometric curve. This process can control the smoothness of the curve by adjusting the polynomial degree, eliminating abrupt changes in the original path, and making the movement trajectory of the game object natural and smooth. The fitted curve must meet the physical constraints of the game object (such as the minimum turning radius) to avoid sharp turns that violate dynamics in the formation animation. The key path point sequence refers to the feature points on the fitted curve that mark the direction of motion or changes in velocity. The central processing unit automatically extracts these key points by calculating the curve derivative (rate of change in tangential direction) and the second derivative (rate of change in curvature).

[0046] Specifically, in step 0223, the critical path point sequence is the set of position points arranged on the movement trajectory of the game object, and the final output is a set of position coordinates that are time-stamp aligned and conflict-free. For example, for a game object consisting of 10 cluster units, if the formation switching lasts for five seconds and is sampled at 20 frames per second, one thousand spatial coordinates will be generated (ten ships × five seconds × 20 frames). Each coordinate is bound to a specific ship identifier and a timestamp, forming the underlying data for driving the array animation.

[0047] Please see Figure 2 In some implementations, step 022 may also be embodied by the following steps 0221, 0222 and 0223.

[0048] Step 0221: Perform curve fitting on the formation switching path to obtain the key path point sequence; Step 0222: Fit the sequence of key path points using a preset polynomial function to obtain a smooth and continuous motion trajectory curve; Step 0223: Sample the motion trajectory curve based on the object information to obtain position point information, which includes a one-to-one corresponding timestamp and position coordinates.

[0049] Specifically, in step 0221, the path corresponding to the formation switching path corresponds to the motion trajectory of the preset skeletal animation (such as the displacement keyframes of the flagship skeleton). The formation switching path can be a discrete point sequence (keyframes created by the art team), and these discrete point sequences are connected to form a broken line, thus forming the formation switching path. Curve fitting is the process by which the central processing unit uses algorithms to fit discrete path points into a smooth geometric curve. This process can control the smoothness of the curve by adjusting the polynomial degree, eliminating abrupt changes in the original path, and making the movement trajectory of the game object natural and smooth. The fitted curve must meet the physical constraints of the game object (such as the minimum turning radius) to avoid sharp turns that violate dynamics in the formation animation. The key path point sequence refers to the feature points on the fitted curve that mark the direction of motion or changes in velocity. The central processing unit automatically extracts these key points by calculating the curve derivative (rate of change in tangential direction) and the second derivative (rate of change in curvature).

[0050] Specifically, step 0222 involves converting the discrete sequence of critical path points into a continuous trajectory that conforms to the physical motion laws of game objects through mathematical modeling. This ensures that the ship's movement trajectory is natural, smooth, and without abrupt changes when the game object's formation changes. For example, these discrete path points can be connected using a polynomial function fitting method to generate a smooth and continuous motion trajectory.

[0051] Specifically, in step 0223, the critical path point sequence is the set of position points arranged on the movement trajectory of the game object, and the final output is a set of position coordinates that are time-stamp aligned and conflict-free. For example, for a game object consisting of 10 cluster units, if the formation switching lasts for five seconds and is sampled at 20 frames per second, one thousand spatial coordinates will be generated (ten ships × five seconds × 20 frames). Each coordinate is bound to a specific ship identifier and a timestamp, forming the underlying data for driving the array animation.

[0052] Please see Figure 2 In some implementations, the object information includes a unit identifier and a unit size, and step 03 can be represented by the following steps 031 and 033.

[0053] Step 031: Based on the location information and formation switching path, obtain the formation switching route; Step 033: Normalize the unit identifier, unit size, and formation switching route to obtain formation switching texture data. The formation switching texture data includes a one-to-one correspondence of first-class pixels and unit identifier, second-class pixels and unit size, and third-class pixels and formation switching route.

[0054] Specifically, step 031 is used to fuse discrete position point information with the macro-formation switching path to generate a set of motion trajectories that are spatiotemporally conflict-free and conform to the physical constraints of the game objects, providing a data foundation for subsequent texture encoding. Position point information refers to the set of target spatial coordinates of each ship in the game object at a specific moment, pre-calculated and generated by the central processing unit. These coordinates are obtained by curve fitting and parametric sampling of the skeletal animation path to ensure smooth and continuous ship movement trajectories. For example, when a ship changes from a square formation to a cone formation, each track must maintain a minimum turning radius to avoid dynamic distortion. The formation switching path is derived from keyframe data of the skeletal animation (such as the motion trajectory of the flagship skeleton), describing the macro-geometric path framework of the overall movement of the game object. This path is initially a discrete polyline, which is upgraded to a continuous curve after fitting with a polynomial function. The formation switching path defines the strategic direction and spatial boundary of formation switching.

[0055] Specifically, step 033 encodes the game object attributes (unit identifier, unit size) and motion paths that meet preset conditions into a texture data format that the graphics processor can efficiently read, enabling lightweight transfer of large-scale data from the central processing unit (CPU) to the graphics processor. The unit identifier is a unique numerical label (such as an ID number) that identifies each ship in the game object, used by the graphics processor to distinguish animation parameters from different instances. For example, different types of ships, such as aircraft carriers and destroyers, need to be encoded independently to ensure that the correct model and motion trajectory are matched during rendering.

[0056] Please see Figure 2In some implementations, step 033 can be embodied by the following step 0331.

[0057] Step 0331: Normalize the unit identifier, unit size, and formation switching route according to the preset pixel group to obtain formation switching texture data. The preset pixel group includes a first type of pixel, a second type of pixel, and a third type of pixel. The first type of pixel corresponds to the unit identifier, the second type of pixel corresponds to the unit size, and the third type of pixel corresponds to the formation switching route.

[0058] Specifically, step 0331 is used to map discrete game object motion data (unit identifier, unit size, formation switching route) into image data that can be directly read by the graphics processor through a structured texture encoding strategy, thereby achieving efficient compression transmission and real-time parsing of large-scale ship cluster animation parameters and solving the performance problem caused by insufficient video memory on mobile devices.

[0059] Please see Figure 2 In some implementations, the location point information includes location coordinates, and the formation switching route includes the target route. Step 031 can be represented by the following steps 0311, 0313, and 0315.

[0060] Step 0311: Based on the location information and formation switching path, obtain the formation switching route, and determine whether the formation switching route meets the preset conditions based on the location information; Step 0313: When different cluster units have the same location coordinates, determine that the formation switching route does not meet the preset conditions; Step 0315: When different cluster units have the same location coordinates, determine that the formation switching route meets the preset conditions, and determine the formation switching route as the target route.

[0061] Specifically, step 0311 is used to predict the risk of ship position conflicts during the preprocessing stage, ensuring that there are no model overlaps or collisions during animation rendering, and solving the physical distortion problem caused by the intersection and overlap of ship trajectories in large-scale cluster animations. When any two cluster units (ships) are assigned to the same spatial coordinates at the same time, it is considered a serious path conflict, and the formation switching route is an illegal route. Conversely, when all cluster units (ships) are not assigned to the same spatial coordinates at the same time, it is considered that the path meets the preset conditions, and the formation switching route is the target route.

[0062] Please see Figure 2 In some implementations, step 04 can be embodied by the following steps 041, 042, and 043.

[0063] Step 041: Obtain the animation progress coefficient; Step 042: Process the texture data according to the animation progress coefficient and the preset function to determine the position or orientation of the game object; Step 043: Obtain the transformation matrix based on the position or orientation of the game object, and generate an array animation based on the transformation matrix.

[0064] Specifically, the global timestamp, which drives the timing synchronization of game object cluster animations, is typically normalized to the range [0,1] (0.0 represents the start time of the animation, and 1.0 represents the end time). This coefficient is generated in real-time by a time counter in the rendering pipeline and is dynamically updated each frame according to the animation playback rate. For example, if the game object formation switching is set to last for 5 seconds, then the animation progress coefficient per frame = current running time / 5.0. This mechanism ensures that hundreds of ships are in the correct motion phase (such as turning or acceleration phases) at the same time, avoiding formation chaos caused by ship movements becoming disjointed.

[0065] Specifically, step 043 is used to convert the pose parameters into rigid body transformation matrices to drive the motion rendering of the ship model in 3D space. For example, the translation matrix is ​​constructed from the interpolated position coordinates (X, Y, Z) and can be used to determine the ship's spatial anchor point in the scene; the rotation matrix converts the orientation angle into a quaternion and then into a 3×3 rotation matrix, which can be used to control the ship's horizontal turning (yaw angle); the scaling matrix can be used to dynamically adjust the model bounding box size based on the unit size of the second type of pixel decoding (such as the ship length scaling factor of 0.8) to achieve visual proportion coordination. Through these three matrices, the final output can be a 4×4 model transformation matrix, which integrates translation, rotation, and scaling spatial transformations.

[0066] All of the above technical solutions can be combined in any way to form optional embodiments of this application, and will not be described in detail here.

[0067] This application provides a method for generating array animations. After obtaining the formation switching information of a game object, the central processing unit (CPU) processes the formation switching information to obtain position point information that can accommodate cluster units. The game object includes multiple cluster units, and the position point information includes point information that can accommodate these units. Therefore, based on the position point information, the object information and formation switching information of the game object are normalized to obtain the formation switching texture data of the game object. The formation switching texture data can display the positions of all cluster units. Then, the graphics processing unit (GPU) parses and performs matrix operations on the texture data to obtain a transformation matrix, and generates an array animation based on the transformation matrix. This application can directly obtain an array animation displaying the actual position of the ship in the graphics processing unit without using a hardware-side computational shader, thus reducing the requirements for mobile hardware, having higher compatibility, and ensuring an improved gaming experience for players.

[0068] To facilitate better implementation of the array animation generation method of this application embodiment, this application embodiment also provides an array animation generation apparatus. Please refer to... Figure 4 , Figure 4 This is a schematic diagram of the structure of the array animation generation apparatus provided in this application embodiment. The array animation generation apparatus 200 can provide a graphical user interface through a terminal device. The graphical user interface includes at least a partial virtual scene and at least one virtual character. The array animation generation apparatus 200 may include: The first obtaining unit 210 is used to obtain the formation switching information of the game object, and to process the formation switching information through the central processing unit to obtain the position point information that can be used to accommodate the cluster units. The game object includes multiple cluster units. The second obtaining unit 220 is used to normalize the object information and formation switching information of the game object based on the position point information to obtain the formation switching texture data of the game object. The third unit 230 is used to parse and perform matrix operations on the texture data through the graphics processor to obtain the transformation matrix, and generate array animation based on the transformation matrix.

[0069] In some embodiments, the first obtaining unit 210 is further configured to obtain a preset skeletal animation and perform path parsing processing on the preset skeletal animation to obtain formation switching information, the formation switching information including the formation switching path of the game object; and to obtain position point information by processing the formation switching path through the central processing unit, the position point information including position coordinates, each position coordinate corresponding to at most one cluster unit.

[0070] In some embodiments, the first obtaining unit 210 is further configured to perform curve fitting processing on the pattern switching path through the central processing unit to obtain a key path point sequence; and to perform parameterization processing on the key path point sequence through the central processing unit to obtain location point information.

[0071] In some embodiments, the first obtaining unit 210 is further configured to perform curve fitting processing on the pattern switching path through the central processing unit to obtain a key path point sequence; fit the key path point sequence through a preset polynomial function to obtain a smooth and continuous motion trajectory curve; and sample the motion trajectory curve according to the object information to obtain position point information, wherein the position point information includes a one-to-one corresponding timestamp and position coordinates.

[0072] In some embodiments, the second obtaining unit 220 is further configured to obtain a formation switching route based on the location point information and the formation switching path; and to normalize the unit identifier, unit size and formation switching route to obtain formation switching texture data, wherein the formation switching texture data includes a one-to-one correspondence of a first type of pixel and a unit identifier, a second type of pixel and a unit size and a third type of pixel and a formation switching route.

[0073] In some embodiments, the second obtaining unit 220 is further configured to normalize the unit identifier, unit size and array switching route according to a preset pixel group to obtain array switching texture data. The preset pixel group includes a first type of pixel, a second type of pixel and a third type of pixel. The first type of pixel corresponds to the unit identifier, the second type of pixel corresponds to the unit size and the third type of pixel corresponds to the array switching route.

[0074] In some embodiments, the second obtaining unit 220 is further configured to obtain a formation switching route based on the location point information and the formation switching path, and determine whether the formation switching route meets the preset conditions based on the location point information; if different cluster units correspond to the same location coordinates, determine that the formation switching route does not meet the preset conditions; if different cluster units correspond to the same location coordinates, determine that the formation switching route meets the preset conditions, and determine the formation switching route as the target route.

[0075] In some embodiments, the third obtaining unit 230 is further configured to obtain an animation progress coefficient; process the texture data according to the animation progress coefficient and a preset function to determine the position or orientation of the game object; obtain a transformation matrix according to the position or orientation of the game object, and generate an array animation according to the transformation matrix.

[0076] Each unit in the aforementioned array animation generation device can be implemented entirely or partially through software, hardware, or a combination thereof. These units can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each unit.

[0077] The array animation generation device 200 can be integrated into a terminal or server that has storage and a processor and thus computing power, or the array animation generation device 200 can be the terminal or server.

[0078] Optionally, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0079] Figure 5This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The computer device may be a terminal or a server. Figure 5 As shown, the computer device 300 includes a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 is electrically connected to the memory 302. Those skilled in the art will understand that the computer device structure shown in the figures does not constitute a limitation on the computer device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0080] The processor 301 is the control center of the computer device 300. It connects various parts of the computer device 300 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 302, and calling data stored in the memory 302, it performs various functions of the computer device 300 and processes data, thereby performing overall processing of the computer device 300.

[0081] In this embodiment, the processor 301 in the computer device 300 loads the instructions corresponding to the processes of one or more computer programs into the memory 302 according to the following steps, and the processor 301 runs the computer programs stored in the memory 302 to realize various functions: Step 02: Obtain the formation switching information of the game object, and process the formation switching information through the central processing unit to obtain the position point information that can be used to accommodate the cluster units. The game object includes multiple cluster units. Step 03: Based on the position point information, normalize the object information and formation switching information of the game object to obtain the formation switching texture data of the game object; Step 04: The texture data is parsed and processed by the graphics processor to obtain the transformation matrix, and an array animation is generated based on the transformation matrix.

[0082] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0083] Optional, such as Figure 5 As shown, the computer device 300 also includes: a display screen 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. The processor 301 is electrically connected to the display screen 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307. Those skilled in the art will understand that... Figure 5The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0084] The display screen 303 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The display screen 303 may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the computer device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program. Optionally, the touch panel may include a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, and transmits the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to the processor 301, and can receive and execute commands from the processor 301. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 301 to determine the type of touch event. Subsequently, the processor 301 provides corresponding visual output on the display panel according to the type of touch event. In this embodiment, the touch panel and the display panel can be integrated into the display screen 303 to achieve input and output functions. However, in some embodiments, the touch panel and the display screen 303 can be implemented as two independent components to achieve input and output functions. That is, the display screen 303 can also be used as part of the input unit 306 to achieve input functions.

[0085] The radio frequency circuit 304 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other computer devices, and to transmit and receive signals with network devices or other computer devices.

[0086] Audio circuitry 305 can be used to provide an audio interface between a user and a computer device via a speaker and a microphone. Audio circuitry 305 converts received audio data into electrical signals, transmits them to the speaker, and the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuitry 305, converted back into audio data, and output to processor 301 for processing. The audio data is then transmitted via radio frequency circuitry 304 to, for example, another computer device, or output to memory 302 for further processing. Audio circuitry 305 may also include an earphone jack to facilitate communication between peripheral headphones and the computer device.

[0087] The input unit 306 can be used to receive input numbers, characters, or object feature information (such as fingerprints, irises, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.

[0088] Power supply 307 is used to supply power to various components of computer device 300. Optionally, power supply 307 can be logically connected to processor 301 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 307 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0089] although Figure 5 As not shown in the diagram, computer equipment 300 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.

[0090] This application also provides a computer-readable storage medium for storing a computer program. This computer-readable storage medium can be applied to a computer device, and the computer program causes the computer device to execute the corresponding processes in the array animation generation method of the embodiments of this application; for brevity, these will not be elaborated further here.

[0091] This application also provides a computer program product including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the corresponding process in the array animation generation method described in the embodiments of this application. For simplicity, further details are omitted here.

[0092] This application also provides a computer program comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the corresponding process in the array animation generation method of this application; for brevity, further details are omitted here.

[0093] It should be understood that the processor in this application may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0094] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0095] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0096] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0097] 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.

[0098] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

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

[0100] In addition, the functional units in this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0101] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer or a server) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0102] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for generating array animation, characterized in that, The generation method includes: The game object's formation switching information is obtained and processed to obtain position point information that can accommodate cluster units, wherein the game object includes multiple cluster units; Based on the location point information, the object information of the game object and the formation switching information are normalized to obtain the formation switching texture data of the game object; The array switching texture data is parsed and matrix operations are performed in parallel to obtain a transformation matrix, and an array animation is generated based on the transformation matrix.

2. The method for generating array animation as described in claim 1, characterized in that, The process of acquiring the formation switching information of game objects and processing the formation switching information to obtain position point information that can accommodate cluster units includes: Obtain a preset skeletal animation and perform path parsing processing on the preset skeletal animation to obtain the formation switching information, which includes the formation switching path of the game object; The array switching path is calculated and processed to obtain the location point information, which includes location coordinates. Each location coordinate corresponds to at most one cluster unit.

3. The method for generating array animation as described in claim 2, characterized in that, The calculation and processing of the array switching path to obtain the location point information includes: Curve fitting is performed on the array switching path to obtain the key path point sequence; The key path point sequence is parameterized to obtain the location point information.

4. The method for generating array animation as described in claim 2, characterized in that, The calculation and processing of the array switching path to obtain the location point information includes: Curve fitting is performed on the array switching path to obtain the key path point sequence; By fitting the sequence of key path points with a preset polynomial function, a smooth and continuous motion trajectory curve is obtained. The motion trajectory curve is sampled based on the object information to obtain the location point information, which includes a one-to-one timestamp and the location coordinates.

5. The method for generating array animation as described in claim 1, characterized in that, The object information includes a unit identifier and a unit size. The normalization process, based on the position point information, of the game object's object information and the formation switching information to obtain the game object's formation switching texture data includes: Based on the location information and the formation switching path, the formation switching route is obtained; The unit identifier, the unit size, and the formation switching route are normalized to obtain the formation switching texture data. The formation switching texture data includes a one-to-one correspondence between the first type of pixels and the unit identifier, the second type of pixels and the unit size, and the third type of pixels and the formation switching route.

6. The method for generating array animation as described in claim 5, characterized in that, The normalization process for the unit identifier, the unit size, and the formation switching route to obtain the formation switching texture data includes: The unit identifier, the unit size, and the formation switching route are normalized according to a preset pixel group to obtain the formation switching texture data. The preset pixel group includes a first type of pixel, a second type of pixel, and a third type of pixel. The first type of pixel corresponds to the unit identifier, the second type of pixel corresponds to the unit size, and the third type of pixel corresponds to the formation switching route.

7. The method for generating array animation as described in claim 5, characterized in that, The location information includes location coordinates, the formation switching route includes a target route, and obtaining the formation switching route based on the location information and the formation switching route includes: Based on the location information and the formation switching path, a formation switching route is obtained, and based on the location information, it is determined whether the formation switching route meets preset conditions. When different cluster units correspond to the same location coordinates, it is determined that the formation switching route does not meet the preset conditions; When different cluster units have the same location coordinates, the formation switching route is determined to meet the preset conditions, and the formation switching route is determined as the target route.

8. The method for generating array animation as described in claim 1, characterized in that, The process of parsing and performing matrix operations on the array switching texture data in parallel to obtain a transformation matrix, and generating an array animation based on the transformation matrix, includes: Get the animation progress coefficient; The formation switching texture data is processed according to the animation progress coefficient and a preset function to determine the position or orientation of the game object; Based on the position or orientation of the game object, a transformation matrix is ​​obtained, and the array animation is generated based on the transformation matrix.

9. A device for generating array animation, characterized in that, The device includes: The first obtaining unit is used to acquire the formation switching information of the game object and process the formation switching information to obtain the position point information that can be used to accommodate the cluster units, wherein the game object includes multiple cluster units; The second obtaining unit is used to normalize the object information of the game object and the formation switching information according to the position point information to obtain the formation switching texture data of the game object. The third obtaining unit is used to perform parallel parsing and matrix operation processing on the array switching texture data to obtain a transformation matrix, and generate an array animation based on the transformation matrix.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted for loading by a processor to perform the method for generating array animations as described in any one of claims 1-8.

11. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a computer program, and the processor executing the array animation generation method according to any one of claims 1-8 by calling the computer program stored in the memory.

12. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the array animation generation method according to any one of claims 1-8.