Game scene preloading method, game scene preloading device, medium and equipment

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

Patent Information

Application Number
CN202310760823.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-26
Publication Date
2026-09-29
Estimated Expiration
2043-06-26

AI Technical Summary

Technical Problem

[0005]本公开的目的在于提供一种游戏场景预加载方法及装置、计算机可读存储介质及电子设备,可以解决相关技术中切换游戏场景时效率较低的问题

Benefits of technology

[0014]本公开的一种实施例提供的游戏场景预加载方法中,可以在游戏进行过程中,控制游戏虚拟对象在游戏子场景中执行游戏动作,确定游戏虚拟对象所要切换的目标游戏子场景,获取目标游戏子场景对应的多个游戏资源标识,将目标游戏子场景的多个游戏资源标识分配到至少一个线程中,将多个游戏资源标识压入线程对应的存储区域中,从存储区域中按照弹出速率依次弹出多个游戏资源标识,根据弹出的多个游戏资源标识将多个游戏资源标识对应的多个游戏资源加载至内存中,在游戏虚拟对象切换游戏场景时,从内存中获取多个游戏资源,根据多个游戏资源构建目标游戏子场景。通过本公开的方案,一方面,可以确定所要切换的目标游戏子场景,缩小游戏资源的加载范围,从而加快游戏场景的构建效率;另一方面,可以将目标游戏子场景的游戏资源加载至内存中,在需要根据该些游戏资源构建游戏场景时,直接从内存中进行获取,避免从磁盘中获取游戏资源速度较慢的问题,从而加快游戏场景的构建效率;再一方面,可以控制游戏资源标识弹出的速率,从而控制游戏资源加载至内存的速率,避免目标游戏子场景的多个游戏资源加载的过程影响到当前游戏子场景的构建,从而保证当前游戏画面的稳定性,进而保证了玩家了游戏体验。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116747514B_ABST
    Figure CN116747514B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of computer, in particular to a game scene preloading method, a game scene preloading device, a storage medium and equipment, the method comprises: controlling a game virtual object to perform a game action in a game sub-scene; obtaining a plurality of game resource identifiers corresponding to a target game sub-scene; distributing the plurality of game resource identifiers of the target game sub-scene to at least one thread, and pushing the plurality of game resource identifiers into a storage area corresponding to the thread; sequentially popping the plurality of game resource identifiers from the storage area at a pop rate, and loading a plurality of game resources corresponding to the plurality of game resource identifiers into a memory according to the popped plurality of game resource identifiers; when the game virtual object switches the game scene, obtaining the plurality of game resources from the memory, and constructing the target game sub-scene according to the plurality of game resources. Through the technical scheme of the embodiments of the present disclosure, the problem of low efficiency when switching the game scene in the related art can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and more specifically, to a game scene preloading method, a game scene preloading device, a computer-readable storage medium, and an electronic device. Background Technology

[0002] With the development of terminal devices and the gaming industry, a large number of games of different themes have emerged to meet the needs of players. Some games require the use of a large amount of game resources to construct game scenes, such as model resources, texture resources, and material resources. These game resources enrich the game details and bring players an ultimate gaming experience.

[0003] As the game progresses, new game scenes need to be loaded or switched continuously. This requires retrieving the relevant game resources from the device's disk. However, because the number of game resources needed to build a scene is large, it takes a considerable amount of time to load or switch scenes successfully, resulting in poor efficiency and significantly impacting the player's gaming experience.

[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0005] The purpose of this disclosure is to provide a game scene preloading method and apparatus, a computer-readable storage medium and an electronic device, which can solve the problem of low efficiency when switching game scenes in related technologies.

[0006] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part from practice of this disclosure.

[0007] According to a first aspect of this disclosure, a game scene preloading method is provided, characterized in that the method includes: during game execution, controlling a game virtual object to perform game actions in a game sub-scene; wherein the game scene includes multiple game sub-scenes; determining the target game sub-scene to which the game virtual object is to switch, and obtaining multiple game resource identifiers corresponding to the target game sub-scene; wherein the game resource identifiers are used to indicate the game resources corresponding to the game resource identifiers; allocating the multiple game resource identifiers of the target game sub-scene to at least one thread, and pushing the multiple game resource identifiers into the storage area corresponding to the thread; sequentially popping the multiple game resource identifiers from the storage area according to a popping rate, and loading the multiple game resources corresponding to the multiple game resource identifiers into memory according to the popped multiple game resource identifiers; wherein the popping rate is used to indicate the rate at which the game resource identifiers are sequentially popped from the storage area; and when the game virtual object switches game scenes, obtaining multiple game resources from memory, and constructing the target game sub-scene according to the multiple game resources.

[0008] According to a second aspect of this disclosure, a game scene preloading device is provided, characterized in that the device comprises: a virtual object control module, used to control a game virtual object to perform game actions in a game sub-scene during game execution; wherein the game scene includes multiple game sub-scenes; a resource identifier acquisition module, used to determine the target game sub-scene to which the game virtual object is to switch, and acquire multiple game resource identifiers corresponding to the target game sub-scene; wherein the game resource identifiers are used to indicate the game resources corresponding to the game resource identifiers; a resource identifier pushing module, used to allocate multiple game resource identifiers of the target game sub-scene to at least one thread, and push the multiple game resource identifiers into the storage area corresponding to the thread; a game resource loading module, used to sequentially pop multiple game resource identifiers from the storage area according to a pop-up rate, and load multiple game resources corresponding to the multiple game resource identifiers into memory according to the popped multiple game resource identifiers; wherein the pop-up rate is used to indicate the rate at which the game resource identifiers are sequentially popped from the storage area; and a target scene construction module, used to acquire multiple game resources from memory when the game virtual object switches game scenes, and construct the target game sub-scene according to the multiple game resources.

[0009] According to a third aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the game scene preloading method of the first aspect of the above embodiments.

[0010] According to a fourth aspect of this disclosure, an electronic device is provided, comprising:

[0011] One or more processors; and

[0012] A memory is used to store one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the game scene preloading method as described in the first aspect of the above embodiments.

[0013] The technical solutions provided in this disclosure may have the following beneficial effects:

[0014] In one embodiment of the game scene preloading method provided by this disclosure, during the game, a game virtual object can be controlled to perform game actions in a game sub-scene. The target game sub-scene to which the game virtual object needs to switch is determined, multiple game resource identifiers corresponding to the target game sub-scene are obtained, the multiple game resource identifiers of the target game sub-scene are allocated to at least one thread, the multiple game resource identifiers are pushed into the storage area corresponding to the thread, the multiple game resource identifiers are popped out of the storage area in sequence according to the popping rate, the multiple game resources corresponding to the popped multiple game resource identifiers are loaded into memory according to the popped multiple game resource identifiers, and when the game virtual object switches game scenes, the multiple game resources are obtained from memory, and the target game sub-scene is constructed according to the multiple game resources. The solution disclosed herein achieves several advantages. First, it allows for the identification of the target game sub-scene to be switched, narrowing the scope of game resource loading and thus accelerating the construction efficiency of the game scene. Second, it enables the loading of game resources from the target game sub-scene into memory, allowing for direct retrieval from memory when the game scene needs to be constructed based on these resources, avoiding the slow speed of retrieving game resources from the disk and further accelerating the construction efficiency of the game scene. Third, it allows for the control of the rate at which game resource identifiers pop up, thereby controlling the rate at which game resources are loaded into memory and preventing the loading process of multiple game resources from the target game sub-scene from affecting the construction of the current game sub-scene, thus ensuring the stability of the current game screen and ultimately guaranteeing the player's gaming experience.

