CN112316437B - Resource switching method and device, electronic equipment and storage medium - Google Patents

Resource switching method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112316437B
CN112316437B CN202011324499.3A CN202011324499A CN112316437B CN 112316437 B CN112316437 B CN 112316437B CN 202011324499 A CN202011324499 A CN 202011324499A CN 112316437 B CN112316437 B CN 112316437B
Authority
CN
China
Prior art keywords
game
performance
determining
model
scene
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.)
Active
Application number
CN202011324499.3A
Other languages
Chinese (zh)
Other versions
CN112316437A (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.)
Shanghai Mihoyo Tianming Technology Co Ltd
Original Assignee
Shanghai Mihoyo Tianming Technology 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 Shanghai Mihoyo Tianming Technology Co Ltd filed Critical Shanghai Mihoyo Tianming Technology Co Ltd
Priority to CN202011324499.3A priority Critical patent/CN112316437B/en
Publication of CN112316437A publication Critical patent/CN112316437A/en
Application granted granted Critical
Publication of CN112316437B publication Critical patent/CN112316437B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • A63F13/69Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor by enabling or updating specific game elements, e.g. unlocking hidden features, items, levels or versions
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the invention discloses a resource switching method, a resource switching device, electronic equipment and a storage medium. When a game scene is loaded, obtaining a game model in the game scene, wherein the game model at least comprises: the character model and the object model determine the performance level of the game scene based on the performance parameters of the game model and the running platform where the game scene is located. A performance level may be determined that is compatible with the scene level of the game and the performance of the execution platform. And further configuring resource switching data for the game scene according to the performance grade. The distributed resource switching data can be adapted to the performance grade, and by reusing a set of art resource configuration resource switching data, the flexibility of resource switching configuration can be improved, the resource waste is reduced, the rendering effect of the game is ensured, and the normal loading of the game scene on the running platform is ensured.

Description

Resource switching method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to a game development technology, in particular to a resource switching method, a resource switching device, electronic equipment and a storage medium.
Background
At present, network games are rapidly developed, and various network games are flooded with the internet. In the 3D game, an LOD (Levels of Detail) technology is mainly adopted to allocate resources to a loaded game scene, and the technology adjusts the resource allocation of object rendering by the position and the importance degree of nodes of a model in a display environment, reduces the number of faces and the Detail degree of non-important objects and obtains high-efficiency rendering operation.
Generally, when a game scene is loaded on a game platform, a scene level is divided according to the distance between a lens and an object model or a character model, resources are allocated to the game scene according to the scene level, and the game is controlled to perform resource switching. For example, when the lens is closer to the object model or the character model, the scene level is higher, and more resources are allocated to the object model or the character model to increase the number of faces and the degree of detail of the object model or the character model, whereas, when the scene level is lower, less resources are allocated to the object model or the character model to decrease the number of faces and the degree of detail of the object model or the character model.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
when the scene level is higher, the running platform with lower performance cannot load more resources of the object model or the character model, so that the game cannot run on the running platform, and resource waste is also caused.
Disclosure of Invention
The embodiment of the invention provides a resource switching method, a resource switching device, electronic equipment and a storage medium, which are used for reasonably distributing resource data, enabling a game to normally run on a running platform and reducing occupied resources.
In a first aspect, an embodiment of the present invention provides a resource switching method, including:
when a game scene is loaded, obtaining a game model in the game scene, wherein the game model at least comprises: character models and object models;
determining the performance level of the game scene based on the performance parameters of the game model and the running platform where the game scene is located;
and configuring resource switching data for the game scene according to the performance grade.
In a second aspect, an embodiment of the present invention further provides a resource switching apparatus, including:
a game model obtaining module, configured to obtain a game model in a game scene when the game scene is loaded, where the game model at least includes: character models and object models;
the performance grade determining module is used for determining the performance grade of the game scene based on the performance parameters of the game model and the running platform where the game scene is located;
and the resource switching module is used for configuring resource switching data for the game scene according to the performance grade.
In a third aspect, an embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the resource switching method according to any one of the first aspect.
In a fourth aspect, an embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor implement the resource switching method according to any one of the first aspect.
According to the technical scheme provided by the embodiment, when a game scene is loaded, a game model in the game scene is obtained, wherein the game model at least comprises: the character model and the object model determine the performance level of the game scene based on the performance parameters of the game model and the running platform where the game scene is located. A performance level may be determined that is compatible with the scene level of the game and the performance of the execution platform. And further configuring resource switching data for the game scene according to the performance grade. The distributed resource switching data can be adapted to the performance grade, the problems that the running platform with lower performance cannot normally load resources and cannot normally run in the prior art are solved, the resource switching configuration flexibility can be improved by reusing a set of art resource configuration resource switching data, the resource waste is reduced, the rendering effect of the game is ensured, and the running platform can normally load the game scene.
Drawings
Fig. 1 is a flowchart illustrating a resource switching method according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a resource switching method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a resource switching apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a schematic flowchart of a resource switching method according to an embodiment of the present invention, where the embodiment is applicable to determining a performance level of a game scene according to a game model of the game scene and a performance parameter of an operating platform, and configuring resource switching data for the game scene based on the performance level, and the method may be executed by a resource switching apparatus, where the apparatus may be implemented by software and/or hardware and is generally integrated in an electronic device. Referring specifically to fig. 1, the method may include the steps of:
and S110, acquiring a game model in the game scene when the game scene is loaded.
The game scene can be understood as a game picture displayed on an operation platform, the operation platform can switch the game scene according to the operation time of the game or user operation, and the operation platform can include electronic devices such as a mobile phone, a tablet, and a game machine (switch). The game model refers to a model designed by scaling scenes, characters and props in a game, the game model at least comprises a character model and an object model, the character model can comprise models of various characters in the game scene, and the object model can comprise models of static objects and dynamic objects in the game scene. Optionally, the game model may also include an animation model, a prop model used by the character model in the game, and the like.
And S120, determining the performance level of the game scene based on the performance parameters of the running platform where the game model and the game scene are located.
The performance parameter includes at least one of a memory size, a processor size, an image quality, a rendering resolution, a screen resolution, an ambient light shading level, an illumination effect, and a texture definition. It can be understood that when the game platform loads a game field scene, the larger the game model is, the higher the scene level of the game is, the more resources are allocated to the game model, however, the running platform with lower performance cannot load more resources, and situations such as unsatisfactory rendering effect of the game, game backslash or stuck running platform are easy to occur. Based on the above problems, in this embodiment, the performance level matched with the game scene is determined by combining the performance parameters of the running platform where the game model and the game scene are located, that is, the performance level adapted to the scene level of the game and the performance of the running platform is determined, which is beneficial to improving the rendering effect of the game and ensuring that the running platform loads the game scene normally.
Optionally, the method for determining the performance level includes: determining the distance between the game model and a camera, and determining a scene grade corresponding to the game scene according to the distance; determining a platform grade of an operation platform for loading the game scene based on the performance parameters of the operation platform; and determining the performance grade according to the scene grade and the platform grade. Specifically, a correspondence between the distance and the scene grade may be established in advance, and the smaller the distance, the higher the scene grade; meanwhile, establishing a corresponding relation between the performance parameters and the platform grade, wherein the higher the performance parameters are, the higher the platform grade is; the performance level is further determined in combination with the scene level and the platform level. Wherein, the determining the scene grade corresponding to the game scene according to the distance comprises: and comparing the distance with at least one preset distance threshold, and determining the scene grade corresponding to the game scene according to the comparison result. Alternatively, a plurality of distance thresholds may be preset, and different scene grades are determined according to different distance thresholds.
Illustratively, the execution platforms a and B load the same game scenario of game C, respectively, and the performance levels include: l1, L2 and L3 \ 8230L 8, wherein the performance parameters of the running platform A are higher than those of the running platform B, the scene grades corresponding to the game scenes of the running platform A and the running platform B are determined to be the same according to the distance between the game model and the camera, and the optimal performance grade of the running platform A and the running platform B is preliminarily determined to be L6; further, determining the highest platform grade of the operation platform A to be L5 according to the performance parameters of the operation platform A, and determining the highest platform grade of the operation platform B to be L4 according to the performance parameters of the operation platform B; further, according to the preliminarily determined optimal performance level and the highest performance level respectively corresponding to the optimal performance level and the highest performance level, the final performance level of the operating platform A is determined to be L5, and the final performance level of the operating platform B is determined to be L4.
Through the mode, the performance grade matched with the game scene is determined by combining the performance parameters of the running platform where the game model and the game scene are located, and the purpose of determining the performance grade adaptive to the scene grade of the game and the performance of the running platform can be achieved.
And S130, configuring resource switching data for the game scene according to the performance level.
The performance level may be used to determine a level of detail of the scene model, and the higher the performance level is, the higher the level of detail of the scene model is, the more resources are configured for the scene model, and conversely, the fewer resources are configured for the scene model. Optionally, the configuring, according to the performance level, resource switching data for the game scenario includes: determining the character position and the character importance of the character model respectively, and determining the face number and the detail degree of the character based on the performance level, the character position and the character importance; and/or respectively determining the object position and the object importance of the object model, and determining the face number and the detail degree of the object based on the performance grade, the object position and the object importance.
Specifically, a Level of details (LOD) technique may be adopted to configure a resource switching technique for a game scene. The LOD technique may invoke models of different complexity based on the percentage of objects or characters that make up the view in the game. I.e. a low mode when an object or person is relatively far from the camera and a high mode when the object or person is relatively close to the camera. Specifically, the character position and the character importance are determined according to the position and the importance of the character model in the picture of the game scene, and the face number and the detail of the character are determined according to the performance level, the character position and the character importance so as to improve the face number and the detail of the character with a closer position and higher importance or reduce the face number and the detail of the character with a farther position and lower importance; and determining the object model and the object importance according to the position and the importance of the object model in the picture of the game scene, and determining the number of faces and the detail of the object according to the performance level, the object position and the object importance so as to improve the number of faces and the detail of the object with a closer position and higher importance or reduce the number of faces and the detail of the object with a farther position and lower importance, thereby completing the configuration process of resource switching data. By the method, the resource switching data of the person or the object can be determined according to the performance level, or the resource switching data of the person and the object can be determined simultaneously, so that the allocated resource switching data is adaptive to the performance level; and a set of art resource configuration resource switching data is reused, so that the flexibility of resource switching configuration can be improved, the resource waste is reduced, the rendering effect of the game is ensured, and the normal loading of the game scene by the running platform is ensured.
According to the technical scheme provided by the embodiment, when a game scene is loaded, a game model in the game scene is obtained, wherein the game model at least comprises: the character model and the object model determine the performance level of the game scene based on the performance parameters of the game model and the running platform where the game scene is located. A performance level may be determined that is compatible with the scene level of the game and the performance of the execution platform. And further configuring resource switching data for the game scene according to the performance grade. The distributed resource switching data can be adapted to the performance grade, the problems that an operation platform with lower performance cannot load resources normally and cannot operate normally in the prior art are solved, the resource switching configuration flexibility can be improved by multiplexing a set of art resource configuration resource switching data, resource waste is reduced, the rendering effect of the game is ensured, and the game scene is ensured to be loaded normally by the operation platform.
Example two
Fig. 2 is a flowchart illustrating a resource switching method according to a second embodiment of the present invention. In the technical solution of this embodiment, new steps are added on the basis of the above embodiment, and optionally, after resource switching data is configured for the game scene, the method further includes: running the loaded game based on the resource switching data, and monitoring the performance parameters of the running platform within a set time period in the running process of the game; and updating the performance level of the operating platform according to the monitored performance parameters. For those parts of the method not described in detail, reference is made to the above-described embodiments. Referring specifically to fig. 2, the method may include the steps of:
s210, when the game scene is loaded, the game model in the game scene is obtained.
Optionally, before loading a game scene, obtaining an installation file of a loaded game, and determining a target performance level when the game is installed according to the performance parameters of the running platform; and determining at least one intermediate performance level according to the target performance level, so as to configure resource switching data for the game scene based on the intermediate performance level when the game scene is loaded. Wherein the target performance level is higher than or equal to the intermediate performance level. In particular, the target performance level may support game data items having a precision or complexity that is greater than or equal to the intermediate performance level. For example, the target performance level supports parameters such as the number of faces and the degree of detail of scene data such as tasks and objects in the game, which are higher than or equal to the intermediate performance level in accuracy or complexity.
And if the performance level of the game is lower than the target performance level, the running platform can normally switch resources. Specifically, when a game is installed, obtaining an installation file of the game, determining a target performance level of an operation platform according to performance parameters of the operation platform for operating the game, and determining one or more intermediate performance levels of which the levels are lower than the target performance level; and when the game is installed and the game scene is loaded, configuring resource switching data of the game scene based on at least one intermediate performance grade. By the method, at least one intermediate performance grade adaptive to the operation platform can be screened out before the game scene is loaded, and the resource switching data is reasonably configured based on the intermediate performance grade, so that the aim of improving the resource switching efficiency and accuracy can be fulfilled.
S220, determining the performance level of the game scene based on the performance parameters of the running platform where the game model and the game scene are located.
And S230, configuring resource switching data for the game scene according to the performance level.
Wherein the resource switching data comprises: at least one of a character model logo, an object model logo, a performance level logo, a level switching logo, a distance threshold, a performance parameter threshold, an operation platform configuration item, and a resource reference item. The system comprises a character model, an object model, a performance level mark, a level switching mark, a distance threshold, a performance parameter threshold, an operation platform configuration item and a resource reference item, wherein the character model mark and the object model mark are used for distinguishing the character model and the object model, the performance level mark is used for distinguishing different performance levels, the level switching mark is used for marking and calling different templates, the distance threshold is used for determining different scene levels, the performance parameter threshold is used for determining different platform levels, the operation platform configuration item is used for distinguishing different operation platforms, and the resource reference item is used for completing calling of resources of corresponding levels.
S240, the loaded game is operated based on the resource switching data, the performance parameters of the operation platform are monitored in a set time period in the game operation process, the performance grade of the operation platform is updated according to the monitored performance parameters, and the resource switching data is reconfigured according to the updated performance grade.
Wherein the set time period can be set according to the game running time. It can be understood that, the running platform configures the resource switching data, performs resource switching based on the resource switching data and runs the game, and during the running of the game, the running platform may also run other application programs simultaneously, so that the performance parameters of the running platform are reduced, and further the performance level of the running platform is reduced, and if the configured resource switching data is not changed continuously, the running platform cannot run the game with longer time continuously. Based on the above problems, the embodiment monitors the performance parameters of the operation platform within a set time period, updates the performance level of the operation platform according to the monitored performance parameters, determines the number of faces and the detail degree of people and determines the number of faces and the detail degree of objects based on the updated performance level, the positions of people, the importance degree of people, the positions of objects and the importance degree of objects in the scene model, and completes the process of reconfiguring the resource switching data. By the method, the performance parameters of the running platform are monitored at regular time, the performance grade is updated continuously, and the resource switching data is reconfigured according to the updated performance grade, so that the purposes of dynamically updating the performance grade and configuring proper resources, reducing resource waste, ensuring the rendering effect of the game and ensuring the normal loading of the game scene by the running platform are achieved.
According to the technical scheme provided by the embodiment, before a game scene is loaded, an installation file of the loaded game is obtained, and a target performance level when the game is installed is determined according to performance parameters of an operation platform; determining at least one intermediate performance level according to a target performance level to configure resource switching data for the game scenario based on the intermediate performance level when the game scenario is loaded. At least one intermediate performance grade adaptive to the operation platform can be screened out before the game scene is loaded, and the resource switching data is reasonably configured based on the intermediate performance grade, so that the purpose of improving the resource switching efficiency and accuracy is achieved. And the loaded game is operated based on the resource switching data, the performance parameters of the operation platform are monitored in a set time period in the game operation process, the performance grade of the operation platform is updated according to the monitored performance parameters, the resource switching data is reconfigured according to the updated performance grade, the performance parameters of the operation platform can be monitored at regular time, the performance grade is continuously updated, the resource switching data is reconfigured according to the updated performance grade, the purposes of dynamically updating the performance grade and configuring proper resources, reducing resource waste are achieved, the rendering effect of the game is ensured, and the normal loading of game scenes by the operation platform is ensured.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a resource switching apparatus according to a third embodiment of the present invention. Referring to fig. 3, the apparatus includes: a game model acquisition module 310, a performance level determination module 320, and a resource switching module 330.
The game model obtaining module 310 is configured to obtain a game model in a game scene when the game scene is loaded, where the game model at least includes: character models and object models;
a performance level determining module 320, configured to determine a performance level of the game scene based on the performance parameters of the game model and an operating platform where the game scene is located;
and the resource switching module 330 is configured to configure resource switching data for the game scene according to the performance level.
On the basis of the above technical solutions, the performance level determining module 320 is further configured to determine a distance between the game model and the camera, and determine a scene level corresponding to the game scene according to the distance;
determining a platform grade of an operation platform for loading the game scene based on the performance parameters of the operation platform;
and determining the performance grade according to the scene grade and the platform grade.
On the basis of the above technical solutions, the resource switching module 330 is further configured to determine a character position and a character importance of the character model, and determine the face number and the detail degree of the character based on the performance level, the character position, and the character importance;
and/or the presence of a gas in the gas,
and respectively determining the object position and the object importance of the object model, and determining the face number and the detail degree of the object based on the performance grade, the object position and the object importance.
On the basis of the foregoing technical solutions, the performance level determining module 320 is further configured to compare the distance with at least one preset distance threshold, and determine a scene level corresponding to the game scene according to a comparison result.
On the basis of the above technical solutions, the performance parameters include: at least one of memory size, processor size, image quality, rendering resolution, screen resolution, ambient light obscuration, lighting effect, and texture definition.
On the basis of the above technical solutions, the apparatus further includes: a resource switching data updating configuration module; the resource switching data updating and configuring module is used for running the loaded game based on the resource switching data and monitoring the performance parameters of the running platform within a set time period in the running process of the game;
and updating the performance level of the operating platform according to the monitored performance parameters, and reconfiguring resource switching data according to the updated performance level.
On the basis of the above technical solutions, the apparatus further includes: an intermediate performance level determination module; the middle performance level determining module is used for acquiring an installation file of a loaded game and determining a target performance level when the game is installed according to the performance parameters of the running platform;
determining at least one intermediate performance level according to the target performance level, so as to configure resource switching data for the game scene based on the intermediate performance level when the game scene is loaded, wherein the target performance level is higher than or equal to the intermediate performance level.
According to the technical scheme provided by the embodiment, when a game scene is loaded, a game model in the game scene is obtained, wherein the game model at least comprises: the character model and the object model determine the performance level of the game scene based on the performance parameters of the game model and the running platform where the game scene is located. A performance level may be determined that is compatible with the scene level of the game and the performance of the running platform. And further configuring resource switching data for the game scene according to the performance grade. The distributed resource switching data can be adapted to the performance grade, the problems that an operation platform with lower performance cannot load resources normally and cannot operate normally in the prior art are solved, the resource switching configuration flexibility can be improved by multiplexing a set of art resource configuration resource switching data, resource waste is reduced, the rendering effect of the game is ensured, and the game scene is ensured to be loaded normally by the operation platform.
Example four
Fig. 4 is a schematic structural diagram of an image reconstruction apparatus according to a fourth embodiment of the present invention. FIG. 4 illustrates a block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention. The electronic device 12 shown in fig. 4 is only an example and should not bring any limitation to the function and the scope of use of the embodiment of the present invention.
As shown in FIG. 4, electronic device 12 is embodied in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and/or cache 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. The system memory 28 may include at least one program product having a set of program modules (e.g., the game model acquisition module 310, the performance level determination module 320, and the resource switching module 330 of the resource switching device) that are configured to perform the functions of the embodiments of the present invention.
A program/utility 44 having a set of program modules 46 (e.g., a game model acquisition module 310, a performance level determination module 320, and a resource switching module 330 for a resource switching device) may be stored, for example, in system memory 28, such program modules 46 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may include an implementation of a network environment. Program modules 46 generally carry out the functions and/or methodologies of the described embodiments of the invention.
The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the electronic device 12, and/or any device (e.g., network card, modem, etc.) that enables the electronic device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing by executing programs stored in the system memory 28, for example, to implement a resource switching method provided by an embodiment of the present invention, the method including:
when a game scene is loaded, obtaining a game model in the game scene, wherein the game model at least comprises: character models and object models;
determining the performance level of the game scene based on the performance parameters of the game model and the running platform where the game scene is located;
and configuring resource switching data for the game scene according to the performance grade.
The processing unit 16 executes various functional applications and data processing by executing programs stored in the system memory 28, for example, to implement a resource switching method provided by an embodiment of the present invention.
Of course, those skilled in the art can understand that the processor may also implement the technical solution of the resource switching method provided in any embodiment of the present invention.
EXAMPLE five
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a resource switching method provided in an embodiment of the present invention, where the method includes:
when a game scene is loaded, obtaining a game model in the game scene, wherein the game model at least comprises: character models and object models;
determining the performance level of the game scene based on the performance parameters of the game model and the running platform where the game scene is located;
and configuring resource switching data for the game scene according to the performance grade.
Of course, the computer program stored on the computer-readable storage medium provided in the embodiments of the present invention is not limited to the above method operations, and may also perform related operations in a resource switching method provided in any embodiment of the present invention.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: 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 context of this document, 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, or device.
A computer readable signal medium may be embodied in a game model, performance level, resource switching data, etc., and may carry computer readable program code. Such propagated game models, performance levels, resource switching data, and the like. 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, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + + or the like 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).
It should be noted that, in the embodiment of the resource switching apparatus, the modules included in the embodiment are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (9)

