Resource preloading method and device, storage medium and electronic device

By loading static resources in advance during the character selection stage of the game and loading dynamic resources in the resource loading stage, the problem of too long resource loading caused by the large amount of game resources is solved, and the effect of improving resource loading efficiency and user experience is achieved.

CN114428921BActive Publication Date: 2025-05-16TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210033926.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-12
Publication Date
2025-05-16
Estimated Expiration
2042-01-12

AI Technical Summary

Technical Problem

The problem of long-term resource loading caused by large amount of game resources.

Method used

The static resource collection is loaded in advance during the character selection stage of the game, and after the static resource collection is loaded, the dynamic resource collection is loaded in the resource loading stage, and the amount and time of the resource loading stage are reduced through parallel loading or asynchronous loading.

Benefits of technology

It effectively reduces the resource loading time, avoids frame rate lag, improves resource loading efficiency, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114428921B_ABST
    Figure CN114428921B_ABST
Patent Text Reader

Abstract

The present invention discloses a resource preloading method and device, a storage medium and an electronic device. The method comprises: loading a static resource set of a game in the role selection stage of a game, wherein the role selection stage is used to select a virtual character participating in the game, and the static resource set includes resources to be used in the game and unrelated to the role configuration information determined in the role selection stage; when the static resource set is loaded in the role selection stage, loading a dynamic resource set of the game in the resource loading stage of the game, wherein the dynamic resource set includes resources to be used in the game and related to the role configuration information determined in the role selection stage. The present invention solves the technical problem that resource loading takes too long due to the large amount of resources in a single game.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet technology, and in particular to a resource preloading method and device, a storage medium and an electronic device. Background Art

[0002] With the continuous development of the game industry, more and more games are loved by the public. The basic process of a game usually includes a game preparation phase and a battle phase. For example, a MOBA (Multiplayer Online Battle Arena) game running on a mobile phone includes at least a character selection phase and a resource loading phase before entering the game battle phase. Among them, the resource loading phase is to load the required resources after analyzing the resources required for the current game in the character selection phase.

[0003] In related technologies, all resources required for the current game are usually completed during the resource loading phase. However, as the complexity of a single game gradually increases, the amount of resources required for a single game also increases, leading to a technical problem in which resource loading takes too long.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present invention provide a resource preloading method and device, a storage medium and an electronic device, so as to at least solve the technical problem that resource loading takes too long due to a large amount of game resources.

[0006] According to one aspect of an embodiment of the present invention, a resource preloading method is provided, comprising: loading a static resource collection for a game during a role selection phase of a game, wherein the role selection phase is used to select a virtual character participating in the game, and the static resource collection includes resources to be used in the game and are not related to role configuration information determined in the role selection phase; and loading a dynamic resource collection for the game during a resource loading phase of the game when the static resource collection is loaded in the role selection phase, wherein the dynamic resource collection includes resources to be used in the game and are related to role configuration information determined in the role selection phase.

[0007] Optionally, the above-mentioned resource preloading method also includes: when some static resources in the static resource collection are loaded during the character selection stage, during the resource loading stage of a game, loading the dynamic resource collection of a game, and loading the static resources other than some static resources in the static resource collection.

[0008] Optionally, during the resource loading stage of the above-mentioned game, the dynamic resource collection of the game is loaded, and the static resources except some static resources in the static resource collection are loaded, including: during the resource loading stage of the game, the dynamic resource collection of the game and the static resources except some static resources in the static resource collection are loaded in parallel.

[0009] Optionally, the above-mentioned resource preloading method also includes: in the case of loading a static resource collection of a game during the character selection stage of a game, displaying a first prompt information during the character selection stage, wherein the first prompt information is used to prompt that some resources of the game have been loaded in advance; or in the case of loading a static resource collection of a game during the character selection stage of a game, displaying a second prompt information during the resource loading stage, wherein the second prompt information is used to prompt that some resources of the game have been loaded in advance.

[0010] Optionally, the above-mentioned loading of a static resource set for a game during the character selection phase of a game includes: during the character selection phase, sequentially loading or loading in parallel each static resource subset in the static resource set, wherein each static resource subset includes at least one of the following: a scene resource subset in a game, wherein the scene resource subset includes resources of virtual objects appearing on a game map in the game; an NPC (Non-Player Character) resource subset in a game, wherein the NPC resource subset includes resources of one or more NPCs in the game.

[0011] Optionally, in the above-mentioned character selection stage, each static resource subset in the static resource collection is loaded sequentially or in parallel, including: repeating the following operations until the character selection stage ends or each static resource subset is loaded: when the current static resource to be used in a game is determined and the resource path information of the current static resource has not been stored in the target resource list, the resource path information of the current static resource is stored in the target resource list; the resource path information of some unloaded static resources is obtained from the target resource list sequentially or in parallel, and some static resources are loaded according to the resource path information of some static resources; the in-game objects of the loaded partial static resources are instantiated to obtain the instantiated objects of some static resources; the instantiated objects of some static resources are stored in the object buffer pool.

[0012] Optionally, in the case where some static resources in the static resource collection are loaded during the character selection phase, during the resource loading phase of a game, the dynamic resource collection of a game is loaded, and the static resources other than some static resources in the static resource collection are loaded, including: when the character selection phase ends when some static resources are loaded during the character selection phase, the loading of some static resources is stopped, and when the resource loading phase starts, the loading of the dynamic resource collection of a game is started, and the static resources other than some static resources in the static resource collection are continued to be loaded.

[0013] Optionally, the resource preloading method further includes: storing the loaded static resource set in a target cache during a game; and loading part or all of the static resources in the static resource set from the target cache during a character selection phase of the next game of the game.

[0014] Optionally, in the character selection stage of the next game of the above-mentioned game, some or all of the static resources in the static resource set are loaded from the target cache, including: when the game mode of the first game is the same as the game mode of the next game, all of the static resources in the static resource set are loaded from the target cache; and / or

[0015] When the game mode of one game is different from the game mode of the next game, some static resources in the static resource set are loaded from the target cache, wherein the some static resources are static resources to be used in the next game.

[0016] Optionally, the resource preloading method further includes: after the resource loading phase is finished, displaying a game screen of a battle phase of a game according to the loaded static resource set and dynamic resource set.

[0017] According to another aspect of an embodiment of the present invention, a resource preloading device is also provided, including: a first loading unit, used to load a static resource collection for a game during a character selection phase of the game, wherein the character selection phase is used to select a virtual character participating in the game, and the static resource collection includes resources to be used in the game and are not related to character configuration information determined in the character selection phase; a second loading unit, used to load a dynamic resource collection for a game during a resource loading phase of the game after the static resource collection is loaded in the character selection phase, wherein the dynamic resource collection includes resources to be used in the game and are related to the character configuration information determined in the character selection phase.

[0018] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the resource preloading method when running.

[0019] According to another aspect of an embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the resource preloading method through the computer program.