[0015] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:

[0017] Figure 1 The illustration shows a schematic diagram of an exemplary system architecture for which an embodiment of the game scene preloading method of the present disclosure can be applied;

[0018] Figure 2 A flowchart illustrating a game scene preloading method in an exemplary embodiment of this disclosure is shown schematically.

[0019] Figure 3 This schematically illustrates a flowchart of a process for determining a game sub-scene as the target game sub-scene to be switched to by a game virtual object in an exemplary embodiment of this disclosure.

[0020] Figure 4 This schematically illustrates a flowchart of obtaining multiple game resource identifiers corresponding to a game sub-scene based on multiple game resources within a game sub-scene in an exemplary embodiment of this disclosure;

[0021] Figure 5 This illustration schematically shows a game scene divided into multiple game sub-scenes in an exemplary embodiment of the present disclosure;

[0022] Figure 6 This illustration shows a schematic diagram of a method in an exemplary embodiment of the present disclosure for scanning multiple game sub-scenes corresponding to a game scene using a resource distribution analyzer to obtain resource distribution data.

[0023] Figure 7 This illustration schematically shows a game scene preloading method according to an exemplary embodiment of the present disclosure;

[0024] Figure 8 This illustration schematically shows a method for controlling the rate at which game resource identifiers are sequentially popped from the storage area in an exemplary embodiment of the present disclosure.

[0025] Figure 9 This schematic diagram illustrates the composition of a game scene preloading device according to an exemplary embodiment of the present disclosure;

[0026] Figure 10 The schematic diagram illustrates a structural schematic of a computer system suitable for implementing an electronic device according to exemplary embodiments of the present disclosure. Detailed Implementation

[0027] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that this disclosure will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., may be employed. In other instances, well-known structures, methods, apparatuses, implementations, materials, or operations are not shown or described in detail to avoid obscuring various aspects of this disclosure.

[0028] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, or in one or more software-hardened modules, or in different network and / or processor devices and / or microcontroller devices.

[0029] With the development of terminal devices and the gaming industry, a large number of games of different themes have emerged to meet the needs of players. Typically, game logic can be controlled by a server. After receiving instructions uploaded by the client, the server can issue game protocols based on the game logic, and the client will then execute relevant actions according to the game protocols.

[0030] However, when the game logic is complex, multiple game protocols may be sent to the client at the same time. When the client receives multiple game protocols, it will execute these game protocols simultaneously, resulting in chaotic in-game behavior.

[0031] Figure 1 A schematic diagram of an exemplary system architecture for which the game scene preloading method of embodiments of the present disclosure can be applied is shown.

[0032] like Figure 1 As shown, system architecture 1000 may include one or more of terminal devices 1001, 1002, and 1003, network 1004, and server 1005. Network 1004 is used as a medium to provide a communication link between terminal devices 1001, 1002, and 1003 and server 1005. Network 1004 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.

[0033] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included. For example, server 1005 could be a server cluster composed of multiple servers.

[0034] Users can use terminal devices 1001, 1002, and 1003 to interact with server 1005 via network 1004 to receive or send messages, etc. Terminal devices 1001, 1002, and 1003 can be various electronic devices with displays, including but not limited to smartphones, tablets, laptops, and desktop computers. Additionally, server 1005 can be a server providing various services.

[0035] In one embodiment, the execution entity of the game scene preloading method of this disclosure can be a server 1005. The server 1005 can determine the target game sub-scene that the game virtual object needs to switch to, and then return the determined target game sub-scene to the terminal devices 1001, 1002, and 1003, so that the terminal devices 1001, 1002, and 1003 can control the game virtual object to perform game actions in the game sub-scene during the game process, obtain multiple game resource identifiers corresponding to the target game sub-scene, allocate the multiple game resource identifiers of the target game sub-scene to at least one thread, push the multiple game resource identifiers into the storage area corresponding to the thread, pop the multiple game resource identifiers from the storage area in sequence according to the popping rate, load the multiple game resources corresponding to the multiple game resource identifiers into memory according to the popped multiple game resource identifiers, and when the game virtual object switches game scenes, obtain multiple game resources from memory and construct the target game sub-scene according to the multiple game resources.

[0036] Furthermore, the game scene preloading method disclosed herein can also be executed through terminal devices 1001, 1002, and 1003 to realize the game scene preloading process. During game execution, terminal devices 1001, 1002, and 1003 can control game virtual objects to perform game actions in game sub-scenes, determine the target game sub-scene to which the game virtual object needs to switch, obtain multiple game resource identifiers corresponding to the target game sub-scene, allocate the multiple game resource identifiers of the target game sub-scene to at least one thread, push the multiple game resource identifiers into the storage area corresponding to the thread, pop the multiple game resource identifiers sequentially from the storage area according to the popping rate, load the multiple game resources corresponding to the popped game resource identifiers into memory, and when the game virtual object switches game scenes, retrieve the multiple game resources from memory and construct the target game sub-scene based on the multiple game resources.

[0037] refer to Figure 2The diagram illustrates a flowchart of a game scene preloading method in this exemplary embodiment, which may include the following steps:

[0038] Step S210: During the game, control the game virtual object to perform game actions in the game sub-scene; wherein, the game scene includes multiple game sub-scenes;

[0039] Step S220: Determine the target game sub-scene to which the game virtual object needs to switch, and obtain multiple game resource identifiers corresponding to the target game sub-scene; wherein, the game resource identifier is used to indicate the game resource corresponding to the game resource identifier;

[0040] Step S230: Assign multiple game resource identifiers of the target game sub-scene to at least one thread, and push the multiple game resource identifiers into the storage area corresponding to the thread.

[0041] Step S240: Pop multiple game resource identifiers sequentially from the storage area according to the pop-up rate, and load multiple game resources corresponding to the multiple game resource identifiers into memory according to the popped game resource identifiers; wherein, the pop-up rate is used to indicate the rate at which the game resource identifiers are popped sequentially from the storage area;

[0042] Step S250: When the game virtual object switches game scenes, multiple game resources are retrieved from memory, and the target game sub-scene is constructed based on the multiple game resources.

[0043] In one embodiment of the game scene preloading method provided by this disclosure, during the game, a game virtual object can be controlled to perform game actions in a game sub-scene. The target game sub-scene to which the game virtual object needs to switch is determined, multiple game resource identifiers corresponding to the target game sub-scene are obtained, the multiple game resource identifiers of the target game sub-scene are allocated to at least one thread, the multiple game resource identifiers are pushed into the storage area corresponding to the thread, the multiple game resource identifiers are popped out of the storage area in sequence according to the popping rate, the multiple game resources corresponding to the popped multiple game resource identifiers are loaded into memory according to the popped multiple game resource identifiers, and when the game virtual object switches game scenes, the multiple game resources are obtained from memory, and the target game sub-scene is constructed according to the multiple game resources. The solution disclosed herein achieves several advantages. First, it allows for the identification of the target game sub-scene to be switched, narrowing the scope of game resource loading and thus accelerating the construction efficiency of the game scene. Second, it enables the loading of game resources from the target game sub-scene into memory, allowing for direct retrieval from memory when the game scene needs to be constructed based on these resources, avoiding the slow speed of retrieving game resources from the disk and further accelerating the construction efficiency of the game scene. Third, it allows for the control of the rate at which game resource identifiers pop up, thereby controlling the rate at which game resources are loaded into memory and preventing the loading process of multiple game resources from the target game sub-scene from affecting the construction of the current game sub-scene, thus ensuring the stability of the current game screen and ultimately guaranteeing the player's gaming experience.

