Game engine resource processing method and device, storage medium and electronic equipment

文档序号:1968394 发布日期:2021-12-17 浏览:22次 中文

阅读说明:本技术 游戏引擎资源的处理方法、装置、存储介质及电子设备 (Game engine resource processing method and device, storage medium and electronic equipment ) 是由 欧阳海 徐梓焜 于 2021-09-22 设计创作,主要内容包括:本公开涉及一种游戏引擎资源的处理方法、装置、存储介质及电子设备,方法包括:获取第一游戏引擎支持渲染的预置体的资源文件,对所述预置体的资源文件进行解析,基于解析结果,生成第二游戏引擎支持渲染的目标预置体的资源文件,如此,将已开发好的第一游戏引擎支持的预置体转换为第二游戏引擎支持渲染的目标预置体,降低了新的游戏引擎的资源开发成本,且提高了游戏项目开发的效率。(The disclosure relates to a processing method, a device, a storage medium and an electronic device of game engine resources, wherein the method comprises the following steps: the method comprises the steps of obtaining a resource file of a preset body which is rendered by a first game engine, analyzing the resource file of the preset body, and generating a resource file of a target preset body which is rendered by a second game engine based on an analysis result, so that the developed preset body which is supported by the first game engine is converted into the target preset body which is rendered by the second game engine, the resource development cost of a new game engine is reduced, and the efficiency of game project development is improved.)

1. A method for processing game engine resources is characterized by comprising the following steps:

acquiring a resource file of a preset body which is rendered by a first game engine;

analyzing the resource file of the preset body;

and generating a resource file of a target preset body which is supported by the second game engine to render based on the analysis result, wherein the preset body and the target preset body are resources supporting different game engines to instantiate game objects.

2. The method of claim 1, wherein obtaining the resource file of the preset that the first game engine supports rendering comprises:

traversing directory entries of a resource folder of the first game engine;

and determining a target directory entry conforming to a preset file format according to the file format of the traversed directory entry, wherein a file corresponding to the target directory entry is a resource file of a preset body which is rendered by the first game engine.

3. The method of claim 2, wherein determining a target directory entry conforming to a preset file format according to the file format of the traversed directory entry comprises:

determining candidate directory items according with the preset file format according to the file format of the traversed directory items;

acquiring historical instantiation information of a preset body corresponding to the candidate directory entry;

and determining the candidate directory entry meeting the preset condition as a target directory entry according to the historical instantiation information of the preset body corresponding to the candidate directory entry.

4. The method according to claim 3, wherein the historical instantiation information includes historical instantiation times, and the determining, according to the historical instantiation information of the preset body corresponding to the candidate directory entry, the candidate directory entry meeting the preset condition as the target directory entry includes:

and according to the historical instantiation times of the preset body corresponding to the candidate directory items, taking the candidate directory items with the historical instantiation times higher than the preset times as target directory items.

5. The method according to claim 3, wherein the historical instantiation information includes a rendering object, and the determining, according to the historical instantiation information of the preset body corresponding to the candidate directory entry, the candidate directory entry meeting the preset condition as the target directory entry includes:

classifying all the candidate directory entries according to rendering objects of preset bodies corresponding to the candidate directory entries;

and aiming at the candidate directory entries included in each type in the classification result, determining the target directory entry meeting the preset condition from the candidate directory entries included in the type.

6. The method of any of claims 1-5, wherein generating a resource file of target presets supported by the second game engine based on the parsing result comprises:

acquiring a picture corresponding to the material applied to the preset body based on the analysis result;

generating a target material which is supported by the second game engine to be rendered according to the texture information of the picture;

and generating a resource file of the target preset body based on the target material and the attribute information used for instantiating the game object in the analysis result.

7. The method of claim 1, wherein the preset and the target preset are particle resources that support instantiation of game objects by different game engines.

8. A processing apparatus for game engine resources, comprising:

the acquisition module is used for acquiring a resource file of a preset body which is rendered by a first game engine;

the analysis module is used for analyzing the resource file of the preset body

And the generating module is used for generating a resource file of a target preset body which is supported by the second game engine to render based on the analysis result, wherein the preset body and the target preset body are resources supporting different game engines to instantiate game objects.

9. A computer-readable medium, on which a computer program is stored, characterized in that the program, when being executed by processing means, carries out the steps of the method of any one of claims 1 to 7.

10. An electronic device, comprising:

a storage device having a computer program stored thereon;

processing means for executing the computer program in the storage means to carry out the steps of the method according to any one of claims 1 to 7.

Technical Field

The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for processing game engine resources, a storage medium, and an electronic device.

Background

In the related art, a relatively mature game engine usually has more reusable resources for developing projects. However, for a new engine, it is usually necessary to develop reusable resources that the new engine can support rendering at a high cost, so as to realize efficient development of projects by using the reusable resources.

Disclosure of Invention

This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.

In a first aspect, the present disclosure provides a method for processing game engine resources, including:

acquiring a resource file of a preset body which is rendered by a first game engine;

analyzing the resource file of the preset body;

and generating a resource file of a target preset body which is supported by the second game engine to render based on the analysis result, wherein the preset body and the target preset body are resources supporting different game engines to instantiate game objects.

In a second aspect, the present disclosure provides a processing apparatus for game engine resources, comprising:

the acquisition module is used for acquiring a resource file of a preset body which is rendered by a first game engine;

the analysis module is used for analyzing the resource file of the preset body

And the generating module is used for generating a resource file of a target preset body which is supported by the second game engine to render based on the analysis result, wherein the preset body and the target preset body are resources supporting different game engines to instantiate game objects.

In a third aspect, the present disclosure provides a computer-readable medium having stored thereon a computer program which, when executed by a processing apparatus, performs the steps of the method described in the first aspect above.

In a fourth aspect, the present disclosure provides an electronic device comprising:

a storage device having a computer program stored thereon;

processing means for executing the computer program in the storage means to implement the steps of the method of the first aspect described above.

According to the technical scheme, the resource file of the preset body which is rendered by the first game engine is obtained, the resource file of the preset body is analyzed, and the resource file of the target preset body which is rendered by the second game engine is generated based on the analysis result.

Additional features and advantages of the disclosure will be set forth in the detailed description which follows.

Drawings

The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale. In the drawings:

FIG. 1 is a flow diagram illustrating a method of processing game engine resources according to an exemplary embodiment of the present disclosure.

FIG. 2 is a flow diagram illustrating a determination of a target directory entry by traversal of the present disclosure in accordance with an exemplary embodiment.

FIG. 3 is a block diagram illustrating a processing device of a game engine resource according to an exemplary embodiment of the present disclosure.

Fig. 4 is a schematic structural diagram of an electronic device shown in accordance with an exemplary embodiment of the present disclosure.

Detailed Description

Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.

It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.

The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.

It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.

It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.

The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.

Technical terms used in the present disclosure will be explained below.

Particle systems, representing techniques for simulating certain blurring phenomena in three-dimensional computer graphics, are difficult to achieve realistic laws of physical motion using other conventional rendering techniques.

Particle resources, done by a particle system, for rendering dynamic fluid effects in a scene, which may be, for example, fires, explosions, smoke, water currents, sparks, fallen leaves, clouds, fog, snow, dust, meteor trails, or visual effects like light emitting tracks.

In the related art, a page formed based on the HTML5(HyperText Markup Language 5, 5 th generation HyperText Markup Language) standard is called as an H5 page, and existing mobile phone application software is mostly developed and completed by using H5. Currently, in the H5 environment, 3-dimensional rendering and exhibition can be achieved, and the Cocos engine which is vigorously developed in the H5 direction is also emerging completely in the game industry, but because the Unity engine already has rich reusable developed resources, such as particle resources, the Unity engine is still more selected for development.

If the effect that the developed particle resource of the Unity engine can be rendered on the Cocos engine is desired, one way is to find other ways of displaying special effects to replace the display of the particle resource, such as using sequential frames, videos, lottiee animations and the like, and the implementation way is complex; another way is to artificially copy a particle resource with a similar effect on the Cocos engine by referring to all parameters of the particle resource supported by the Unity engine, but if the number of particles is large or the parameters are complex, the task becomes a tedious and complex task, and the project development efficiency is low.

In view of this, the embodiments of the present disclosure provide a method for processing resources caused by a game, which reduces the resource development cost of a new game engine and improves the efficiency of game project development.

FIG. 1 is a flow diagram illustrating a method of processing game engine resources according to an exemplary embodiment of the present disclosure, the processing method including the steps of:

step 101, acquiring a resource file of a preset body which is rendered by a first game engine.

In some embodiments, the first game engine may be a Unity engine or other game engines, and this embodiment is not limited herein.

It should be noted that a preset is an aggregate of components, and in the development of a project, a preset is a game object that can be repeatedly created and has the same structure.

In some implementations, the preset may be a particle resource that supports the Unity engine for instantiation of game objects.

It should be noted that, under the Unity engine, the resource file of the preset is a data file with a YAML configuration file format.

In some embodiments, the step of acquiring the resource file of the preset for which the first game engine supports rendering, as shown in fig. 1, may include: and receiving a file path corresponding to the manually input resource file, and acquiring the resource file of the preset body which is rendered by the first game engine according to the file path.

In some embodiments, the step of acquiring the resource file of the preset for which the first game engine supports rendering, as shown in fig. 1, may include: traversing directory entries of a resource folder of the first game engine; and determining a target directory entry which accords with a preset file format according to the file format of the traversed directory entry, wherein the file corresponding to the target directory entry is a resource file of a preset body which is rendered by the first game engine support.

Taking the first game engine as a unity engine as an example, the resource folder of the unity engine is an Assets folder, and the Assets folder comprises six subfolders below: editors, plug-ins, resources, scenes, scripts and data repositories. Editing and storing an editor and a menu tool script for window tool expansion; the plug-in stores the plug-in library file to be referred; resources, which store all resource files, generally include: map, characters, audio, preset body, model, material ball, etc.; a scene storing the scene; the script is used for storing the script; and the data bank is used for storing resource packaging files and storing class files, such as player data files of Json, Sqlite, Excel and the like.

In this disclosure, traversing the directory entries of the resource folder of the first game engine primarily includes traversing the directory entries under this subfolder of resources in the Assets folder. Generally, Assets folders have folders with a fixed hierarchical relationship, for example, to reflect parent-child relationships between various directory items. Therefore, the folder for storing the preset can be located according to the hierarchical relation.

In some embodiments, whether the directory entry is in the preset file format may be determined according to the extension of the directory entry, so as to determine whether the file corresponding to the directory entry is a resource file of a preset supported by the first game engine. Specifically, the extension of the directory entry is the same as the format of the preset file, and the file corresponding to the directory entry is a resource file of the preset body supported by the first game engine. On the contrary, if the extension of the directory entry is not the same as the preset file format, the file corresponding to the directory entry is not the resource file of the preset body supported by the first game engine.

In some embodiments, under the Unity engine, the preset file format may be ". yaml".

Through the method, the resource file of the preset body which is rendered by the first game engine is positioned and acquired in a mode of traversing the directory entry, and compared with a mode of manually inputting a file path, the traversing can reduce errors of manual operation, such as file path input errors, repeated input of the same file path, omission of a certain file path and the like.

And 102, analyzing the resource file of the preset body.

In some embodiments, a parsing tool may be employed to parse the resource file of the preset volume. For example, parsing tools for YAML documents include, but are not limited to, SnakeYaml, jYaml, Jackson, and the like.

And 103, generating a resource file of a target preset body which is supported by the second game engine to render based on the analysis result, wherein the preset body and the target preset body are resources supporting different game engines to instantiate game objects.

It should be noted that the first game engine and the second game engine are different game engines.

In some embodiments, the second game engine may be a Cocos engine, or may be another game engine, and this embodiment is not limited herein.

It should be noted that, under the Cocos engine, the resource file of the target preset body is a data file with a configuration file format of JSON format.

In some embodiments, the generating of the resource file of the target preset body that the second game engine supports rendering based on the parsing result specifically means converting the resource file of the preset body of the first game engine into a resource file in a configuration file format that the second game engine supports rendering.

It should be noted that, for all the generated resources of the second game engine, it is necessary to store them in the resource directory of the second game engine and refresh them into meta files of the same name, where the meta files include an ID (Identity document) of the resource file, and the resource is referred by the ID when the project is developed. Illustratively, when generating the resource file of the target preset body, the resource file of the target preset body needs to be stored in the resource directory of the second game engine, and the resource file of the target preset body needs to be refreshed into a meta file of the same name stored in the second game engine, where the meta file includes an ID (Identity document) of the resource file, and the resource file is referred to by the ID when the project is developed. By the method, the resource file of the preset body which is rendered and supported by the first game engine is obtained, the resource file of the preset body is analyzed, and the resource file of the target preset body which is rendered and supported by the second game engine is generated based on the analysis result.

The disclosure is further explained below by taking the first game engine as the Unity engine and the second game engine as the Cocos engine as an example.

In a case of acquiring a resource file of a preset body which is rendered by a first game engine in a traversal manner, fig. 2 is a flowchart illustrating a process of determining a target directory entry through traversal according to an exemplary embodiment of the present disclosure, where the process includes the following steps:

step 201, according to the file format of the traversed directory entry, determining a candidate directory entry conforming to a preset file format.

It should be noted that the file corresponding to the candidate directory entry is a resource file of a preset body that the first game engine supports rendering.

Step 202, obtaining historical instantiation information of the preset body corresponding to the candidate directory entry.

It should be noted that the historical instantiation information of the preset body can be obtained from a log file in the game engine. Wherein the log file is a record file or a file collection for recording system operation events.

In some embodiments, the historical instantiation information may include, but is not limited to, historical instantiation times and rendering objects.

The rendering objects can be recorded through character tags, and the same character tags represent the same rendering objects.

In some embodiments, the character tag may be a numeric tag or an alphabetic tag.

Step 203, according to the historical instantiation information of the preset body corresponding to the candidate directory item, determining the candidate directory item meeting the preset condition as the target directory item.

The preset conditions correspond to the historical instantiation information one by one. The preset condition is used for optimizing the preset body required to generate the target preset body, and the optimization aims to reasonably reduce the development cost. Namely, a proper candidate directory item is selected from the candidate directory items as a target directory item, and a file corresponding to the target directory item is used as a resource file of the preset body.

In some embodiments, the historical instantiation information comprises historical instantiation times, and step 203 may comprise: and according to the historical instantiation times of the preset body corresponding to the candidate directory items, taking the candidate directory items with the historical instantiation times higher than the preset times as target directory items.

It should be noted that, in the initial stage of creating a reusable preset, the practicability of the created preset in actual application cannot be predicted, and for a preset with low practicability in actual application, if a target preset supported by another engine is generated correspondingly, the practicability of the preset is also predicted. If the number of such presets is large, the storage cost and the resource development cost are also large.

In some embodiments, the preset number of times may be set according to actual situations, which is not limited in this embodiment.

By the method, the candidate directory entry with the historical instantiation times higher than the preset times is used as the target directory entry, the file corresponding to the target directory entry is analyzed, and the resource file of the target preset body, which is supported to be rendered by the second game engine, is generated based on the analysis result. Because the number of the historical instantiation times reflects the practicability of the preset body from the side, the candidate directory item with the historical instantiation times higher than the preset times is used as the target directory item to realize the optimization of the preset body needing to generate the target preset body, and the corresponding target preset body is generated based on the preset body with high practicability, thereby further reducing the development cost and simultaneously reducing the storage cost.

In some embodiments, the historical instantiation information comprises a rendering object, and step 203 may comprise: classifying all candidate directory entries according to rendering objects of preset bodies corresponding to the candidate directory entries; and aiming at the candidate directory entries included in each type in the classification result, determining target directory entries meeting preset conditions from the candidate directory entries included in the type.

Illustratively, the rendering object may be, for example, a fire, explosion, smoke, stream, or the like.

It should be understood that different rendering attributes may exist for the same rendering object, and the rendering attributes may be, for example, the colors of the rendered representation. For example, the rendering object may be rendered differently in color for its rendering properties of fire.

In some embodiments, the classification rule may be based on rendering objects to classify candidate directory entries belonging to the same rendering object together.

It should be noted that, under the Cocos engine, after the preset is instantiated, the attribute modification may be performed on the instantiated object, and such modification may be saved for the instantiation of the preset with the same rendering effect at the next time. Therefore, considering the characteristics of the Cocos engine, for the target directory entries of the same rendering object, one target directory entry meeting the preset condition can be selected to generate the target preset body, and further the development cost is further reduced.