[0020] In an embodiment of the present invention, the static resource collection of the game is preloaded in advance by utilizing the idle time of the character selection stage, and then the dynamic resource collection of the game is loaded in the resource loading stage after the static resource collection is loaded, thereby avoiding frame rate freezes caused by long resource loading time in the game, achieving the purpose of reducing resource loading time, thereby achieving the technical effect of improving resource loading efficiency, and further solving the technical problem of long resource loading time caused by a large amount of game resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0022] Figure 1 is a schematic diagram of an application environment scenario of an optional resource preloading method according to an embodiment of the present invention;

[0023] Figure 2 is a flowchart of an optional resource preloading method according to an embodiment of the present invention;

[0024] Figure 3 is a schematic diagram of an optional resource preloading method according to an embodiment of the present invention;

[0025] Figure 4 is a schematic diagram of an optional static resource set and a dynamic resource set according to an embodiment of the present invention;

[0026] Figure 5 is a schematic diagram of an optional loading state of a static resource set and a dynamic resource set according to an embodiment of the present invention;

[0027] Figure 6 is a schematic diagram of another optional loading state of a static resource set and a dynamic resource set according to an embodiment of the present invention;

[0028] Figure 7 is a schematic diagram of another optional loading state of a static resource set and a dynamic resource set according to an embodiment of the present invention;

[0029] Figure 8is a schematic diagram of another optional loading state of a static resource set and a dynamic resource set according to an embodiment of the present invention;

[0030] Fig. 9 is an optional flow chart of generating offline static resources according to an embodiment of the present invention;

[0031] Fig.10 is a schematic diagram of a key coroutine in an optional resource loading phase according to an embodiment of the present invention;

[0032] Fig.11 is a schematic diagram of an optional way of ending the role selection phase according to an embodiment of the present invention;

[0033] Fig.12 is a schematic diagram of an optional release / save resource cache according to an embodiment of the present invention;

[0034] Fig.13 is a schematic diagram of static resource preloading in different game modes according to an optional embodiment of the present invention;

[0035] Fig.14 is an overall flow chart of an optional resource preloading method according to an embodiment of the present invention;

[0036] Fig.15 This is an effect diagram of an optional test using a resource preloading method according to an embodiment of the present invention;

[0037] Fig.16 is a schematic structural diagram of an optional resource preloading device according to an embodiment of the present invention;