[0044] In one example embodiment of this disclosure, the games involved in the solution of this disclosure may include various types of games, such as TPS (third-person shooter), FPS (first-person shooter), RPG (role-playing game), ACT (action game), SLG (strategy game), FTG (fighting game), SPG (sports game), RCG (racing game), AVG (adventure game), etc. As long as it involves the construction of game scenes, the game scene preloading method of this disclosure can be applied.

[0045] Below, we will combine Figure 2 The embodiments will provide a more detailed description of steps S210 to S250 of the game scene preloading method in this exemplary embodiment.

[0046] Step S210: During the game, control the game virtual object to perform game actions in the game sub-scene;

[0047] In one example embodiment of this disclosure, game virtual objects can be controlled to perform game actions in game sub-scenes during gameplay. A game scene includes multiple game sub-scenes. Specifically, "during gameplay" refers to the state after the game application starts, such as when the player enters a game match, game competition, game story, or game lobby. For example, in a competitive game, a player can match with other players in the game lobby and engage in battle. At this time, the game is in progress. After a successful match, multiple player-controlled game virtual objects enter the game virtual scene, and the players control their respective game virtual objects to engage in battle. This state is also considered "during gameplay."

[0048] It should be noted that this disclosure does not impose any special restrictions on the specific form of the game process.

[0049] In one example embodiment of this disclosure, for a game, there is a game scene, which includes multiple game sub-scenes. For example, the game scene corresponding to the game can be divided into multiple game sub-scenes.

[0050] Furthermore, game sub-scenes can include game waiting scenes. For example, in some games, after entering the game, players need to match with other virtual game objects in a game matchmaking lobby to play the game; this game matchmaking lobby is a game waiting scene.

[0051] In one exemplary embodiment of this disclosure, game virtual objects can be controlled to perform game actions within game sub-scenes during gameplay. For example, game virtual objects can be controlled to perform attack, movement, and defense actions within game sub-scenes.

[0052] It should be noted that this disclosure does not impose any special restrictions on the specific types of game actions that control virtual game objects to perform in game sub-scenes.

[0053] Step S220: Determine the target game sub-scene to which the game virtual object needs to switch, and obtain multiple game resource identifiers corresponding to the target game sub-scene;

[0054] In one example embodiment of this disclosure, after controlling a game virtual object to perform game actions in a game sub-scene, the target game sub-scene to which the game virtual object needs to switch can be determined, and multiple game resource identifiers corresponding to the target game sub-scene can be obtained. Specifically, the game sub-scene is the game sub-scene where the game virtual object is currently located. When it is determined that the game virtual object needs to switch from the current game sub-scene to another game sub-scene, the target game sub-scene to which the game virtual object needs to switch can be obtained first.

[0055] For example, a game scene includes game sub-scene A, game sub-scene B, game sub-scene C, and game sub-scene D. The current game sub-scene is game sub-scene A. At this time, the target game sub-scene to be switched to is game sub-scene C.

[0056] It should be noted that this disclosure does not impose any special limitations on the specific method for determining the target game sub-scene to which the game virtual object should switch.

[0057] In one example embodiment of this disclosure, when determining the target game sub-scene to which a game virtual object needs to switch, control operations targeting the game virtual object can be obtained, and the target game sub-scene to which the game virtual object needs to switch can be determined based on the control operations. Specifically, different control operations targeting the game virtual object result in different target game scenes to which the game virtual object needs to switch.

[0058] For example, a control operation on a virtual game object is a movement control operation. This means that the virtual game object can be moved within a game sub-scene using the movement control operation. When the final position of the movement control operation is located in another game sub-scene, that game sub-scene can be identified as the target game sub-scene. Another example is a control operation on a virtual game object that is a task execution operation. After inputting the task execution operation, an automatic pathfinding function is triggered. When the endpoint of the automatic pathfinding function is located in another game sub-scene, that game sub-scene can be identified as the target game sub-scene. Yet another example is a control operation on a virtual game object that is a task execution operation. If the task corresponding to the task execution operation is to clear a certain game dungeon, then the game sub-scene corresponding to that game dungeon can be identified as the target game sub-scene.

[0059] It should be noted that this disclosure does not impose any special limitations on the specific method by which the target game sub-scene to be switched based on the control operation.

[0060] In one example embodiment of this disclosure, after determining the target game sub-scene to which the game virtual object needs to switch, multiple game resource identifiers corresponding to the target game sub-scene can be obtained. These game resource identifiers indicate the game resources corresponding to them. Specifically, game resources may include models, textures, patterns, animation data, etc., within the game.

[0061] It should be noted that this disclosure does not impose any specific restrictions on the type of game resources.

[0062] Specifically, the game resource identifier is the identifier corresponding to multiple game resources in the target game sub-scene. You can configure the game resource identifier corresponding to each game resource in the game scene. After determining the target game sub-scene, you can use the game resource identifier corresponding to the multiple game resources included in the target game sub-scene.

[0063] It should be noted that this disclosure does not impose any special restrictions on the specific methods for obtaining multiple game resource identifiers corresponding to the target game sub-scene.

[0064] In one example embodiment of this disclosure, the target game sub-scene is a game scene within a preset range of the location to which the game virtual object wants to switch. Specifically, when the game virtual object switches from the current game sub-scene to the target game sub-scene, it needs to be located at a certain position within the target game sub-scene. This position can be determined as the location to which the game virtual object wants to switch, and the game scene within a preset range of this position can be determined as the target game sub-scene.

[0065] For example, the target game sub-scene is a game instance, which includes multiple points, including point A. When a game virtual object switches from the current game sub-scene to the game instance, the game virtual object will be located at point A. At this time, the game scene with point A as the center and a radius of 50 game distance units can be determined as the target game sub-scene.

[0066] It should be noted that this disclosure does not impose any special limitations on the specific values ​​of the preset range.

[0067] In one example embodiment of this disclosure, the location to be switched to by the game virtual object can be obtained, the game sub-scene where the location is located can be determined, and the game sub-scene can be identified as the target game sub-scene to which the game virtual object wants to switch. (Refer to...) Figure 3 As shown, determining the game sub-scene as the target game sub-scene to be switched to by the game virtual object may include the following steps S310 to S320:

[0068] Step S310: Obtain the position to be switched by the game virtual object and determine the game sub-scene where the position is located;

[0069] Step S320: Determine the game sub-scene as the target game sub-scene that the game virtual object wants to switch to.

[0070] In one example embodiment of this disclosure, the location to be switched to by the game virtual object can be obtained, and the game sub-scene where the location is located can be determined. Specifically, when the game virtual object switches from the current game sub-scene to the target game sub-scene, it needs to be located in a certain position within the target game sub-scene. This position can be determined as the location to be switched to by the game virtual object, and the game sub-scene where the switch is located can be determined. The game sub-scene is then determined as the target game sub-scene to which the game virtual object wants to switch.

