Collision body generation method and apparatus, electronic device, and readable storage medium

CN117462952BActive Publication Date: 2026-09-11NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311372832.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-23
Publication Date
2026-09-11
Estimated Expiration
2043-10-23

AI Technical Summary

Technical Problem

[0003]目前,为进行碰撞检测,需通过启动进程来创建多个游戏场景实例,以在多个游戏场景中分别生成相应的碰撞体,从而进行碰撞检测,但由于需创建的游戏场景实例较多,而为了实现对游戏场景实例的创建,每一游戏场景实例的都需在内存中存储有对应的碰撞体数据,所以在多个游戏场景中生成碰撞体时所需的内存成本较大

Benefits of technology

[0017]In this embodiment, a target game scene instance is created through a first process; a shared memory address for shared static collider data is determined, wherein the static collider data stored in the shared memory address is shared by at least two game scene instances of at least one process; the first process obtains the target static collider data required by the target game scene instance from the shared memory address, and creates a static collider in the game scene corresponding to the target game scene instance based on the target static collider data; the first process obtains target dynamic collider data for the target game scene instance, and creates a dynamic collider in the game scene corresponding to the target game scene instance based on the target static collider data. Thus, in this embodiment, by splitting the game scene instance into static collider data and dynamic collider data, the static collider data shared by multiple game scene instances is set in a shared memory address, and the process obtains the corresponding static collider data from the shared memory address to generate the static collider, and then generates the dynamic collider separately. This achieves the goal of satisfying multiple game scene instances by storing the static collider data only once, greatly reducing the memory cost required to generate colliders in multiple game scenes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117462952B_ABST
    Figure CN117462952B_ABST
Patent Text Reader

Abstract

The application discloses a collision body generation method and device, electronic equipment and a computer readable storage medium. Embodiments of the application create a target game scene instance through a first process; determine a shared memory address of shared static collision body data, wherein the static collision body data stored in the shared memory address is shared by at least two game scene instances of at least one process; acquire target static collision body data required by the target game scene instance from the shared memory address through the first process, and create a static collision body in a game scene corresponding to the target game scene instance based on the target static collision body data; and acquire target dynamic collision body data for the target game scene instance through the first process, and create a dynamic collision body in the game scene corresponding to the target game scene instance based on the target static collision body data, thereby reducing the memory cost required when generating collision bodies in multiple game scenes.
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, electronic device, and computer-readable storage medium for generating colliders. Background Technology

[0002] The rise of the internet and the continuous development and evolution of hardware and software technologies have spurred the emergence of smart devices and software. Simultaneously, a large number of games of various themes have sprung up to meet user needs. However, with the rapid development of various technologies in the gaming industry, the performance overhead of performing detailed collision detection on objects within games is increasing.

[0003] Currently, to perform collision detection, multiple game scene instances need to be created by starting a process to generate corresponding colliders in each game scene for collision detection. However, since there are many game scene instances to be created, and each game scene instance needs to store corresponding collider data in memory in order to create game scene instances, the memory cost required to generate colliders in multiple game scenes is large. Summary of the Invention

[0004] This application provides a collider generation method, apparatus, electronic device, and computer-readable storage medium, which can reduce the memory cost required to generate colliders in multiple game scenes.

[0005] In a first aspect, embodiments of this application provide a method for generating a collider, the method comprising:

[0006] Create a target game scene instance through the first process;

[0007] Determine the shared memory address of the shared static collider data, wherein the static collider data stored in the shared memory address is shared by at least two game scene instances of at least one process;

[0008] The first process described above obtains the target static collider data required by the target game scene instance from the shared memory address, and creates a static collider in the game scene corresponding to the target game scene instance based on the target static collider data.

[0009] The first process described above obtains target dynamic collider data for the target game scene instance, and based on the target static collider data, creates a dynamic collider in the game scene corresponding to the target game scene instance.

[0010] Secondly, embodiments of this application also provide a collision body generating apparatus, the apparatus comprising:

[0011] The instance creation module is used to create instances of the target game scene through the first process.

[0012] The address determination module is used to determine the shared memory address of the shared static collider data, wherein the static collider data stored in the shared memory address is shared by at least two game scene instances of at least one process.

[0013] The first creation module is used to obtain the target static collider data required by the target game scene instance from the shared memory address through the first process, and create a static collider in the game scene corresponding to the target game scene instance based on the target static collider data.

[0014] The second creation module is used to obtain target dynamic collider data for the target game scene instance through the first process, and create dynamic colliders in the game scene corresponding to the target game scene instance based on the target static collider data.

[0015] Thirdly, embodiments of this application also provide an electronic device, including a memory storing multiple instructions; the processor loads instructions from the memory to execute any of the collider generation methods provided in embodiments of this application.

[0016] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute any of the collider generation methods provided in embodiments of this application.

[0017] In this embodiment, a target game scene instance is created through a first process; a shared memory address for shared static collider data is determined, wherein the static collider data stored in the shared memory address is shared by at least two game scene instances of at least one process; the first process obtains the target static collider data required by the target game scene instance from the shared memory address, and creates a static collider in the game scene corresponding to the target game scene instance based on the target static collider data; the first process obtains target dynamic collider data for the target game scene instance, and creates a dynamic collider in the game scene corresponding to the target game scene instance based on the target static collider data. Thus, in this embodiment, by splitting the game scene instance into static collider data and dynamic collider data, the static collider data shared by multiple game scene instances is set in a shared memory address, and the process obtains the corresponding static collider data from the shared memory address to generate the static collider, and then generates the dynamic collider separately. This achieves the goal of satisfying multiple game scene instances by storing the static collider data only once, greatly reducing the memory cost required to generate colliders in multiple game scenes. Attached Figure Description

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

[0019] Figure 1 This is a schematic diagram of the collision body generation system provided in an embodiment of this application;