[0038] Fig.17 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0039] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0040] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, 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 that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0041] According to one aspect of an embodiment of the present invention, a resource preloading method is provided. Optionally, as an optional implementation, the resource preloading method may be applied to, but is not limited to, Figure 1 The resource preloading system in the application scenario shown. The resource preloading system may include but is not limited to a client 102, a network 104, a server 106, and a database 108. The client 102 includes a human-computer interaction screen, a processor, and a memory. The human-computer interaction screen is used to display the game interface of the client (such as Figure 1 The processor is used to generate an interaction instruction in response to the above-mentioned human-computer interaction operation, and send the interaction instruction to the server 106. The memory is used to store relevant attribute data, such as resource path information, character selection information, and game battle screen information.

[0042] The specific process is as follows: Step S102, analyze the resources needed for the current game and generate a resource list; Step S104, obtain information such as resource paths from the resource list; then in steps S106-108, the server 106 sends the resource list and resource path information to the client 102 via the network 104; Step S110, the client 102 receives the resource list and resource path, and loads the resources to be referenced by the current game, including static resources and dynamic resources. The above is only an example, and this embodiment does not make any limitation to this.

[0043] As an optional example, this embodiment does not limit the execution subject of the above steps S102 to S110. For example, the above steps S102 to S110 can all be executed on the client 102.

[0044] According to one aspect of an embodiment of the present invention, a resource preloading method is provided. Figure 2is a flowchart of a resource preloading method according to an embodiment of the present invention, and the process includes the following steps:

[0045] Step S202, loading a static resource set of a game during a character selection phase of a game, wherein the character selection phase is used to select a virtual character participating in a game, and the static resource set includes resources to be used in a game and are not related to the character configuration information determined during the character selection phase;

[0046] As an optional example, the above-mentioned static resource set includes but is not limited to resources that are not related to the character configuration information determined in the character selection stage, wherein the above-mentioned character configuration information may include but is not limited to the character, skills, or skin determined in the character selection stage. In the character selection stage, the above-mentioned character configuration information may continue to change with the input instructions, and the above-mentioned character configuration information may be partially different or completely different in two different games. Further, the above-mentioned resources that are not related to the character configuration information can be understood as these static resources are independent of the character configuration information. In other words, the resources in the static resource set in this embodiment are resources that do not change with the character configuration information determined in the character selection stage. For example, the static resource set includes Figure 4 The resources corresponding to grass 408.

[0047] Step S204, when the static resource set is loaded in the character selection phase, the dynamic resource set of a game is loaded in the resource loading phase of a game, wherein the dynamic resource set includes resources to be used in a game and related to the character configuration information determined in the character selection phase.

[0048] As an optional example, the above dynamic resource set includes resources related to the character configuration information determined in the character selection stage, that is, the dynamic resources in the above dynamic resource set will change with the changes in the selected character, skills, skins or star points, etc., and the dynamic resources in each game may be different. It can be seen that the resources in the dynamic resource set in this embodiment are resources that will change with the changes in the character configuration information. For example, the dynamic resource set includes Figure 3 The resources corresponding to the role 300 and skill 303 in .

[0049] In this embodiment, the resources used in a game include but are not limited to static resources and dynamic resources. Before entering the game battle phase, all static resources and dynamic resources required for the current game need to be loaded, and then the loaded static resource set and dynamic resource set are rendered to display the game screen of the game battle phase.

[0050] In the related technology, the loading of static resources and dynamic resources is completed in the resource loading stage. In the character selection stage, only the resources to be used in the current game are analyzed offline, and different tags are set for the resources analyzed offline to distinguish their categories, and then a corresponding resource list is generated. However, it is worth noting that as the complexity of the game increases, the amount of resources required for a single game will also increase, resulting in the resource loading stage taking too long and reducing the user experience.

[0051] As an optional implementation, in order to solve the problem of the above-mentioned resource loading phase taking too long, in an embodiment of the present invention, the static resource collection of the game is preloaded in advance by utilizing the idle time of the character selection phase, and then after the static resource collection is loaded, the dynamic resource collection of the game is loaded in the resource loading phase.

[0052] Specifically, Figure 3 As shown, in the character selection stage, it is assumed that the player selects a character 300 from a character list 301 (such as a hero) as needed, and can select a corresponding skin for the character 300 from a skin list 302, and at the same time selects the skills (such as skill 303 and skills 305-307 in the figure) that the character 300 has in the current game. Figure 3 As shown in the resource loading stage in the example, characters 1 to 5 form a team, characters 6 to 10 form a team, and character 300 may be, but is not limited to, character 1 in the resource loading stage. For example, in the character selection stage, the static resource set of this game may be loaded in advance. The above static resource set may include, but is not limited to, Figure 3 The above-mentioned character configuration information may include, but is not limited to, the character 300 determined in the character selection stage, the skin corresponding to the character 300, the skill 303 used by the character 300 in the current game, etc. The above-mentioned static resource set may include, but is not limited to, Figure 3 The scene elements (such as grass, walls) in the map displayed in the battle phase and the resources corresponding to the NPC. In the battle phase, a thumbnail map 307 can also be displayed. Optionally, the scene elements (such as grass, walls) and the resources corresponding to the NPC can be understood as the resources required to display (or render) the scene elements and NPC in the battle phase.

[0053] When the static resource set is loaded, in the resource loading phase, the dynamic resource set of the game is loaded. The above dynamic resource set may include but is not limited to Figure 3The above-mentioned dynamic resource set is used to display the corresponding screen elements in the battle stage, for example, the virtual button corresponding to the skill 303, the virtual button corresponding to the skill 305, the virtual button corresponding to the skill 306, the virtual button corresponding to the skill 307, the virtual joystick 304, etc. Optionally, the above-mentioned dynamic resource set can be understood as the resources required to display (or render) the above-mentioned corresponding screen elements in the battle stage.

[0054] As can be seen from the above description, the static resources in the above embodiments may be, but are not limited to, resources that are not related to the role configuration information determined in the role selection stage; dynamic resources may be, but are not limited to, resources related to the role configuration information determined in the role selection stage. For example, static resources are resources that will not change when entering a fixed level match such as a match or a ranking match when the game mode (such as a match or a ranking) is determined; dynamic resources will change with changes in the selected character, summoner skills, skins, or Xingyuan, etc., and the dynamic resources of each game may be different. It can be seen that static resources are resources that will not change with changes in the role configuration information, while dynamic resources are resources that will change with changes in the role configuration information.

[0055] To further illustrate the resource preloading process in this embodiment, Figure 4 Describe it in detail. Figure 4 As shown, in the character selection stage, the player can determine the corresponding character configuration information according to personal preferences. The above-mentioned character configuration information may include, but is not limited to: the character 400 selected in the character list 401, the skin selected for the character 400 in the skin list 402, the skills 403 and skills 405-407 used by the character 400 in the current game, etc. Before the end of the character selection stage, part or all of the information in the character configuration information can be changed. Therefore, the resources corresponding to the above-mentioned character 400, the skin selected for the character 400, and the skills 403 used by the character 400 in the current game are dynamic resources. The static resource collection that needs to be extracted and preloaded in the character selection stage may include, but is not limited to, resources that are not related to the above-mentioned character configuration information, for example, Figure 4 The scene elements (such as grass 408, wall) in the map displayed in the battle phase and the resources corresponding to the NPC will not change with the changes in the above-mentioned character configuration information. Therefore, the above-mentioned scene elements and the resources corresponding to the NPC are all static resources.

[0056] Through the above-mentioned embodiments provided by the present application, the static resource collection is preloaded by utilizing the idle time of the role stage, and when the static resource collection is loaded, the dynamic resource collection of the game is loaded in the resource loading stage, thereby avoiding the frame rate freeze caused by the long resource loading time in the game, achieving the purpose of reducing the resource loading time, thereby achieving the technical effect of improving the resource loading efficiency, and further solving the technical problem of the long resource loading time caused by the large amount of game resources.

[0057] As an optional implementation, the resource preloading method further includes:

[0058] When some static resources in the static resource collection are loaded during the character selection phase, during the resource loading phase of a game, the dynamic resource collection of the game is loaded, and the static resources other than some static resources in the static resource collection are loaded.

[0059] It is understandable that before entering the resource loading phase, the loading status of static resources includes at least the following two situations:

[0060] The first method is to load all static resources in advance during the character selection phase.

[0061] The second method: load some static resources in advance during the character selection stage.

[0062] In the second case, the remaining static resources that have not been loaded in the character selection phase are loaded in the resource loading phase.

[0063] To further illustrate the second situation in this embodiment, Figure 5 Describe it in detail. Figure 5 As shown, in the character selection stage, only 50% of the static resources in the static resource set are loaded. Thus, in the resource loading stage, all dynamic resources in the dynamic resource set and the remaining 50% of the static resources in the static resource set need to be loaded through coroutine 1 and coroutine 2 respectively.

[0064] Through the above-mentioned embodiments provided by the present application, the type and amount of resources to be loaded in the resource loading phase can be determined according to the completion status of loading the static resource collection in the role selection phase, thereby reducing the amount of resources to be loaded in the resource loading phase, saving resource loading time, and improving user experience.

[0065] In this embodiment, in the resource loading stage, Figure 5The different coroutines shown load the dynamic resource set and the remaining static resources in the static resource set respectively, which is only an example. This embodiment can also use other methods to load the dynamic resource set and the remaining static resources in the static resource set during the resource loading stage. For example, during the resource loading stage, coroutine 1 is used to load the dynamic resource set and the remaining static resources in the static resource set in sequence.

[0066] As another optional implementation, during the resource loading stage of the above-mentioned game, the dynamic resource collection of the game is loaded, and the static resources except some static resources in the static resource collection are loaded, including: during the resource loading stage of the game, the dynamic resource collection of the game and the static resources except some static resources in the static resource collection are loaded in parallel.

[0067] In this embodiment, in the resource loading stage, in addition to loading some static resources that have not been loaded in the role selection stage, all dynamic resources in the dynamic resource set are also loaded.

[0068] To further illustrate the process of loading resources in parallel during the resource loading phase in this embodiment, Figure 6 Specifically, Figure 6 As shown, in the character selection stage, only 50% of the static resources in the static resource set are loaded. In the resource loading stage, all dynamic resources and the remaining 50% of the static resources in the static resource set are loaded in parallel through coroutine 1 and coroutine 2 until the loading is completed.

[0069] According to the above embodiments provided by the present application, in the resource loading stage, for some static resources and all dynamic resources that have not been loaded in the role selection stage, there are at least the following two loading methods:

[0070] (1) First load the remaining unloaded static resources (or dynamic resources), and then load the dynamic resources (or static resources), that is, the two types of resources are loaded serially;

[0071] (2) Load the remaining unloaded static resources and dynamic resources at the same time, that is, load the two types of resources in parallel.

[0072] In an optional example, any one of the two different loading methods mentioned above can be selected according to the situation. For example, one of the two different loading methods mentioned above can be selected according to the proportion of static resources that are not loaded in the character selection stage. For example, when the static resources that are not loaded in the character selection stage are less than or equal to 50%, the above loading method (1) can be selected; when the static resources that are not loaded in the character selection stage are greater than 50%, the above loading method (2) can be selected. However, it should be noted that since the character selection stage in both loading methods preloads some or all of the static resources in advance, both loading methods reduce the amount of resources that need to be loaded in the resource loading stage.

[0073] Through the above-mentioned embodiments provided by the present application, when the loading of static resources is not completed in the role selection stage, the loading of all resources is completed by adopting the method of parallel recording of static resources and dynamic resources or asynchronous loading in the resource loading stage, thereby improving the flexibility of the resource loading method, reducing the resource loading time, and achieving the technical effect of improving resource loading efficiency.

[0074] As an optional implementation, the resource preloading method further includes:

[0075] When a static resource set of a game is loaded during a character selection phase of a game, first prompt information is displayed during the character selection phase, wherein the first prompt information is used to prompt that some resources of the game have been loaded in advance; or

[0076] When a static resource set of a game is loaded during a character selection phase of the game, a second prompt message is displayed during the resource loading phase, wherein the second prompt message is used to prompt that some resources of the game have been loaded in advance.

[0077] In order to more intuitively reflect the loading status of resources, a first prompt message for preloading static resources is set in the display interface of the character selection stage in this embodiment, which is used to dynamically display the loading progress of static resources; or, a second prompt message is set in the display interface of the resource loading stage, which is used to display the proportion of resources that have been preloaded in advance at the current moment to the total resources.

[0078] To further illustrate the above prompting process in this embodiment, Figure 7 Specifically, Figure 7As shown in (a), when 30% of the static resources have been loaded in the character selection stage, a progress bar of "30% loaded in advance" can be displayed in the display interface of the character selection stage. It is easy to understand that as the progress of resource loading changes, the numbers in the progress bar will also change. For example, as the amount of static resources loaded increases, prompt information such as "40% loaded in advance" and "50% loaded in advance" will be dynamically displayed.

[0079] As an optional example, a second prompt information may be displayed in the display interface of the resource loading stage, and the second prompt information may be, but is not limited to, used to prompt the proportion of static resources that have been pre-loaded in the character selection stage to the total game resources, and the above-mentioned total game resources may include the above-mentioned static resource set and dynamic resource set. Optionally, the above-mentioned second prompt information may be, but is not limited to, displayed at the end of the character selection stage and the moment of jumping to the resource loading stage, for example, Figure 7 "70% preloaded for you" as shown in (b).

[0080] As an optional example, since the first prompt information is used to indicate the proportion of loaded static resources that are updated in real time during the character selection stage to the total game resources, the second prompt information is used to indicate the proportion of static resources that have been loaded during the character selection stage to the total resources. In other words, the second prompt information can be the same as the first prompt information at the end of the character stage.

[0081] Therefore, based on the meanings indicated by the first prompt information and the second prompt information, and the relationship between the two, in the display interface of the character selection stage and the resource loading stage, the first prompt information and the second prompt information are displayed in at least one of the following ways:

[0082] (1) The first prompt information is displayed only in the role selection stage, and the second prompt information is not displayed in the resource selection stage;

[0083] (2) The first prompt information is not displayed during the role selection phase, but the second prompt information is displayed during the resource selection phase;

[0084] (3) Displaying the first prompt information during the character selection phase and displaying the second prompt information during the resource selection phase.

[0085] Through the above-mentioned embodiments provided by the present application, the first prompt information is displayed in the role selection stage, and / or the second prompt information is displayed in the resource loading stage, which intuitively reflects the status of resource preloading, so that while reducing the resource loading time, the progress of resource loading can also be understood in real time, thereby improving resource loading efficiency and enhancing user experience.

[0086] It should be noted that if Figure 7The use of a progress bar to indicate resource preloading is only an example. This embodiment may also use other methods to display the first prompt information and the second prompt information, for example, using text, icons, audio or animation or various combinations of the above methods to indicate resource preloading during the character selection stage.

[0087] As an optional implementation mode, in the character selection stage of a game, loading a static resource set of a game includes:

[0088] In the role selection stage, each static resource subset in the static resource set is loaded sequentially or in parallel, wherein each static resource subset includes at least one of the following:

[0089] A subset of scene resources in a game, wherein the subset of scene resources includes resources of virtual objects appearing on a game map in a game;

[0090] A subset of non-player character NPC resources in a game, wherein the NPC resource subset includes resources of one or more NPCs in a game.

[0091] In each embodiment of the present invention, different labels are set for all static resources in the static resource set according to the classification of resource types. For example, all static resources are divided into four categories according to type, and four offline static resource configuration tables are generated, including:

[0092] 1) Load the offline basic resource configuration table in advance, including fields such as ID, resource path, resource type, and resource instantiation quantity;

[0093] 2) Load the offline skill resource configuration table in advance, including fields: resource type, resource path, player ID, configuration ID, skin ID, etc.;

[0094] 3) Load offline soldier (e.g. NPC) resource configuration table in advance, including fields: configuration ID, role type, role camp, etc.;

[0095] 4) Load the scene resource configuration table in advance, including fields: ID, resource scene path, etc.

[0096] It can be understood that the above classification method is only an example. In this embodiment, other classification methods can be used to classify static resources. For example, some of the above four classifications can be included, or static resources can be classified according to other classification conditions different from the above four classification conditions.

[0097] To further illustrate the above different types of resource preloading processes in this embodiment, Figure 8 Specifically, Figure 8 As shown, in the character selection stage, the static resource set includes static resource subsets 803 and 804. It should be noted that this embodiment does not limit the number of static resource subsets included in the static resource set. For example, 3, 4, or 5 static resource subsets may be included. Optionally, according to the resource type, the label of the static resource subset 803 is set to the scene resource subset, wherein the scene resource subset 803 includes but is not limited to resources corresponding to virtual objects appearing on the game map in the game, such as resources corresponding to grass 802 appearing on the game map in the battle stage, and resources corresponding to walls appearing on the game map, resources corresponding to lights appearing on the game map, etc.

[0098] According to the resource type, the label of the static resource subset 804 is set to the non-player NPC resource subset, wherein the NPC resource subset includes resources corresponding to one or more NPCs in a game. For example, the NPC resource subset includes but is not limited to the following: Figure 8 The resources of NPC 801 shown in FIG. It is easy to understand that the number of non-player character NPCs in a game is not limited and can be one or more according to needs.

[0099] In the character selection stage, the loading methods for the scene resource subset 803 and the non-player NPC resource subset 804 include but are not limited to the following two methods:

[0100] The first method: sequentially loading the scene resource subset 803 and the non-player NPC resource subset 804;

[0101] The first method: loading the scene resource subset 803 and the non-player NPC resource subset 804 at the same time;

[0102] It should be noted that the above-mentioned scene resource subset 803 and non-player NPC resource subset 804 are only exemplary, and in the actual game process, the number and type of static resource subsets in the static resource set required for a game are not limited. Correspondingly, the loading method for multiple static resource subsets also includes but is not limited to sequentially loading or parallel loading of each static resource subset.

[0103] Furthermore, in the game development stage, managers usually pre-configure the resources needed in different game modes in the editor stage and generate static resource configuration tables referenced with game levels. For example, in the above embodiment, the resources corresponding to the color of the grass on the game map, the resources corresponding to the position of the NPC, etc. In addition, an editing panel dedicated to resource loading is developed in the editor, through which the relevant data in the game resource loading process can be displayed.

[0104] As an optional implementation, before entering the role selection stage, the administrator needs to generate offline static resources in advance in the editor stage. For details, please refer to Fig. 9 Flowchart shown.

[0105] Develop a dedicated panel for resource loading. In the editor stage, turn on "Whether to generate offline and analysis file mode" in the dedicated panel for resource loading, including: setting different labels for all resource loading analysis functions to distinguish whether the resources analyzed in the resource analysis function are static resources or dynamic resources. If they cannot be distinguished, they are defined as dynamic resources. After turning on "Whether to generate offline and analysis file mode", all analysis functions of dynamic resources will be closed in the resource preloading stage, and only analysis functions labeled as static resources will be run, specifically, as shown in steps S902-S9014.

[0106] After all static resources are analyzed through "Whether to generate offline and analyze file mode", resource loading is completed, and the button "Execute to generate offline data" in the resource loading dedicated panel is clicked to classify all static resources analyzed by the above resource analysis function according to type and generate four offline static resource configuration tables. Specifically, as shown in steps S916-S920.

[0107] Furthermore, after generating offline static resources in the editor stage, each static resource subset in the static resource set can be loaded for resource preloading in the character selection stage.

[0108] Through the above-mentioned embodiments provided by the present application, a static resource configuration table is generated according to the offline static resources analyzed in the editor stage, and then various static resources in the static resource configuration table are loaded in advance by utilizing the idle time in the character selection stage, thereby reducing the amount of resources in the resource loading stage, reducing the loading time of the resource loading stage, and achieving the technical effect of improving resource loading efficiency.

[0109] As an optional embodiment, in the above-mentioned role selection stage, each static resource subset in the static resource set is loaded sequentially or in parallel, including:

[0110] Repeat the following steps until the character selection phase ends or all static resource subsets are loaded:

[0111] When a current static resource to be used in a game is determined and the resource path information of the current static resource is not stored in the target resource list, the resource path information of the current static resource is stored in the target resource list;

[0112] Obtain resource path information of some static resources that have not been loaded from the target resource list sequentially or in parallel, and load some static resources according to the resource path information of some static resources;

[0113] Instantiate some of the loaded static resources to obtain instantiated objects of some of the static resources;

[0114] Store instantiated objects of some static resources in the object buffer pool.

[0115] In this embodiment, when entering the role selection stage, four key coroutines in the resource preloading stage are triggered, specifically, Fig.10 As shown:

[0116] 1) Resource analysis coroutine: The analysis coroutine will continuously analyze the resources that will be referenced by the current game and save them in the resource list;

[0117] 2) Resource loading coroutine: The loading coroutine loop obtains information such as resource path from the resource list and starts loading;

[0118] 3) Resource instantiation coroutine: The instantiation coroutine obtains the loaded resources from the resource list and instantiates the local objects;

[0119] 4) Resource pool recycling coroutine: The recycling coroutine recycles resources and loads instantiated objects into the object buffer pool.

[0120] It should be noted that the resource analysis coroutine will analyze all the resources needed for the current game, number the analyzed resources, set classification labels of "static resources" or "dynamic resources" for resources with different numbers, and then generate the following Fig.10 The resource list shown in the figure. Among them, the types of resources 1, 2 and 4 are "static resources", and the type of resource 3 is "dynamic resource". According to the resource number and classification label, the current static resource to be used in the current game is determined, and the resource path information of the current static resource is stored in the resource list.

[0121] In the role selection phase, the resource path information of some unloaded static resources is obtained from the resource list sequentially or in parallel through the resource loading coroutine. For example, assuming that the static resources that are not loaded at the current moment include resource 1 and resource 2, the path information of resource 1 is obtained first, and resource 1 is loaded; then the path information of resource 2 is obtained, and resource 2 is loaded; or the path information of resource 1 and resource 2 are obtained at the same time, and resource 1 and resource 2 are loaded at the same time.

[0122] After loading resource 1 and resource 2, enter the resource instantiation coroutine, instantiate the in-game objects corresponding to the loaded resource 1 and resource 2, and obtain the instantiated objects. For example, the in-game object corresponding to resource 1 is NPC, and the in-game object corresponding to resource 2 is grass on the game map. Then, by instantiating the objects of resource 1 and resource 2, we can get the following: Fig.10 The instantiated object 1 (e.g., NPC) and the instantiated object 2 (e.g., grass) are shown. Then, the instantiated object 1 and the instantiated object 2 are stored in the object buffer pool through the resource pool recycling coroutine, so that the pre-loaded resources 1 and 2 can be directly obtained from the object buffer pool in the next game.

[0123] Furthermore, in the role selection stage, the above four coroutines in this embodiment will be triggered simultaneously, and the execution order of the four coroutines is still as follows: Fig.10 The embodiments shown are explained, for example:

[0124] S1, determine the current static resources (resource 1 and resource 2) to be used through the resource analysis coroutine, and store the resource path information of resource 1 and resource 2 in the resource list;

[0125] S2, through the resource loading coroutine, loads resource 1 and resource 2 according to the resource path information of resource 1 and resource 2;

[0126] S3, through the resource instantiation coroutine, instantiate the local objects of the loaded resources 1 and 2;

[0127] S4, through the resource pool recycling coroutine, instantiated objects 1 and 2 are recycled to the object buffer pool;

[0128] Repeat steps S1 to S4 until the character selection phase ends or all static resources required for the current game are loaded.

[0129] It should be noted that the use of Fig.10 The four coroutines and the working mode of the four coroutines shown in the figure are used to load resources, which is just an example. This embodiment can also use other numbers of coroutines and / or other working modes to load resources, for example, Fig.10 The difference between the illustrated method and the embodiment is that a coroutine is used to complete the above steps S3 and S4.

[0130] Through the above-mentioned embodiments provided by the present application, multiple key coroutines in the character selection stage are utilized to sequentially or in parallel load each static resource subset in the static resource set required for the game in the resource loading coroutine, and then the instantiated objects corresponding to each loaded static resource subset are stored in the object buffer pool through the resource instantiation coroutine and the resource pool recycling coroutine, so that the pre-loaded static resources can be reused in the next game, which reduces the resource loading time, avoids the frame rate freeze caused by the long resource loading time, and improves the user experience.

[0131] As an optional embodiment, in the case where some static resources in the static resource collection are loaded during the above-mentioned character selection phase, during the resource loading phase of a game, the dynamic resource collection of a game is loaded, and the static resources other than some static resources in the static resource collection are loaded, including: when the character selection phase ends when some static resources are loaded during the character selection phase, the loading of some static resources is stopped, and when the resource loading phase starts, the dynamic resource collection of a game is started, and the static resources other than some static resources in the static resource collection are continued to be loaded.

[0132] To further illustrate the above-mentioned stage jump process in this embodiment, Fig.11 Specifically, Fig.11 As shown, the maximum allowed selection time t1 is pre-configured for the character selection phase of a game, that is, all players are required to complete the determination of the character configuration information within the maximum allowed selection time t1. If the above t1 is exceeded, the game will directly jump to the resource loading phase. Fig.11 As shown in Figure 2, the time of the resource loading phase is t2. Fig.11 In the scenario shown, the conditions for jumping from the character selection phase to the resource loading phase include but are not limited to the following two situations:

[0133] (1) All players participating in this game have completed the determination of their character configuration information within time t0. At this time, the character selection phase ends directly and jumps to the resource loading phase. t0 <t1;

[0134] (2) If all players participating in the current game do not complete the determination of the character configuration information within the scheduled time t1, or if they have just completed the determination of the character configuration information when the scheduled time t1 is reached, then when time t1 is reached, the character selection phase will automatically end and jump to the resource loading phase.

[0135] It should be noted that when the character selection stage ends under condition (1), a prompt message indicating that the character selection stage is about to end will be given in the display interface of the character selection stage in the form of a timer. For example, the numbers 10, 9, 8...1 are dynamically displayed in the interface in sequence, and then the display interface of the resource loading stage is entered.

[0136] It is understandable that, for the situation where the character selection is not completed in the character selection stage under condition (2), the corresponding character configuration information will be automatically determined for the player when the predetermined time t1 is reached, for example, the corresponding character, character skin, and character skills will be automatically selected.

[0137] Furthermore, when executing the above jump conditions (1) or (2), as long as the character selection phase ends, the preloading of static resources is stopped, and then in the resource loading phase, the dynamic resource set of the current game is loaded, and the remaining static resources in the static resource set that have not been loaded in the character selection phase are loaded.

[0138] Through the above-mentioned embodiments provided by the present application, two different end conditions are adopted to realize the transition from the role selection stage to the resource loading stage, and the two different end conditions are applied to different scenarios. While improving the resource loading efficiency, the technical effect of improving the flexibility of resource loading can also be achieved.

[0139] In the related art, when the resource loading stage ends, the resources used in other stages of the game will be released. Usually, there are overlapping resources required for the next game and the current game. For these resources, if the resources loaded in the current game are directly reused in the next game, the loading efficiency of the next game will be improved.

[0140] As an optional implementation, the following may be used: Fig.12 The method of releasing the resource cache shown realizes the reuse of the resources loaded in the current game, specifically, including: storing the loaded static resource collection in the target cache in a game; and loading part or all of the static resources in the static resource collection from the target cache during the character selection stage of the next game of the game.

[0141] In this embodiment, the static resource set and dynamic resource set required for the game are loaded through the character selection stage and the resource loading stage (such as steps S1202, S1206-S1214-1), and after all resources are loaded, the static resource set to be loaded by the game is stored in the target cache (such as step S1214-2).

[0142] During the resource loading process of the next game, by setting tags for offline static resources in the editor stage, resources that have duplicate parts with the current game are directly obtained from the target cache, saving the amount of resources that need to be loaded for the next game and reducing the resource loading time for the next game.

[0143] It should be noted that in this embodiment, the resources of the repeated part between the current game and the next game are not limited. In other words, the repeated resources may be part of the resources or all of the static resources in the static resource set required for the current game.

[0144] Furthermore, for resources (such as combat data) generated during the combat phase, if the resources used during the combat phase are released by executing step S1212 when leaving the combat phase (step S1210), then the combat data of the current game cannot be referenced in the next game. Therefore, in an embodiment of the present invention, through step S1210 and step S1214-2, when leaving the combat phase, the resources generated during the combat phase are stored in the target cache, and the combat data of the current game can be directly obtained from the target cache during the combat phase of the next game, providing reference data for the combat phase of the next game, which helps to improve the combat capability of the next game.

[0145] As an optional implementation, in the character selection phase of the next game of a game, some or all of the static resources in the static resource set are loaded from the target cache, including:

[0146] When the game mode of one round of the game is the same as the game mode of the next round of the game, load all static resources in the static resource collection from the target cache; and / or

[0147] When the game mode of one game is different from the game mode of the next game, some static resources in the static resource set are loaded from the target cache, wherein the some static resources are static resources to be used in the next game.

[0148] Specifically, assuming that the game mode includes mode 1 (ranking) and mode 2 (matching), as Fig.13 As shown in (a), when the game modes of the current game and the next game are the same, and both are ranked match modes, when loading the static resources of the next game, all the pre-stored static resources to be loaded by the current game can be directly loaded from the target cache.

[0149] like Fig.13 As shown in (b), when the current game mode is the ranking match mode and the next game mode is the matching match mode, since the two game modes are different, some of the static resources used in the two games may be the same. When loading the static resources of the next game, the same static resources can be directly loaded from the target cache.

[0150] It should be noted that the resources related to the game mode of a game mainly include the resources corresponding to the scene elements and NPCs in the game, for example, the resources corresponding to the grass, lights, walls or other virtual objects that appear on the game map, and the resources corresponding to different NPCs. In other words, the resources related to the game mode are usually the static resources of a game. Therefore, when the game modes of two games are the same, it means that the static resources required for the two games are also the same. Conversely, when the game modes of the two games are different, the static resources required for the two games may be partially the same.

[0151] Through the above-mentioned embodiments provided by the present application, by storing the static resource set to be loaded in a game into the target cache, and then when loading the static resources for the next game, all or part of the static resources in the static resource set are directly obtained from the target cache according to the tags of the static resources, thereby achieving the reuse of game resources, reducing the resource loading time of the next game, and improving the resource loading efficiency.

[0152] As an optional implementation, the resource preloading method further includes:

[0153] After the resource loading phase is completed, the game screen of the battle phase of a game is displayed based on the loaded static resource set and dynamic resource set.

[0154] In this embodiment, all resources of a game are loaded through the character selection stage and the resource loading stage, including all static resources and all dynamic resources. Then, images corresponding to each resource are rendered based on the loaded static resources and the loaded dynamic resources to form an image set. Finally, the game screen of the battle stage of the game is dynamically displayed based on the images in the image set.

[0155] Specifically, Figure 3 As shown, through the role selection stage and the resource loading stage, the static resource collection and the dynamic resource collection are loaded. For example, Figure 3 The character 300 and the skill 303 possessed by the character 300 shown in the figure are all dynamic resources in the dynamic resource set. Figure 3 The scene element (grass) in belongs to the static resource in the static resource set. By rendering the loaded resource of skill 303, the virtual button corresponding to skill 303 can be displayed in the game screen of the battle stage; by rendering the resource corresponding to character 300, the character 300 can be displayed in the game screen of the battle stage.

[0156] Based on the same principle, by rendering the static resources in the static resource collection according to the static resource collection loaded in the character selection phase and the resource loading phase, the in-game objects corresponding to all static resources can be displayed in the game screen in the battle phase, such as grass, lights, NPCs, etc. on the game map.

[0157] Through the above-mentioned embodiments provided by the present application, some or all of the static resources of a game are preloaded in advance in the character selection stage, which reduces the amount of resources to be loaded in the resource loading stage and reduces the time of resource loading, thereby improving the rendering efficiency of the loaded resources, reducing the frame rate freeze caused by resource loading in the game, improving the display effect of the game screen in the battle stage, and thus improving the user experience.