[0071] For example, the game scene can be divided into multiple game sub-scenes, namely: game sub-scene A, game sub-scene B, game sub-scene C, and game sub-scene D. Each game sub-scene occupies one-quarter of the game scene. The position to which the game virtual object needs to switch can be obtained. When the position to which the game virtual object needs to switch is in game sub-scene C, game sub-scene C can be determined as the target game sub-scene.

[0072] Through the above steps S310 to S320, the position to be switched to by the game virtual object can be obtained, the game sub-scene where the position is located can be determined, and the game sub-scene can be determined as the target game sub-scene to which the game virtual object is to switch.

[0073] Step S230: Assign multiple game resource identifiers of the target game sub-scene to at least one thread, and push the multiple game resource identifiers into the storage area corresponding to the thread.

[0074] In one example embodiment of this disclosure, after obtaining multiple game resource identifiers corresponding to the target game sub-scene through the above steps, the multiple game resource identifiers of the target game sub-scene can be allocated to at least one thread, and the multiple game resource identifiers can be pushed into the storage area corresponding to the thread. Specifically, each thread has its own storage area. For example, the storage area may include a heap or a stack. In a stack, data is entered and exited in a first-in, first-out manner, while in a heap, data is entered and exited in a first-in, last-out manner. It should be noted that this disclosure does not impose any special limitations on the specific type of storage area corresponding to the thread.

[0075] In one example embodiment of this disclosure, multiple game resource identifiers of the target game sub-scene can be assigned to one thread, or multiple game resource identifiers of the target game sub-scene can be assigned to multiple threads, and the game resource identifiers can be pushed into the storage area corresponding to the thread. The thread may include the main thread and child threads.

[0076] For example, if the target game sub-scene corresponds to multiple game resource identifiers, namely Game Resource Identifier A, Game Resource Identifier B, Game Resource Identifier C, Game Resource Identifier D, and Game Resource Identifier E, all game resource identifiers can be assigned to a single thread A and pushed into the storage area of ​​thread A; or, Game Resource Identifiers A, B, and C can be assigned to thread A and pushed into the storage area of ​​thread A, while Game Resource Identifiers D and E can be assigned to thread B and pushed into the storage area of ​​thread B.

[0077] It should be noted that this disclosure does not impose any special restrictions on the specific method of allocating multiple game resource identifiers of the target game sub-scene to at least one thread.

[0078] In one exemplary embodiment of this disclosure, multiple game resource identifiers of a target game sub-scene can be allocated to at least one sub-thread via the main thread, and the multiple game resource identifiers can be pushed into the storage area corresponding to the sub-thread. Specifically, the thread may include a main thread and sub-threads, and the multiple game resource identifiers of the target game sub-scene can be allocated to at least one sub-thread via the main thread, that is, task allocation is performed only through the main thread, and the multiple game resource identifiers are pushed into the storage area corresponding to the sub-thread.

[0079] Furthermore, when allocating multiple game resource identifiers for a target game sub-scene to at least one sub-thread via the main thread, the allocation can be based on the load of each sub-thread. Specifically, game resource identifiers can be preferentially allocated to sub-threads with lower loads.

[0080] It should be noted that this disclosure does not impose any special restrictions on the specific method of allocating multiple game resource identifiers of the target game sub-scene to at least one sub-thread through the main thread.

[0081] Step S240: Pop multiple game resource identifiers sequentially from the storage area according to the pop-up rate, and load the multiple game resources corresponding to the multiple game resource identifiers into memory according to the popped multiple game resource identifiers;

[0082] In one exemplary embodiment of this disclosure, after pushing multiple game resource identifiers into the thread's corresponding storage area through the above steps, multiple game resource identifiers can be sequentially popped from the storage area according to a popping rate. The popping rate indicates the rate at which game resource identifiers are sequentially popped from the storage area. Specifically, after popping game resource identifiers from the thread's storage area, multiple game resources corresponding to the popped game resource identifiers can be loaded into memory. That is, popping game resource identifiers from the thread's storage area indicates that the corresponding transaction for the game resource identifier needs to be executed (loading the game resources corresponding to the game resource identifier into memory).

[0083] Specifically, the pop-up rate can be used to indicate the frequency or number of game resource identifiers popped from the thread's corresponding storage area. The pop-up frequency indicates how often a pop-up occurs, and the pop-up number indicates how many game resource identifiers are popped each time. A higher pop-up rate means a higher frequency or speed at which game resource identifiers are popped from the thread's corresponding storage area, i.e., a higher rate at which multiple game resource identifiers corresponding to multiple game resources are loaded into memory; a lower pop-up rate means a lower frequency or speed at which game resource identifiers are popped from the thread's corresponding storage area, i.e., a lower rate at which multiple game resource identifiers corresponding to multiple game resources are loaded into memory.

[0084] In one example embodiment of this disclosure, multiple game resources corresponding to multiple game resource identifiers can be loaded into memory based on the pop-up multiple game resource identifiers. Specifically, the game resource identifiers can be used to indicate game resources. After obtaining the game resource identifiers, the game resources corresponding to the game resource identifiers can be obtained from the terminal device based on the game resource identifiers, and these game resources can be loaded into memory.

[0085] For example, the game resources corresponding to the game resource identifier can be obtained from the disk of the terminal device based on the game resource identifier, and these game resources can be loaded into memory.

[0086] It should be noted that this disclosure does not impose any special restrictions on the specific method of loading multiple game resources corresponding to multiple game resource identifiers into memory based on the pop-up multiple game resource identifiers.

[0087] In one example embodiment of this disclosure, the pop-up rate can be adjusted to sequentially pop multiple game resource identifiers from the storage area according to the adjusted pop-up rate. Specifically, the pop-up rate can be adjusted to control the speed at which multiple game resource identifiers are popped from the thread's storage area.

[0088] It should be noted that this disclosure does not impose any special restrictions on the method of adjusting the pop-up rate.

[0089] In one example embodiment of this disclosure, the pop-up rate includes 0. When the pop-up rate is 0, popping game resource identifiers from the storage area stops. Specifically, the pop-up rate can be set to 0. When the pop-up rate is 0, it means that game resource identifiers are not popped from the storage area, that is, popping game resource identifiers from the storage area stops.

[0090] Furthermore, a pop-up rate of 0 includes stopping the pop-up of game resource identifiers from the storage area and clearing the game resource identifiers from the storage area corresponding to the thread.

[0091] In one example embodiment of this disclosure, when a thread is creating game resources corresponding to a game sub-scene, the pop-up rate can be adjusted to 0 to stop popping game resource identifiers from the storage area, or the pop-up rate can be reduced to decrease the rate at which multiple game resource identifiers are popped sequentially from the storage area. Specifically, when a thread is creating game resources corresponding to the game sub-scene where the current game virtual object is located, the pop-up rate can be adjusted to 0, or the pop-up rate can be reduced, to avoid affecting the creation of game resources corresponding to the current game sub-scene when game resource identifiers corresponding to the target game sub-scene are popped from the storage area.

[0092] Specifically, when a thread needs to participate in the creation of both the current game sub-scene and the target game sub-scene, the creation of the target game sub-scene can be paused or slowed down, since the creation of the current game sub-scene needs to be prioritized. This can be achieved by adjusting the pop-up rate to 0 to stop popping game resource identifiers from the storage area, or by reducing the pop-up rate to decrease the rate at which multiple game resource identifiers are popped from the storage area sequentially. This slows down the creation of the target game sub-scene, ensuring that the creation of the current game sub-scene is prioritized and guaranteeing the player's immediate gaming experience.

