CN112799737A - Game resource processing method, device, processor and storage medium - Google Patents

Game resource processing method, device, processor and storage medium Download PDF

Info

Publication number
CN112799737A
CN112799737A CN202110099750.9A CN202110099750A CN112799737A CN 112799737 A CN112799737 A CN 112799737A CN 202110099750 A CN202110099750 A CN 202110099750A CN 112799737 A CN112799737 A CN 112799737A
Authority
CN
China
Prior art keywords
loaded
resource
game
resources
index
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110099750.9A
Other languages
Chinese (zh)
Other versions
CN112799737B (en
Inventor
占德文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202110099750.9A priority Critical patent/CN112799737B/en
Publication of CN112799737A publication Critical patent/CN112799737A/en
Application granted granted Critical
Publication of CN112799737B publication Critical patent/CN112799737B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/162Delete operations
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/50Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers
    • A63F2300/53Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers details of basic data processing
    • A63F2300/538Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers details of basic data processing for performing operations on behalf of the game client, e.g. rendering
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a game resource processing method, a game resource processing device, a game resource processor and a storage medium. Wherein, the method comprises the following steps: when a game is started, loading an index table, wherein the index table comprises index identifications of a plurality of resources to be loaded; in the process of running the game, determining a target resource corresponding to a target game scene from a plurality of resources to be loaded; and acquiring an index identifier corresponding to the target resource based on the index table, acquiring the target resource according to the index identifier corresponding to the target resource, and loading the target resource to render and obtain the target game scene. The invention solves the technical problem of resource loading jamming caused by loading all resources when a game is started in the related technology.

Description

Game resource processing method, device, processor and storage medium
Technical Field
The invention relates to the field of computers, in particular to a game resource processing method, a game resource processing device, a game resource processor and a storage medium.
Background
With the development of computer technology, people experience better and better in games. In order to improve the experience of people in game, when the game is played, the terminal equipment running the game needs to load resources, such as audio resources, video resources and the like.
Typically, the Resources that need to be loaded at the time of game are stored in a default folder (e.g., Resources folder), and all Resources in the default folder are loaded directly at the time of game start. However, when the resources in the default folder are too many, loading all the resources at one time during game starting may cause a large amount of memory resources to be consumed during game starting, thereby causing resource loading to be unsmooth; in the process of game development, when the editor runs the game for the first time, too many resources are loaded at one time, so that the loading is blocked.
To avoid the above problem, in the prior art, the resource to be loaded may be packaged and compressed into an AB package (i.e., AssetBundle package) by a game engine (e.g., Unity engine), then the AB package is placed on a server, the AB package is downloaded from the server in advance when the resource needs to be loaded, and the resource is loaded through a game interface such as AssetBundle.
Although the mode based on AB packet loading resources can avoid the problem of blocking during game starting, the maintenance cost required by the scheme is higher, and the convenience is poor. Moreover, in the case of a project which largely uses a resource folder-based resource loading scheme, changing the project to an AB package-based resource loading scheme requires more time and cost.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a game resource processing method, a game resource processing device, a game resource processor and a storage medium, which at least solve the technical problem of resource loading blockage caused by loading all resources when a game is started in the related art.
According to an aspect of an embodiment of the present invention, there is provided a method for processing game resources, including: when a game is started, loading an index table, wherein the index table comprises index identifications of a plurality of resources to be loaded; in the process of running the game, determining a target resource corresponding to a target game scene from a plurality of resources to be loaded; and acquiring an index identifier corresponding to the target resource based on the index table, acquiring the target resource according to the index identifier corresponding to the target resource, and loading the target resource to render and obtain the target game scene.
Further, the index table is determined by performing editing processing on a plurality of resources to be loaded, and the editing processing includes: moving a plurality of resources to be loaded stored in a first preset folder to a second preset folder, wherein the first preset folder is a folder accessed when a game is started, and the second preset folder is a folder accessed in the process of running the game; determining an index identifier for storing the resources to be loaded according to the storage positions of the resources to be loaded in the second preset folder and the global unique identification code corresponding to each resource to be loaded; and constructing an index table based on the index identification.
Further, the first preset folder and the second preset folder are arranged in an external memory of the terminal device, and the processing method of the game resource further includes: acquiring the target resource from the second preset folder based on the index identifier corresponding to the target resource; and loading the target resource into an internal memory of the terminal equipment.
Further, the processing method of the game resource further comprises the following steps: and under the condition that the resource content of the plurality of resources to be loaded is detected to change, maintaining the index identifications of the plurality of resources to be loaded unchanged.
Further, the processing method of the game resource further comprises the following steps: determining an index identifier of the newly added resource to be loaded under the condition that the newly added resource to be loaded is detected to exist in the second preset folder; and updating the index table based on the index identification of the newly added resource to be loaded.
Further, the processing method of the game resource further comprises the following steps: under the condition that the newly added resources to be loaded exist in the first preset folder, the newly added resources to be loaded are moved to the second preset folder; determining index identification of newly added resources to be loaded; and updating the index table based on the index identification of the newly added resource to be loaded.
Further, the processing method of the game resource further comprises the following steps: determining an index identifier of a deleted resource to be loaded under the condition that deletion of the resource to be loaded in the second preset folder is detected; and deleting the index identification of the deleted resource to be loaded in the index table, and generating prompt information, wherein the prompt information is used for prompting that the resource to be loaded in the second preset folder is deleted.
According to another aspect of the embodiments of the present invention, there is also provided a processing apparatus of game resources, including: the first loading module is used for loading an index table when a game is started, wherein the index table comprises index identifications of a plurality of resources to be loaded; the determining module is used for determining a target resource corresponding to a target game scene from a plurality of resources to be loaded in the process of running the game; the acquisition module is used for acquiring the index identification corresponding to the target resource based on the index table; and the second loading module is used for acquiring the target resource according to the index identifier corresponding to the target resource and loading the target resource so as to render and obtain the target game scene.
According to another aspect of the embodiments of the present invention, there is also provided a non-volatile storage medium having a computer program stored therein, wherein the computer program is configured to execute the above-mentioned processing method of game resources when running.
According to another aspect of the embodiments of the present invention, there is also provided a processor for executing a program, wherein the program is configured to execute the processing method of the game resource when running.
In the embodiment of the invention, a resource loading mode based on the index table is adopted, and the index table is loaded when the game is started; and in the process of running the game, determining a target resource corresponding to a target game scene from a plurality of resources to be loaded, then acquiring an index identifier corresponding to the target resource based on the index table, finally acquiring the target resource according to the index identifier corresponding to the target resource, and loading the target resource to render and obtain the target game scene.
In the above process, since all resources are not loaded when the game is started, the problem of resource loading jam caused by loading all resources when the game is started in the prior art can be avoided. And when the game is started, only the index table is loaded, and in the process of the game, when the resources need to be loaded, the corresponding resources are loaded through the index table. In the project for loading Resources based on the Resources folder, the mode of loading the Resources can be directly changed into the mode of loading the Resources, and compared with the mode of loading the Resources based on the AB packet, the time cost is reduced.
Therefore, the purpose of avoiding resource loading jamming is achieved by the scheme provided by the application, the technical effects of improving the resource loading efficiency and improving the game experience of the user are achieved, and the technical problem of resource loading jamming caused by loading all resources when the game is started in the related technology is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart of a method for processing game resources according to an embodiment of the invention;
FIG. 2 is a diagram illustrating an alternative method for creating an index table according to an embodiment of the invention;
FIG. 3 is a diagram illustrating an alternative method for moving a resource to be loaded according to an embodiment of the present invention;
FIG. 4 is a diagram of an alternative index table according to an embodiment of the present invention;
FIG. 5 is a diagram of a processing device for game resources according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In accordance with an embodiment of the present invention, there is provided an embodiment of a method for processing game resources, it is noted that the steps illustrated in the flowchart of the figure may be performed in a computer system such as a set of computer-executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
Fig. 1 is a flow chart of a processing method of game resources according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S102, when the game is started, loading an index table, wherein the index table comprises index identifications of a plurality of resources to be loaded.
In step S102, the index table may be, but is not limited to, an Asset index table, and the index identifier included in the index table is a unique identifier of each resource to be loaded. The resource to be loaded may be, but is not limited to, an audio resource, a video resource, and an image resource.
In an alternative embodiment, the resources to be loaded include resources that need to be loaded when the game is started and resources that need to be loaded when the game is run. When the game is started, the terminal device (e.g., a mobile phone or a computer) running the game obtains the index identifier of the target resource to be loaded when the game is started through the index table, then determines the target resource from the multiple resources to be loaded through the index identifier of the target resource, and loads the target resource.
In another alternative embodiment, the resources to be loaded include only the resources that need to be loaded at game run time. When the game is started, the terminal device (e.g., a mobile phone or a computer) running the game directly loads the target resource required to be loaded when the game is started. And when the game runs, loading the target resource based on the index table. It should be noted that, the resources that need to be loaded during the game running are usually relatively small, so that, when the game is started, only the target resources at the time of starting the game are loaded, and the loading of the resources is not jammed.
In step S102, at the time of starting the game, not all resources in the game runtime are directly loaded, but the index table is loaded. Because the index table only contains the index identification of the resource to be loaded, when the game is started, only the index table is loaded, and the problem of resource loading blockage caused by directly loading all resources when the game is started in the prior art can be effectively avoided.
And step S104, in the process of running the game, determining a target resource corresponding to a target game scene from a plurality of resources to be loaded.
It should be noted that, in the process of running the game, resources to be loaded in different game scenes are different, for example, in a shooting game, resources required by the terminal device when a virtual character in the game runs are different from resources required by the terminal device when the virtual character shoots.
In step S104, during the game running, the terminal device only loads the target resource corresponding to the target game scene, but does not load all resources, so that the stuttering of the game running when the resources are loaded can be avoided.
And step S106, acquiring the index identification corresponding to the target resource based on the index table.
It should be noted that the resource to be loaded is stored in the external memory of the terminal device, the index identifier may be determined based on the storage location of the target resource in the external memory and the manner of the pre-form reference, and optionally, the pre-form reference may be a global unique identification code carried by the game engine, and the global unique identification code is used for the game engine to accurately read the target resource.
And S108, acquiring the target resource according to the index identification corresponding to the target resource, and loading the target resource to render and obtain the target game scene.
Note that the target resource is stored in the external memory of the terminal device, and after passing through step S108, the target resource is loaded into the internal memory of the terminal device. It is easy to note that in the present application, the terminal device only loads the resource to be loaded, which needs to be loaded, into the internal memory, so that the memory loss is reduced, and the resource loading speed is increased.
Based on the schemes defined in the above steps S102 to S108, it can be known that, in the embodiment of the present invention, a resource loading manner based on an index table is adopted, and the index table is loaded when a game is started; and in the process of running the game, determining a target resource corresponding to a target game scene from a plurality of resources to be loaded, then acquiring an index identifier corresponding to the target resource based on the index table, finally acquiring the target resource according to the index identifier corresponding to the target resource, and loading the target resource to render and obtain the target game scene.
It is easy to notice that, because all resources are not loaded when the game is started, the problem of resource loading jam caused by loading all resources when the game is started in the prior art can be avoided. And when the game is started, only the index table is loaded, and in the process of the game, when the resources need to be loaded, the corresponding resources are loaded through the index table. In the project for loading Resources based on the Resources folder, the mode of loading the Resources can be directly changed into the mode of loading the Resources, and compared with the mode of loading the Resources based on the AB packet, the time cost is reduced.
Therefore, the purpose of avoiding resource loading jamming is achieved by the scheme provided by the application, the technical effects of improving the resource loading efficiency and improving the game experience of the user are achieved, and the technical problem of resource loading jamming caused by loading all resources when the game is started in the related technology is solved.
In an alternative embodiment, before loading the index table, the index table needs to be constructed, where the index table can be determined by performing editing processing on a plurality of resources to be loaded. Specifically, firstly, a plurality of resources to be loaded stored in a first preset folder are moved to a second preset folder, then index identifications of the plurality of resources to be loaded are determined according to storage positions of the plurality of resources to be loaded in the second preset folder and global unique identification codes corresponding to the plurality of resources to be loaded, and finally an index table is constructed based on the index identifications. The first preset folder and the second preset folder are arranged in an external memory of the terminal device, the first preset folder is a folder accessed when the game is started, and the second preset folder is a folder accessed in the process of running the game.
Optionally, the first predetermined folder may be a Resources file, wherein the Resources in the first predetermined folder may be automatically indexed by the game engine and identified as Resources that need to be loaded quickly. When the game is started, the game engine loads all the resources to be loaded into the memory at one time so as to ensure that the required resources can be loaded quickly and conveniently. However, when the amount of the resources to be loaded is huge, loading all the resources to be loaded at one time can cause the game to start to be unsmooth, and a large amount of memory space is occupied. When the game is started, the game engine can only load the resource to be loaded in the first preset folder, but cannot load the resource to be loaded in the second preset folder, and the resource to be loaded in the first preset folder is moved to the second preset folder, and the first preset folder has no resource to be loaded or only a few resources to be loaded, at the moment, the game engine does not need to load the resource to be loaded or only loads a few resources to be loaded when the game is started, so that the problem of blocking when the game is started is avoided.
Optionally, fig. 2 shows a schematic diagram of creating an index table, and as can be seen from fig. 2, the terminal device may create the index table through ResourceMover/createeasset in the menu bar. Wherein the index identifier in the index table can be determined based on the storage location of the target resource in the external memory and the manner of the pre-form reference, and the pre-form reference can be a global unique identification code carried by the game engine. For example, if the relative path of the preform file next to the second predetermined folder is "/ResourceMove/xxx 1/xxx2. prefab", the index record is added in the index table in the form of "relative path" + "preform reference", where the relative path is "xxx 1/xxx2. prefab" and the preform reference is (a globally unique identification code, e.g., "a 55cd38a605dcd94c900c 87 ca87cb85 c").
In an alternative embodiment, FIG. 3 shows a schematic diagram of moving a resource to be loaded. Specifically, the user can open a resource window through the resource window/Main of the menu bar, and then click the click control button "Refresh" in the window to Refresh the existing Resources folder (i.e., the first preset folder) in the items displayed in the window. Further, the user may check the moved resource to be loaded in the ResourceMover window, and after clicking the application control "Apply", automatically move the selected resource to be loaded to a "ResourceMove" folder (i.e., a second preset folder) of the peer directory, and add the resource to be loaded in the "ResourceMove" folder to establish the index. For example, fig. 4 is a schematic diagram of an alternative index table.
Further, after the resource to be loaded is moved to the second preset folder, the terminal device may load the resource to be loaded from the second preset folder when the game is running. Specifically, the terminal device obtains the target resource from the second preset folder based on the index identifier corresponding to the target resource, and loads the target resource into an internal memory of the terminal device.
Optionally, where the resource needs to be loaded, the resource to be loaded may be loaded through a self-created API (Application Programming Interface). The function of the self-created API is completely consistent with that of the API for loading Resources in the Resources scheme. In the aspect of program codes, only the Resources is needed to be changed into the self-created API resource MoveManager at the place where the Resources are used in the original project.
It should be noted that, since the functions of the API created by the present application are the same as those of the API in the original Resources scheme, and when the resource loading scheme is migrated in the same project, only the API needs to be modified adaptively, so that the problem that the time and cost are high when the resource loading scheme based on the Resources folder is used in a large amount in the project is solved.
In an optional embodiment, the terminal device may further update the index table. Optionally, when it is detected that the resource content of the multiple resources to be loaded changes, the index identifiers of the multiple resources to be loaded are maintained unchanged. It should be noted that, in this scenario, only the content of the resource to be loaded is changed, and the storage location of the resource to be loaded and the global unique identification code are not changed, that is, the index identifier of the resource to be loaded is not changed, and the terminal device still uses the original index identifier when indexing the resource to be loaded.
Optionally, when it is detected that the newly added resource to be loaded exists in the second preset folder, the terminal device determines the index identifier of the newly added resource to be loaded, and updates the index table based on the index identifier of the newly added resource to be loaded. It should be noted that in this scenario, a newly added resource to be loaded exists in the second preset folder, an index identifier may be determined according to a storage location of the newly added resource to be loaded and the global unique identification code, and the index identifier is added to the index table, so as to update the index table.
Optionally, when it is detected that the newly added resource to be loaded exists in the first preset folder, the terminal device moves the newly added resource to be loaded to the second preset folder, then determines the index identifier of the newly added resource to be loaded, and updates the index table based on the index identifier of the newly added resource to be loaded. When detecting that the newly added resource to be loaded is in the first preset folder, the newly added resource to be loaded is moved to the second preset folder, and then the index table is updated.
In another optional embodiment, in the case that it is detected that there is a newly added resource to be loaded in the first preset folder, the terminal device may further detect when the newly added resource to be loaded is loaded. If the newly added resource to be loaded is loaded when the game is started, the terminal equipment does not move the newly added resource to be loaded; and if the newly added resource to be loaded is loaded during the running of the game, the terminal equipment moves the newly added resource to be loaded to a second preset folder.
Optionally, when it is detected that the resource to be loaded in the second preset folder is deleted, the index identifier of the deleted resource to be loaded is determined, the index identifier of the deleted resource to be loaded is deleted in the index table, and prompt information is generated, where the prompt information is used to prompt that the resource to be loaded in the second preset folder is deleted.
It should be noted that, in this scenario, the resource to be loaded deleted from the second preset folder may be detected, the index identifier of the deleted resource to be loaded is determined according to the storage location of the deleted resource to be loaded and the global unique identification code, and then the index identifier is deleted from the index table, so as to update the index table.
Based on the above content, the resource loading method and the device have the advantages that the resource to be loaded in the first preset folder is moved to the second preset folder, the index table is built according to the index identification of the resource to be loaded in the second preset folder, and the index table is indexed according to the path of the resource to be loaded relative to the second preset folder, so that the problem of resource loading blockage caused by loading all resources when the game is started is solved.
According to an embodiment of the present invention, there is further provided an embodiment of a processing apparatus for game resources, where fig. 5 is a schematic diagram of a processing apparatus for game resources according to an embodiment of the present invention, and as shown in fig. 5, the apparatus includes: a first loading module 501, a determining module 503, an obtaining module 505, and a second loading module 507.
The first loading module 501 is configured to load an index table when a game is started, where the index table includes index identifiers of multiple resources to be loaded; a determining module 503, configured to determine, in a process of running a game, a target resource corresponding to a target game scene from a plurality of resources to be loaded; an obtaining module 505, configured to obtain an index identifier corresponding to the target resource based on the index table; the second loading module 507 is configured to obtain the target resource according to the index identifier corresponding to the target resource, and load the target resource to obtain the target game scene through rendering.
It should be noted that the first loading module 501, the determining module 503, the obtaining module 505, and the second loading module 507 correspond to steps S102 to S108 in the foregoing embodiment, and the four modules are the same as the corresponding steps in the implementation example and the application scenario, but are not limited to the disclosure in the foregoing embodiment.
Optionally, the index table is determined by editing a plurality of resources to be loaded, where the processing apparatus for game resources further includes: the device comprises a first moving module, a first determining module and a constructing module. The system comprises a first moving module, a second moving module and a third moving module, wherein the first moving module is used for moving a plurality of resources to be loaded stored in a first preset folder to a second preset folder, the first preset folder is a folder accessed when a game is started, and the second preset folder is a folder accessed in the process of running the game; the first determining module is used for determining index identifications of the multiple resources to be loaded according to storage positions of the multiple resources to be loaded in a second preset folder and global unique identification codes corresponding to the multiple resources to be loaded; and the construction module is used for constructing an index table based on the index identification.
Optionally, the first preset folder and the second preset folder are disposed in an external memory of the terminal device, wherein the second loading module includes: the device comprises a first obtaining module and a third loading module. The first obtaining module is used for obtaining the target resource from the second preset folder based on the index identifier corresponding to the target resource; and the third loading module is used for loading the target resource into the internal memory of the terminal equipment.
Optionally, the processing device of the game resource further includes: and the processing module is used for maintaining the index identifications of the plurality of resources to be loaded unchanged under the condition that the resource content of the plurality of resources to be loaded is detected to change.
Optionally, the processing device of the game resource further includes: a second determining module and a first updating module. The second determining module is used for determining the index identifier of the newly added resource to be loaded under the condition that the newly added resource to be loaded is detected to exist in the second preset folder; and the first updating module is used for updating the index table based on the index identification of the newly added resource to be loaded.
Optionally, the processing device of the game resource further includes: the device comprises a second moving module, a third determining module and a second updating module. The second moving module is used for moving the newly added resource to be loaded to a second preset folder under the condition that the newly added resource to be loaded is detected to exist in the first preset folder; the third determining module is used for determining the index identification of the newly added resource to be loaded; and the second updating module is used for updating the index table based on the index identification of the newly added resource to be loaded.
Optionally, the processing device of the game resource further includes: a fourth determination module and a deletion module. The fourth determining module is configured to determine an index identifier of the deleted resource to be loaded when detecting that the resource to be loaded in the second preset folder is deleted; and the deleting module is used for deleting the index identifier of the deleted resource to be loaded in the index table and generating prompt information, wherein the prompt information is used for prompting that the resource to be loaded in the second preset folder is deleted.
According to another aspect of the embodiments of the present invention, there is also provided a non-volatile storage medium having a computer program stored therein, wherein the computer program is configured to execute the above-mentioned processing method of game resources when running.
According to another aspect of the embodiments of the present invention, there is also provided a processor for executing a program, wherein the program is configured to execute the processing method of the game resource when running.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A method for processing game resources, comprising:
when a game is started, loading an index table, wherein the index table comprises index identifications of a plurality of resources to be loaded;
in the process of running the game, determining a target resource corresponding to a target game scene from the plurality of resources to be loaded;
acquiring an index identification corresponding to the target resource based on the index table;
and acquiring the target resource according to the index identification corresponding to the target resource, and loading the target resource to render and obtain the target game scene.
2. The method according to claim 1, wherein the index table is determined by performing an editing process on the plurality of resources to be loaded, the editing process comprising:
moving a plurality of resources to be loaded stored in a first preset folder to a second preset folder, wherein the first preset folder is a folder accessed when the game is started, and the second preset folder is a folder accessed in the process of running the game;
determining index identifications of the multiple resources to be loaded according to storage positions of the multiple resources to be loaded in the second preset folder and the globally unique identification codes corresponding to the multiple resources to be loaded;
and constructing the index table based on the index identification.
3. The method according to claim 2, wherein the first preset folder and the second preset folder are disposed in an external memory of a terminal device, and wherein obtaining the target resource according to the index identifier corresponding to the target resource and loading the target resource comprises:
acquiring the target resource from the second preset folder based on the index identifier corresponding to the target resource;
and loading the target resource into an internal memory of the terminal equipment.
4. The method of claim 1, further comprising:
and under the condition that the resource content of the plurality of resources to be loaded is detected to be changed, maintaining the index identifications of the plurality of resources to be loaded unchanged.
5. The method of claim 2, further comprising:
under the condition that the newly added resources to be loaded exist in the second preset folder, determining index identifications of the newly added resources to be loaded;
and updating the index table based on the index identification of the newly added resource to be loaded.
6. The method of claim 2, further comprising:
under the condition that the newly added resources to be loaded exist in the first preset folder, moving the newly added resources to be loaded to the second preset folder;
determining the index identification of the newly added resource to be loaded;
and updating the index table based on the index identification of the newly added resource to be loaded.
7. The method of claim 2, further comprising:
determining an index identifier of the deleted resource to be loaded under the condition that the deletion of the resource to be loaded in the second preset folder is detected;
and deleting the index identification of the deleted resource to be loaded in the index table, and generating prompt information, wherein the prompt information is used for prompting that the resource to be loaded in the second preset folder is deleted.
8. A processing apparatus for game resources, comprising:
the first loading module is used for loading an index table when a game is started, wherein the index table comprises index identifications of a plurality of resources to be loaded;
the determining module is used for determining a target resource corresponding to a target game scene from the plurality of resources to be loaded in the process of running the game;
an obtaining module, configured to obtain, based on the index table, an index identifier corresponding to the target resource;
and the second loading module is used for acquiring the target resource according to the index identifier corresponding to the target resource and loading the target resource so as to render and obtain the target game scene.
9. A non-volatile storage medium, in which a computer program is stored, wherein the computer program is arranged to execute a method of processing a game resource as claimed in any one of claims 1 to 7 when run.
10. A processor for running a program, wherein the program is arranged to perform the method of processing a game resource as claimed in any one of claims 1 to 7 when run.
CN202110099750.9A 2021-01-25 2021-01-25 Game resource processing method, game resource processing device, processor and storage medium Active CN112799737B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110099750.9A CN112799737B (en) 2021-01-25 2021-01-25 Game resource processing method, game resource processing device, processor and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110099750.9A CN112799737B (en) 2021-01-25 2021-01-25 Game resource processing method, game resource processing device, processor and storage medium

Publications (2)

Publication Number Publication Date
CN112799737A true CN112799737A (en) 2021-05-14
CN112799737B CN112799737B (en) 2023-05-26

Family

ID=75811653

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110099750.9A Active CN112799737B (en) 2021-01-25 2021-01-25 Game resource processing method, game resource processing device, processor and storage medium

Country Status (1)

Country Link
CN (1) CN112799737B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113986376A (en) * 2021-10-25 2022-01-28 土巴兔集团股份有限公司 Resource file updating method based on Flutter platform and related equipment thereof
CN114416207A (en) * 2022-01-20 2022-04-29 网易(杭州)网络有限公司 Resource network loading method and device for H5 game, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107038044A (en) * 2017-03-27 2017-08-11 长沙趣动文化科技有限公司 The discrete loading method of game resource and system based on Unity3D
CN108888951A (en) * 2018-06-25 2018-11-27 网易(杭州)网络有限公司 Game resource treating method and apparatus
CN109513213A (en) * 2018-11-13 2019-03-26 广州互爱信息科技有限公司 A kind of hand trip subpackage download technology method
CN110688175A (en) * 2019-10-09 2020-01-14 网易(杭州)网络有限公司 File loading method and device, terminal equipment and storage medium
CN110865888A (en) * 2019-11-28 2020-03-06 米哈游科技(上海)有限公司 Resource loading method and device, server and storage medium
CN112023399A (en) * 2020-08-21 2020-12-04 上海完美时空软件有限公司 Game scene data processing method and device, storage medium and computer equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107038044A (en) * 2017-03-27 2017-08-11 长沙趣动文化科技有限公司 The discrete loading method of game resource and system based on Unity3D
CN108888951A (en) * 2018-06-25 2018-11-27 网易(杭州)网络有限公司 Game resource treating method and apparatus
CN109513213A (en) * 2018-11-13 2019-03-26 广州互爱信息科技有限公司 A kind of hand trip subpackage download technology method
CN110688175A (en) * 2019-10-09 2020-01-14 网易(杭州)网络有限公司 File loading method and device, terminal equipment and storage medium
CN110865888A (en) * 2019-11-28 2020-03-06 米哈游科技(上海)有限公司 Resource loading method and device, server and storage medium
CN112023399A (en) * 2020-08-21 2020-12-04 上海完美时空软件有限公司 Game scene data processing method and device, storage medium and computer equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113986376A (en) * 2021-10-25 2022-01-28 土巴兔集团股份有限公司 Resource file updating method based on Flutter platform and related equipment thereof
CN114416207A (en) * 2022-01-20 2022-04-29 网易(杭州)网络有限公司 Resource network loading method and device for H5 game, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112799737B (en) 2023-05-26

Similar Documents

Publication Publication Date Title
CN112799737B (en) Game resource processing method, game resource processing device, processor and storage medium
CN108492338B (en) Compression method and device for animation file, storage medium and electronic device
CN105072461A (en) Data processing method and device
CN103716346A (en) Management method and device of application on android handset client
CN104461621B (en) A kind of method and device of Update attribute information
CN102082873B (en) Starting method, mobile terminal and user identification card
CN105893471B (en) Data processing method and electronic equipment
CN108073424B (en) Calling method and device of component interface
CN112306411A (en) Data storage method and device, nonvolatile storage medium and processor
CN111161283A (en) Method and device for processing picture resources and electronic equipment
CN101986662B (en) Widget instance operation method and system
CN110652728A (en) Game resource management method and device, electronic equipment and storage medium
CN112882746B (en) Application program updating method and device, storage medium and computer equipment
CN110874220B (en) Function integration method, apparatus and storage medium in game application
CN111984293A (en) Information processing method, device and storage medium
CN111752454A (en) Skin control method, device, terminal and medium for application program interface
CN113244625B (en) Editing method and device for game topography data, storage medium and electronic device
CN112036133B (en) File storage method and device, electronic equipment and storage medium
CN113051336B (en) Visual data operation method, system, equipment and medium
CN111586170B (en) Resource downloading method, device, equipment and computer readable storage medium
CN110704157B (en) Application starting method, related device and medium
CN108959955B (en) File processing method and device
CN111176715A (en) Information calling method and server
CN113572640B (en) Equipment instruction issuing control method, system and device
US20210141771A1 (en) Method of managing files by mobile device and mobile device for implementing the same

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant