CN104298562A - Resource management method and system for game development - Google Patents
Resource management method and system for game development Download PDFInfo
- Publication number
- CN104298562A CN104298562A CN201410531293.6A CN201410531293A CN104298562A CN 104298562 A CN104298562 A CN 104298562A CN 201410531293 A CN201410531293 A CN 201410531293A CN 104298562 A CN104298562 A CN 104298562A
- Authority
- CN
- China
- Prior art keywords
- data
- resource
- chained list
- binary
- loading
- 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.)
- Pending
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a resource management method for game development. The resource management method includes: building a resource linked list queue L and a binary data linked list H; seeking whether cache has loaded data, if not, reading the loaded data into a memory and conducting queuing and conversion processing; better judging whether parameter CO and parameter SO are true, and caching the loaded data in the memory or caching the loaded data in the memory or a disk of a user. In the data loading process, linear list operation is conducted through the linked chain so that the code execution efficiency can be improved. In the queuing process, the data are subject to sequence adjustment according to the data priority so that urgent data are used first. During data caching, different caching is conducted according to different control parameters, not frequently used data are cached in an external storage, and therefore oversize memory is avoided and use experience is improved. Meanwhile, the phenomena of multiple loading of the same data form the network are reduced, and the purpose of saving network resources is achieved.
Description
Technical field
The present invention relates to development of games field, the method for managing resource of particularly a kind of development of games and system.
Background technology
Development of games is a more difficult field in software development always, and game is compared with common software, play and have the requirement of very harshness at resource management module, in traditional front development of games, resource management belongs to a more chaotic module, the loading of resource and buffer memory two major parts are all independently, and loading and buffer memory all can not need type to process according to resource type and resource, different calling interfaces is needed when therefore developing program, user experience is lower, and user network resource cost is larger.
Therefore a kind of method for managing resource and system of development of games is needed.
Summary of the invention
In view of this, technical matters to be solved by this invention is to provide a kind of method for managing resource and system of development of games.
An object of the present invention is the method for managing resource proposing a kind of development of games; Two of object of the present invention is the resource management systems proposing a kind of development of games.
An object of the present invention is achieved through the following technical solutions:
The method for managing resource of a kind of development of games provided by the invention, comprises the following steps:
S1: obtain and load data;
S2: set up resource chained list queue L and binary data chained list H;
S3: search buffer memory and whether there are loading data, if existed, then enters step S7;
S4: if there is no, then to read in loading data in internal memory and to rank and conversion process;
S5: judge whether parameter CO is true, if so, then loading data buffer storage is entered internal memory; If not, then data buffer storage need not be carried out to enter internal memory;
S6: judge whether parameter SO is true, if so, then loading data buffer storage is entered user disk; If not, then data buffer storage need not be entered user disk;
S7: judge that game is the need of loading data, if so, then will load data according to the buffer memory rank loading data and use from the taking-up of buffer memory place; If not, be then left intact.
Further, the queuing of described loading data carries out order adjustment according to the priority loading data.
Further, described loading data buffer storage carries out buffer memory according to parameter.
Further, described loading data to be read in internal memory and to be ranked and conversion process is realized by following steps:
S41: initialization resource chained list queue L; With loader, resource reading is entered internal memory;
S42: according to loading data priority, to rank operation according to order, and resource data is carried out add resource chained list queue L and operate, forward step S44 to;
S43: when also there is resource load request, then return step S42;
S44: the resource data having been read in internal memory, saves as Binary Resources by resource data, resource chained list queue L length subtracts 1, and Binary Resources is added binary data chained list H;
S45: take out binary data chained list H gauge outfit data, carry out category conversion process according to data, binary data chained list H length adds 1;
Binary Conversion is then BitmapData form buffer memory by S46: when resource format is Bitmap bitmap, adjustment gauge outfit data, and binary data chained list H length subtracts 1;
Binary Conversion is then XML format by S47: when resource format is XML file, adjustment gauge outfit data, and binary data chained list H length subtracts 1;
S48: when resource format is SWF file, then do not do conversion process, adjustment gauge outfit data, binary data chained list H length subtracts 1;
S49: if the gauge outfit of binary data chained list H is not empty, continue to forward step S45 to.
Two of object of the present invention is achieved through the following technical solutions:
The resource management system of a kind of development of games provided by the invention, comprise Data import module, parameter initialization module, buffer memory judge module, internal memory reads in module, buffer memory reads in module,
Described Data import module, for obtaining loading data;
Described parameter initialization module, for setting up resource chained list queue L and binary data chained list H;
Whether described buffer memory judge module, exist loading data for searching buffer memory;
Described stored in selection module, enter internal memory for loadings data to be read in internal memory and rank with conversion process or buffer memory.
Further, described stored in selecting module to realize by following situation:
Judge whether parameter SO is TRUE, if so, then loading data buffer storage is entered user disk; If not, then data buffer storage need not be entered user disk;
Judge whether parameter CO is true TRUE, if so, then loading data buffer storage is entered internal memory; If not, then data buffer storage need not be carried out to enter internal memory;
Judge that game is the need of loading data, if so, then will load data according to the buffer memory rank loading data and use from the taking-up of buffer memory place; If not, be then left intact.
Further, the queuing of described loading data carries out order adjustment according to the priority loading data.
Further, described loading data buffer storage carries out buffer memory according to parameter.
Further, described loading data to be read in internal memory and to be ranked and conversion process is realized by following steps:
S41: initialization resource chained list queue L; With loader, resource reading is entered internal memory;
S42: according to loading data priority, to rank operation according to order, and resource data is carried out add resource chained list queue L and operate, forward step S44 to;
S43: when also there is resource load request, then return step S42;
S44: the resource data having been read in internal memory, saves as Binary Resources by resource data, resource chained list queue L length subtracts 1, and Binary Resources is added binary data chained list H;
S45: take out binary data chained list H gauge outfit data, carry out category conversion process according to data, binary data chained list H length adds 1;
Binary Conversion is then BitmapData form buffer memory by S46: when resource format is Bitmap bitmap, adjustment gauge outfit data, and binary data chained list H length subtracts 1;
Binary Conversion is then XML format by S47: when resource format is XML file, adjustment gauge outfit data, and binary data chained list H length subtracts 1;
S48: when resource format is SWF file, then do not do conversion process, adjustment gauge outfit data, binary data chained list H length subtracts 1;
S49: if the gauge outfit of binary data chained list H is not empty, continue to forward step S45 to.
Beneficial effect of the present invention is: the present invention is in data load process, and using chained list to carry out linear list operation can improve efficiency of code execution, and in queuing process, can carry out order adjustment, emergency data is used at first according to the priority of data; Avoid and when ranking operation, data manipulation is caused confusion situation; When carrying out data buffer storage, according to different controling parameters, carry out different buffer memorys, its buffer memory is entered external memory by data infrequently, the excessive phenomenon of internal memory is avoided to occur, the Experience Degree improved, decreases the situation that same data repeatedly carry out from network downloading simultaneously, decreases the order ground saving Internet resources; Provide one efficiently to development of games field, method removes management resource flexibly.Resource loading and buffer memory two major parts are combined, and loading and buffer memory can need to do Intelligent treatment according to dissimilar resource and different resource, reach as programmer provides the convenient interface developed, for user improves user experience, save the order ground of user network resource.
Accompanying drawing explanation
In order to make the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, the present invention is described in further detail, wherein:
The method for managing resource process flow diagram of the development of games that Fig. 1 provides for the embodiment of the present invention;
The resource management system schematic diagram of the development of games that Fig. 2 provides for the embodiment of the present invention.
Embodiment
Hereinafter with reference to accompanying drawing, the preferred embodiments of the present invention are described in detail.Should be appreciated that preferred embodiment only in order to the present invention is described, instead of in order to limit the scope of the invention.
The method for managing resource process flow diagram of the development of games that Fig. 1 provides for the embodiment of the present invention, as shown in the figure: the method for managing resource of a kind of development of games provided by the invention, comprises the following steps:
S1: obtain and load data;
S2: set up resource chained list queue L and binary data chained list H;
S3: search buffer memory and whether there are loading data, if existed, then enters step S7;
S4: if there is no, then to read in loading data in internal memory and to rank and conversion process;
S5: judge whether parameter CO is true, if so, then loading data buffer storage is entered internal memory; If not, then data buffer storage need not be carried out to enter internal memory;
S6: judge whether parameter SO is true, if so, then loading data buffer storage is entered user disk; If not, then data buffer storage need not be entered user disk;
S7: judge that game is the need of loading data, if so, then will load data according to the buffer memory rank loading data and use from the taking-up of buffer memory place; If not, be then left intact.
The queuing of described loading data carries out order adjustment according to the priority loading data.
Described loading data buffer storage carries out buffer memory according to parameter.
Described loading data to be read in internal memory and to be ranked and conversion process is realized by following steps:
S41: initialization resource chained list queue L; With loader, resource reading is entered internal memory;
S42: according to loading data priority, to rank operation according to order, and resource data is carried out add resource chained list queue L and operate, forward step S44 to;
S43: when also there is resource load request, then return step S42;
S44: the resource data having been read in internal memory, saves as Binary Resources by resource data, resource chained list queue L length subtracts 1, and Binary Resources is added binary data chained list H;
S45: take out binary data chained list H gauge outfit data, carry out category conversion process according to data, binary data chained list H length adds 1;
Binary Conversion is then BitmapData form buffer memory by S46: when resource format is Bitmap bitmap, adjustment gauge outfit data, and binary data chained list H length subtracts 1;
Binary Conversion is then XML format by S47: when resource format is XML file, adjustment gauge outfit data, and binary data chained list H length subtracts 1;
S48: when resource format is SWF file, then do not do conversion process, adjustment gauge outfit data, binary data chained list H length subtracts 1;
S49: if the gauge outfit of binary data chained list H is not empty, continue to forward step S45 to.
The resource management system schematic diagram of the development of games that Fig. 2 provides for the embodiment of the present invention, as shown in the figure, the present embodiment additionally provides a kind of resource management system of development of games, comprise Data import module, parameter initialization module, buffer memory judge module, internal memory reads in module, buffer memory reads in module,
Described Data import module, for obtaining loading data;
Described parameter initialization module, for setting up resource chained list queue L and binary data chained list H;
Whether described buffer memory judge module, exist loading data for searching buffer memory;
Described stored in selection module, enter internal memory for loadings data to be read in internal memory and rank with conversion process or buffer memory.
Described stored in selecting module to realize by following situation:
Judge whether parameter SO is TRUE, if so, then loading data buffer storage is entered user disk; If not, then data buffer storage need not be entered user disk;
Judge whether parameter CO is true TRUE, if so, then loading data buffer storage is entered internal memory; If not, then data buffer storage need not be carried out to enter internal memory;
Judge that game is the need of loading data, if so, then will load data according to the buffer memory rank loading data and use from the taking-up of buffer memory place; If not, be then left intact.
The queuing of described loading data carries out order adjustment according to the priority loading data.
Described loading data buffer storage carries out buffer memory according to parameter.
Described loading data to be read in internal memory and to be ranked and conversion process is realized by following steps:
S41: initialization resource chained list queue L; With loader, resource reading is entered internal memory;
S42: according to loading data priority, to rank operation according to order, and resource data is carried out add resource chained list queue L and operate, forward step S44 to;
S43: when also there is resource load request, then return step S42;
S44: the resource data having been read in internal memory, saves as Binary Resources by resource data, resource chained list queue L length subtracts 1, and Binary Resources is added binary data chained list H;
S45: take out binary data chained list H gauge outfit data, carry out category conversion process according to data, binary data chained list H length adds 1;
Binary Conversion is then BitmapData form buffer memory by S46: when resource format is Bitmap bitmap, adjustment gauge outfit data, and binary data chained list H length subtracts 1;
Binary Conversion is then XML format by S47: when resource format is XML file, adjustment gauge outfit data, and binary data chained list H length subtracts 1;
S48: when resource format is SWF file, then do not do conversion process, adjustment gauge outfit data, binary data chained list H length subtracts 1;
S49: if the gauge outfit of binary data chained list H is not empty, continue to forward step S45 to.
What finally illustrate is, above embodiment is only in order to illustrate technical scheme of the present invention and unrestricted, although by referring to the preferred embodiments of the present invention, invention has been described, but those of ordinary skill in the art is to be understood that, various change can be made to it in the form and details, and not depart from the spirit and scope of the present invention that appended claims limits.
Claims (9)
1. a method for managing resource for development of games, is characterized in that: comprise the following steps:
S1: obtain and load data;
S2: set up resource chained list queue L and binary data chained list H;
S3: search buffer memory and whether there are loading data, if existed, then enters step S7;
S4: if there is no, then to read in loading data in internal memory and to rank and conversion process;
S5: judge whether parameter CO is true, if so, then loading data buffer storage is entered internal memory; If not, then data buffer storage need not be carried out to enter internal memory;
S6: judge whether parameter SO is true, if so, then loading data buffer storage is entered user disk; If not, then data buffer storage need not be entered user disk;
S7: judge that game is the need of loading data, if so, then will load data according to the buffer memory rank loading data and use from the taking-up of buffer memory place; If not, be then left intact.
2. the method for managing resource of development of games according to claim 1, is characterized in that: the queuing of described loading data carries out order adjustment according to the priority loading data.
3. the method for managing resource of development of games according to claim 1, is characterized in that: described loading data buffer storage carries out buffer memory according to parameter.
4. the method for managing resource of development of games according to claim 1, is characterized in that: described loading data to be read in internal memory and to be ranked and conversion process is realized by following steps:
S41: initialization resource chained list queue L; With loader, resource reading is entered internal memory;
S42: according to loading data priority, to rank operation according to order, and resource data is carried out add resource chained list queue L and operate, forward step S44 to;
S43: when also there is resource load request, then return step S42;
S44: the resource data having been read in internal memory, saves as Binary Resources by resource data, resource chained list queue L length subtracts 1, and Binary Resources is added binary data chained list H;
S45: take out binary data chained list H gauge outfit data, carry out category conversion process according to data, binary data chained list H length adds 1;
Binary Conversion is then BitmapData form buffer memory by S46: when resource format is Bitmap bitmap, adjustment gauge outfit data, and binary data chained list H length subtracts 1;
Binary Conversion is then XML format by S47: when resource format is XML file, adjustment gauge outfit data, and binary data chained list H length subtracts 1;
S48: when resource format is SWF file, then do not do conversion process, adjustment gauge outfit data, binary data chained list H length subtracts 1;
S49: if the gauge outfit of binary data chained list H is not empty, continue to forward step S45 to.
5. a resource management system for development of games, is characterized in that: comprise Data import module, parameter initialization module, buffer memory judge module, internal memory reads in module, buffer memory reads in module,
Described Data import module, for obtaining loading data;
Described parameter initialization module, for setting up resource chained list queue L and binary data chained list H;
Whether described buffer memory judge module, exist loading data for searching buffer memory;
Described stored in selection module, enter internal memory for loadings data to be read in internal memory and rank with conversion process or buffer memory.
6. the resource management system of development of games according to claim 1, is characterized in that: described stored in selecting module to realize by following situation:
Judge whether parameter SO is TRUE, if so, then loading data buffer storage is entered user disk; If not, then data buffer storage need not be entered user disk;
Judge whether parameter CO is true TRUE, if so, then loading data buffer storage is entered internal memory; If not, then data buffer storage need not be carried out to enter internal memory;
Judge that game is the need of loading data, if so, then will load data according to the buffer memory rank loading data and use from the taking-up of buffer memory place; If not, be then left intact.
7. the resource management system of development of games according to claim 1, is characterized in that: the queuing of described loading data carries out order adjustment according to the priority loading data.
8. the resource management system of development of games according to claim 1, is characterized in that: described loading data buffer storage carries out buffer memory according to parameter.
9. the resource management system of development of games according to claim 1, is characterized in that: described loading data to be read in internal memory and to be ranked and conversion process is realized by following steps:
S41: initialization resource chained list queue L; With loader, resource reading is entered internal memory;
S42: according to loading data priority, to rank operation according to order, and resource data is carried out add resource chained list queue L and operate, forward step S44 to;
S43: when also there is resource load request, then return step S42;
S44: the resource data having been read in internal memory, saves as Binary Resources by resource data, resource chained list queue L length subtracts 1, and Binary Resources is added binary data chained list H;
S45: take out binary data chained list H gauge outfit data, carry out category conversion process according to data, binary data chained list H length adds 1;
Binary Conversion is then BitmapData form buffer memory by S46: when resource format is Bitmap bitmap, adjustment gauge outfit data, and binary data chained list H length subtracts 1;
Binary Conversion is then XML format by S47: when resource format is XML file, adjustment gauge outfit data, and binary data chained list H length subtracts 1;
S48: when resource format is SWF file, then do not do conversion process, adjustment gauge outfit data, binary data chained list H length subtracts 1;
S49: if the gauge outfit of binary data chained list H is not empty, continue to forward step S45 to.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410531293.6A CN104298562A (en) | 2014-10-10 | 2014-10-10 | Resource management method and system for game development |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410531293.6A CN104298562A (en) | 2014-10-10 | 2014-10-10 | Resource management method and system for game development |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104298562A true CN104298562A (en) | 2015-01-21 |
Family
ID=52318299
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410531293.6A Pending CN104298562A (en) | 2014-10-10 | 2014-10-10 | Resource management method and system for game development |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104298562A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101075241A (en) * | 2006-12-26 | 2007-11-21 | 腾讯科技(深圳)有限公司 | Method and system for processing buffer |
CN102096605A (en) * | 2011-02-17 | 2011-06-15 | 成电汽车电子产业园(昆山)有限公司 | Multi-level resource management implementation method in embedded real-time operation system |
US20120066390A1 (en) * | 2010-09-15 | 2012-03-15 | Qualcomm Incorporated | System and method for managing resources and markers of a portable computing device |
CN102447688A (en) * | 2010-10-15 | 2012-05-09 | 盛绩信息技术(上海)有限公司 | Webpage game resource accelerator and acceleration method |
CN103260713A (en) * | 2010-10-20 | 2013-08-21 | 索尼电脑娱乐美国公司 | Resource management of server hosts in online game environment |
-
2014
- 2014-10-10 CN CN201410531293.6A patent/CN104298562A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101075241A (en) * | 2006-12-26 | 2007-11-21 | 腾讯科技(深圳)有限公司 | Method and system for processing buffer |
US20120066390A1 (en) * | 2010-09-15 | 2012-03-15 | Qualcomm Incorporated | System and method for managing resources and markers of a portable computing device |
CN102447688A (en) * | 2010-10-15 | 2012-05-09 | 盛绩信息技术(上海)有限公司 | Webpage game resource accelerator and acceleration method |
CN103260713A (en) * | 2010-10-20 | 2013-08-21 | 索尼电脑娱乐美国公司 | Resource management of server hosts in online game environment |
CN102096605A (en) * | 2011-02-17 | 2011-06-15 | 成电汽车电子产业园(昆山)有限公司 | Multi-level resource management implementation method in embedded real-time operation system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102103497B (en) | Finite state machine actuating device and method, and method for establishing and using finite state machine | |
US20150189030A1 (en) | Message processing method, device and system for Internet of Things | |
CN103473732B (en) | Based on the mobile GIS slice map exhibiting method of con current control and dual-cache mechanism | |
CN109656950B (en) | Recursive query method, device, server and storage medium | |
CN104239134B (en) | The task management method and device of a kind of many-core system | |
WO2021093365A1 (en) | Gpu video memory management control method and related device | |
CN107077390A (en) | A kind of task processing method and network interface card | |
CN102014282A (en) | Distributed video transcoding scheduling method and system | |
CN111488492B (en) | Method and device for searching graph database | |
CN106055274A (en) | Data storage method, data reading method and electronic device | |
CN107798111B (en) | Method for exporting data in large batch in distributed environment | |
CN110222046B (en) | List data processing method, device, server and storage medium | |
CN112860412B (en) | Service data processing method and device, electronic equipment and storage medium | |
CN101373444A (en) | Exposing system topology to the execution environment | |
CN103207866A (en) | File storing method and system based on partitioning strategies | |
CN111858612B (en) | Data accelerated access method and device based on graph database and storage medium | |
CN109558159A (en) | The update method and device of user interface in game | |
CN103164409A (en) | Network advertisement show type post test method and network advertisement show type post test system | |
US9959839B2 (en) | Predictive screen display method and apparatus | |
CN105630556A (en) | Resource loading method and system | |
CN114637499B (en) | Visualization component processing method, device, equipment and medium | |
CN104298562A (en) | Resource management method and system for game development | |
CN109753533A (en) | A kind of multi-source relevant database client development approach and device | |
CN110069243A (en) | A kind of java program threads optimization method | |
CN104102480A (en) | Method and device for generating configuration file |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20150121 |