1. A method for switching resources, comprising:
when a game scene is loaded, obtaining a game model in the game scene, wherein the game model at least comprises: character models and object models;
determining the performance level of the game scene based on the performance parameters of the game model and the running platform where the game scene is located;
configuring resource switching data for the game scene according to the performance grade; the determining the performance level of the game scene based on the performance parameters of the game model and the running platform where the game scene is located includes:
determining a platform grade of an operation platform for loading the game scene based on the performance parameters of the operation platform;
the configuring resource switching data for the game scene according to the performance level comprises:
determining the character position and the character importance of the character model according to the position and the importance of the character model in a picture of a game scene, and determining the face number and the detail degree of the character based on the performance level, the character position and the character importance;
and/or the presence of a gas in the atmosphere,
and determining the object position and the object importance of the object model according to the position and the importance of the object model in the picture of the game scene, and determining the face number and the detail degree of the object based on the performance grade, the object position and the object importance.
2. The method of claim 1, wherein determining the performance level of the game scenario based on the performance parameters of the game model and an operating platform on which the game scenario is located further comprises:
determining the distance between the game model and a camera, and determining a scene grade corresponding to the game scene according to the distance;
and determining the performance grade according to the scene grade and the platform grade.
3. The method of claim 2, wherein the determining a scene level corresponding to the game scene according to the distance comprises:
and comparing the distance with at least one preset distance threshold, and determining the scene grade corresponding to the game scene according to the comparison result.
4. The method of claim 2, wherein the performance parameters comprise: at least one of memory size, processor size, image quality, rendering resolution, screen resolution, ambient light obscuration, lighting effect, and texture definition.
5. The method of claim 1, wherein after configuring the resource switching data for the game scenario, the method further comprises:
running the loaded game based on the resource switching data, and monitoring the performance parameters of the running platform within a set time period in the running process of the game;
and updating the performance level of the operating platform according to the monitored performance parameters, and reconfiguring resource switching data according to the updated performance level.
6. The method of claim 1, wherein prior to loading the game scene, the method further comprises:
acquiring an installation file of a loaded game, and determining a target performance level when the game is installed according to the performance parameters of the running platform;
determining at least one intermediate performance level according to the target performance level, so as to configure resource switching data for the game scene based on the intermediate performance level when the game scene is loaded, wherein the target performance level is higher than or equal to the intermediate performance level.
7. A resource switching apparatus, comprising:
a game model obtaining module, configured to obtain a game model in a game scene when the game scene is loaded, where the game model at least includes: character models and object models;
the performance grade determining module is used for determining the performance grade of the game scene based on the game model and the performance parameters of the running platform where the game scene is located;
the resource switching module is used for configuring resource switching data for the game scene according to the performance grade;
the resource switching module is also used for determining the character position and the character importance of the character model according to the position and the importance of the character model in the picture of the game scene, and determining the face number and the detail degree of the character based on the performance level, the character position and the character importance;
and/or the presence of a gas in the atmosphere,
determining the object position and the object importance of the object model according to the position and the importance of the object model in the picture of the game scene, and determining the face number and the detail degree of the object based on the performance level, the object position and the object importance;
the performance grade determining module is further used for determining the platform grade of the running platform for loading the game scene based on the performance parameters of the running platform.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the resource switching method according to any one of claims 1-6 when executing the computer program.
9. A storage medium containing computer-executable instructions which, when executed by a computer processor, implement the resource switching method of any one of claims 1-6.
CN202011324499.3A 2020-11-23 2020-11-23 Resource switching method and device, electronic equipment and storage medium Active CN112316437B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011324499.3A CN112316437B (en) 2020-11-23 2020-11-23 Resource switching method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011324499.3A CN112316437B (en) 2020-11-23 2020-11-23 Resource switching method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112316437A CN112316437A (en) 2021-02-05
CN112316437B true CN112316437B (en) 2023-02-03