In some embodiments, determining the target directory entry meeting the preset condition from the candidate directory entries included in the same type may include: and regarding the candidate directory entries included by the type, taking the candidate directory entries with the historical instantiation times higher than the preset times as target directory entries.

By the mode, the influence of multi-dimensional factors is considered at the same time, the target directory entry is determined, and the optimization effect of the target directory entry is improved.

In a possible manner, the step of generating the resource file of the target preset supported by the second game engine based on the parsing result shown in fig. 1 may include: acquiring a picture corresponding to the material applied to the preset body based on the analysis result; generating a target material which is supported by the rendering of the second game engine according to the texture information of the picture; and generating a resource file of the target preset body based on the target material and the attribute information for instantiating the game object in the analysis result.

In some embodiments, the picture corresponding to the material of the preset body is stored in a resource subfolder under the resource directory of the first game engine, so that the picture corresponding to the material of the preset body can be obtained from the subfolder.

In some embodiments, taking the resource as a particle resource as an example, the attribute information may include material information, node position information, node angle information, node parent-child relationship information, and the like, where a plurality of nodes are constituent particle resources.

It should be noted that the texture represents the interaction of the object to the light, and the data set read by the renderer includes texture mapping, lighting algorithm, and the like. A chartlet texture is a bitmap stored in memory that is mapped to the surface of an object by UV coordinates.

Since the file formats of the materials supported by the first game engine and the second game engine are not consistent, the target material supported by the second game engine needs to be regenerated based on the texture information of the picture corresponding to the material of the first game engine, and then the resource file of the target preset body needs to be generated based on the target material and the attribute information for instantiating the game object in the analysis result.

Based on the same inventive concept, the disclosed embodiment provides a processing apparatus for resources caused by a game, and referring to fig. 3, the processing apparatus 300 includes:

an obtaining module 301, configured to obtain a resource file of a preset volume that a first game engine supports rendering; an analysis module 302, configured to analyze the resource file of the preset entity

A generating module 303, configured to generate, based on the parsing result, a resource file of a target preset body that the second game engine supports rendering, where the preset body and the target preset body are resources that support different game engines to perform instantiation of game objects.

Optionally, the obtaining module 301 includes:

the traversing submodule is used for traversing directory entries of the resource folder of the first game engine;

and the determining submodule is used for determining a target directory entry which accords with a preset file format according to the file format of the traversed directory entry, wherein a file corresponding to the target directory entry is a resource file of a preset body which is rendered by the first game engine.

Optionally, the determining sub-module includes:

the candidate directory entry determining unit is used for determining candidate directory entries conforming to the preset file format according to the file format of the traversed directory entries;

the information acquisition unit is used for acquiring historical instantiation information of the preset body corresponding to the candidate directory item;

and the target directory entry determining unit is used for determining the candidate directory entry meeting the preset condition as the target directory entry according to the historical instantiation information of the preset body corresponding to the candidate directory entry.

Optionally, the historical instantiation information includes historical instantiation times, and the target directory entry determining unit is specifically configured to use, as the target directory entry, the candidate directory entry of which the historical instantiation times are higher than the preset times according to the historical instantiation times of the preset body corresponding to the candidate directory entry.

Optionally, the historical instantiation information includes a rendering object, and the target directory entry determining unit is specifically configured to classify all the candidate directory entries according to the rendering object of the preset body corresponding to the candidate directory entries; and aiming at the candidate directory entries included in each type in the classification result, determining the target directory entry meeting the preset condition from the candidate directory entries included in the type.

Optionally, the parsing module 303 includes:

the picture acquisition submodule is used for acquiring a picture corresponding to the material applied to the preset body based on the analysis result;

the material generation submodule is used for generating a target material which is supported by the second game engine to be rendered according to the texture information of the picture;

and the target preset body generation submodule is used for generating a resource file of the target preset body based on the target material and the attribute information used for instantiating the game object in the analysis result.

Optionally, the preset body and the target preset body are particle resources supporting different game engines to instantiate game objects.

Based on the same inventive concept, the disclosed embodiments provide a computer-readable medium, on which a computer program is stored, which, when executed by a processing device, implements the steps in the above-described method embodiments.

Based on the same inventive concept, an electronic device in an embodiment of the present disclosure includes:

a storage device having a computer program stored thereon;

processing means for executing the computer program in the storage means to implement the steps of the above-described method embodiments.