[0020] Figure 2 This is a schematic flowchart of one embodiment of the collider generation method provided in this application.

[0021] Figure 3 This is a schematic diagram of the collider provided in an embodiment of this application;

[0022] Figure 4 This is a schematic diagram illustrating a single-process example provided in an embodiment of this application;

[0023] Figure 5 This is a schematic diagram illustrating an example of a multi-process implementation provided in this application.

[0024] Figure 6 This is a schematic diagram of a collision detection provided in an embodiment of this application;

[0025] Figure 7This is another collision detection schematic diagram provided in an embodiment of this application;

[0026] Figure 8 This is a schematic diagram of the collision body generation device provided in the embodiments of this application;

[0027] Figure 9 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

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

[0029] Before providing a detailed explanation of the embodiments of this application, some terms involved in the embodiments of this application will be explained.

[0030] In the description of the embodiments of this application, the terms "first," "second," etc., may be used herein to describe various concepts, but unless specifically stated otherwise, these concepts are not limited by these terms. These terms are used only to distinguish one concept from another. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices.

[0031] This application provides a method, apparatus, electronic device, and computer-readable storage medium for generating colliders. Specifically, the collider generation method of this application can be executed by an electronic device, which can be a terminal or a server. The terminal can be a smartphone, tablet, laptop, touch screen, game console, personal computer (PC), personal digital assistant (PDA), or other terminal device. The terminal can also include a client, which can be a game application client, a browser client carrying a game program, or an instant messaging client. 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 (CDNs), and big data and artificial intelligence platforms.

[0032] For example, such as Figure 1 As shown, the electronic device is illustrated using server 10 as an example. This server can create a target game scene instance through a first process; determine the shared memory address of shared static collider data, wherein the static collider data stored in the shared memory address is shared by at least two game scene instances of at least one process; obtain the target static collider data required by the target game scene instance from the shared memory address through the first process, and create a static collider in the game scene corresponding to the target game scene instance based on the target static collider data; obtain target dynamic collider data for the target game scene instance through the first process, and create a dynamic collider in the game scene corresponding to the target game scene instance based on the target static collider data.

[0033] To address the aforementioned issues, this application provides a collider generation method, apparatus, electronic device, and computer-readable storage medium, which can reduce the memory cost required to generate colliders in multiple game scenes.

[0034] The following is a detailed description in conjunction with the accompanying drawings. It should be noted that the order of description of the following embodiments is not intended to limit the preferred order of the embodiments. Although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be performed in a different order than that shown in the drawings.

[0035] In this embodiment, a server is used as an example for illustration. This embodiment provides a method for generating colliders, such as... Figure 2As shown, the specific process of this collider generation method can be as follows:

[0036] 201. Create a target game scene instance through the first process.

[0037] The first process described above is used to create a game scene instance corresponding to a game scene, namely the target game scene instance. The target game scene instance is the instance corresponding to the game scene to be created. The game scene can be the game scene that the player is about to enter, the game scene that needs to be collision detected, or other game scenes that need to be created.

[0038] Understandably, the server creates a target game scene instance by starting the first game process, and obtains the corresponding game scene based on the target game scene instance. The game scene can contain multiple colliders.

[0039] The aforementioned colliders are visible objects appearing in the game scene, such as buildings, vehicles, and game characters.

[0040] Understandably, some colliders in a typical game scene are fixed and have been present in the game scene since the beginning. They are generally not removed, created, or moved during the game's run, such as buildings and trees. Other colliders in the game scene are created in real time during the game's operation and can generally be removed, created, or moved based on game mechanics or player actions, such as game characters, vehicles, and game items.

[0041] In this embodiment, the server can divide the colliders in the game scene based on their characteristics. Specifically, the colliders in the game scene can be divided into static colliders and dynamic colliders. The colliders that have been in the game scene since the beginning and do not change are identified as static colliders, while those that change as the game progresses are identified as dynamic colliders.

[0042] For example, such as Figure 3 As shown, Figure 3 These are static and dynamic colliders shown in the game's shooting scene. Figure 3 Colliders 301, 302, and 303 are static colliders. Figure 3 Colliders 304 and 305 are dynamic colliders. Figure 3 Colliders 304 and 305 are game characters that perform shooting actions, while Figure 3 The game character corresponding to collider 304 also holds a shield.

[0043] In some embodiments, since a server may have multiple processes, the first process mentioned above can be the first process on the server. That is, the creation of the target game scene instance through the first process may include: creating the target game scene instance through the first process of the server.

[0044] 202. Determine the shared memory address of the shared static collider data, wherein the static collider data stored in the shared memory address is shared by at least two game scene instances of at least one process.

[0045] The aforementioned shared memory address is used to indicate the shared memory space where the static collider data that can be shared is stored, i.e., physical memory.

[0046] Understandably, since there are multiple processes on at least one server, and depending on the triggering conditions, the server may sometimes start multiple processes simultaneously, and each process may create multiple scene instances to build the corresponding game scene to meet user needs.

[0047] Furthermore, since different game scenes are independent of each other and each maintains its own collision data, for a server containing a large amount of collision data, if each game scene instance corresponding to a game scene loads a complete copy of the collision data, it will undoubtedly consume a lot of memory.

[0048] Therefore, the server can be optimized based on the characteristics of the colliders in the game scene. Since the game scene contains static colliders and dynamic colliders, and the static colliders are fixed colliders in the game scene, the static collider data in the game scene can be placed in a shared memory space so that multiple game scene instances can share it. The address corresponding to this shared memory space is the aforementioned shared memory address.

[0049] By storing the data of static colliders in the game scene in a shared memory space, which is shared by multiple game scene instances, the huge memory overhead caused by each scene instance needing to consume memory to store completely identical or partially identical static collider data is avoided. For example, in a game scene, the data of static colliders such as buildings and trees generally accounts for a large proportion of the total data in the game scene. Therefore, by using a single set of static collider data, the process avoids having to allocate too much physical memory to load and store redundant and duplicate static collider data.