[0093] Furthermore, each terminal device has a different configuration, and different pop-up rates can be used for different terminal devices.

[0094] Step S250: When the game virtual object switches game scenes, multiple game resources are retrieved from memory, and the target game sub-scene is constructed based on the multiple game resources.

[0095] In one example embodiment of this disclosure, after loading multiple game resources corresponding to multiple game resource identifiers into memory through the above steps, multiple game resources can be retrieved from memory when the game virtual object switches game scenes, and a target game sub-scene can be constructed based on these multiple game resources. Specifically, switching game scenes for a game virtual object means that the game virtual object leaves its current game sub-scene and enters the target game sub-scene. When switching game scenes, multiple loaded game resources (multiple game resources corresponding to the target game sub-scene) can be retrieved from memory, and the target game sub-scene can be constructed based on these game resources.

[0096] For example, when controlling a virtual game object to enter a certain game instance (corresponding to the target game sub-scene), it is necessary to enter the target game sub-scene from the current game sub-scene. This is the time for the virtual game object to switch game scenes.

[0097] Furthermore, when constructing a target game sub-scene based on multiple game resources, a waiting screen can be displayed in the graphical user interface, and the target game sub-scene can be displayed after it is constructed; alternatively, the process of constructing the target game sub-scene can be displayed directly in the graphical user interface.

[0098] It should be noted that this disclosure does not impose any special restrictions on the specific method of constructing target game sub-scenes based on multiple game resources.

[0099] In one example embodiment of this disclosure, a game scene corresponding to the game can be obtained, the game scene can be divided into multiple game sub-scenes, and multiple game resource identifiers corresponding to the game sub-scenes can be obtained based on multiple game resources within the game sub-scenes. (Refer to...) Figure 4 As shown, obtaining multiple game resource identifiers corresponding to multiple game resources within a game sub-scene can include the following steps S410 to S420:

[0100] Step S410: Obtain the game scene corresponding to the game and divide the game scene into multiple game sub-scenes;

[0101] Step S420: Obtain multiple game resource identifiers corresponding to the game sub-scene based on multiple game resources within the game sub-scene.

[0102] In one example embodiment of this disclosure, a game scene corresponding to the game can be obtained, the game scene can be divided into multiple game sub-scenes, and multiple game resource identifiers corresponding to the game sub-scene can be obtained based on multiple game resources within the game sub-scene. Each game sub-scene includes multiple game resources. Specifically, each game sub-scene has multiple game resources. For each game resource, a game resource identifier corresponding to each game resource can be generated during the pre-configuration stage. The resulting multiple game resource identifiers are the multiple game resource identifiers corresponding to that game sub-scene.

[0103] It should be noted that this disclosure does not impose any special restrictions on the specific method of obtaining multiple game resource identifiers corresponding to multiple game resources within a game sub-scene.

[0104] like Figure 5 The diagram illustrates a method of dividing a game scene into multiple game sub-scenes. Game scene 501 can be divided into multiple game sub-scenes 5011, each game sub-scene 5011 consisting of multiple entities 502, and each entity consisting of multiple game resources (e.g., game resource A, game resource B, game resource C, and game resource D).

[0105] For example, during the game development phase, the game scene can be divided into multiple game sub-scenes (levels), and relevant information of each game sub-scene (such as name, location, etc.) can be saved. Entities in each game sub-scene can be obtained, and the game resources corresponding to each entity can be obtained. Game resource identifiers corresponding to each game resource can be generated based on each game resource, or the game resource identifiers of each game resource can be saved in each game resource, and the game resource identifiers corresponding to each game resource can be obtained directly from each game resource.

[0106] For example, game resource identifiers can be GUIDs (Globally Unique Identifiers).

[0107] It should be noted that this disclosure does not impose any special restrictions on the specific method of obtaining multiple game resource identifiers corresponding to multiple game resources within a game sub-scene.

[0108] Through the above steps S410 to S420, the game scene corresponding to the game can be obtained, the game scene can be divided into multiple game sub-scenes, and multiple game resource identifiers corresponding to the game sub-scene can be obtained based on multiple game resources within the game sub-scene.

[0109] In one embodiment of the game scene preloading method provided by this disclosure, during the game, a game virtual object can be controlled to perform game actions in a game sub-scene. The target game sub-scene to which the game virtual object needs to switch is determined, multiple game resource identifiers corresponding to the target game sub-scene are obtained, the multiple game resource identifiers of the target game sub-scene are allocated to at least one thread, the multiple game resource identifiers are pushed into the storage area corresponding to the thread, the multiple game resource identifiers are popped out of the storage area in sequence according to the popping rate, the multiple game resources corresponding to the popped multiple game resource identifiers are loaded into memory according to the popped multiple game resource identifiers, and when the game virtual object switches game scenes, the multiple game resources are obtained from memory, and the target game sub-scene is constructed according to the multiple game resources. The solution disclosed herein achieves several advantages. First, it allows for the identification of the target game sub-scene to be switched, narrowing the scope of game resource loading and thus accelerating the construction efficiency of the game scene. Second, it enables the loading of game resources from the target game sub-scene into memory, allowing for direct retrieval from memory when the game scene needs to be constructed based on these resources, avoiding the slow speed of retrieving game resources from the disk and further accelerating the construction efficiency of the game scene. Third, it allows for the control of the rate at which game resource identifiers pop up, thereby controlling the rate at which game resources are loaded into memory and preventing the loading process of multiple game resources from the target game sub-scene from affecting the construction of the current game sub-scene, thus ensuring the stability of the current game screen and ultimately guaranteeing the player's gaming experience.

[0110] It should be noted that the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of this disclosure, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0111] In one example embodiment of this disclosure, the solution of this disclosure can be implemented by a game scene preloading device, which may include the following modules: a resource pre-organization module, a resource preloading module, and a preloaded resource control module.

[0112] In the resource pre-organization module, such as Figure 6 As shown, a resource distribution analyzer can scan multiple game sub-scenes (**.world**.level**.xml) corresponding to the game scene to obtain resource distribution data. The resource distribution data records multiple game resource identifiers corresponding to each game sub-scene, so that when executing the solution disclosed herein, multiple game resource identifiers corresponding to the target game sub-scene can be obtained based on the text. Furthermore, the resource distribution data can also record information such as the name, location, size, and number of game resources for each game sub-scene.

[0113] In the resource preloading module, such as Figure 7 As shown, the server can determine the target game sub-scene to which the game virtual object needs to switch and send the target game sub-scene to the client. The preload manager obtains multiple game resource identifiers corresponding to the target game sub-scene and assigns these identifiers to at least one thread. The game resource identifiers are pushed into the storage area corresponding to each thread. The game resource identifiers are popped out of the storage area according to the popping rate. Then, the game resources corresponding to the popped game resource identifiers are retrieved from the disk and loaded into memory (Cache). When the game virtual object switches game scenes, the game resources are retrieved from memory and the target game sub-scene is constructed based on these game resources.

[0114] In the preloaded resource control module, such as Figure 8 As shown, the rate at which game resource identifiers are sequentially popped from the storage area (pop-up rate) can be controlled at the script layer during gameplay. Specifically, the server can send a request to the client to adjust the pop-up rate. When the client receives the request, it can execute actions such as start popping, end popping, pause popping, continue popping, and adjust pop-up rate in the engine-layer preload manager to control the popping status of game resource identifiers from the storage area. End popping clears the storage area corresponding to the thread, and pause popping sets the pop-up rate to 0.