Family

ID=74322291

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011324499.3A Active CN112316437B (en) 2020-11-23 2020-11-23 Resource switching method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112316437B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112965806B (en) * 2021-03-26 2023-08-04 北京汇钧科技有限公司 Method and device for determining resources
CN114984578B (en) * 2022-06-14 2023-03-21 上海久游网络科技有限公司 Game scene conversion method based on intelligent algorithm

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107577537A (en) * 2017-09-06 2018-01-12 广东欧珀移动通信有限公司 Resource allocation method and Related product
CN107613107A (en) * 2017-08-31 2018-01-19 广东欧珀移动通信有限公司 Resource allocation method and related product
CN108664338A (en) * 2018-03-30 2018-10-16 努比亚技术有限公司 Scene of game message treatment method, mobile terminal and readable storage medium storing program for executing
EP3477472A1 (en) * 2017-10-31 2019-05-01 Guangdong Oppo Mobile Telecommunications Corp., Ltd Method for resource allocation and terminal device
CN110339567A (en) * 2019-07-17 2019-10-18 三星电子(中国)研发中心 System resource configuration, scene prediction model training method and device
CN111064712A (en) * 2019-11-29 2020-04-24 珠海金山网络游戏科技有限公司 Game resource packaging method and system
CN111111176A (en) * 2019-12-18 2020-05-08 北京像素软件科技股份有限公司 Method and device for managing object LOD in game and electronic equipment
CN111176758A (en) * 2019-12-31 2020-05-19 腾讯科技(深圳)有限公司 Configuration parameter recommendation method and device, terminal and storage medium
CN111530077A (en) * 2020-05-26 2020-08-14 网易(杭州)网络有限公司 Game scene optimization method and device, electronic equipment and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107613107A (en) * 2017-08-31 2018-01-19 广东欧珀移动通信有限公司 Resource allocation method and related product
CN107577537A (en) * 2017-09-06 2018-01-12 广东欧珀移动通信有限公司 Resource allocation method and Related product
WO2019047709A1 (en) * 2017-09-06 2019-03-14 Oppo广东移动通信有限公司 Resource configuration method and related product
EP3477472A1 (en) * 2017-10-31 2019-05-01 Guangdong Oppo Mobile Telecommunications Corp., Ltd Method for resource allocation and terminal device
CN108664338A (en) * 2018-03-30 2018-10-16 努比亚技术有限公司 Scene of game message treatment method, mobile terminal and readable storage medium storing program for executing
CN110339567A (en) * 2019-07-17 2019-10-18 三星电子(中国)研发中心 System resource configuration, scene prediction model training method and device
CN111064712A (en) * 2019-11-29 2020-04-24 珠海金山网络游戏科技有限公司 Game resource packaging method and system
CN111111176A (en) * 2019-12-18 2020-05-08 北京像素软件科技股份有限公司 Method and device for managing object LOD in game and electronic equipment
CN111176758A (en) * 2019-12-31 2020-05-19 腾讯科技(深圳)有限公司 Configuration parameter recommendation method and device, terminal and storage medium
CN111530077A (en) * 2020-05-26 2020-08-14 网易(杭州)网络有限公司 Game scene optimization method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112316437A (en) 2021-02-05