[0158] In order to better understand the above embodiments, the present application also provides an overall flow chart of a resource preloading method. Specifically, Fig.14 As shown, the following steps are included:

[0159] S1402, enter the role selection stage of a game, as described above Figure 3 The character selection phase shown;

[0160] S1404, determining whether to preload offline static resources in advance; if it is determined that offline preloading of static resources is enabled, executing step S1406; otherwise, executing step S1420;

[0161] S1406, reading offline data;

[0162] S1408-S1410, the system runs the loading coroutine in advance, and enters the resource loading phase of the game after the general selection phase is completed, as described above Fig.11 As shown, jump from t0 or t1 to the resource loading phase shown in t2;

[0163] S1412, determine whether the pre-loading is completed, and if the pre-loading is completed, execute step S1414 to load the remaining resources (including unloaded static resources and dynamic resources) normally. For details, please refer to the above Figure 5 In the resource loading phase shown, dynamic resources and static resources that are not loaded in the role selection phase are loaded;

[0164] Otherwise, execute step S1422 to determine whether the advance loading has timed out. If the result of the determination is that the advance loading has not timed out, execute step S1414 to load the remaining resources normally. Otherwise, execute step S1418.

[0165] S1416: After completing the loading of the game resources, execute step S1418.

[0166] S1418, enter the game.

[0167] The resource preloading method in the embodiment of the present invention is used to test the resource loading time of a certain game, and the following results are obtained: Fig.15 The effect diagram shown. Fig.15 In the figure, the horizontal axis coordinates t1~t n Indicates the time of game testing. The vertical axis indicates the average resource loading time of the same game at different test times during the actual game process, for example: the average daily resource loading time.

[0168] from Fig.15 It can be seen intuitively from the resource loading time curve in that by adopting the resource preloading method in the embodiment of the present invention, the resource loading time of the same game will gradually decrease with the change of test time. That is, by utilizing the idle time of the character selection stage (general selection stage), part or all of the static resources of a game are preloaded, which reduces the resource loading time, improves the resource loading efficiency, and solves the technical problem of too long resource loading time in the related art.

[0169] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0170] According to another aspect of an embodiment of the present invention, a resource preloading device for implementing the above resource preloading method is also provided. Fig.16 As shown, the device comprises:

[0171] The first loading unit 1602 is used to load a static resource set of a game during a character selection phase of a game, wherein the character selection phase is used to select a virtual character participating in the game, and the static resource set includes resources to be used in the game and are not related to the character configuration information determined in the character selection phase;

[0172] The second loading unit 1604 is used to load a dynamic resource set for a game during the resource loading phase of a game after the static resource set is loaded during the character selection phase, wherein the dynamic resource set includes resources to be used in the game and related to the character configuration information determined during the character selection phase.

[0173] Optionally, the resource preloading device further includes:

[0174] The third loading unit is used to load the dynamic resource set of a game during the resource loading phase of a game after loading some static resources in the static resource set in the character selection phase, and to load the static resources other than some static resources in the static resource set.

[0175] Optionally, in the resource loading stage of a game, loading a dynamic resource set of a game, and loading static resources except some static resources in a static resource set include:

[0176] The first loading module is used to load the dynamic resource set of a game and the static resources except some static resources in the static resource set in parallel during the resource loading stage of a game.

[0177] Optionally, the resource preloading device further includes:

[0178] A first display unit is used to display first prompt information in a character selection phase when a static resource set of a game is loaded in a character selection phase of the game, wherein the first prompt information is used to prompt that some resources of a game have been loaded in advance; or

[0179] The second display unit is used to display second prompt information in the resource loading stage when a static resource set of a game is loaded in the character selection stage of the game, wherein the second prompt information is used to prompt that some resources of the game have been loaded in advance.

[0180] Optionally, the first loading unit comprises:

[0181] The first processing module is used to sequentially load or load in parallel each static resource subset in the static resource set during the role selection phase, wherein each static resource subset includes at least one of the following:

[0182] A subset of scene resources in a game, wherein the subset of scene resources includes resources of virtual objects appearing on a game map in a game;

[0183] A subset of non-player character NPC resources in a game, wherein the NPC resource subset includes resources of one or more NPCs in a game.

[0184] Optionally, the first processing module includes:

[0185] The processing submodule is used to repeatedly perform the following operations until the character selection phase ends or each static resource subset is loaded:

[0186] When a current static resource to be used in a game is determined and the resource path information of the current static resource is not stored in the target resource list, the resource path information of the current static resource is stored in the target resource list;

[0187] Obtain resource path information of some static resources that have not been loaded from the target resource list sequentially or in parallel, and load some static resources according to the resource path information of some static resources;

[0188] Instantiate some of the loaded static resources to obtain instantiated objects of some of the static resources;

[0189] Store instantiated objects of some static resources in the object buffer pool.

[0190] Optionally, the third loading unit includes:

[0191] The second processing module is used to stop loading some static resources when the character selection phase ends when some static resources are loaded during the character selection phase, and start loading the dynamic resource set of a game at the beginning of the resource loading phase, and continue loading static resources except some static resources in the static resource set.

[0192] Optionally, the resource preloading device further includes:

[0193] A storage unit, used to store a set of loaded static resources in a target cache during a game;

[0194] The fourth loading unit is used to load part or all of the static resources in the static resource set from the target cache during the character selection phase of the next game of the previous game.

[0195] Optionally, the fourth loading unit comprises:

[0196] A second loading module is used to load all static resources in the static resource set from the target cache when the game mode of one game is the same as the game mode of the next game; and / or

[0197] The third loading module is used to load part of the static resources in the static resource set from the target cache when the game mode of one game is different from the game mode of the next game, wherein the part of the static resources are static resources to be used in the next game.

[0198] Optionally, the resource preloading device further includes:

[0199] The display unit is used to display the game screen of the battle phase of a game according to the loaded static resource set and dynamic resource set after the resource loading phase is completed.

[0200] It should be noted that the embodiment of the resource preloading device here can refer to the embodiment of the resource preloading method mentioned above, which will not be described in detail here.

[0201] According to another aspect of the embodiment of the present application, an electronic device for implementing the above resource preloading method is also provided. The electronic device may be Fig.17 The terminal device shown or the server shown. This embodiment is described by taking the electronic device as a server as an example. Fig.17 As shown, the electronic device includes a memory 1702 and a processor 1704. The memory 1702 stores a computer program, and the processor 1704 is configured to execute the steps in any of the above method embodiments through the computer program.

[0202] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.

[0203] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0204] S1, loading a static resource set of a game during a character selection phase of a game, wherein the character selection phase is used to select a virtual character participating in a game, and the static resource set includes resources to be used in the game and are not related to the character configuration information determined in the character selection phase;

[0205] S2, when the static resource set is loaded in the character selection phase, the dynamic resource set of a game is loaded in the resource loading phase of a game, wherein the dynamic resource set includes resources to be used in a game and related to the character configuration information determined in the character selection phase.

