Display Method, Device, Electronic Device and Storage Medium for Game Scenes
By obtaining the upper limit parameters of the performance occupancy of the terminal device and determining the target performance element type, calculating and adjusting the performance parameters to maximize the index value, the problem of poor rendering effect in the existing technology is solved, and a more accurate terminal device matching and optimized rendering effect is achieved.
Patent Information
- Application Number
- CN202210531387.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-16
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2042-05-16
AI Technical Summary
When rendering game scenes, it is difficult for the prior art to accurately match the performance requirements of the terminal device, resulting in poor rendering effects.
By obtaining the upper limit parameters of the performance occupancy of the target game under different terminal performance, determining the target performance element type, and calculating the tentative performance index value based on the tentative performance parameters and weights, adjusting the parameters to maximize the index value, thereby determining the optimal performance parameter.
Improve the accuracy of terminal devices in matching game scene performance parameters and optimize the rendering effect of game scenes.
Smart Images

Figure CN114768252B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, particularly to the field of game technology, and specifically to a method, device, electronic device, and storage medium for displaying a game scene. Background Art
[0002] With the continuous development of computer communication technology, in order to meet people's pursuit of spiritual life, entertainment games that can be operated on terminals have emerged as the times require. For example, games of the type of multiplayer online action competition developed based on the client or server architecture. In action competition games, players can manipulate virtual characters on the screen to play the game, and can perform related operations such as walking, running, jumping, and fighting in the game scene from the third perspective of the character operated by the player, enabling players to experience the visual impact brought by the game immersive, greatly enhancing the initiative and realism of the game.
[0003] The game client usually has several performance parameters for rendering the game scene. In order to present the game scene most suitable for the player's current terminal device to the player, game developers usually need to select appropriate performance parameters according to the terminal performance of the target terminal device to render the game scene, so as to perform the corresponding screen of the game scene at as high a level as possible while making full use of the device performance. Currently, game developers divide several fixed performance level grades according to the common terminal performance, and specific performance parameters are set within each performance level grade. When the game is rendering the game scene on the target terminal device, the performance level grade that best matches the terminal performance of the target terminal device is determined from the performance level grades according to the terminal performance of the target terminal device, and the game scene is rendered according to the performance parameters corresponding to the determined performance level. However, the performance level of the game scene in the prior art is configured with performance parameters according to the performance level grade corresponding to the terminal device, and there will be situations where it is not applicable to some players' terminal devices, resulting in the rendering of the game scene being unable to meet the specific requirements of different device terminals, and the accuracy of matching the performance parameters of the game scene accurately for the terminal device is low, resulting in poor rendering effects of the game scene. Summary of the Invention
[0004] The embodiments of this application provide a method, device, electronic device, and storage medium for displaying a game scene. By matching the performance parameters of the game scene with the highest matching degree of the terminal device performance of the terminal device used by the player, the accuracy of matching the performance parameters of the game scene for the terminal device can be improved, and the rendering effect of the game scene can be optimized.
[0005] The embodiments of this application provide a method for displaying a game scene. The method for displaying the game scene includes:
[0006] Obtain the upper limit parameter of the performance occupancy of the target game under at least one terminal performance, and determine the type of target performance elements required for the screen rendering of the target game scene. Among them, the performance parameter under one type of target performance element is used to indicate the number of the same type of game performance elements that need to be rendered in the target game scene;
[0007] Obtain the performance occupancy parameter of the rendering process of a single game performance element under each type of target performance element under each terminal performance;
[0008] Determine the tentative performance parameters of each type of target performance element in the target game scene. Among them, the tentative performance occupancy parameter of the target game scene for each terminal performance does not exceed the corresponding upper limit parameter of the performance occupancy. The tentative performance occupancy parameter is determined based on the tentative performance parameters of each type of target performance element and the corresponding performance occupancy parameter;
[0009] Calculate based on the tentative performance parameters of each type of target performance element and the weight corresponding to each type of target performance element to obtain a tentative performance index value;
[0010] Adjust the tentative performance parameters of each type of target performance element based on the tentative performance index value to maximize the tentative performance index value. Among them, the tentative performance parameter corresponding to the maximized tentative performance index value is the target performance parameter;
[0011] Perform a rendering process on the user interface according to the target performance parameters under each type of target performance element to display the target game scene on the user interface.
[0012] Correspondingly, the embodiment of the present application further provides a display device for a game scene. The display device for the game scene includes:
[0013] The first acquisition unit is used to obtain the upper limit parameter of the performance occupancy of the target game under at least one terminal performance, and determine the type of target performance elements required for the screen rendering of the target game scene. Among them, the performance parameter under one type of target performance element is used to indicate the number of the same type of game performance elements that need to be rendered in the target game scene;
[0014] The second acquisition unit is used to obtain the performance occupancy parameter of the rendering process of a single game performance element under each type of target performance element under each terminal performance;
[0015] A determination unit for determining tentative performance parameters of each of the target performance element types in the target game scenario, where the tentative performance occupancy parameter of the target game scenario for each terminal performance does not exceed the corresponding performance occupancy upper limit parameter, and the tentative performance occupancy parameter is determined based on the tentative performance parameters of each target performance element type and the corresponding performance occupancy parameter;
[0016] A calculation unit for calculating based on the tentative performance parameters of each of the target performance element types and the weight corresponding to each target performance element type to obtain a tentative performance index value;
[0017] An adjustment unit for adjusting the tentative performance parameters of each of the target performance element types based on the tentative performance index value to maximize the tentative performance index value, where the tentative performance parameters corresponding to the maximized tentative performance index value are the target performance parameters;
[0018] A display unit for performing rendering processing on the user interface according to the target performance parameters of each target performance element type to display the target game scenario on the user interface.
[0019] In some embodiments, the display device of the game scenario includes:
[0020] A selection unit for selecting a reference performance index value from a preset performance index value range;
[0021] A first determination subunit for determining, based on the magnitude relationship between the tentative performance index value and the reference performance index value, a new performance index value range in the preset performance index value range to replace the preset performance index value range, and returning to the step of determining the tentative performance parameters of each of the target performance element types in the target game scenario until the new performance index value range cannot be divided and the process ends, and using the latest tentative performance parameters as the target performance parameters, where the new index value range includes the tentative performance index value.
[0022] In some embodiments, the display device of the game scenario includes:
[0023] A second determination subunit for performing a dichotomy process on the preset performance index value range to determine a reference performance index value.
[0024] In some embodiments, the display device of the game scenario includes:
[0025] A third determination subunit, configured to determine a first performance index value range and a second performance index value range based on the preset performance index range and the reference performance index value, where the range of the first performance index value range is an interval from the minimum value of the preset performance index value range to the reference performance index value, and the range of the second performance index value range is an interval from the reference performance index value to the maximum value of the preset performance index value range.
[0026] In some embodiments, the display device of the game scenario includes:
[0027] A fourth determination subunit, configured to determine the magnitude relationship between the tentative performance index value and the reference performance index value;
[0028] A first replacement unit, configured to replace the preset performance index range with the first performance index value range if the tentative performance index value is less than the reference performance index value;
[0029] A second replacement unit, configured to replace the preset performance index range with the second performance index value range if the tentative performance index value is greater than or equal to the reference performance index value.
[0030] In some embodiments, the display device of the game scenario includes:
[0031] A first acquisition subunit, configured to obtain the product of the tentative performance parameter of the target performance element type and the weight corresponding to the target performance element type, and determine the sub-tentative performance index value of the target performance element type;
[0032] A first processing unit, configured to perform a superposition process on the sub-tentative performance index values of all the target performance element types to determine the total tentative performance index, where the total tentative performance index is the tentative performance index value.
[0033] In some embodiments, the display device of the game scenario includes:
[0034] A fifth determination subunit, configured to determine the tentative performance occupancy parameter of each target performance element type based on the tentative performance parameter of each target performance element type and the corresponding performance occupancy parameter;
[0035] A second acquisition subunit, configured to obtain the sum between the tentative performance occupancy parameters of each target performance element type of the same terminal performance to obtain the total performance occupancy parameter;
[0036] A sixth determination subunit, configured to determine the magnitude relationship between the performance occupancy upper limit parameter of all terminal performances and the corresponding total performance occupancy parameter;
[0037] A second processing unit, configured to re - execute the step of determining the tentative performance parameters of each of the target presentation element types in the target game scenario to determine new tentative performance parameters of each of the target presentation element types in the target game scenario if there is at least one performance occupancy upper - limit parameter of the terminal performance that is less than the corresponding total performance occupancy parameter.
[0038] In some embodiments, the display device of the game scenario includes:
[0039] A seventh determination subunit, configured to determine a target game scenario based on the scenario switching instruction when detecting a scenario switching instruction for the current game scenario;
[0040] A third acquisition subunit, configured to acquire the scenario information of the target game scenario, where the scenario information includes the target presentation element types required for rendering the picture of the game scenario of the target game.
[0041] In some embodiments, the display device of the game scenario includes:
[0042] An eighth determination subunit, configured to determine whether the current game scenario is the same as the target game scenario based on the scenario information of the current game scenario and the scenario information of the target game scenario;
[0043] A fourth acquisition subunit, configured to, if not, acquire the performance occupancy parameters of the rendering process of a single game presentation element under each target presentation element type and under each terminal performance.
[0044] Correspondingly, an embodiment of the present application further provides an electronic device, including a processor, a memory, and a computer program stored on the memory and capable of running on the processor. When the computer program is executed by the processor, the steps of any one of the game scenario display methods are implemented.
[0045] Correspondingly, an embodiment of the present application further provides a computer - readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the game scenario display methods are implemented.
[0046] An embodiment of the present application provides a game scenario display method, device, electronic device, and storage medium. By matching the performance occupancy upper - limit parameter of the target terminal device currently used by the player, the performance parameters of the target presentation element types required for rendering the picture of the target game scenario with the highest matching degree of the terminal device performance of the target terminal device are obtained, so that the performance parameters of the game scenario can be determined according to the performance parameters of the specific terminal device used, thereby improving the accuracy of matching the performance parameters of the target terminal device with the game scenario and optimizing the rendering effect of the game scenario. Description of the Drawings
[0047] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those skilled in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0048] Figure 1 It is a schematic diagram of the scene of the display system for the game scene provided by the embodiment of the present application.
[0049] Figure 2 It is a schematic flowchart of a method for displaying a game scene provided by the embodiment of the present application.
[0050] Figure 3 It is a schematic structural diagram of a device for displaying a game scene provided by the embodiment of the present application.
[0051] Figure 4 It is a schematic structural diagram of an electronic device provided by the embodiment of the present application. Detailed implementation manners
[0052] The following will clearly and completely describe the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.
[0053] The embodiments of the present application provide a method, device, electronic device and storage medium for displaying a game scene. Specifically, the method for displaying a game scene in the embodiments of the present application can be executed by an electronic device. Among them, the electronic device can be a terminal or a server and other devices. The terminal can be a smart phone, a tablet computer, a notebook computer, a touch screen, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA) and other terminal devices. The terminal can also include a client, and the client can be a game application client, a browser client carrying a game program or an instant messaging client, etc. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
[0054] For example, when the display method of the game scene runs on a terminal, the terminal device stores a game application and is used to present the virtual scene in the game screen. The terminal device is used to interact with the user through a graphical user interface. For example, the game application is downloaded and installed on the terminal device and then run. The way the terminal device provides the graphical user interface to the user can include various methods. For example, it can be rendered and displayed on the display screen of the terminal device, or the graphical user interface can be presented through holographic projection. For example, the terminal device can include a touch display screen and a processor. The touch display screen is used to present the graphical user interface and receive the operation instructions generated by the user's actions on the graphical user interface. The graphical user interface includes the game screen. The processor is used to run the game, generate the graphical user interface, respond to the operation instructions, and control the display of the graphical user interface on the touch display screen.
[0055] Please refer to Figure 1 , Figure 1 which is a schematic diagram of the scene of a display system for a game scene provided by an embodiment of the present application. The system may include at least one terminal, at least one server, at least one database, and a network. The terminal held by the user can be connected to the servers of different games through the network. The terminal is any device with computing hardware that can support and execute software products corresponding to the game. In addition, the terminal has one or more multi-touch sensitive screens for sensing and obtaining the input of touch or swipe operations performed by the user at multiple points on one or more touch display screens. In addition, when the system includes multiple terminals, multiple servers, and multiple networks, different terminals can be connected to each other through different networks and through different servers. The network can be a wireless network or a wired network. For example, the wireless network can be a wireless local area network (WLAN), local area network (LAN), cellular network, 2G network, 3G network, 4G network, 5G network, etc. In addition, different terminals can also use their own Bluetooth network or hotspot network to connect to other terminals or to the server, etc. For example, multiple users can be online through different terminals, connect through an appropriate network, and synchronize with each other to support multi-player games. In addition, the system can include multiple databases. The multiple databases are coupled to different servers and can continuously store information related to the game environment in the database when different users are online for multi-player games.
[0056] An embodiment of the present application provides a method for displaying a game scene, which can be executed by a terminal or a server. In the embodiment of the present application, the method for displaying a game scene is taken as an example to be executed by a terminal. Among them, the terminal includes a touch display screen and a processor. The touch display screen is used to present a graphical user interface and receive operation instructions generated by a user acting on the graphical user interface. When the user operates on the graphical user interface through the touch display screen, the graphical user interface can control the content of the terminal locally in response to the received operation instructions, or can control the content of the peer server in response to the received operation instructions. For example, the operation instructions generated by the user acting on the graphical user interface include instructions for starting a game application, and the processor is configured to start the game application after receiving the instructions for starting the game application provided by the user. In addition, the processor is configured to render and draw a graphical user interface associated with the game on the touch display screen. The touch display screen is a multi-touch sensitive screen capable of sensing touch or swipe operations performed simultaneously by multiple points on the screen. When the user performs a touch operation on the graphical user interface with a finger, when the graphical user interface detects the touch operation, it controls different virtual objects in the graphical user interface of the game to perform actions corresponding to the touch operation. For example, the game can be any one of casual games, action games, role-playing games, strategy games, sports games, puzzle games, etc. Among them, the game can include a virtual scene of the game drawn on the graphical user interface. In addition, the virtual scene of the game can include one or more virtual objects controlled by the user (or player), such as virtual characters. In addition, the virtual scene of the game can also include one or more obstacles, such as railings, ditches, walls, etc., to limit the movement of virtual objects. For example, the movement of one or more objects is limited to a specific area within the virtual scene. Optionally, the virtual scene of the game also includes one or more elements, such as skills, scores, character health status, energy, etc., to provide assistance to the player, provide virtual services, increase scores related to the player's performance, etc. In addition, the graphical user interface can also present one or more indicators to provide indication information to the player. For example, the game can include a virtual object controlled by the player and one or more other virtual objects (such as enemy characters). In one embodiment, one or more other virtual objects are controlled by other players of the game. For example, one or more other virtual objects can be controlled by a computer, such as a robot using an artificial intelligence (AI) algorithm, to implement a human-computer battle mode. For example, virtual objects have various skills or abilities used by game players to achieve goals. For example, virtual objects have one or more weapons, props, tools, etc. that can be used to eliminate other objects in the game. Such skills or abilities can be activated by the game player using one of multiple preset touch operations on the touch display screen of the terminal. The processor can be configured to present a corresponding game screen in response to the operation instructions generated by the user's touch operation.
[0057] It should be noted that Figure 1 The schematic diagram of the game scene shown in the display system of the game scene is only an example. The display method and the scene of the game scene described in the embodiments of the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those of ordinary skill in the art know that the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.
[0058] Based on the above problems, the embodiments of the present application provide a display method, device, electronic device and storage medium for a game scene, which will be described in detail below. It should be noted that the description order of the following embodiments does not limit the preferred order of the embodiments.
[0059] The embodiments of the present application provide a display method for a game scene. This method can be executed by a game client or a server. In the embodiments of the present application, the display method of the game scene is taken as an example of being executed by the game client for illustration.
[0060] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of a display method for a game scene provided by the embodiments of the present application. The specific process can be as follows: steps 101 to 106:
[0061] 101. Obtain the upper limit parameter of performance occupancy under at least one terminal performance of the target game, and determine the type of target performance elements required for rendering the screen of the target game scene, where the performance parameter under a target performance element type is used to indicate the number of the same type of game performance elements to be rendered in the target game scene.
[0062] In the embodiments of the present application, the game scene is a virtual scene for carrying the display of virtual characters, and this virtual scene is displayed on the user interface or the game interface. Among them, the virtual scene is a virtual environment displayed (or provided) when the game application runs on the terminal. This virtual environment can be a simulation environment of the real world, a semi-simulation and semi-fictional three-dimensional environment, or a purely fictional three-dimensional environment. This virtual environment is used for virtual environment battles between at least two virtual characters, and there are virtual resources available for at least two virtual characters in this virtual environment. A virtual scene is displayed in the game interface, and one or more virtual characters are displayed in the virtual scene. The virtual characters can be the main control virtual characters controlled by the current game player, or the enemy virtual characters in the enemy camp with the main control virtual characters. There can be multiple main control virtual characters and multiple enemy virtual characters in the virtual scene at the same time. This is for illustrative purposes and is not a limitation.
[0063] A virtual character (or hero) refers to an active object in a virtual environment. A virtual character refers to a virtual object in a game that is controlled by a user or player through a terminal. In the embodiments of the present application, the master virtual character refers to the virtual object in the game controlled by the current game player through the terminal, that is, the virtual character controlled by the local player. The hostile virtual character refers to the virtual object in the game controlled by other players through the terminal, that is, the virtual character controlled by other local players.
[0064] Among them, the terminal performance may include the memory occupancy limit of the target game for the terminal device, the video memory occupancy limit, and the maximum time consumption for rendering a frame of the screen, etc. The computer device can obtain the memory occupancy upper limit parameter corresponding to the memory occupancy limit, the video memory occupancy upper limit parameter corresponding to the video memory occupancy limit, and the frame consumption. In addition, the types of performance elements of the game scene may include the on-screen virtual characters in the game scene, game special effects, and scene special effects of the game scene, etc.
[0065] In an embodiment, in the step of "obtaining the performance occupancy upper limit parameters of the target game under at least one terminal performance, and determining the target type of performance elements required for rendering the screen of the target game scene", the method may include:
[0066] When detecting a scene switching instruction for the current game scene, determining the target game scene based on the scene switching instruction;
[0067] Obtaining the scene information of the target game scene, where the scene information includes the target type of performance elements required for rendering the screen of the game scene of the target game.
[0068] In order to avoid wasting computing resources when switching game scenes, before the step of "obtaining the performance occupancy parameters of the rendering process of a single game performance element under each target type of performance element and under each terminal performance", the method may include:
[0069] Based on the scene information of the current game scene and the scene information of the target game scene, determining whether the current game scene is the same as the target game scene;
[0070] If not, obtaining the performance occupancy parameters of the rendering process of a single game performance element under each target type of performance element and under each terminal performance.
[0071] 102. Obtaining the performance occupancy parameters of the rendering process of a single game performance element under each target type of performance element and under each terminal performance.
[0072] Specifically, the computer device can calculate the rendering processing of a single game performance element under each target performance element type, and obtain the performance occupancy parameters of a single game performance element under each terminal performance. The computer device can calculate the single performance occupancy parameter of the terminal performance according to the calculation formula CostA_B, where A is the performance parameter of a single game performance element, and B is the performance parameter of a single terminal performance. Among them, the terminal performance can include the memory occupancy limit of the target game for the terminal device, the video memory occupancy limit, and the maximum time consumption for rendering one frame of the screen. The computer device can obtain the memory occupancy upper limit parameter corresponding to the memory occupancy limit, the video memory occupancy upper limit parameter corresponding to the video memory occupancy limit, and the frame consumption. In addition, the performance element types of the game scene can include on-screen virtual characters, game special effects, and scene special effects in the game scene. For example, taking the on-screen virtual characters in the game scene as the target performance element type for illustration, it is calculated that the memory consumption for rendering one on-screen virtual character is Cost on-screen_memory, that is, for each additional on-screen virtual character, the memory consumption increases by one Cost on-screen_memory.
[0073] 103. Determine the tentative performance parameters of each of the target performance element types in the target game scene, where the tentative performance occupancy parameter of the target game scene for each terminal performance does not exceed the corresponding performance occupancy upper limit parameter, and the tentative performance occupancy parameter is determined based on the tentative performance parameters of each target performance element type and the corresponding performance occupancy parameters.
[0074] Specifically, after the step of "determining the tentative performance parameters of each of the target performance element types in the target game scene", the method may include:
[0075] Determine the tentative performance occupancy parameters of each target performance element type based on the tentative performance parameters of each target performance element type and the corresponding performance occupancy parameters;
[0076] Obtain the sum of the tentative performance occupancy parameters of each target performance element type of the same terminal performance to obtain the total performance occupancy parameter;
[0077] Determine the size relationship between the performance occupancy upper limit parameters of all terminal performances and the corresponding total performance occupancy parameters;
[0078] If there is at least one terminal performance whose performance occupancy upper limit parameter is less than the corresponding total performance occupancy parameter, then re-execute the step of "determining the tentative performance parameters of each of the target performance element types in the target game scene" to determine the new tentative performance parameters of each of the target performance element types in the target game scene.
[0079] The embodiments of the present application can use the canReach function to calculate the tentative performance parameters of each of the target performance element types. The purpose of the canReach function is to determine whether there is a set of P1 to Pn values that can reach the performance level of the tentative performance index value under the limitation of the performance occupancy upper limit parameters under each terminal performance. Specifically, the canReach function is implemented using a stepping algorithm. In each round, an attempt is made to step up or down each Pi (i ∈ (1, n)). If the P1 to Pn combination after stepping meets the limitation of the performance occupancy upper limit parameters under each terminal performance and is closer to the tentative performance index value, it is updated as the minimum difference in this round. After the stepping in this round ends, if the minimum difference in this round, that is, RoundMinDiff, is better than the global minimum MinDiff, the global MinDiff is updated. Then, the stepping parameter Delta is reduced, and the stepping process continues until Delta approaches 0. The specific implementation code is as follows:
[0080]
[0081]
[0082] --The following code logic is the same as above, except that the positive stepping is changed to negative stepping
[0083]
[0084]
[0085] In order to determine whether the tentative performance parameters of each of the target performance element types meet the limitation of the performance occupancy upper limit parameters under each terminal performance, the isValid function can be used for calculation, so as to know whether the tentative performance parameters of each of the target performance element types meet the limitation of the performance occupancy upper limit parameters under each terminal performance. The specific implementation code is as follows:
[0086]
[0087] 104. Calculate based on the tentative performance parameters of each of the target performance element types and the weight corresponding to each target performance element type to obtain the tentative performance index value.
[0088] In one embodiment, for the step of "calculate based on the tentative performance parameters of each of the target performance element types and the weight corresponding to each target performance element type to obtain the tentative performance index value", the method may include:
[0089] Obtain the product of the tentative performance parameter of the target performance element type and the weight corresponding to the target performance element type, and determine the sub-tentative performance index value of the target performance element type;
[0090] Superimpose the sub-tentative performance index values of all the target performance element types to determine the total tentative performance index, where the total tentative performance index is the tentative performance index value.
[0091] In the embodiments of the present application, a performance index value calculation formula can be used for calculation to obtain the performance index value. The performance index value formula is as follows:
[0092] Ptotal = P1×W1 + P2×W2 + P3×W3 +... + P n ×W n
[0093] Among them, Ptotal represents the performance index value, P is the performance parameter corresponding to the performance element type, and W is the preset weight set for the performance element type. For example, P1 can be the number of on-screen virtual characters of the on-screen virtual characters, W1 is the preset weight corresponding to the on-screen virtual characters; P2 can be the number of game special effects, W2 is the preset weight corresponding to the game special effects; P3 can be the number of scene special effects of the game scene, W3 is the preset weight corresponding to the scene special effects of the game scene, and so on.
[0094] 105. Adjust the tentative performance parameters of each of the target performance element types based on the tentative performance index value to maximize the tentative performance index value. Among them, the tentative performance parameter corresponding to the maximized tentative performance index value is the target performance parameter.
[0095] To maximize the tentative performance index, for the step "Adjust the tentative performance parameters of each of the target performance element types based on the tentative performance index value to maximize the tentative performance index value", the method may include:
[0096] Select a reference performance index value from the preset performance index value range;
[0097] Based on the magnitude relationship between the tentative performance index value and the reference performance index value, determine a new performance index value range in the preset performance index value range to replace the preset performance index value range, and return to the step of determining the tentative performance parameters of each of the target performance element types in the target game scene until the new performance index value range cannot be divided and the process ends, and use the latest tentative performance parameter as the target performance parameter, where the new index value range includes the tentative performance index value.
[0098] Specifically, for the step "Select a reference performance index value from the preset performance index value range", the method may include:
[0099] Perform a dichotomy process on the preset performance index value range to determine the reference performance index value.
[0100] For example, the embodiments of the present application can process the preset performance index value range by dichotomy, and the specific implementation code is as follows:
[0101]
[0102] After the dichotomy ends with Ptotal = Pmin, the best Ptotal is Pmin (or Pmax).
[0103] To determine two symmetric intervals from the preset performance index value range, after the step of "processing the preset performance index value range by dichotomy to determine the reference performance index value", the method may include:
[0104] Determine a first performance index value range and a second performance index value range based on the preset performance index range and the reference performance index value, where the range of the first performance index value range is the interval between the minimum value of the preset performance index value range and the reference performance index value, and the range of the second performance index value range is the interval between the reference performance index value and the maximum value of the preset performance index value range.
[0105] In an embodiment, for the step of "determining a new performance index value range from the preset performance index value range to replace the preset performance index value range based on the magnitude relationship between the tentative performance index value and the reference performance index value", the method may include:
[0106] Determine the magnitude relationship between the tentative performance index value and the reference performance index value;
[0107] If the tentative performance index value is less than the reference performance index value, then replace the preset performance index value range with the first performance index value range;
[0108] If the tentative performance index value is greater than or equal to the reference performance index value, then replace the preset performance index value range with the second performance index value range.
[0109] 106. Perform rendering processing on the user interface according to the target performance parameters under each target performance element type, so as to display the target game scene on the user interface.
[0110] To further illustrate the game scene display method provided by the embodiments of the present application, the following will take the application of the game scene display method in a specific implementation scenario as an example for illustration, and the specific application scenario is as follows.
[0111] (1) When a game scene switching instruction is detected, the embodiment of the present application can obtain the memory occupancy upper limit parameter corresponding to the memory occupancy limit of the target game on the target terminal device (named Limit memory), the video memory occupancy upper limit parameter corresponding to the video memory occupancy limit (named Limit video memory), and the frame consumption (named Limit frame consumption); at the same time, it can also obtain the types of target performance elements required for rendering the screen of the target game scene. The types of target performance elements can include on-screen virtual characters, game special effects, and scene special effects of the game scene. For example, the number of on-screen virtual characters can be named P1, the number of game special effects can be named P2, and the number of scene special effects of the game scene can be named P3.
[0112] (2) The embodiment of the present application can determine the tentative performance parameters of each of the types of target performance elements in the target game scene. For example, the tentative performance parameters can be obtained through the canReach function. Then, based on the tentative performance parameters of each of the types of target performance elements and the weight corresponding to each type of target performance element, a calculation is performed to obtain the tentative performance index value.
[0113] (3) The embodiment of the present application can determine a preset performance index value interval, perform a dichotomy process on the preset performance index value interval to determine the reference performance index value, based on the magnitude relationship between the tentative performance index value and the reference performance index value, determine a new performance index value interval in the preset performance index value interval to replace the preset performance index value interval, and again determine the number of each of the types of target performance elements in the target game scene. According to the number of each of the types of target performance elements, the tentative performance index value is determined, and the steps of performing a dichotomy process on the preset performance index value interval to determine the reference performance index value and based on the magnitude relationship between the tentative performance index value and the reference performance index value to determine a new performance index value interval in the preset performance index value interval to replace the preset performance index value interval are performed again until the new performance index value interval cannot be divided and the process ends, and the latest tentative performance parameters of each target performance element type are used as the target performance parameters of each target performance element type.
[0114] In summary, the embodiment of the present application provides a method for displaying a game scene. It can match the performance parameters of the types of target performance elements required for rendering the screen of the target game scene with the highest matching degree of the terminal device performance of the target terminal device used by the player according to the performance occupancy upper limit parameters of the target terminal device, so that the performance parameters of the game scene can be determined according to the performance parameters of the specific terminal device used, thereby improving the accuracy of matching the performance parameters of the target terminal device with the game scene and optimizing the rendering effect of the game scene.
[0115] To facilitate better implementation of the game scene display method provided in the embodiments of the present application, the embodiments of the present application also provide a display device based on the above game scene. The meanings of the nouns are the same as those in the above game scene display method, and the specific implementation details can be referred to the descriptions in the method embodiments.
[0116] Please refer to Figure 3 , Figure 3 which is a schematic structural diagram of a display device for a game scene provided in the embodiments of the present application. The device includes:
[0117] A first acquisition unit 201, configured to acquire the upper limit parameter of performance occupancy of the target game under at least one terminal performance, and determine the type of target performance elements required for rendering the screen of the target game scene. Among them, the performance parameter under one type of target performance element is used to indicate the number of the same type of game performance elements to be rendered in the target game scene;
[0118] A second acquisition unit 202, configured to acquire the performance occupancy parameter of rendering and processing a single game performance element under each type of target performance element under each terminal performance;
[0119] A determination unit 203, configured to determine the tentative performance parameters of each type of target performance element in the target game scene, where the tentative performance occupancy parameter of the target game scene for each terminal performance does not exceed the corresponding upper limit parameter of performance occupancy, and the tentative performance occupancy parameter is determined based on the tentative performance parameters of each type of target performance element and the corresponding performance occupancy parameters;
[0120] A calculation unit 204, configured to calculate based on the tentative performance parameters of each type of target performance element and the weight corresponding to each type of target performance element to obtain a tentative performance index value;
[0121] An adjustment unit 205, configured to adjust the tentative performance parameters of each type of target performance element based on the tentative performance index value so that the tentative performance index value is maximized. Among them, the tentative performance parameters corresponding to the maximized tentative performance index value are the target performance parameters;
[0122] A display unit 206, configured to perform rendering processing on the user interface according to the target performance parameters under each type of target performance element to display the target game scene on the user interface.
[0123] In some embodiments, the display device for the game scene includes:
[0124] A selection unit, configured to select a reference performance index value from a preset performance index value range;
[0125] The first determination subunit is configured to determine, based on the magnitude relationship between the tentative performance index value and the reference performance index value, a new performance index value interval from the preset performance index value interval to replace the preset performance index value interval, and return the step of determining the tentative performance parameters of each of the target performance element types in the target game scenario until the new performance index value interval cannot be divided and the processing ends, and use the latest tentative performance parameters as the target performance parameters, where the new index value interval includes the tentative performance index value.
[0126] In some embodiments, the display device of the game scenario includes:
[0127] The second determination subunit is configured to perform a dichotomy process on the preset performance index value interval to determine the reference performance index value.
[0128] In some embodiments, the display device of the game scenario includes:
[0129] The third determination subunit is configured to determine a first performance index value interval and a second performance index value interval based on the preset performance index interval and the reference performance index value, where the range of the first performance index value interval is the interval between the minimum value of the preset performance index value interval and the reference performance index value, and the range of the second performance index value interval is the interval between the reference performance index value and the maximum value of the preset performance index value interval.
[0130] In some embodiments, the display device of the game scenario includes:
[0131] The fourth determination subunit is configured to determine the magnitude relationship between the tentative performance index value and the reference performance index value;
[0132] The first replacement unit is configured to, if the tentative performance index value is less than the reference performance index value, replace the preset performance index value interval with the first performance index value interval;
[0133] The second replacement unit is configured to, if the tentative performance index value is greater than or equal to the reference performance index value, replace the preset performance index value interval with the second performance index value interval.
[0134] In some embodiments, the display device of the game scenario includes:
[0135] The first acquisition subunit is configured to obtain the product of the tentative performance parameter of the target performance element type and the weight corresponding to the target performance element type, and determine the sub-tentative performance index value of the target performance element type.
[0136] A first processing unit for adding up the sub-tentative performance index values of all the target performance element types to determine a total tentative performance index, where the total tentative performance index is a tentative performance index value.
[0137] In some embodiments, the display device of the game scenario includes:
[0138] A fifth determination subunit for determining the tentative performance occupancy parameters of each target performance element type based on the tentative performance parameters of each target performance element type and the corresponding performance occupancy parameters;
[0139] A second acquisition subunit for obtaining the sum between the tentative performance occupancy parameters of each target performance element type of the same terminal performance to obtain a total performance occupancy parameter;
[0140] A sixth determination subunit for determining the magnitude relationship between the performance occupancy upper limit parameter of all terminal performances and the corresponding total performance occupancy parameter;
[0141] A second processing unit for, if there is at least one terminal performance whose performance occupancy upper limit parameter is less than the corresponding total performance occupancy parameter, re-executing the step of determining the tentative performance parameters of each of the target performance element types in the target game scenario to determine new tentative performance parameters of each of the target performance element types in the target game scenario.
[0142] In some embodiments, the display device of the game scenario includes:
[0143] A seventh determination subunit for, when detecting a scene switching instruction for the current game scenario, determining a target game scenario based on the scene switching instruction;
[0144] A third acquisition subunit for acquiring the scene information of the target game scenario, where the scene information includes the target performance element types required for rendering the picture of the game scenario of the target game.
[0145] In some embodiments, the display device of the game scenario includes:
[0146] An eighth determination subunit for determining whether the current game scenario is the same as the target game scenario based on the scene information of the current game scenario and the scene information of the target game scenario;
[0147] A fourth acquisition subunit for, if not, acquiring the performance occupancy parameters of rendering a single game performance element under each target performance element type and under each terminal performance.
[0148] An embodiment of the present application provides a display device for a game scene. The first acquisition unit 201 acquires the upper limit parameter of performance occupancy of the target game under at least one terminal performance, and determines the type of target performance elements required for rendering the picture of the target game scene. Among them, the performance parameter under a type of target performance element is used to indicate the number of the same type of game performance elements to be rendered in the target game scene; the second acquisition unit 202 acquires the performance occupancy parameter of rendering and processing a single game performance element under each type of target performance element under each terminal performance; the determination unit 203 determines the tentative performance parameters of each type of target performance element in the target game scene, where the tentative performance occupancy parameter of the target game scene for each terminal performance does not exceed the corresponding performance occupancy upper limit parameter, and the tentative performance occupancy parameter is determined based on the tentative performance parameters of each type of target performance element and the corresponding performance occupancy parameter; the calculation unit 204 calculates based on the tentative performance parameters of each type of target performance element and the weight corresponding to each type of target performance element to obtain a tentative performance index value; the adjustment unit 205 adjusts the tentative performance parameters of each type of target performance element based on the tentative performance index value to maximize the tentative performance index value, where the tentative performance parameters corresponding to the maximized tentative performance index value are the target performance parameters; the display unit 206 performs rendering processing on the user interface according to the target performance parameters under each type of target performance element to display the target game scene on the user interface. The embodiment of the present application can match the performance parameter of the type of target performance element required for rendering the picture of the target game scene with the highest degree of matching of the terminal device performance of the target terminal device according to the upper limit parameter of performance occupancy of the target terminal device currently used by the player, so that the performance parameter of the game scene can be determined according to the performance parameter of the specific terminal device used, thereby improving the accuracy of matching the performance parameter of the target terminal device with the game scene and optimizing the rendering effect of the game scene.
[0149] Correspondingly, an embodiment of the present application further provides an electronic device, which can be a terminal or a server. The terminal can be a smart phone, a tablet computer, a notebook computer, a touch screen, a game console, a personal computer (PC), a personal digital assistant (PDA), and other terminal devices. As Figure 4 shown, Figure 4Schematic diagram of the structure of the electronic device provided in the embodiment of the present application. The electronic device 300 includes a processor 301 having one or more processing cores, a memory 302 having one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. Among them, the processor 301 is electrically connected to the memory 302. Those skilled in the art can understand that the structure of the electronic device shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange different components.
[0150] The processor 301 is the control center of the electronic device 300, connects various parts of the entire electronic device 300 through various interfaces and lines, and executes various functions and processes data of the electronic device 300 by running or loading software programs and / or modules stored in the memory 302, and calling data stored in the memory 302, thereby monitoring the electronic device 300 as a whole.
[0151] In the embodiment of the present application, the processor 301 in the electronic device 300 will load the instructions corresponding to the processes of one or more application programs into the memory 302 according to the following steps, and the processor 301 will run the application programs stored in the memory 302 to implement various functions:
[0152] Obtain the upper limit parameter of performance occupancy of the target game under at least one terminal performance, and determine the type of target performance elements required for rendering the screen of the target game scene, where the performance parameter under one type of target performance element is used to indicate the number of the same type of game performance elements to be rendered in the target game scene;
[0153] Obtain the performance occupancy parameter of the rendering process of a single game performance element under each type of target performance element under each terminal performance;
[0154] Determine the tentative performance parameters of each type of target performance element in the target game scene, where the tentative performance occupancy parameter of the target game scene for each terminal performance does not exceed the corresponding upper limit parameter of performance occupancy, and the tentative performance occupancy parameter is determined based on the tentative performance parameters of each type of target performance element and the corresponding performance occupancy parameter;
[0155] Calculate based on the tentative performance parameters of each type of target performance element and the weight corresponding to each type of target performance element to obtain a tentative performance index value;
[0156] Adjust the tentative performance parameters of each of the target performance element types based on the tentative performance index value to maximize the tentative performance index value, where the tentative performance parameters corresponding to the maximized tentative performance index value are the target performance parameters;
[0157] Perform rendering processing on the user interface according to the target performance parameters under each target performance element type to display the target game scene on the user interface.
[0158] In one embodiment, the adjusting the tentative performance parameters of each of the target performance element types based on the tentative performance index value to maximize the tentative performance index value includes:
[0159] Select a reference performance index value from a preset performance index value range;
[0160] Based on the magnitude relationship between the tentative performance index value and the reference performance index value, determine a new performance index value range in the preset performance index value range to replace the preset performance index value range, and return to the step of determining the tentative performance parameters of each of the target performance element types in the target game scene until the new performance index value range cannot be divided and the processing ends, and use the latest tentative performance parameters as the target performance parameters, where the new index value range includes the tentative performance index value.
[0161] In one embodiment, the selecting a reference performance index value from a preset performance index value range includes:
[0162] Perform bisection processing on the preset performance index value range to determine the reference performance index value.
[0163] In one embodiment, after performing bisection processing on the preset performance index value range to determine the reference performance index value, it further includes:
[0164] Determine a first performance index value range and a second performance index value range based on the preset performance index range and the reference performance index value, where the range of the first performance index value range is the range between the minimum value of the preset performance index value range and the reference performance index value, and the range of the second performance index value range is the range between the reference performance index value and the maximum value of the preset performance index value range.
[0165] In one embodiment, the determining a new performance index value range in the preset performance index value range to replace the preset performance index value range based on the magnitude relationship between the tentative performance index value and the reference performance index value includes:
[0166] Determine the magnitude relationship between the tentative performance index value and the reference performance index value;
[0167] If the tentative performance index value is less than the reference performance index value, replace the preset performance index value range with the first performance index value range;
[0168] If the tentative performance index value is greater than or equal to the reference performance index value, replace the preset performance index value range with the second performance index value range.
[0169] In one embodiment, calculating the tentative performance index value based on the tentative performance parameters of each of the target performance element types and the weight corresponding to each target performance element type includes:
[0170] Obtain the product of the tentative performance parameter of the target performance element type and the weight corresponding to the target performance element type, and determine the sub-tentative performance index value of the target performance element type;
[0171] Perform a superposition process on the sub-tentative performance index values of all the target performance element types to determine the total tentative performance index, where the total tentative performance index is the tentative performance index value.
[0172] In one embodiment, after determining the tentative performance parameters of each of the target performance element types in the target game scenario, it further includes:
[0173] Determine the tentative performance occupancy parameter of each target performance element type based on the tentative performance parameter of each target performance element type and the corresponding performance occupancy parameter;
[0174] Obtain the sum between the tentative performance occupancy parameters of each target performance element type of the same terminal performance to obtain the total performance occupancy parameter;
[0175] Determine the magnitude relationship between the performance occupancy upper limit parameter of all terminal performances and the corresponding total performance occupancy parameter;
[0176] If there is at least one terminal performance whose performance occupancy upper limit parameter is less than the corresponding total performance occupancy parameter, re-execute the step of determining the tentative performance parameters of each of the target performance element types in the target game scenario to determine the new tentative performance parameters of each of the target performance element types in the target game scenario.
[0177] In one embodiment, before obtaining the performance occupancy upper limit parameter of the target game under at least one terminal performance and determining the target performance element types required for the screen rendering of the target game scenario, it further includes:
[0178] When detecting a scene switching instruction for the current game scenario, determine the target game scenario based on the scene switching instruction;
[0179] Obtain the scene information of the target game scene, where the scene information includes the types of target performance elements required for rendering the game scene of the target game.
[0180] In one embodiment, before obtaining the performance occupancy parameters of the rendering process of a single game performance element under each type of target performance element for each type of terminal performance, it further includes:
[0181] Based on the scene information of the current game scene and the scene information of the target game scene, determine whether the current game scene is the same as the target game scene;
[0182] If not, obtain the performance occupancy parameters of the rendering process of a single game performance element under each type of target performance element for each type of terminal performance.
[0183] For the specific implementation of each of the above operations, reference can be made to the previous embodiments and will not be elaborated here.
[0184] Optionally, as Figure 4 shown, the electronic device 300 further includes: a touch display screen 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. Among them, the processor 301 is electrically connected to the touch display screen 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307 respectively. Those skilled in the art can understand that Figure 4 the structure of the electronic device shown in
[0185] The touch display screen 303 can be used to display a graphical user interface and receive operation instructions generated by a player acting on the graphical user interface. The touch display screen 303 may include a display panel and a touch panel. Among them, the display panel can be used to display information input by the player or information provided to the player, as well as various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, videos, and any combination thereof. Optionally, the display panel can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. The touch panel can be used to collect touch operations of the player on or near it (such as operations of the player using any suitable object or accessory such as a finger or a stylus on or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute the corresponding program. Optionally, the touch panel can include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the touch position of the player and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 301, and can receive and execute commands sent by the processor 301. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 301 to determine the type of touch event. Subsequently, the processor 301 provides a corresponding visual output on the display panel according to the type of touch event. In the embodiments of the present application, the touch panel and the display panel can be integrated into the touch display screen 303 to achieve input and output functions. However, in some embodiments, the touch panel and the touch panel can be implemented as two independent components to achieve input and output functions. That is, the touch display screen 303 can also be used as part of the input unit 306 to achieve the input function.
[0186] In the embodiments of the present application, the processor 301 executes a game application to generate a graphical user interface on the touch display screen 303. The touch display screen 303 is used to present the graphical user interface and receive operation instructions generated by a player acting on the graphical user interface.
[0187] The radio frequency circuit 304 can be used to transmit and receive radio frequency signals to establish wireless communication with a network device or other electronic devices through wireless communication, and transmit and receive signals with the network device or other electronic devices.
[0188] The audio circuit 305 can be used to provide an audio interface between the player and the electronic device through a speaker and a microphone. The audio circuit 305 can convert the received audio data into an electrical signal and transmit it to the speaker, which converts it into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 305, converted into audio data, and then the audio data is output to the processor 301 for processing. After that, it is sent to another electronic device through the radio frequency circuit 304, or the audio data is output to the memory 302 for further processing. The audio circuit 305 may also include an earphone jack to provide communication between the peripheral earphone and the electronic device.
[0189] The input unit 306 can be used to receive input digital, character information or player characteristic information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal inputs related to player settings and function controls.
[0190] The power supply 307 is used to supply power to each component of the electronic device 300. Optionally, the power supply 307 can be logically connected to the processor 301 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 307 may also include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, and a power status indicator.
[0191] Although Figure 4 not shown in the figure, the electronic device 300 may also include a camera, a sensor, a Wi-Fi module, a Bluetooth module, etc., which will not be elaborated here.
[0192] In the above embodiments, the descriptions of each embodiment have their own focuses. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0193] As can be seen from the above, the electronic device provided in this embodiment can match the performance parameter of the target performance element type required for rendering the target game scene with the highest terminal device performance matching degree of the target terminal device according to the performance occupancy upper limit parameter of the target terminal device currently used by the player, so that the performance parameter of the game scene can be determined according to the performance parameter of the specific terminal device used, thereby improving the accuracy of matching the performance parameter of the game scene of the target terminal device and optimizing the rendering effect of the game scene.
[0194] Those of ordinary skill in the art can understand that all or part of the steps in the above various methods can be completed by instructions or by controlling relevant hardware through instructions. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0195] To this end, an embodiment of the present application provides a computer-readable storage medium, which stores multiple computer programs that can be loaded by a processor to execute the steps in any of the display methods for game scenarios provided by the embodiments of the present application. For example, the computer program can execute the following steps:
[0196] Obtain the upper limit parameter of performance occupancy of the target game under at least one terminal performance, and determine the type of target performance elements required for rendering the screen of the target game scenario, where the performance parameter under one type of target performance element is used to indicate the number of game performance elements of the same type that need to be rendered in the target game scenario;
[0197] Obtain the performance occupancy parameter of rendering and processing a single game performance element under each type of target performance element under each terminal performance;
[0198] Determine the tentative performance parameters of each type of target performance element in the target game scenario, where the tentative performance occupancy parameter of the target game scenario for each terminal performance does not exceed the corresponding upper limit parameter of performance occupancy, and the tentative performance occupancy parameter is determined based on the tentative performance parameters of each type of target performance element and the corresponding performance occupancy parameter;
[0199] Calculate based on the tentative performance parameters of each type of target performance element and the weight corresponding to each type of target performance element to obtain a tentative performance index value;
[0200] Adjust the tentative performance parameters of each type of target performance element based on the tentative performance index value to maximize the tentative performance index value, where the tentative performance parameters corresponding to the tentative performance index value at the maximum are the target performance parameters;
[0201] Perform rendering processing on the user interface according to the target performance parameters of each type of target performance element to display the target game scenario on the user interface.
[0202] In one embodiment, the adjusting the tentative performance parameters of each type of target performance element based on the tentative performance index value to maximize the tentative performance index value includes:
[0203] Select a reference performance index value from a preset performance index value range;
[0204] Based on the magnitude relationship between the tentative performance metric value and the reference performance metric value, determine a new performance metric value range from the preset performance metric value range to replace the preset performance metric value range, and return the step of determining the tentative performance parameters of each of the target performance element types in the target game scenario until the new performance metric value range cannot be divided and the process ends, and use the latest tentative performance parameters as the target performance parameters, where the new metric value range includes the tentative performance metric value.
[0205] In one embodiment, the selecting a reference performance metric value from the preset performance metric value range includes:
[0206] Perform a dichotomy process on the preset performance metric value range to determine the reference performance metric value.
[0207] In one embodiment, after performing a dichotomy process on the preset performance metric value range to determine the reference performance metric value, it further includes:
[0208] Based on the preset performance metric range and the reference performance metric value, determine a first performance metric value range and a second performance metric value range, where the range of the first performance metric value range is the range between the minimum value of the preset performance metric value range and the reference performance metric value, and the range of the second performance metric value range is the range between the reference performance metric value and the maximum value of the preset performance metric value range.
[0209] In one embodiment, the determining a new performance metric value range from the preset performance metric value range to replace the preset performance metric value range based on the magnitude relationship between the tentative performance metric value and the reference performance metric value includes:
[0210] Determine the magnitude relationship between the tentative performance metric value and the reference performance metric value;
[0211] If the tentative performance metric value is less than the reference performance metric value, then replace the preset performance metric value range with the first performance metric value range;
[0212] If the tentative performance metric value is greater than or equal to the reference performance metric value, then replace the preset performance metric value range with the second performance metric value range.
[0213] In one embodiment, the calculating a tentative performance metric value based on the tentative performance parameters of each of the target performance element types and the weight corresponding to each target performance element type includes:
[0214] Obtain the product of the tentative performance parameter of the target performance element type and the weight corresponding to the target performance element type, and determine the sub-tentative performance metric value of the target performance element type;
[0215] Superimpose the sub-tentative performance index values of all the target performance element types to determine the total tentative performance index, where the total tentative performance index is the tentative performance index value.
[0216] In one embodiment, after determining the tentative performance parameters of each of the target performance element types in the target game scenario, it further includes:
[0217] Determine the tentative performance occupancy parameters of each target performance element type based on the tentative performance parameters of each target performance element type and the corresponding performance occupancy parameters;
[0218] Obtain the sum between the tentative performance occupancy parameters of each target performance element type with the same terminal performance to obtain the total performance occupancy parameter;
[0219] Determine the magnitude relationship between the performance occupancy upper limit parameter of all terminal performances and the corresponding total performance occupancy parameter;
[0220] If there is at least one terminal performance whose performance occupancy upper limit parameter is less than the corresponding total performance occupancy parameter, then re-execute the step of determining the tentative performance parameters of each of the target performance element types in the target game scenario to determine the new tentative performance parameters of each of the target performance element types in the target game scenario.
[0221] In one embodiment, before obtaining the performance occupancy upper limit parameter of the target game under at least one terminal performance and determining the target performance element types required for rendering the screen of the target game scenario, it further includes:
[0222] When detecting a scene switching instruction for the current game scenario, determine the target game scenario based on the scene switching instruction;
[0223] Obtain the scene information of the target game scenario, where the scene information includes the target performance element types required for rendering the screen of the game scenario of the target game.
[0224] In one embodiment, before obtaining the performance occupancy parameter of the rendering process of a single game performance element under each target performance element type and under each terminal performance, it further includes:
[0225] Based on the scene information of the current game scenario and the scene information of the target game scenario, determine whether the current game scenario is the same as the target game scenario;
[0226] If not, then obtain the performance occupancy parameter of the rendering process of a single game performance element under each target performance element type and under each terminal performance.
[0227] For the specific implementation of each of the above operations, reference may be made to the previous embodiments and will not be elaborated herein.
[0228] Among them, the storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc.
[0229] Since the computer program stored in the storage medium can execute the steps in any of the game scene display methods provided in the embodiments of the present application, the computer program stored in the storage medium provided in this embodiment can match the performance parameter of the target presentation element type required to render the target game scene with the highest terminal device performance matching degree according to the performance occupancy upper limit parameter of the target terminal device currently used by the player, so that the presentation parameter of the game scene can be determined according to the performance parameter of the specific terminal device used, thereby improving the accuracy of the target terminal device in matching the presentation parameter of the game scene and optimizing the rendering effect of the game scene.
[0230] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0231] The above has introduced in detail a game scene display method, device, electronic device and storage medium provided by the embodiments of the present application. Specific examples are used herein to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the technical solution and its core idea of the present application; those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for displaying a game scene, characterized in that, Including: Obtaining the upper limit parameter of performance occupancy of a target game under at least one terminal performance, and determining the type of target performance elements required for rendering the screen of the target game scene, wherein the performance parameter under one type of target performance element is used to indicate the number of the same type of game performance elements to be rendered in the target game scene, and the upper limit parameter of performance occupancy includes at least one of the upper limit parameter of memory occupancy, the upper limit parameter of video memory occupancy, and frame consumption; Obtaining the performance occupancy parameter of rendering and processing a single game performance element under each type of target performance element under each terminal performance; Determining the tentative performance parameters of each type of target performance element in the target game scene, wherein the tentative performance occupancy parameter of the target game scene for each terminal performance does not exceed the corresponding upper limit parameter of performance occupancy, and the tentative performance occupancy parameter is determined based on the tentative performance parameters of each type of target performance element and the corresponding performance occupancy parameter; Obtaining the product of the tentative performance parameter of the target performance element type and the weight corresponding to the target performance element type, and determining the sub-tentative performance index value of the target performance element type; Performing a superposition process on the sub-tentative performance index values of all the target performance element types to determine the total tentative performance index, wherein the total tentative performance index is the tentative performance index value; Adjusting the tentative performance parameters of each type of target performance element based on the tentative performance index value to maximize the tentative performance index value, wherein the tentative performance parameters corresponding to the tentative performance index value at the maximum are the target performance parameters; Performing a rendering process on the user interface according to the target performance parameters under each type of target performance element to display the target game scene on the user interface.
2. The method for displaying a game scene according to claim 1, characterized in that, The adjusting the tentative performance parameters of each type of target performance element based on the tentative performance index value to maximize the tentative performance index value includes: Selecting a reference performance index value from a preset performance index value range; Based on the magnitude relationship between the tentative performance index value and the reference performance index value, determining a new performance index value range in the preset performance index value range to replace the preset performance index value range, and returning to the step of determining the tentative performance parameters of each type of target performance element in the target game scene until the new performance index value range cannot be divided and the process ends, and using the latest tentative performance parameters as the target performance parameters, wherein the new index value range includes the tentative performance index value.
3. The method for displaying a game scene according to claim 2, characterized in that, The selecting a reference performance index value from a preset performance index value range includes: Performing a dichotomy process on the preset performance index value range to determine the reference performance index value.
4. The method for displaying a game scene according to claim 3, characterized in that, After performing the dichotomy process on the preset performance index value range to determine the reference performance index value, it further includes: Determine a first performance metric value range and a second performance metric value range based on the preset performance metric value range and the reference performance metric value, where the range of the first performance metric value range is the range between the minimum value of the preset performance metric value range and the reference performance metric value, and the range of the second performance metric value range is the range between the reference performance metric value and the maximum value of the preset performance metric value range.
5. The method for displaying a game scene according to claim 4, characterized in that, The step of determining a new performance metric value range from the preset performance metric value range to replace the preset performance metric value range based on the magnitude relationship between the tentative performance metric value and the reference performance metric value includes: Determine the magnitude relationship between the tentative performance metric value and the reference performance metric value; If the tentative performance metric value is less than the reference performance metric value, then replace the preset performance metric value range with the first performance metric value range; If the tentative performance metric value is greater than or equal to the reference performance metric value, then replace the preset performance metric value range with the second performance metric value range.
6. The method for displaying a game scene according to claim 1, characterized in that, After determining the tentative performance parameters of each of the target performance element types in the target game scenario, it further includes: Determine the tentative performance occupancy parameters of each of the target performance element types based on the tentative performance parameters of each of the target performance element types and the corresponding performance occupancy parameters; Obtain the sum of the tentative performance occupancy parameters of each of the target performance element types with the same terminal performance to obtain the total performance occupancy parameter; Determine the magnitude relationship between the performance occupancy upper limit parameter of all terminal performances and the corresponding total performance occupancy parameter; If there is at least one performance occupancy upper limit parameter of the terminal performance that is less than the corresponding total performance occupancy parameter, then re-execute the step of determining the tentative performance parameters of each of the target performance element types in the target game scenario to determine the new tentative performance parameters of each of the target performance element types in the target game scenario.
7. The method for displaying a game scene according to claim 1, characterized in that, Before obtaining the performance occupancy upper limit parameter of the target game under at least one terminal performance and determining the target performance element types required for rendering the screen of the target game scenario, it further includes: When detecting a scene switching instruction for the current game scenario, determine the target game scenario based on the scene switching instruction; Obtain the scene information of the target game scenario, where the scene information includes the target performance element types required for rendering the screen of the game scenario of the target game.
8. The method for displaying a game scene according to claim 7, characterized in that, Before obtaining the performance occupancy parameters of the rendering process of a single game performance element under each target performance element type and each terminal performance, it further includes: Based on the scene information of the current game scenario and the scene information of the target game scenario, determine whether the current game scenario is the same as the target game scenario; If not, then obtain the performance occupancy parameters of the rendering process of a single game performance element under each target performance element type and each terminal performance.
9. A display device for a game scene, characterized in that, It includes: A first acquisition unit, configured to acquire upper limit parameters of performance occupancy of a target game under at least one terminal performance, and determine a type of target performance element required for rendering a picture of a target game scene, where performance parameters under a type of target performance element are used to indicate the number of the same type of game performance elements to be rendered in the target game scene, and the upper limit parameters of performance occupancy include at least one of an upper limit parameter of memory occupancy, an upper limit parameter of video memory occupancy, and frame consumption; A second acquisition unit, configured to acquire performance occupancy parameters of rendering processing of a single game performance element under each type of target performance element under each terminal performance; A determination unit, configured to determine tentative performance parameters of each type of target performance element in the target game scene, where tentative performance occupancy parameters of the target game scene for each terminal performance do not exceed corresponding upper limit parameters of performance occupancy, and the tentative performance occupancy parameters are determined based on tentative performance parameters of each type of target performance element and corresponding performance occupancy parameters; A calculation unit, configured to obtain a product of tentative performance parameters of a type of target performance element and a weight corresponding to the type of target performance element, and determine a sub-tentative performance index value of the type of target performance element; perform a superposition process on sub-tentative performance index values of all types of target performance elements to determine a total tentative performance index, where the total tentative performance index is a tentative performance index value; An adjustment unit, configured to adjust the tentative performance parameters of each type of target performance element based on the tentative performance index value so that the tentative performance index value is maximized, where the tentative performance parameters corresponding to the maximized tentative performance index value are target performance parameters; A display unit, configured to perform rendering processing on a user interface according to target performance parameters under each type of target performance element, so as to display the target game scene on the user interface.
10. An electronic device, characterized in that, The electronic device includes a memory and a processor, where a computer program is stored in the memory, and the processor executes the steps in the display method of the game scene according to any one of claims 1 to 8 by calling the computer program stored in the memory.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the steps in the display method of the game scene according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method and device for resource processing in games, electronic equipment and storage medium
CN110052032A
Rendering method and device in game, electronic equipment and readable storage medium
CN111260767A