Referring now to FIG. 4, a block diagram of an electronic device 400 suitable for use in implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.

As shown in fig. 4, electronic device 400 may include a processing device (e.g., central processing unit, graphics processor, etc.) 401 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage device 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the electronic apparatus 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.

Generally, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device 400 to communicate wirelessly or by wire with other devices to exchange data. While fig. 4 illustrates an electronic device 400 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.

In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 409, or from the storage device 408, or from the ROM 402. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 401.

It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.

In some implementations, the electronic devices may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.

The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.

The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring a resource file of a preset body which is rendered by a first game engine; analyzing the resource file of the preset body; and generating a resource file of a target preset body which is supported by the second game engine to render based on the analysis result, wherein the preset body and the target preset body are resources supporting different game engines to instantiate game objects.

Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).

The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

The modules described in the embodiments of the present disclosure may be implemented by software or hardware. The name of the module does not constitute a limitation to the module itself in some cases, for example, the acquiring module may be further described as a module for acquiring a resource file of a preset body in which the rendering is supported by the first game engine.

The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.

In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

Example 1 provides, in accordance with one or more embodiments of the present disclosure, a method of processing game engine resources, comprising:

acquiring a resource file of a preset body which is rendered by a first game engine;

analyzing the resource file of the preset body;

and generating a resource file of a target preset body which is supported by the second game engine to render based on the analysis result, wherein the preset body and the target preset body are resources supporting different game engines to instantiate game objects.

Example 2 provides the method of example 1, the obtaining a resource file of a preset for which rendering is supported by the first game engine, including:

traversing directory entries of a resource folder of the first game engine;

and determining a target directory entry conforming to a preset file format according to the file format of the traversed directory entry, wherein a file corresponding to the target directory entry is a resource file of a preset body which is rendered by the first game engine.

Example 3 provides the method of example 2, wherein determining a target directory entry that conforms to a preset file format according to the file format of the traversed directory entry comprises:

determining candidate directory items according with the preset file format according to the file format of the traversed directory items;

acquiring historical instantiation information of a preset body corresponding to the candidate directory entry;

and determining the candidate directory entry meeting the preset condition as a target directory entry according to the historical instantiation information of the preset body corresponding to the candidate directory entry.

Example 4 provides the method of example 3, wherein the historical instantiation information includes historical instantiation times, and determining, as the target directory entry, a candidate directory entry meeting the preset condition according to the historical instantiation information of the preset volume corresponding to the candidate directory entry includes:

and according to the historical instantiation times of the preset body corresponding to the candidate directory items, taking the candidate directory items with the historical instantiation times higher than the preset times as target directory items.

Example 5 provides the method of example 3, wherein the historical instantiation information includes a rendering object, and determining, according to the historical instantiation information of the preset volume corresponding to the candidate directory entry, the candidate directory entry meeting the preset condition as the target directory entry includes:

classifying all the candidate directory entries according to rendering objects of preset bodies corresponding to the candidate directory entries;

and aiming at the candidate directory entries included in each type in the classification result, determining the target directory entry meeting the preset condition from the candidate directory entries included in the type.

Example 6 provides the method of any one of examples 1-5, the generating a resource file for a target preset supported by the second game engine based on the parsing result, including:

acquiring a picture corresponding to the material applied to the preset body based on the analysis result;

generating a target material which is supported by the second game engine to be rendered according to the texture information of the picture;

and generating a resource file of the target preset body based on the target material and the attribute information used for instantiating the game object in the analysis result.

Example 7 provides the method of example 1, the preset volume and the target preset volume being particle resources that support instantiation of game objects by different game engines, in accordance with one or more embodiments of the present disclosure.

Example 8 provides, in accordance with one or more embodiments of the present disclosure, a processing apparatus of a game engine resource, comprising:

example 9 provides a computer readable medium having stored thereon a computer program that, when executed by a processing apparatus, performs the steps of the method of any of examples 1-7, in accordance with one or more embodiments of the present disclosure.

Example 10 provides, in accordance with one or more embodiments of the present disclosure, an electronic device comprising:

a storage device having a computer program stored thereon;

processing means for executing the computer program in the storage means to carry out the steps of the method of any of examples 1-7.

The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.

Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims. With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种能解决未成年人玩手机游戏的方法及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类