[0050] The aforementioned collider data is used to create at least one collider. This collider data can be the vertex coordinates of each vertex of the at least one collider, or it can be data used to form the collider, such as the shape of the collider, the position of the center point, the identifier of the collider, etc. The specific settings are determined according to the requirements and are not limited here.

[0051] It is understandable that a game corresponds to a complete game map, while the game scene instance corresponds to a part of the scene area in the game map. If the static collider data corresponding to two game scene instances are the same, it means that the game scenes corresponding to these two game scene instances are the same; if the static collider data corresponding to two game scene instances are partially the same, it means that there are shared scene areas between the game scenes corresponding to these two game scene instances; and if the static collider data corresponding to two game scene instances are different, it means that the game scenes corresponding to these two game scene instances are different.

[0052] Among them, a distributed framework can be constructed, that is, at least one of the above processes can come from one server, or from two or more servers, thereby achieving the goal of satisfying the static collider data requirements of all game scene instances by sharing the static collider data stored in the memory address.

[0053] For example, such as Figure 4 As shown, Figure 4 The diagram shows the breakdown of colliders for n game scene instances within the same process. Figure 4 As can be seen, the static colliders corresponding to different game scene instances under the same process all come from a single static collider system, which consists of multiple shared static collider data stored in a shared memory address.

[0054] For example, such as Figure 5 As shown, Figure 5 The diagram shows the breakdown of colliders for n game scene instances across m processes. Figure 5 As can be seen, the static colliders corresponding to different game scene instances under different processes all come from a single static collider system, which consists of multiple shared static collider data stored in a shared memory address.

[0055] In some embodiments, if the multiple colliders corresponding to the previous game scene instance are considered to form a physical collision system, and the simulation effect of the game is improved through this physical collision system, then in this embodiment, the collision system corresponding to each game scene instance is split into a static collision system and a dynamic collision system. That is, the multiple dynamic colliders corresponding to the game scene instance form a dynamic collision system, and the multiple static colliders corresponding to the game scene instance form a static collision system, thereby avoiding the situation where the development and maintenance costs are too low due to each game scene instance having only one physical collision system.

[0056] In some embodiments, the static collider data may be pre-stored in the shared memory space, that is, the server may store all the static collider data appearing in the game map into the shared memory space based on the static collider data appearing in the game map.

[0057] In some embodiments, the aforementioned static collider data can be continuously created as different processes or a process is started, thereby continuously adding static collider data to the shared memory space. That is, as game scene instances are continuously created, the corresponding game scenes will increase, and correspondingly, as different game scenes are created, the static collider data required by different game scenes will be added to the shared memory space. The static collider data shared in the aforementioned shared memory space will also increase until the static collider data required by all game scenes is loaded into the aforementioned shared memory space, that is, the shared memory space contains the static collider data of the entire game map.

[0058] Specifically, when the runtime environment of at least one process is configured to be a Linux environment, that is, when at least one process is run through the Linux system to create at least two game scene instances corresponding to each process, the game scene instances of different processes in at least one server can be shared and stored in a shared memory as static collision data through a preset memory sharing technology.

[0059] Among these, the aforementioned memory sharing technologies include, but are not limited to, memory mapping (mmap) technology and kernel samepage merge (ksm) technology.

[0060] For example, since the essence of KSM technology is to merge data from identical memory pages together, i.e., retain only one copy of the memory page, each memory page corresponds to at least one data block in the static collider data. That is, the static collider data contains at least one data block corresponding to a static collider. Then, the data read address corresponding to the memory page is mapped to a shared memory address in the shared memory space. This shared memory address is the physical address, so that the static collider data can be retrieved from the corresponding shared memory address using the data read address of the memory page corresponding to the static collider data. The size of a memory page can be 2KB. Different game scene instances need at least one identical memory page when requiring the same static collider data.

[0061] In some embodiments, when a distributed architecture is built on a server, i.e., there are multiple processes on the server, after the target game scene instance is created by the first process of the server, the aforementioned determination of the shared memory address of the shared static collider data may include: determining the shared memory address of the shared static collider data on the server, so as to reduce the memory cost of the server.

[0062] 203. The first process obtains the target static collider data required by the target game scene instance from the shared memory address, and creates a static collider in the game scene corresponding to the target game scene instance based on the target static collider data.

[0063] In this embodiment, after the server determines the shared memory address where the shared static collider data is stored, it can obtain the target static collider data required by the target game scene instance from the shared memory space corresponding to the shared memory address. Based on the target static collider data, a static collider can be created in the game scene, thereby greatly reducing the memory cost required to generate colliders in multiple game scenes.

[0064] In some embodiments, since the shared static collider data includes at least one static collider data block, and each of the static collider data blocks corresponds to a shared memory address, obtaining the target static collider data required for the target game scene instance from the shared memory address through the first process may include: determining the target shared memory address corresponding to each static collider data block in the target static collider data; and obtaining the corresponding target static collider data block from each of the target shared memory addresses through the first process.

[0065] In some embodiments, since the static collider data can be continuously added to the shared memory space as different processes are continuously started, the static collider data required by the target game scene instance may exist in the shared memory address, may exist partially in the shared memory address, or may not exist in the shared memory address. Therefore, it is necessary to determine whether at least one static collider data block in the target static collider data has a corresponding shared memory address, that is, whether the static collider data block in the target static collider data exists in the shared memory space. Based on the determination result, the subsequent steps are determined. That is, if the static collider data block in the target static collider data has a corresponding target shared memory address, the static collider data block is obtained through the target shared memory address. If the static collider data block in the target static collider data does not have a corresponding target shared memory address, the corresponding target shared memory address needs to be applied for in the shared memory space for the static collider data block.