[0115] Furthermore, in an exemplary embodiment of this disclosure, a game scene preloading device is also provided. (Refer to...) Figure 9 As shown, a game scene preloading device 900 includes: a virtual object control module 910, a resource identifier acquisition module 920, a resource identifier pushing module 930, a game resource loading module 940, and a target scene construction module 950.

[0116] The system includes the following modules: a virtual object control module, used to control virtual game objects to perform game actions in game sub-scenes during gameplay; a game scene includes multiple sub-scenes; a resource identifier acquisition module, used to determine the target game sub-scene to which the virtual game object is to switch and acquire multiple game resource identifiers corresponding to the target game sub-scene; the game resource identifiers indicate the game resources corresponding to the identifiers; a resource identifier pushing module, used to allocate multiple game resource identifiers of the target game sub-scene to at least one thread and push the multiple game resource identifiers into the storage area corresponding to the thread; a game resource loading module, used to sequentially pop multiple game resource identifiers from the storage area according to a pop-up rate, and load the multiple game resources corresponding to the popped game resource identifiers into memory; the pop-up rate indicates the rate at which the game resource identifiers are sequentially popped from the storage area; and a target scene construction module, used to acquire multiple game resources from memory and construct the target game sub-scene based on the multiple game resources when the virtual game object switches game scenes.

[0117] In one exemplary embodiment of this disclosure, based on the aforementioned scheme, the target game sub-scene is a game scene within a preset range of the location to which the game virtual object is to be switched.

[0118] In an exemplary embodiment of this disclosure, based on the aforementioned scheme, the target game sub-scene to which the game virtual object is to switch is determined. The apparatus further includes: a location acquisition unit, configured to acquire the location to which the game virtual object is to switch and determine the game sub-scene where the location is located; and a target game sub-scene determination unit, configured to determine the game sub-scene as the target game sub-scene to which the game virtual object is to switch.

[0119] In an exemplary embodiment of this disclosure, based on the aforementioned scheme, the device further includes a control operation acquisition unit, used to acquire control operations targeting the game virtual object and determine the target game sub-scene to be switched by the game virtual object based on the control operations.

[0120] In one exemplary embodiment of this disclosure, based on the foregoing scheme, the apparatus further includes: a game scene division unit, configured to acquire a game scene corresponding to the game and divide the game scene into multiple game sub-scenes; wherein each game sub-scene includes multiple game resources; and a game resource identifier acquisition unit, configured to acquire multiple game resource identifiers corresponding to the game sub-scene based on the multiple game resources within the game sub-scene.

[0121] In an exemplary embodiment of this disclosure, based on the aforementioned scheme, multiple game resource identifiers of the target game sub-scene are allocated to at least one thread, and the multiple game resource identifiers are pushed into the storage area corresponding to the thread. The apparatus further includes: a resource identifier allocation unit, used to allocate multiple game resource identifiers of the target game sub-scene to at least one sub-thread through the main thread, and push the multiple game resource identifiers into the storage area corresponding to the sub-thread.

[0122] In an exemplary embodiment of this disclosure, based on the aforementioned scheme, multiple game resource identifiers are sequentially popped from the storage area according to the pop-up rate. The device further includes a pop-up rate adjustment unit, used to adjust the pop-up rate and sequentially pop up multiple game resource identifiers from the storage area according to the adjusted pop-up rate.

[0123] In an exemplary embodiment of this disclosure, based on the foregoing scheme, the device further includes an adjustment unit for adjusting the frequency at which game resource identifiers are sequentially popped from the storage area, and / or adjusting the number of game resource identifiers sequentially popped from the storage area, so as to adjust the pop-up rate.

[0124] In one exemplary embodiment of this disclosure, based on the foregoing scheme, the pop-up rate includes 0, and when the pop-up rate is 0, popping game resource identifiers from the storage area is stopped.

[0125] In one exemplary embodiment of this disclosure, based on the foregoing scheme, the device further includes a pop-up control unit, configured to adjust the pop-up rate to 0 when a thread creates game resources corresponding to a game sub-scene, so as to stop popping game resource identifiers from the storage area, or to reduce the pop-up rate to reduce the rate at which multiple game resource identifiers are popped up sequentially from the storage area.

[0126] One embodiment of this disclosure provides a game scene preloading device that can control a game virtual object to perform game actions in a game sub-scene during game execution, determine the target game sub-scene to which the game virtual object needs to switch, obtain multiple game resource identifiers corresponding to the target game sub-scene, allocate the multiple game resource identifiers of the target game sub-scene to at least one thread, push the multiple game resource identifiers into the storage area corresponding to the thread, pop the multiple game resource identifiers from the storage area sequentially according to the popping rate, load the multiple game resources corresponding to the multiple game resource identifiers into memory according to the popped multiple game resource identifiers, and when the game virtual object switches game scenes, obtain multiple game resources from memory and construct the target game sub-scene according to the multiple game resources. The solution disclosed herein achieves several advantages. First, it allows for the identification of the target game sub-scene to be switched, narrowing the scope of game resource loading and thus accelerating the construction efficiency of the game scene. Second, it enables the loading of game resources from the target game sub-scene into memory, allowing for direct retrieval from memory when the game scene needs to be constructed based on these resources, avoiding the slow speed of retrieving game resources from the disk and further accelerating the construction efficiency of the game scene. Third, it allows for the control of the rate at which game resource identifiers pop up, thereby controlling the rate at which game resources are loaded into memory and preventing the loading process of multiple game resources from the target game sub-scene from affecting the construction of the current game sub-scene, thus ensuring the stability of the current game screen and ultimately guaranteeing the player's gaming experience.

[0127] Since the functional modules of the game scene preloading device in the example embodiments of this disclosure correspond to the steps of the example embodiments of the game scene preloading method described above, for details not disclosed in the device embodiments of this disclosure, please refer to the embodiments of the game scene preloading method described above.

[0128] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0129] Furthermore, in an exemplary embodiment of this disclosure, an electronic device capable of implementing the above-described game scene preloading method is also provided.

[0130] Those skilled in the art will understand that various aspects of this disclosure can be implemented as a system, method, or program product. Therefore, various aspects of this disclosure can be embodied in the following forms: a completely hardware embodiment, a completely software embodiment (including firmware, microcode, etc.), or an embodiment combining hardware and software aspects, collectively referred to herein as a "circuit," "module," or "system."

[0131] The following reference Figure 10 To describe an electronic device 10000 according to such an embodiment of the present disclosure. Figure 10 The electronic device 10000 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.

[0132] like Figure 10 As shown, the electronic device 10000 is manifested in the form of a general-purpose computing device. The components of the electronic device 10000 may include, but are not limited to: at least one processing unit 1010, at least one storage unit 1020, a bus 1030 connecting different system components (including storage unit 1020 and processing unit 1010), and a display unit 1040.