Similar Documents

Publication Publication Date Title
US20210208951A1 (en) Method and apparatus for sharing gpu, electronic device and readable storage medium
CN111737019B (en) Method and device for scheduling video memory resources and computer storage medium
KR101813429B1 (en) Shader pipeline with shared data channels
CN112316437B (en) Resource switching method and device, electronic equipment and storage medium
CN110928695A (en) Management method and device for video memory and computer storage medium
CN112257135A (en) Model loading method and device based on multithreading, storage medium and terminal
CN108389151B (en) Over-rendering evaluation method and system
CN111209116B (en) Method and device for distributing video memory space and computer storage medium
CN113655975A (en) Image display method, image display device, electronic apparatus, and medium
CN110471700B (en) Graphic processing method, apparatus, storage medium and electronic device
CN111159606A (en) Three-dimensional model loading method, equipment and storage medium applied to building system
CN114186527A (en) Method and device for realizing automatic wiring of integrated circuit independent of grid point
CN112684965A (en) Dynamic wallpaper state changing method and device, electronic equipment and storage medium
CN110659024B (en) Graphics resource conversion method and device, electronic equipment and storage medium
CN110728773A (en) Image storage method and device and electronic equipment
CN110960858B (en) Game resource processing method, device, equipment and storage medium
CN116450347A (en) Video multitasking method, video analysis device, and storage medium
CN110751592A (en) Graphic resource conversion method, apparatus, electronic device and storage medium
CN113608809B (en) Layout method, device, equipment, storage medium and program product of components
CN112988364B (en) Dynamic task scheduling method, device and storage medium
CN115501588A (en) Image rendering method and device, storage medium and electronic equipment
CN106802856B (en) Performance testing method of game application program, server and game application client
CN111292392A (en) Unity-based image display method, apparatus, device and medium
CN113384893A (en) Data processing method and device and computer readable storage medium
US20210118141A1 (en) Defect enhancement

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