[0066] Specifically, it also includes: if at least one first static collider data block in the above target static collider data does not have a target shared memory address, it means that the first static collider data block does not exist in the shared storage space and cannot be shared by multiple game scene instances, that is, there is no static collider corresponding to the first static collider data block in the game scene instance before the target game scene instance, then the first process applies for a shared memory address for the first static collider data block so as to store the first static collider data block in the obtained shared memory address.

[0067] For example, if the KSM technology is used and the memory page is set to 2k, then the starting address of each memory page is a multiple of 2k, that is, the starting address of the memory page corresponding to the first static collider data block is a multiple of 2k.

[0068] Furthermore, if a shared memory address is requested for the first static collider data block mentioned above, the requested shared memory address can be marked. The requested shared memory address can be marked by a preset variable, that is, the requested shared memory address is marked with a corresponding sharing identifier to indicate that the shared memory address can be shared, and the data in the shared memory address can be merged, that is, when the data in other shared memory addresses is the same, only one can be retained.

[0069] By marking the address with variables, different game scene instances can obtain static collider data through the variables. This allows different game scene instances to read all the static collider data and obtain the static collider data required by the game scene instance to generate the corresponding static collider.

[0070] For example, the above-mentioned marking of the obtained shared memory address by a preset variable can be done by using the system interface madvise(addr,length,MADV_MERGEABLE) to mark the shared memory address, or by marking the memory page associated with the shared memory address, such as marking it as MADV_MERGEABLE, where MADV_MERGEABLE is the marked identifier, that is, the aforementioned shared identifier.

[0071] In some embodiments, since the static collider data can be continuously added to the shared memory space as different processes are continuously started, there may be duplicate data blocks in the static collider data in the shared memory space. Therefore, in this embodiment, a shared identifier is configured for the shared memory address to compare the static collider data blocks corresponding to different shared identifiers, or to compare the memory pages of the static collider data blocks corresponding to different shared identifiers. Based on the comparison results, it is determined whether some duplicate data blocks need to be deleted and only one of the duplicate data blocks is retained.

[0072] Specifically, a second process can be used to compare the static collider data blocks to which multiple shared identifiers belong; if there are at least two second static collider data blocks with the same data, then one static collider data block is retained from the at least two second static collider data blocks; the retained static collider data block is used as the static collider data block required by the game scene instance associated with the at least two second static collider data blocks respectively.

[0073] The second process mentioned above is used to periodically detect shared identifiers, namely the static collider data blocks marked as MADV_MERGEABLE or the memory pages associated with the static collider data blocks.

[0074] Since the shared memory address of different static collider data blocks is associated with the data read address of a memory page, the aforementioned use of the reserved static collider data block as the static collider data block required for the game scene instance associated with at least two of the aforementioned second static collider data blocks may include mapping the data read address of the memory page associated with at least two of the aforementioned second static collider data blocks to the shared memory address corresponding to the reserved static collider data block.

[0075] 204. Obtain target dynamic collider data for the target game scene instance through the first process described above, and create dynamic colliders in the game scene corresponding to the target game scene instance based on the target static collider data described above.

[0076] In this embodiment, by running the first process, the dynamic collider that has changed in the current game scene can be identified, that is, the target dynamic collider data unique to the target game scene instance can be obtained. The target dynamic collider data is the dynamic collider data corresponding to the changed dynamic collider, so as to create a dynamic collider in the game scene based on the target dynamic collider data.

[0077] Understandably, since static colliders generally exist in the game scene from the beginning, after creating a game instance, a static collider must first be generated in the game scene based on the static collider data. Then, as the game progresses, additional dynamic colliders are created on top of this. However, because different game scene instances may experience different situations, the dynamic colliders created for different game scene instances will also differ.

[0078] In some embodiments, after creating a dynamic collider in the game scene corresponding to the above-mentioned target game scene instance, that is, the generation of the collider has been completed in the game scene corresponding to the above-mentioned target game scene instance. The generated collider includes static colliders and dynamic colliders, so that collision detection can be performed on the static colliders and dynamic colliders contained in the game scene respectively, so as to improve the accuracy of collision detection.

[0079] Specifically, in response to a collision event in the aforementioned game scene, based on the target object that triggered the collision event, collision detection is performed on the static and dynamic colliders in the aforementioned game scene to obtain static collision results and dynamic collision results; the final collision result of the aforementioned target object is determined from the aforementioned static collision results and the aforementioned dynamic collision results.

[0080] The aforementioned collision events can be events triggered by operations that may result in collisions. For example, in a shooting game scenario, the aforementioned collision event is triggered when a game character fires a virtual item, such as a bullet or arrow. The aforementioned collision events can also be events triggered when a collision is detected. For example, in a racing game scenario, the aforementioned collision event is triggered when two racing cars collide. The specific collision events can be set according to different game scenarios and are not limited here.

[0081] The target object mentioned above is the object that triggers the collision event. For example, if the collision event is triggered when a game character launches a virtual item, the target object can be the virtual item; if the collision event is triggered when two race cars collide, the target object can be the race car that is actively responsible, that is, the race car that actively collides with the other race car.

[0082] The collision result can be the target collider with the target object among all colliders in the game scene, or it can be the collision position with the target object among the outer surfaces of all colliders in the game scene. The specific settings can be set according to the requirements and are not limited here.

[0083] Accordingly, the static collision result can be the target static collider with the target object among all static colliders in the game scene, or it can be the static collision position with the target object among the outer surfaces of all static colliders in the game scene. The specific settings can be made according to the requirements and are not limited here.

[0084] Accordingly, the dynamic collision result can be the target dynamic collider with the target object among all dynamic colliders in the game scene, or it can be the dynamic collision position with the target object among the outer surfaces of all dynamic colliders in the game scene. The specific settings can be made according to the requirements and are not limited here.