[0133] The storage unit stores program code, which can be executed by the processing unit 1010 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure. For example, the processing unit 1010 can perform actions such as... Figure 2 Step S210: During the game, control the game virtual object to perform game actions in the game sub-scene; wherein, the game scene includes multiple game sub-scenes; Step S220: Determine the target game sub-scene to which the game virtual object needs to switch, and obtain multiple game resource identifiers corresponding to the target game sub-scene; wherein, the game resource identifier is used to indicate the game resource corresponding to the game resource identifier; Step S230: Assign the multiple game resource identifiers of the target game sub-scene to at least one thread, and push the multiple game resource identifiers into the storage area corresponding to the thread; Step S240: Pop the multiple game resource identifiers sequentially from the storage area according to the popping rate, and load the multiple game resources corresponding to the multiple game resource identifiers into memory according to the popped multiple game resource identifiers; wherein, the popping rate is used to indicate the rate at which the game resource identifiers are popped sequentially from the storage area; Step S250: When the game virtual object switches game scenes, obtain multiple game resources from memory, and construct the target game sub-scene according to the multiple game resources.

[0134] In one exemplary embodiment of this disclosure, based on the aforementioned scheme, the target game sub-scene is a game scene within a preset range of the location to which the game virtual object is to be switched.

[0135] In one exemplary embodiment of this disclosure, based on the aforementioned scheme, determining the target game sub-scene to which the game virtual object needs to switch includes: obtaining the location to which the game virtual object needs to switch, determining the game sub-scene where the location is located, and determining the game sub-scene as the target game sub-scene to which the game virtual object needs to switch.

[0136] In one exemplary embodiment of this disclosure, determining the target game sub-scene to which the game virtual object is to switch, based on the foregoing scheme, includes: acquiring control operations for the game virtual object, and determining the target game sub-scene to which the game virtual object is to switch based on the control operations.

[0137] In one exemplary embodiment of this disclosure, based on the aforementioned scheme, a game scene corresponding to the game is obtained, and the game scene is divided into multiple game sub-scenes; wherein, each game sub-scene includes multiple game resources; and multiple game resource identifiers corresponding to the game sub-scene are obtained according to the multiple game resources in the game sub-scene.

[0138] In one exemplary embodiment of this disclosure, based on the aforementioned scheme, multiple game resource identifiers of the target game sub-scene are allocated to at least one thread, and the multiple game resource identifiers are pushed into the storage area corresponding to the thread, including: allocating multiple game resource identifiers of the target game sub-scene to at least one sub-thread through the main thread, and pushing the multiple game resource identifiers into the storage area corresponding to the sub-thread.

[0139] In one exemplary embodiment of this disclosure, based on the aforementioned scheme, multiple game resource identifiers are sequentially popped from the storage area according to the pop-up rate, including: adjusting the pop-up rate, and sequentially popping multiple game resource identifiers from the storage area according to the adjusted pop-up rate.

[0140] In one exemplary embodiment of this disclosure, adjusting the pop-up rate based on the foregoing scheme includes: adjusting the frequency at which game resource identifiers are popped out of the storage area sequentially, and / or adjusting the number of game resource identifiers popped out of the storage area sequentially, so as to adjust the pop-up rate.

[0141] In one exemplary embodiment of this disclosure, based on the foregoing scheme, the pop-up rate includes 0, and when the pop-up rate is 0, popping game resource identifiers from the storage area is stopped.

[0142] In one exemplary embodiment of this disclosure, based on the foregoing scheme, adjusting the pop-up rate includes: when a thread creates game resources corresponding to a game sub-scene, adjusting the pop-up rate to 0 to stop popping game resource identifiers from the storage area, or reducing the pop-up rate to reduce the rate at which multiple game resource identifiers are popped up sequentially from the storage area.

[0143] An embodiment of this disclosure provides an electronic device that, during game execution, controls a virtual game object to perform game actions in a game sub-scene. This involves determining the target game sub-scene the virtual game object needs to switch to, obtaining multiple game resource identifiers corresponding to the target game sub-scene, allocating these identifiers to at least one thread, pushing them into the thread's corresponding storage area, sequentially popping them from the storage area at a pop-up rate, loading the corresponding game resources into memory based on the popped identifiers, and retrieving multiple game resources from memory when the virtual game object switches game scenes, and constructing the target game sub-scene based on these resources. The solution disclosed herein achieves several advantages. First, it allows for the identification of the target game sub-scene to be switched, narrowing the scope of game resource loading and thus accelerating the construction efficiency of the game scene. Second, it enables the loading of game resources from the target game sub-scene into memory, allowing for direct retrieval from memory when the game scene needs to be constructed based on these resources, avoiding the slow speed of retrieving game resources from the disk and further accelerating the construction efficiency of the game scene. Third, it allows for the control of the rate at which game resource identifiers pop up, thereby controlling the rate at which game resources are loaded into memory and preventing the loading process of multiple game resources from the target game sub-scene from affecting the construction of the current game sub-scene, thus ensuring the stability of the current game screen and ultimately guaranteeing the player's gaming experience.

[0144] Storage unit 1020 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 1021 and / or a cache memory unit 1022, and may further include a read-only memory unit (ROM) 1023.

[0145] Storage unit 1020 may also include a program / utility 1024 having a set (at least one) program module 1025, such program module 1025 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.

[0146] Bus 1030 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the multiple bus structures.

[0147] Electronic device 10000 can also communicate with one or more external devices 1070 (e.g., keyboard, pointing device, Bluetooth device, etc.), one or more devices that enable a user to interact with electronic device 10000, and / or any device that enables electronic device 10000 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 1050. Furthermore, electronic device 10000 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 1060. As shown, network adapter 1060 communicates with other modules of electronic device 10000 via bus 1030. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 10000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0148] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0149] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible embodiments, various aspects of this disclosure may also be implemented as a program product including program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure.

[0150] In one example embodiment of this disclosure, a computer-readable signal medium is provided, which can control a game virtual object to perform game actions in a game sub-scene during game execution, determine the target game sub-scene to which the game virtual object needs to switch, and obtain multiple game resource identifiers corresponding to the target game sub-scene; wherein, the game resource identifiers are used to indicate the game resources corresponding to the game resource identifiers, the multiple game resource identifiers of the target game sub-scene are allocated to at least one thread, the multiple game resource identifiers are pushed into the storage area corresponding to the thread, the multiple game resource identifiers are popped out of the storage area in sequence according to the popping rate, the multiple game resources corresponding to the multiple game resource identifiers are loaded into memory according to the popped multiple game resource identifiers, and when the game virtual object switches game scenes, the multiple game resources are obtained from memory, and the target game sub-scene is constructed according to the multiple game resources.

[0151] In one exemplary embodiment of this disclosure, based on the aforementioned scheme, the target game sub-scene is a game scene within a preset range of the location to which the game virtual object is to be switched.

[0152] In one exemplary embodiment of this disclosure, based on the aforementioned scheme, determining the target game sub-scene to which the game virtual object needs to switch includes: obtaining the location to which the game virtual object needs to switch, determining the game sub-scene where the location is located, and determining the game sub-scene as the target game sub-scene to which the game virtual object needs to switch.

[0153] In one exemplary embodiment of this disclosure, determining the target game sub-scene to which the game virtual object is to switch, based on the foregoing scheme, includes: acquiring control operations for the game virtual object, and determining the target game sub-scene to which the game virtual object is to switch based on the control operations.

[0154] In one exemplary embodiment of this disclosure, based on the aforementioned scheme, a game scene corresponding to the game is obtained, and the game scene is divided into multiple game sub-scenes; wherein, each game sub-scene includes multiple game resources; and multiple game resource identifiers corresponding to the game sub-scene are obtained according to the multiple game resources in the game sub-scene.