[0206] Alternatively, a person skilled in the art may understand that: Fig.17 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID), a PAD, and other terminal devices. Fig.17 The structure of the electronic device is not limited. For example, the electronic device may also include Fig.17 More or fewer components (such as network interfaces, etc.) as shown in, or with Fig.17 Different configurations are shown.

[0207] Among them, the memory 1702 can be used to store software programs and modules, such as the program instructions / modules corresponding to the resource preloading method and device in the embodiment of the present application. The processor 1704 executes various functional applications and data processing by running the software programs and modules stored in the memory 1702, that is, realizing the above-mentioned resource preloading method. The memory 1702 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1702 may further include a memory remotely located relative to the processor 1704, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 1702 can specifically be, but is not limited to, used for information such as static resource sets and dynamic resource sets required for a game. As an example, such as Fig.17 As shown, the memory 1702 may include but is not limited to the first processing unit 1602 and the second processing unit 1604 in the resource preloading device. In addition, it may also include but is not limited to other module units in the resource preloading device, which will not be repeated in this example.

[0208] Optionally, the transmission device 1706 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wired network and a wireless network. In one example, the transmission device 906 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 1706 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0209] In addition, the electronic device further includes: a display 1708 for displaying the game screen of the battle phase; and a connection bus 1710 for connecting the various module components in the electronic device.

[0210] In other embodiments, the terminal device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes through network communication. Among them, the nodes may form a peer-to-peer (P2P, Peer To Peer) network, and any form of computing device, such as a server, terminal and other electronic devices, may become a node in the blockchain system by joining the peer-to-peer network.

[0211] According to one aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the resource preloading method provided in various optional implementations of the above-mentioned server resource allocation, wherein the computer program is configured to execute the steps of any of the above-mentioned method embodiments when running.

[0212] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0213] S1, loading a static resource set of a game during a character selection phase of a game, wherein the character selection phase is used to select a virtual character participating in a game, and the static resource set includes resources to be used in the game and are not related to the character configuration information determined in the character selection phase;

[0214] S2, when the static resource set is loaded in the character selection phase, the dynamic resource set of a game is loaded in the resource loading phase of a game, wherein the dynamic resource set includes resources to be used in a game and related to the character configuration information determined in the character selection phase.

[0215] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0216] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0217] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers or network devices, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention.

[0218] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0219] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

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

[0221] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0222] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A resource preloading method, characterized in that: include: In a character selection phase of a game, a static resource set of the game is loaded, wherein the character selection phase is used to select a virtual character participating in the game, and the static resource set includes resources to be used in the game and are not related to the character configuration information determined in the character selection phase; When the static resource set is loaded in the character selection phase, the dynamic resource set of the game is loaded in the resource loading phase of the game, wherein the dynamic resource set includes resources to be used in the game and related to the character configuration information determined in the character selection phase.

2. The method according to claim 1, characterized in that The method further comprises: When some static resources in the static resource set are loaded during the character selection phase, during the resource loading phase of the game, the dynamic resource set of the game is loaded, and the static resources in the static resource set except the some static resources are loaded.

3. The method according to claim 2, characterized in that The step of loading the dynamic resource set of the game and loading the static resources in the static resource set except for the part of the static resources in the static resource set during the resource loading phase of the game includes: During the resource loading phase of the game, the dynamic resource set of the game and the static resources in the static resource set except for the part of static resources are loaded in parallel.

4. The method according to claim 1, characterized in that: The method further comprises: In a case where a static resource set of a game is loaded during a character selection phase of the game, first prompt information is displayed during the character selection phase, wherein the first prompt information is used to prompt that some resources of the game have been loaded in advance; or When a static resource set of a game is loaded during a character selection phase of the game, second prompt information is displayed during the resource loading phase, wherein the second prompt information is used to prompt that some resources of the game have been loaded in advance.

5. The method according to claim 1, characterized in that: In the character selection stage of a game, loading the static resource set of the game includes: In the role selection stage, each static resource subset in the static resource set is loaded sequentially or in parallel, wherein each static resource subset includes at least one of the following: A subset of scene resources in the game, wherein the subset of scene resources includes resources of virtual objects appearing on a game map in the game; A subset of non-player character (NPC) resources in the game, wherein the subset of NPC resources includes resources of one or more NPCs in the game.

6. The method according to claim 5, characterized in that In the role selection stage, loading each static resource subset in the static resource set sequentially or in parallel includes: Repeat the following steps until the character selection phase ends or the static resource subsets are loaded: When it is determined that the current static resource to be used in the game is present and the resource path information of the current static resource is not stored in the target resource list, storing the resource path information of the current static resource in the target resource list; Acquire resource path information of some static resources that have not been loaded from the target resource list sequentially or in parallel, and load the some static resources according to the resource path information of the some static resources; Instantiating the local object of the loaded part of static resources to obtain the instantiation object of the part of static resources; The instantiated objects of the part of static resources are stored in the object buffer pool.

7. The method according to claim 2, characterized in that: In the case where some of the static resources in the static resource set are loaded in the character selection phase, in the resource loading phase of the game, the dynamic resource set of the game is loaded, and the static resources in the static resource set other than the some of the static resources are loaded, including: When the character selection phase ends when the loading of the part of static resources is completed during the character selection phase, the loading of the part of static resources is stopped, and when the resource loading phase starts, the dynamic resource set of the game is started to be loaded, and the static resources in the static resource set except the part of static resources are continued to be loaded.

8. The method according to claim 1, characterized in that: The method further comprises: In the game, storing the loaded static resource set in a target cache; In a character selection phase of a next game of the game, some or all of the static resources in the static resource set are loaded from the target cache.

9. The method according to claim 8, characterized in that In a character selection phase of a next game of the game, loading part or all of the static resources in the static resource set from the target cache includes: When the game mode of the first game is the same as the game mode of the next game, loading all static resources in the static resource set from the target cache; and / or When the game mode of the first game is different from the game mode of the next game, some static resources in the static resource set are loaded from the target cache, wherein the some static resources are static resources to be used in the next game.

10. The method according to any one of claims 1 to 9, characterized in that The method further comprises: After the resource loading phase is finished, the game screen of the battle phase of the game is displayed according to the loaded static resource set and the dynamic resource set.

11. A resource preloading device, characterized in that: include: A first loading unit is used to load a static resource set of a game during a character selection phase of the game, wherein the character selection phase is used to select a virtual character participating in the game, and the static resource set includes resources to be used in the game and are not related to the character configuration information determined in the character selection phase; A second loading unit is used to load the dynamic resource set of the game during the resource loading phase of the game after the static resource set is loaded during the character selection phase, wherein the dynamic resource set includes resources to be used in the game and related to the character configuration information determined in the character selection phase.

12. A computer-readable storage medium, the computer-readable storage medium comprising a stored program, wherein: When the program is executed, the method described in any one of claims 1 to 10 is executed.

13. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 10 through the computer program.

Citation Information

Patent Citations

  • Scene element display method and device

    CN108499103A

  • Game data processing method and device, computer and readable storage medium

    CN111767503A