[0085] The final collision result is the result of the final analysis of the collision with the target object. This final collision result can be used to determine subsequent game strategies, such as those based on the above. Figure 3 In the example, in a game shooting scene, collider 305 is set as the game character currently shooting, and the virtual prop launched by collider 305 is the target object. If the final collision result is that the game character corresponding to the static collider or collider 304 is still holding the shield, it means that the shot made by collider 305 is invalid because it is blocked. Furthermore, if the final collision result is that the game character corresponding to the static collider or collider 304 is still holding a certain shooting position on the shield, then special effects can be rendered for that shooting position, such as rendering pit effects, to indicate that a shot has occurred at that position and improve the display quality of the game screen.

[0086] Specifically, based on the target object that triggered the collision event, collision detection is performed on static and dynamic colliders in the game scene to obtain static and dynamic collision results. This can include: determining the target static collider with the highest probability of collision with the target object from the static colliders in the game scene based on the motion information of the target object in the game scene; and determining the target dynamic collider with the highest probability of collision with the target object from the dynamic colliders in the game scene based on the motion information of the target object in the game scene.

[0087] Different game scenarios correspond to different motion information, and correspondingly, the methods for determining the target static or dynamic collider with the target object from the static or dynamic colliders in the game scenario are also different.

[0088] For example, the aforementioned motion information may be the direction of motion, and the method of determining the target static collider or dynamic collider with the highest probability of collision with the target object from the static colliders or dynamic colliders in the aforementioned game scene may be to determine the static collider that is closest to the target object in the aforementioned direction of motion from the static colliders in the aforementioned game scene as the target static collider, or to determine the dynamic collider that is closest to the target object in the aforementioned direction of motion from the dynamic colliders in the aforementioned game scene as the target static collider. The aforementioned game shooting scene may adopt the method in this example.

[0089] For example, the aforementioned motion information may be the direction of motion and the speed of motion. The method for determining the target static collider or dynamic collider with the highest probability of collision with the target object from the static colliders or dynamic colliders in the game scene may be to determine the static collider that is closest to the target object in the aforementioned direction of motion from the static colliders in the game scene as the target static collider, or further based on the motion mode and speed of the dynamic collider, that is, based on the motion mode and speed of the dynamic colliders in the game scene, to determine the dynamic collider that will collide with the target object the fastest from the dynamic colliders in the game scene as the target static collider. The game racing scene may adopt the method in this example.

[0090] Accordingly, determining the final collision result of the target object from the static collision result and the dynamic collision result may include: selecting the collider with the highest collision probability from the static collider and the dynamic collider as the final collision result.

[0091] It is understandable that if multiple dynamic colliders in a game scene are combined into a dynamic collision system and multiple static colliders are combined into a static collision system, then collision detection can be performed using the dynamic collision system and the static collision system respectively.

[0092] For example, if the dynamic collision result is the collision location with the highest probability of collision with the target object among the outer surfaces of all dynamic colliders in the game scene, then... Figure 6 As shown, Figure 6 These are static and dynamic colliders shown in the game's shooting scene. Figure 6 Colliders 601, 602, and 603 are static colliders. Figure 6 Colliders 604 and 605 are dynamic colliders, from Figure 6As can be seen, when the target object is a bullet fired by collider 605, based on the target object's direction of motion, it can be determined that the target object interacts with collider 604, and the interaction points are A2 and A1, with A1 as the dynamic collision result.

[0093] For example, if the dynamic collision result is the target collider with the above target object among all static colliders in the game scene with the highest probability of collision, then as follows: Figure 7 As shown, Figure 7 These are static and dynamic colliders shown in the game's shooting scene. Figure 7 Colliders 701, 702, and 703 are static colliders. Figure 7 Colliders 704 and 705 are dynamic colliders, from Figure 7 As can be seen, when the target object is the bullet fired by collider 705, based on the target object's movement direction, it can be determined that the target object interacts with colliders 701 and 702, and the interaction points are B1 and B2. Since B1 is closest to the target object, collider 702, where B1 is located, can be considered the target static collider.

[0094] For example, if the final collision result is the target static collider and the target dynamic collider in the game scene with the highest probability of colliding with the aforementioned target object, then... Figure 6 and Figure 7 The scene shown is the same scene. Therefore, collider 604 and collider 702 are the target dynamic collider and the target static collider, respectively. Since collider 702 is closest to the target object, collider 702 is used as the final collision detection result.

[0095] As can be seen from the above, the process involves creating a target game scene instance through a first process; determining a shared memory address for shared static collider data, wherein the static collider data stored in the shared memory address is shared by at least two game scene instances of at least one process; obtaining the target static collider data required by the target game scene instance from the shared memory address through the first process; creating a static collider in the game scene corresponding to the target game scene instance based on the target static collider data; obtaining target dynamic collider data for the target game scene instance through the first process; and creating a dynamic collider in the game scene corresponding to the target game scene instance based on the target static collider data. In this embodiment, by splitting the game scene instance into static collider data and dynamic collider data, and setting the shared static collider data of multiple game scene instances in a shared memory address, the process obtains the corresponding static collider data from the shared memory address, generates the static collider, and then generates the dynamic collider separately. This achieves the goal of satisfying multiple game scene instances by storing static collider data only once, greatly reducing the memory cost required to generate colliders in multiple game scenes.

[0096] To better implement the above methods, this application also provides a collision body generating device, which can be integrated into an electronic device, such as a computer device, which can be a terminal, server or other device.

[0097] The terminal can be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, personal computer, etc.; the server can be a single server or a server cluster composed of multiple servers.

[0098] For example, in this embodiment, the method of this application embodiment will be described in detail by taking the collider generation device specifically integrated into the server as an example. This embodiment provides a collider generation device, such as... Figure 8 As shown, the collider generating device may include:

[0099] Instance creation module 801 is used to create a target game scene instance through the first process;