[0155] In one exemplary embodiment of this disclosure, based on the aforementioned scheme, multiple game resource identifiers of the target game sub-scene are allocated to at least one thread, and the multiple game resource identifiers are pushed into the storage area corresponding to the thread, including: allocating multiple game resource identifiers of the target game sub-scene to at least one sub-thread through the main thread, and pushing the multiple game resource identifiers into the storage area corresponding to the sub-thread.

[0156] In one exemplary embodiment of this disclosure, based on the aforementioned scheme, multiple game resource identifiers are sequentially popped from the storage area according to the pop-up rate, including: adjusting the pop-up rate, and sequentially popping multiple game resource identifiers from the storage area according to the adjusted pop-up rate.

[0157] In one exemplary embodiment of this disclosure, adjusting the pop-up rate based on the foregoing scheme includes: adjusting the frequency at which game resource identifiers are popped out of the storage area sequentially, and / or adjusting the number of game resource identifiers popped out of the storage area sequentially, so as to adjust the pop-up rate.

[0158] In one exemplary embodiment of this disclosure, based on the foregoing scheme, the pop-up rate includes 0, and when the pop-up rate is 0, popping game resource identifiers from the storage area is stopped.

[0159] In one exemplary embodiment of this disclosure, based on the foregoing scheme, adjusting the pop-up rate includes: when a thread creates game resources corresponding to a game sub-scene, adjusting the pop-up rate to 0 to stop popping game resource identifiers from the storage area, or reducing the pop-up rate to reduce the rate at which multiple game resource identifiers are popped up sequentially from the storage area.

[0160] One embodiment of this disclosure provides a computer-readable signal medium that can control a game virtual object to perform game actions in a game sub-scene during game execution. This includes determining the target game sub-scene the game virtual object needs to switch to, obtaining multiple game resource identifiers corresponding to the target game sub-scene, allocating these identifiers to at least one thread, pushing them into the storage area corresponding to each thread, sequentially popping them from the storage area at a pop rate, loading the game resources corresponding to the popped identifiers into memory, and retrieving multiple game resources from memory when the game virtual object switches game scenes, and constructing the target game sub-scene based on these resources. The solution disclosed herein achieves several advantages. First, it allows for the identification of the target game sub-scene to be switched, narrowing the scope of game resource loading and thus accelerating the construction efficiency of the game scene. Second, it enables the loading of game resources from the target game sub-scene into memory, allowing for direct retrieval from memory when the game scene needs to be constructed based on these resources, avoiding the slow speed of retrieving game resources from the disk and further accelerating the construction efficiency of the game scene. Third, it allows for the control of the rate at which game resource identifiers pop up, thereby controlling the rate at which game resources are loaded into memory and preventing the loading process of multiple game resources from the target game sub-scene from affecting the construction of the current game sub-scene, thus ensuring the stability of the current game screen and ultimately guaranteeing the player's gaming experience.

[0161] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.

[0162] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0163] Program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing devices can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0164] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of this disclosure and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0165] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

Claims

1. A method for preloading game scenes, characterized in that, The method includes: During gameplay, players control virtual game objects to perform game actions within game sub-scenes; each game scene includes multiple game sub-scenes. Determine the target game sub-scene to which the game virtual object needs to switch, and obtain multiple game resource identifiers corresponding to the target game sub-scene; wherein, the game resource identifier is used to indicate the game resource corresponding to the game resource identifier; Assign multiple game resource identifiers of the target game sub-scene to at least one thread, and push the multiple game resource identifiers into the storage area corresponding to the thread; The pop-up rate is adjusted to sequentially pop multiple game resource identifiers from the storage area according to the adjusted pop-up rate, and multiple game resources corresponding to the multiple game resource identifiers are loaded into memory according to the popped multiple game resource identifiers; wherein, the pop-up rate is used to indicate the rate at which the game resource identifiers are sequentially popped from the storage area; adjusting the pop-up rate includes: when the thread creates game resources corresponding to the game sub-scene, adjusting the pop-up rate to 0 to stop popping the game resource identifiers from the storage area, or reducing the pop-up rate to reduce the rate at which multiple game resource identifiers are sequentially popped from the storage area; When the game virtual object switches game scenes, multiple game resources are retrieved from the memory, and a target game sub-scene is constructed based on the multiple game resources.

2. The method according to claim 1, characterized in that, The target game sub-scene is a game scene within a preset range of the location to which the game virtual object is to switch.

3. The method according to claim 1, characterized in that, The process of determining the target game sub-scene to which the game virtual object is to switch includes: Obtain the position to be switched by the game virtual object, and determine the game sub-scene where the position is located; The game sub-scene is determined as the target game sub-scene that the game virtual object wants to switch to.

4. The method according to claim 1, characterized in that, The process of determining the target game sub-scene to which the game virtual object is to switch includes: Obtain control operations for the game virtual object, and determine the target game sub-scene to be switched to by the game virtual object based on the control operations.

5. The method according to claim 1, characterized in that, The method further includes: Obtain the game scene corresponding to the game, and divide the game scene into multiple game sub-scenes; wherein each game sub-scene includes multiple game resources; Obtain multiple game resource identifiers corresponding to the game sub-scene based on multiple game resources within the game sub-scene.

6. The method according to claim 1, characterized in that, The step of allocating multiple game resource identifiers of the target game sub-scene to at least one thread, and pushing the multiple game resource identifiers into the storage area corresponding to the thread, includes: The main thread allocates multiple game resource identifiers of the target game sub-scene to at least one sub-thread, and pushes the multiple game resource identifiers into the storage area corresponding to the sub-thread.

7. The method according to claim 1, characterized in that, Adjusting the pop-up rate includes: Adjust the frequency at which the game resource identifiers are popped out of the storage area sequentially, and / or adjust the number of game resource identifiers popped out of the storage area sequentially, in order to adjust the pop-up rate.

8. A game scene preloading device, characterized in that, The device includes: The virtual object control module is used to control virtual game objects to perform game actions in game sub-scenes during gameplay; a game scene includes multiple game sub-scenes. The resource identifier acquisition module is used to determine the target game sub-scene to which the game virtual object is to switch, and to acquire multiple game resource identifiers corresponding to the target game sub-scene; wherein, the game resource identifier is used to indicate the game resource corresponding to the game resource identifier; The resource identifier pushing module is used to allocate multiple game resource identifiers of the target game sub-scene to at least one thread, and push the multiple game resource identifiers into the storage area corresponding to the thread; A game resource loading module is used to adjust the pop-up rate, sequentially popping multiple game resource identifiers from the storage area according to the adjusted pop-up rate, and loading multiple game resources corresponding to the multiple game resource identifiers into memory according to the popped game resource identifiers; wherein, the pop-up rate is used to indicate the rate at which the game resource identifiers are sequentially popped from the storage area; adjusting the pop-up rate includes: when the thread creates game resources corresponding to the game sub-scene, adjusting the pop-up rate to 0 to stop popping the game resource identifiers from the storage area, or reducing the pop-up rate to reduce the rate at which multiple game resource identifiers are sequentially popped from the storage area; The target scene construction module is used to obtain multiple game resources from the memory and construct a target game sub-scene based on the multiple game resources when the game virtual object switches game scenes.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 7.

10. An electronic device, characterized in that, include: One or more processors; as well as A memory for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Resource processing method and device, storage medium and electronic device

    CN110064198A

  • Scene resource updating method and device, storage medium and electronic device

    CN113398595A