[0100] Address determination module 802 is used to determine the shared memory address of the shared static collider data, wherein the static collider data stored in the shared memory address is shared by at least two game scene instances of at least one process.

[0101] The first creation module 803 is used to obtain the target static collider data required by the target game scene instance from the shared memory address through the first process, and create a static collider in the game scene corresponding to the target game scene instance based on the target static collider data.

[0102] The second creation module 804 is used to obtain target dynamic collider data for the target game scene instance through the first process, and create dynamic colliders in the game scene corresponding to the target game scene instance based on the target static collider data.

[0103] In some embodiments, the shared static collider data mentioned above includes at least one static collider data block, and each of the static collider data blocks corresponds to a shared memory address.

[0104] The first creation module 803 mentioned above is specifically used for:

[0105] Determine the target shared memory address corresponding to each static collider data block in the above target static collider data;

[0106] The first process described above retrieves the corresponding static collider data blocks from the shared memory addresses of each of the aforementioned targets.

[0107] In some embodiments, the above-described collider generating apparatus further includes an address request module, which is specifically used for:

[0108] If at least one of the first static collider data blocks in the aforementioned target static collider data does not have a target shared memory address, then the aforementioned first process applies for a shared memory address for the aforementioned first static collider data block, so as to store the aforementioned first static collider data block in the obtained shared memory address.

[0109] In some embodiments, the shared memory address is configured with a shared identifier, and the collider generation apparatus further includes a comparison module, which is specifically used for:

[0110] The second process compares the static collision body data blocks to which multiple shared identifiers belong;

[0111] If there are at least two second static collider data blocks with identical data, then one static collider data block shall be retained among the at least two second static collider data blocks.

[0112] The reserved static collider data block is the static collider data block required for at least two game scene instances that are respectively associated with the aforementioned second static collider data blocks.

[0113] In some embodiments, the instance creation module 801 described above is specifically used for:

[0114] The target game scene instance is created through the server's first process.

[0115] The address determination module 802 mentioned above is specifically used for:

[0116] Determine the shared memory address of the shared static collider data on the aforementioned server.

[0117] In some embodiments, the above-described collider generating apparatus further includes a collision detection module, which is specifically used for:

[0118] In response to the collision event in the above game scene, based on the target object that caused the collision event, collision detection is performed on the static collider and dynamic collider in the above game scene respectively to obtain the static collision result and the dynamic collision result.

[0119] The final collision result of the target object is determined from the above static collision results and the above dynamic collision results.

[0120] In some embodiments, the collision detection module is specifically used for:

[0121] Based on the motion information of the target object in the game scene, the static collider with the highest probability of collision with the target object is determined from the static colliders in the game scene.

[0122] Based on the motion information of the target object in the game scene, the target dynamic collider with the highest probability of collision with the target object is determined from the dynamic colliders in the game scene.

[0123] The collider with the highest collision probability among the above static and dynamic target colliders is taken as the final collision result.

[0124] As can be seen from the above, the collider generation device of this embodiment creates a target game scene instance through the instance creation module 801 first process; determines the shared memory address of the shared static collider data through the address determination module 802, wherein the static collider data stored in the shared memory address is shared by at least two game scene instances of at least one process; obtains the target static collider data required by the target game scene instance from the shared memory address through the first process through the first creation module 803, and creates a static collider in the game scene corresponding to the target game scene instance based on the target static collider data; and creates a static collider in the game scene corresponding to the target game scene instance through the second creation module 804 through the first process. The system obtains target dynamic collider data from the target game scene instance and creates a dynamic collider in the game scene corresponding to the target game scene instance based on the target static collider data. In this embodiment, by splitting the game scene instance into static collider data and dynamic collider data, the static collider data shared by multiple game scene instances is set in a shared memory address. The process obtains the corresponding static collider data from the shared memory address, generates the static collider, and then generates the dynamic collider separately. This achieves the goal of satisfying multiple game scene instances by storing the static collider data only once, which greatly reduces the memory cost required to generate colliders in multiple game scenes.

[0125] Accordingly, embodiments of this application also provide an electronic device, which can be a server. For example... Figure 9 As shown, Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 900 includes a processor 901 with one or more processing cores, a memory 902 with one or more computer-readable storage media, and a computer program stored on the memory 902 and executable on the processor. The processor 901 and the memory 902 are electrically connected. Those skilled in the art will understand that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0126] The processor 901 is the control center of the electronic device 900. It connects various parts of the electronic device 900 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 902, and calling data stored in the memory 902, it executes various functions of the electronic device 900 and processes data, thereby performing overall monitoring of the electronic device 900.

[0127] In this embodiment, the processor 901 in the electronic device 900 loads the instructions corresponding to the processes of one or more applications into the memory 902 according to the following steps, and the processor 901 runs the applications stored in the memory 902 to achieve various functions:

[0128] Create a target game scene instance through the first process;

[0129] Determine the shared memory address of the shared static collider data, wherein the static collider data stored in the shared memory address is shared by at least two game scene instances of at least one process;

[0130] The first process described above obtains the target static collider data required by the target game scene instance from the shared memory address, and creates a static collider in the game scene corresponding to the target game scene instance based on the target static collider data.

[0131] The first process described above obtains target dynamic collider data for the target game scene instance, and based on the target static collider data, creates a dynamic collider in the game scene corresponding to the target game scene instance.

[0132] In some embodiments, the shared static collider data mentioned above includes at least one static collider data block, and each of the static collider data blocks corresponds to a shared memory address.

[0133] The process described above, which involves retrieving the target static collider data required for the target game scene instance from the shared memory address via the first process, includes:

[0134] Determine the target shared memory address corresponding to each static collider data block in the above target static collider data;

[0135] The first process described above retrieves the corresponding static collider data blocks from the shared memory addresses of each of the aforementioned targets.

[0136] In some embodiments, it also includes:

[0137] If at least one of the first static collider data blocks in the aforementioned target static collider data does not have a target shared memory address, then the aforementioned first process applies for a shared memory address for the aforementioned first static collider data block, so as to store the aforementioned first static collider data block in the obtained shared memory address.

[0138] In some embodiments, the shared memory address configured with a shared identifier further includes:

[0139] The second process compares the static collision body data blocks to which multiple shared identifiers belong;

[0140] If there are at least two second static collider data blocks with identical data, then one static collider data block shall be retained among the at least two second static collider data blocks.

[0141] The reserved static collider data block is the static collider data block required for at least two game scene instances that are respectively associated with the aforementioned second static collider data blocks.

[0142] In some embodiments, the creation of a target game scene instance via a first process includes:

[0143] The target game scene instance is created through the server's first process.

[0144] The shared memory addresses for the aforementioned shared static collider data include:

[0145] Determine the shared memory address of the shared static collider data on the aforementioned server.

[0146] In some embodiments, after creating a dynamic collider in the game scene corresponding to the aforementioned target game scene instance, the method further includes:

[0147] In response to the collision event in the above game scene, based on the target object that caused the collision event, collision detection is performed on the static collider and dynamic collider in the above game scene respectively to obtain the static collision result and the dynamic collision result.

[0148] The final collision result of the target object is determined from the above static collision results and the above dynamic collision results.

[0149] In some embodiments, based on the target object that triggered the collision event, collision detection is performed on static and dynamic colliders in the game scene to obtain static and dynamic collision results, including:

[0150] Based on the motion information of the target object in the game scene, the static collider with the highest probability of collision with the target object is determined from the static colliders in the game scene.

[0151] Based on the motion information of the target object in the game scene, the target dynamic collider with the highest probability of collision with the target object is determined from the dynamic colliders in the game scene.

[0152] The final collision result of the target object determined from the static collision result and the dynamic collision result includes:

[0153] The collider with the highest collision probability among the above static and dynamic target colliders is taken as the final collision result.

[0154] Therefore, the electronic device 900 provided in this embodiment can bring the following technical effects: reduce the memory cost required to generate colliders in multiple game scenes.

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

[0156] Optional, such as Figure 9 As shown, the electronic device 900 also includes: a touch display screen 903, a radio frequency circuit 904, an audio circuit 905, an input unit 906, and a power supply 907. The processor 901 is electrically connected to the touch display screen 903, the radio frequency circuit 904, the audio circuit 905, the input unit 906, and the power supply 907. Those skilled in the art will understand that... Figure 9 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0157] The touch display screen 903 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The touch display screen 903 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 electronic device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. Optionally, the display panel can be configured using a liquid crystal display (LCD), organic light-emitting diode (OLED), or other similar technologies. 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 according to the operation commands. 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, transmitting the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 901. It can also receive and execute commands from the processor 901. 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 901 to determine the type of touch event. Subsequently, the processor 901 provides corresponding visual output on the display panel based on the type of touch event. In this embodiment, the touch panel and the display panel can be integrated into the touch display screen 903 to achieve input and output functions. However, in some embodiments, the touch panel and the touch display screen 903 can be implemented as two independent components to achieve input and output functions. That is, the touch display screen 903 can also be used as part of the input unit 906 to achieve input functions.

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

[0159] Audio circuitry 905 can be used to provide an audio interface between a user and an electronic device via a speaker and a microphone. Audio circuitry 905 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 905, converted back into audio data, and then processed by processor 901 before being transmitted via radio frequency circuitry 904 to, for example, another electronic device, or output to memory 902 for further processing. Audio circuitry 905 may also include an earphone jack to facilitate communication between peripheral headphones and electronic devices.

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

[0161] Power supply 907 is used to supply power to various components of electronic device 900. Optionally, power supply 907 can be logically connected to processor 901 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 907 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.

[0162] although Figure 9 As not shown in the diagram, the electronic device 900 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.

[0163] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0164] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0165] Therefore, embodiments of this application provide a computer-readable storage medium storing multiple computer programs that can be loaded by a processor to execute any of the collider generation methods provided in embodiments of this application. For example, the computer program can perform the following steps:

[0166] Create a target game scene instance through the first process;

[0167] Determine the shared memory address of the shared static collider data, wherein the static collider data stored in the shared memory address is shared by at least two game scene instances of at least one process;

[0168] The first process described above obtains the target static collider data required by the target game scene instance from the shared memory address, and creates a static collider in the game scene corresponding to the target game scene instance based on the target static collider data.

[0169] The first process described above obtains target dynamic collider data for the target game scene instance, and based on the target static collider data, creates a dynamic collider in the game scene corresponding to the target game scene instance.

[0170] In some embodiments, the shared static collider data mentioned above includes at least one static collider data block, and each of the static collider data blocks corresponds to a shared memory address.

[0171] The process described above, which involves retrieving the target static collider data required for the target game scene instance from the shared memory address via the first process, includes:

[0172] Determine the target shared memory address corresponding to each static collider data block in the above target static collider data;

[0173] The first process described above retrieves the corresponding static collider data blocks from the shared memory addresses of each of the aforementioned targets.

[0174] In some embodiments, it also includes:

[0175] If at least one of the first static collider data blocks in the aforementioned target static collider data does not have a target shared memory address, then the aforementioned first process applies for a shared memory address for the aforementioned first static collider data block, so as to store the aforementioned first static collider data block in the obtained shared memory address.

[0176] In some embodiments, the shared memory address configured with a shared identifier further includes:

[0177] The second process compares the static collision body data blocks to which multiple shared identifiers belong;

[0178] If there are at least two second static collider data blocks with identical data, then one static collider data block shall be retained among the at least two second static collider data blocks.

[0179] The reserved static collider data block is the static collider data block required for at least two game scene instances that are respectively associated with the aforementioned second static collider data blocks.

[0180] In some embodiments, the creation of a target game scene instance via a first process includes:

[0181] The target game scene instance is created through the server's first process.

[0182] The shared memory addresses for the aforementioned shared static collider data include:

[0183] Determine the shared memory address of the shared static collider data on the aforementioned server.

[0184] In some embodiments, after creating a dynamic collider in the game scene corresponding to the aforementioned target game scene instance, the method further includes:

[0185] In response to the collision event in the above game scene, based on the target object that caused the collision event, collision detection is performed on the static collider and dynamic collider in the above game scene respectively to obtain the static collision result and the dynamic collision result.

[0186] The final collision result of the target object is determined from the above static collision results and the above dynamic collision results.

[0187] In some embodiments, based on the target object that triggered the collision event, collision detection is performed on static and dynamic colliders in the game scene to obtain static and dynamic collision results, including:

[0188] Based on the motion information of the target object in the game scene, the static collider with the highest probability of collision with the target object is determined from the static colliders in the game scene.

[0189] Based on the motion information of the target object in the game scene, the target dynamic collider with the highest probability of collision with the target object is determined from the dynamic colliders in the game scene.

[0190] The final collision result of the target object determined from the static collision result and the dynamic collision result includes:

[0191] The collider with the highest collision probability among the above static and dynamic target colliders is taken as the final collision result.

[0192] As can be seen, the computer program can be loaded by the processor to execute any of the collider generation methods provided in the embodiments of this application, thereby bringing the following technical effects: reducing the memory cost required to generate colliders in multiple game scenes.

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

[0194] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0195] Since the computer program stored in the computer-readable storage medium can execute any of the collision body generation methods provided in the embodiments of this application, the beneficial effects that any of the collision body generation methods provided in the embodiments of this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.

[0196] The above provides a detailed description of a collision body generation method, apparatus, electronic device, and computer-readable storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A collision body generation method characterized by, The method includes: Create a target game scene instance through the first process; Determine the shared memory address of the shared static collider data, wherein the static collider data stored in the shared memory address is shared by at least two game scene instances of at least one process, and the shared static collider data includes at least one static collider data block, each of the static collider data blocks corresponding to a shared memory address. The first process obtains the target static collider data required by the target game scene instance from the shared memory address, and creates a static collider in the game scene corresponding to the target game scene instance based on the target static collider data. The first process acquires target dynamic collider data for the target game scene instance, and based on the target dynamic collider data, creates a dynamic collider in the game scene corresponding to the target game scene instance; The step of obtaining the target static collider data required for the target game scene instance from the shared memory address through the first process includes: Determine the target shared memory address corresponding to each static collider data block in the target static collider data; The first process retrieves the corresponding target static collider data blocks from the shared memory addresses of each target.

2. The collision body generation method according to claim 1, wherein Also includes: If at least one first static collider data block in the target static collider data does not have a target shared memory address, then the first process applies for a shared memory address for the first static collider data block so as to store the first static collider data block in the obtained shared memory address.

3. The collider generation method as described in claim 1, characterized in that, The shared memory address is configured with a shared identifier and also includes: The second process compares the static collision body data blocks to which the shared identifiers belong. If there are at least two second static collider data blocks with identical data, then one static collider data block is retained among the at least two second static collider data blocks; The reserved static collider data block is used as the static collider data block required for at least two game scene instances that are respectively associated with the second static collider data block.

4. The collider generation method as described in claim 1, characterized in that, The process of creating a target game scene instance through the first process includes: The target game scene instance is created through the server's first process; The determination of the shared memory address of the shared static collider data includes: Determine the shared memory address of the shared static collider data on the server.

5. The collider generation method according to any one of claims 1 to 4, characterized in that, After creating a dynamic collider in the game scene corresponding to the target game scene instance, the process further includes: In response to a collision event in the game scene, based on the target object that caused the collision event, collision detection is performed on static and dynamic colliders in the game scene to obtain static and dynamic collision results. The final collision result of the target object is determined from the static collision result and the dynamic collision result.

6. The collider generation method as described in claim 5, characterized in that, Based on the target object that triggered the collision event, collision detection is performed on static and dynamic colliders in the game scene to obtain static and dynamic collision results, including: Based on the motion information of the target object in the game scene, the target static collider with the highest probability of collision with the target object is determined from the static colliders in the game scene; Based on the motion information of the target object in the game scene, the target dynamic collider with the highest probability of collision with the target object is determined from the dynamic colliders in the game scene; Determining the final collision result of the target object from the static collision result and the dynamic collision result includes: The collider with the highest collision probability among the target static collider and the target dynamic collider is taken as the final collision result.

7. A collision body generating device, characterized in that, The device includes: The instance creation module is used to create instances of the target game scene through the first process. The address determination module is used to determine the shared memory address of the shared static collider data, wherein the static collider data stored in the shared memory address is shared by at least two game scene instances of at least one process, and the shared static collider data includes at least one static collider data block, each of the static collider data blocks corresponding to a shared memory address. The first creation module is used to obtain the target static collider data required by the target game scene instance from the shared memory address through the first process, and create a static collider in the game scene corresponding to the target game scene instance based on the target static collider data; The second creation module is used to obtain target dynamic collider data for the target game scene instance through the first process, and create dynamic colliders in the game scene corresponding to the target game scene instance based on the target dynamic collider data; The first creation module is used to determine the target shared memory address corresponding to each static collider data block in the target static collider data; and to obtain the corresponding target static collider data block from each target shared memory address through the first process.

8. An electronic device, characterized in that, The device includes a processor and a memory, the memory storing multiple instructions; the processor loads instructions from the memory to execute the collider generation method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to execute the collider generation method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Collision body stacking method, collision body generation method, device, equipment and storage medium

    CN110090447A

  • Virtual scene data processing method and device, equipment and storage medium

    CN116650946A