Rendering Distance Adaptation Method, Device, Game Processing Device, and Readable Storage Medium

By dynamically adjusting the rendering distance of game frames, the problem of unbalanced rendering frame rate and scene details is solved, and the number of game models renderings is increased while maintaining the rendering frame rate stable, improving the player experience.

CN114367104BActive Publication Date: 2025-07-08BEIJING PIXEL SOFTWARE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111615598.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-27
Publication Date
2025-07-08
Estimated Expiration
2041-12-27

AI Technical Summary

Technical Problem

The prior art cannot provide sufficient amount of game scene details while maintaining the game rendering frame rate stable, resulting in uneven player game experience.

Method used

By dynamically adjusting the rendering distance of the game frame, increasing or reducing the rendering distance of the previous frame according to the changes in rendering time, to keep the rendering frame rate stable and increase the number of game models rendered.

Benefits of technology

It realizes the rendering frame rate as stable as possible to render as many game models as possible, improving the balance between game fluency and scene details and improving player experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114367104B_ABST
    Figure CN114367104B_ABST
Patent Text Reader

Abstract

The present application provides a rendering distance adaptation method and apparatus, a game processing device, and a readable storage medium, relating to the technical field of image rendering. When the single-frame rendering working time of a target game in the current game frame is obtained and it is detected that the single-frame rendering working time is outside the expected single-frame rendering time range, for the purpose of adapting the single-frame rendering working time to be within the expected single-frame rendering time range, the game rendering distance of the previous game frame of the target game in the current game frame is increased or decreased as the game rendering distance of the current game frame, and the dynamic adjustment operation of the game rendering distance of the target game in different game frames is completed, so that in the actual rendering process of the target game, as many game models as possible can be selected for rendering on the basis of maintaining the stability of the game rendering frame rate, thereby effectively maintaining the balance between the game smoothness and the amount of game scene details and improving the player game experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of image rendering, and in particular, to a rendering distance adaptation method and device, a game processing device, and a readable storage medium. Background Art

[0002] With the continuous development of science and technology, 3D games can be run on mobile terminals, so that players can use mobile terminals for game entertainment. During the operation of a 3D game, the rendering frame rate of the 3D game by the mobile terminal is an important factor affecting the smoothness of the game operation. For a single game frame, generally, the rendering distance is used to characterize the size of the model data of the models that need to be rendered within the corresponding game frame. The larger the rendering distance, the greater the rendering time required for the corresponding game frame, resulting in a smaller game rendering frame rate.

[0003] However, it should be noted that the relevant factors affecting the player experience include not only the smoothness of the game operation but also the amount of game scene details. The larger the rendering distance, the more detailed game scene content can be provided to the player. Therefore, in order to ensure the player game experience, how to maintain the balance between the game smoothness and the amount of game scene details is an important problem that needs to be solved urgently at present. Summary of the Invention

[0004] In view of this, the purpose of the present application is to provide a rendering distance adaptation method and device, a game processing device, and a readable storage medium, which can dynamically adjust the game rendering distance of different game frames, so as to select as many game models for rendering as possible on the basis of maintaining the stability of the game rendering frame rate, thereby effectively maintaining the balance between the game smoothness and the amount of game scene details and improving the player game experience.

[0005] In order to achieve the above purpose, the technical solutions adopted in the embodiments of the present application are as follows:

[0006] In a first aspect, the present application provides a rendering distance adaptation method, and the method includes:

[0007] Obtain the single-frame rendering working time of the target game in the current game frame;

[0008] Detect whether the single-frame rendering working time is within the range of the expected single-frame rendering time;

[0009] In the case where it is detected that the single-frame rendering working time is outside the range of the expected single-frame rendering time, for the purpose of adapting to place the single-frame rendering working time within the range of the expected single-frame rendering time, increase or decrease the game rendering distance of the previous game frame of the target game in the current game frame as the game rendering distance of the current game frame, where the rendering time and the game rendering distance of the same game frame are positively correlated.

[0010] In an alternative embodiment, the step of obtaining the single-frame rendering time consumption of the target game in the current game frame includes:

[0011] Obtain the respective historical rendering time consumptions of a fixed number of consecutive historical game frames before the current game frame of the target game, where the fixed number of historical game frames are adjacent to the current game frame;

[0012] Perform an average value operation on the historical rendering time consumptions of the fixed number of historical game frames to obtain the single-frame rendering time consumption.

[0013] In an alternative embodiment, the step of, in the case where it is detected that the single-frame rendering time consumption is outside the single-frame rendering expected time consumption range, adjusting the game rendering distance of the previous game frame of the target game in the current game frame up or down to adapt the single-frame rendering time consumption to be within the single-frame rendering expected time consumption range includes:

[0014] In the case where it is detected that the single-frame rendering time consumption is greater than the upper limit of the expected time consumption of the single-frame rendering expected time consumption range, perform a reduction process on the game rendering distance of the previous game frame of the target game in the current game frame according to a fixed inter-frame adjustment distance to obtain a first target rendering distance;

[0015] Take the first target rendering distance as the game rendering distance of the target game in the current game frame.

[0016] In an alternative embodiment, the step of performing a reduction process on the game rendering distance of the previous game frame of the target game in the current game frame according to a fixed inter-frame adjustment distance to obtain a target rendering distance includes:

[0017] Reduce the game rendering distance of the previous game frame of the target game in the current game frame according to the fixed inter-frame adjustment distance to obtain a corresponding first rendering distance;

[0018] Compare the first rendering distance with a preset adaptation distance lower limit to obtain a corresponding comparison result;

[0019] If the comparison result is that the first rendering distance is less than the adaptation distance lower limit, configure the adaptation distance lower limit as the first target rendering distance; otherwise, configure the first rendering distance as the first target rendering distance.

[0020] In an alternative embodiment, the step of adjusting the game rendering distance of the previous game frame of the target game in the current game frame up or down to adapt to the single-frame rendering working time being within the expected single-frame rendering time range when it is detected that the single-frame rendering working time is outside the expected single-frame rendering time range further includes:

[0021] When it is detected that the single-frame rendering working time is less than the lower limit of the expected single-frame rendering time range, the game rendering distance of the previous game frame of the target game in the current game frame is increased according to a fixed inter-frame adjustment distance to obtain a second target rendering distance;

[0022] The second target rendering distance is used as the game rendering distance of the target game in the current game frame.

[0023] In an alternative embodiment, the step of increasing the game rendering distance of the previous game frame of the target game in the current game frame according to a fixed inter-frame adjustment distance to obtain a second target rendering distance includes:

[0024] Increase the game rendering distance of the previous game frame of the target game in the current game frame according to the fixed inter-frame adjustment distance to obtain a corresponding second rendering distance;

[0025] Compare the second rendering distance with a preset upper limit of the adaptation distance to obtain a corresponding comparison result;

[0026] If the comparison result is that the second rendering distance is greater than the upper limit of the adaptation distance, the upper limit of the adaptation distance is configured as the second target rendering distance; otherwise, the second rendering distance is configured as the second target rendering distance.

[0027] In an alternative embodiment, the method further includes:

[0028] Configure the lower limit of the expected single-frame rendering time range, the upper limit of the expected single-frame rendering time range, a fixed number, a fixed inter-frame adjustment distance, an upper limit of the adaptation distance, and a lower limit of the adaptation distance.

[0029] In a second aspect, the present application provides a rendering distance adaptation device, where the device includes:

[0030] A rendering time acquisition module, configured to acquire the single-frame rendering working time of a target game in a current game frame;

[0031] A frame rate stability detection module, configured to detect whether the single-frame rendering working time is within an expected single-frame rendering time range;

[0032] A rendering distance adjustment module, configured to, when it is detected that the single-frame rendering working time is outside the expected single-frame rendering time range, adjust the game rendering distance of the previous game frame of the target game in the current game frame up or down as the game rendering distance of the current game frame for the purpose of adapting the single-frame rendering working time within the expected single-frame rendering time range, where the rendering time of the same game frame and the game rendering distance are positively correlated.

[0033] In an alternative embodiment, the device further includes:

[0034] A rendering information configuration module, configured to configure the lower limit of the expected time, the upper limit of the expected time, the fixed number, the fixed inter-frame adjustment distance, the upper limit of the adaptation distance, and the lower limit of the adaptation distance of the expected single-frame rendering time range.

[0035] In a third aspect, the present application provides a game processing device, including a processor and a memory. The memory stores a computer program that can be executed by the processor, and the processor can execute the computer program to implement the rendering distance adaptation method described in any one of the foregoing embodiments.

[0036] In a fourth aspect, the present application provides a readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the rendering distance adaptation method described in any one of the foregoing embodiments is implemented.

[0037] In this case, the beneficial effects of the embodiments of the present application include the following:

[0038] When the present application obtains the single-frame rendering working time of the target game in the current game frame and detects that the single-frame rendering working time is outside the expected single-frame rendering time range, it will adjust the game rendering distance of the previous game frame of the target game in the current game frame up or down as the game rendering distance of the current game frame for the purpose of adapting the single-frame rendering working time within the expected single-frame rendering time range, and complete the dynamic adjustment operation of the game rendering distance of the target game in different game frames, so that the target game can select as many game models as possible for rendering on the basis of maintaining the stability of the game rendering frame rate during the actual rendering process, thereby effectively maintaining the balance between the game smoothness and the amount of game scene details and improving the player's game experience.

[0039] To make the above objects, features, and advantages of the present application more obvious and understandable, the following specific preferred embodiments are given, and in conjunction with the accompanying drawings, the detailed description is as follows. Description of the Drawings

[0040] To more clearly illustrate the technical solutions of the embodiments of the present application, the accompanying drawings required for the embodiments will be briefly introduced below. It should be understood that the following accompanying drawings only show some embodiments of the present application, and thus should not be regarded as limiting the scope. For those of ordinary skill in the art, without creative efforts, other related accompanying drawings can also be obtained based on these drawings.

[0041] Figure 1 Schematic diagram of the composition of the game processing device provided by the embodiment of the present application;

[0042] Figure 2 One of the schematic flowcharts of the rendering distance adaptation method provided by the embodiment of the present application;

[0043] Figure 3 Another schematic flowchart of the rendering distance adaptation method provided by the embodiment of the present application;

[0044] Figure 4 One of the schematic diagrams of the composition of the rendering distance adaptation device provided by the embodiment of the present application;

[0045] Figure 5 Another schematic diagram of the composition of the rendering distance adaptation device provided by the embodiment of the present application.

[0046] Icons: 10 - Game processing device; 11 - Memory; 12 - Processor; 13 - Communication unit; 100 - Rendering distance adaptation device; 110 - Rendering time consumption acquisition module; 120 - Frame rate stability detection module; 130 - Rendering distance adjustment module; 140 - Rendering information configuration module. Detailed implementation manners

[0047] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. Usually, the components of the embodiments of the present application described and illustrated in the accompanying drawings here can be arranged and designed in various different configurations.

[0048] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application claimed, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.

[0049] It should be noted that: Similar reference numerals and letters indicate similar items in the following accompanying drawings. Therefore, once an item is defined in one accompanying drawing, it does not need to be further defined and explained in subsequent accompanying drawings.

[0050] In the description of the present application, it should be understood that relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising a..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood in specific circumstances.

[0051] Through painstaking research, the applicant has found that the existing game rendering solution directly sets the game rendering distance of a single game frame to a very low fixed value to ensure that the final game rendering frame rate is maintained at a relatively high level, thereby ensuring good smoothness during game operation. However, this game rendering solution actually fails to display sufficient game scene detail content to players, substantially affecting the player game experience and failing to achieve a balance between game smoothness and the amount of game scene details.

[0052] The following will, with reference to the accompanying drawings, elaborate on some embodiments of the present application. Without conflict, the following embodiments and the features in the embodiments may be combined with each other.

[0053] Please refer to Figure 1 , Figure 1 which is a schematic diagram of the composition of the game processing device 10 provided by an embodiment of the present application. In the embodiment of the present application, the game processing device 10 can dynamically adjust the game rendering distance of different game frames for a target game, enabling the target game to select as many game models as possible for rendering during actual rendering while maintaining the stability of the game rendering frame rate, thereby effectively maintaining the balance between game smoothness and the amount of game scene details and enhancing the player game experience. Among them, the game processing device 10 can be a mobile terminal directly running the target game, or a game server or other terminal devices communicatively connected to the mobile terminal running the target game, where the mobile terminal can be, but is not limited to, a smart phone, a tablet computer, a laptop computer, etc.

[0054] In this embodiment, the game processing device 10 may include a memory 11, a processor 12, a communication unit 13, and a rendering distance adaptation device 100. Each of the memory 11, the processor 12, and the communication unit 13 is directly or indirectly electrically connected to each other to achieve data transmission or interaction. For example, these components, namely the memory 11, the processor 12, and the communication unit 13, may be electrically connected to each other through one or more communication buses or signal lines.

[0055] In this embodiment, the memory 11 may be, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. Among them, the memory 11 is used to store a computer program, and after receiving an execution instruction, the processor 12 can execute the computer program accordingly.

[0056] In this embodiment, the memory 11 is further used to store the expected time range for rendering a single frame of the target game. The expected time range for rendering a single frame is used to characterize the numerical range of the time required for rendering a single frame when the target game is stably maintained around the expected frame rate. The expected time range for rendering a single frame includes a lower limit of the expected time and an upper limit of the expected time. The lower limit and the upper limit of the expected time can be obtained by calculating the target time required for rendering a single frame corresponding to the expected frame rate, and then selecting a specific fluctuation coefficient to perform boundary time calculation processing based on the calculated target time required for rendering a single frame.

[0057] Taking the expected frame rate of 30 frames per second as an example, the target time required for rendering a single frame corresponding to this expected frame rate is 33 milliseconds. At this time, if 0.1 is selected as the specific fluctuation coefficient, the lower limit of the expected time can be obtained by calculating (1 - 0.1) * 33 = 29.7 milliseconds based on this target time required for rendering a single frame, and the upper limit of the expected time can be obtained by calculating (1 + 0.1) * 33 = 36.3 milliseconds based on this target time required for rendering a single frame.

[0058] In this embodiment, the memory 11 is further configured to store the effective range of the rendering distance of the target game. The effective range of the rendering distance is used to characterize the numerical range of the rendering distance that can be rendered when a single game frame in the target game is rendered. The effective range of the rendering distance includes the corresponding upper adaptation distance limit and the lower adaptation distance limit. The upper adaptation distance limit is used to represent the maximum rendering distance, and the lower adaptation distance limit is used to represent the minimum rendering distance. The memory 11 is further configured to store a fixed inter-frame adjustment distance. The fixed inter-frame adjustment distance is used to represent the fixed rendering distance value that can be adjusted when the game rendering distance of the game model needs to be increased or decreased between two adjacent game frames.

[0059] In this embodiment, the processor 12 may be an integrated circuit chip with signal processing capabilities. The processor 12 may be a general-purpose processor, including at least one of a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc., and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application.

[0060] In this embodiment, the communication unit 13 is used to establish a communication connection between the game processing device 10 and other electronic devices through a network and transmit and receive data through the network, where the network includes a wired communication network and a wireless communication network. For example, the game processing device 10 can obtain the respective historical rendering times of a plurality of historical game frames before the current game frame of the target game through the communication unit 13.

[0061] In this embodiment, the rendering distance adaptation device 100 includes at least one software function module that can be stored in the memory 11 in the form of software or firmware or in the operating system of the game processing device 10. The processor 12 can be used to execute the executable modules stored in the memory 11, such as the software function modules and computer programs included in the rendering distance adaptation device 100. The game processing device 10 can dynamically adjust the game rendering distance of the target game in different game frames through the rendering distance adaptation device 100, so that the target game can select as many game models as possible for rendering while maintaining the stability of the game rendering frame rate during the actual rendering process, thereby effectively maintaining the balance between the game smoothness and the amount of game scene details and enhancing the player's game experience.

[0062] It is understandable that Figure 1 the block diagram shown is only a schematic diagram of the composition of the game processing device 10, and the game processing device 10 may further include more or fewer components than those shown in Figure 1 or have a configuration different from that shown in Figure 1 the figure. Figure 1 Each component shown in may be implemented by hardware, software, or a combination thereof.

[0063] In this application, to ensure that the game processing device 10 can complete the dynamic adjustment operation of the game rendering distance of the target game in different game frames, so that the target game can select as many game models as possible for rendering on the basis of maintaining the stability of the game rendering frame rate during the actual rendering process, so as to effectively maintain the balance between the game smoothness and the amount of game scene details and improve the player game experience, the embodiments of this application implement the foregoing functions by providing a rendering distance adaptation method. The rendering distance adaptation method provided by this application will be elaborated in detail below.

[0064] Please refer to Figure 2 , Figure 2 which is one of the flow schematic diagrams of the rendering distance adaptation method provided by the embodiments of this application. In the embodiments of this application Figure 2 the rendering distance adaptation method shown may include steps S210 to S230 to complete the dynamic adjustment operation of the game rendering distance of the target game in different game frames, so that the target game can select as many game models as possible for rendering on the basis of maintaining the stability of the game rendering frame rate during the actual rendering process, thereby effectively maintaining the balance between the game smoothness and the amount of game scene details and improving the player game experience.

[0065] Step S210, obtain the time consumed for the single-frame rendering work of the target game in the current game frame.

[0066] In this embodiment, the time consumed for the single-frame rendering work is used to represent the rendering duration required for rendering a single game frame during the continuous operation of the target game before rendering the current game frame.

[0067] In an implementation manner of this embodiment, the historical rendering time of the previous historical game frame of the current game frame may be directly used as the time consumed for the single-frame rendering work of the current game frame.

[0068] In another implementation manner of this embodiment, the historical rendering times of a continuous plurality of historical game frames adjacent to the current game frame may be combined to generate a single-frame rendering duration representing the average running state of the target game before rendering the current game frame, and this single-frame rendering duration may be used as the time consumed for the single-frame rendering work of the current game frame.

[0069] Accordingly, the step of obtaining the single-frame rendering time consumption of the target game in the current game frame may include:

[0070] Obtain the historical rendering time consumption of each of a consecutive fixed number of historical game frames before the current game frame of the target game, where the fixed number of historical game frames are adjacently distributed to the current game frame, and the fixed number is at least one;

[0071] Perform an average value operation on the historical rendering time consumption of the fixed number of historical game frames to obtain the single-frame rendering time consumption.

[0072] Step S220, detect whether the single-frame rendering time consumption is within the single-frame rendering expected time consumption range.

[0073] In this embodiment, the game processing device 10 can compare the obtained single-frame rendering time consumption with the expected time consumption upper limit and the expected time consumption lower limit corresponding to the single-frame rendering expected time consumption range, and when the single-frame rendering time consumption is between the expected time consumption lower limit and the expected time consumption upper limit, determine that the single-frame rendering time consumption is within the single-frame rendering expected time consumption range, while when the single-frame rendering time consumption is less than the expected time consumption lower limit or the single-frame rendering time consumption is greater than the expected time consumption upper limit, determine that the single-frame rendering time consumption is outside the single-frame rendering expected time consumption range.

[0074] Step S230, in the case where it is detected that the single-frame rendering time consumption is outside the single-frame rendering expected time consumption range, for the purpose of adapting to make the single-frame rendering time consumption fall within the single-frame rendering expected time consumption range, increase or decrease the game rendering distance of the previous game frame of the target game in the current game frame as the game rendering distance of the current game frame.

[0075] In this embodiment, when the game processing device 10 detects that the time consumed for the single-frame rendering task is outside the range of the expected time consumed for single-frame rendering, it indicates that the target game is not currently running stably around the expected frame rate. To adjust the current rendering frame rate of the target game to within the range of the expected frame rate, it is necessary to use the characteristic that the rendering time consumed for the same game frame is positively correlated with the game rendering distance, and adjust the game rendering distance of the previous game frame of the target game in the current game frame up or down as the game rendering distance of the current game frame. Thus, to a certain extent, the time consumed for single-frame rendering during the actual rendering of the current game frame is made to approach the range of the expected time consumed for single-frame rendering. Eventually, the target game can continue to run around the expected frame rate, and the game rendering distances of different game frames can be different from each other, so as to complete the dynamic adjustment operation of the game rendering distances of the target game in different game frames, enabling the target game to select as many game models for rendering as possible while maintaining the stability of the game rendering frame rate during the actual rendering process, thereby effectively maintaining the balance between game smoothness and the amount of game scene details and enhancing the player's game experience.

[0076] When the game processing device 10 detects that the time consumed for the single-frame rendering task is within the range of the expected time consumed for single-frame rendering, it indicates that the target game is currently running stably around the expected frame rate. At this time, there is no need to use the characteristic that the rendering time consumed for the same game frame is positively correlated with the game rendering distance to adjust the game rendering distance of the current game frame. That is, directly use the game rendering distance of the previous game frame of the target game in the current game frame as the game rendering distance of the current game frame to ensure that the target game can select as many game models for rendering as possible while maintaining the stability of the game rendering frame rate during the actual rendering process.

[0077] Therefore, this application can complete the dynamic adjustment operation of the game rendering distances of the target game in different game frames by executing the above steps S210 to S230, enabling the target game to select as many game models for rendering as possible while maintaining the stability of the game rendering frame rate during the actual rendering process, thereby effectively maintaining the balance between game smoothness and the amount of game scene details and enhancing the player's game experience.

[0078] In the embodiment of this application, the step of adjusting the game rendering distance of the previous game frame of the target game up or down as the game rendering distance of the current game frame for the purpose of adapting to place the time consumed for the single-frame rendering task within the range of the expected time consumed for single-frame rendering when it is detected that the time consumed for the single-frame rendering task is outside the range of the expected time consumed for single-frame rendering includes:

[0079] When it is detected that the time taken for the single-frame rendering work is greater than the upper limit of the expected time taken within the expected time range for single-frame rendering, the game rendering distance of the previous game frame of the target game in the current game frame is adjusted to be smaller according to a fixed inter-frame adjustment distance, so as to obtain a first target rendering distance;

[0080] Use the first target rendering distance as the game rendering distance of the target game in the current game frame.

[0081] Among them, when the time taken for the single-frame rendering work is greater than the upper limit of the expected time taken within the expected time range for single-frame rendering, it can be indicated that the game rendering distance of the previous game frame of the target game in the current game frame is too large, and the amount of game scene details to be rendered in the current game frame needs to be reduced, so that the current game frame rate of the target game approaches the expected frame rate. At this time, the game rendering distance of the previous game frame of the target game can be directly adjusted to be smaller according to the preset fixed inter-frame adjustment distance to obtain the game rendering distance of the current game frame.

[0082] During this process, since the target game needs to provide game scene details to players, there will be a lower limit of the adaptation distance corresponding to the target game. At this time, the step of adjusting the game rendering distance of the previous game frame of the target game in the current game frame to be smaller according to the fixed inter-frame adjustment distance to obtain a first target rendering distance may include:

[0083] Adjust the game rendering distance of the previous game frame of the target game in the current game frame to be smaller according to the fixed inter-frame adjustment distance to obtain a corresponding first rendering distance;

[0084] Compare the first rendering distance with the preset lower limit of the adaptation distance to obtain a corresponding comparison result;

[0085] If the comparison result is that the first rendering distance is less than the lower limit of the adaptation distance, configure the lower limit of the adaptation distance as the first target rendering distance; otherwise, configure the first rendering distance as the first target rendering distance.

[0086] In the embodiment of the present application, the step of, when it is detected that the time taken for the single-frame rendering work is outside the expected time range for single-frame rendering, adjusting the game rendering distance of the previous game frame of the target game in the current game frame to be larger or smaller as the game rendering distance of the current game frame for the purpose of adapting the time taken for the single-frame rendering work to be within the expected time range for single-frame rendering may further include:

[0087] When it is detected that the time taken for the single-frame rendering work is less than the lower limit of the expected time taken within the expected time range for single-frame rendering, the game rendering distance of the previous game frame of the target game in the current game frame is adjusted to be larger according to the fixed inter-frame adjustment distance to obtain a second target rendering distance;

[0088] Use the second target rendering distance as the game rendering distance of the target game in the current game frame.

[0089] Among them, when the time-consuming of single-frame rendering work is less than the lower limit of the expected time-consuming in the expected time-consuming range of single-frame rendering, it can be indicated that the game rendering distance of the target game in the previous game frame of the current game frame is too small, and it is necessary to increase the amount of game scene details to be rendered in the current game frame, so that the current game frame rate of the target game approaches the expected frame rate. At this time, the fixed inter-frame adjustment distance preset can be directly used to increase the game rendering distance of the target game in the previous game frame of the current game frame to obtain the game rendering distance of the current game frame.

[0090] During this process, in order to ensure that the rendering frame rate of the target game approaches the expected frame rate, there will be a corresponding upper limit of the adaptation distance for the target game. At this time, the step of increasing the game rendering distance of the target game in the previous game frame of the current game frame according to the fixed inter-frame adjustment distance to obtain the second target rendering distance may include:

[0091] Increase the game rendering distance of the target game in the previous game frame of the current game frame according to the fixed inter-frame adjustment distance to obtain the corresponding second rendering distance;

[0092] Compare the second rendering distance with the preset upper limit of the adaptation distance to obtain the corresponding comparison result;

[0093] If the comparison result is that the second rendering distance is greater than the upper limit of the adaptation distance, then configure the upper limit of the adaptation distance as the second target rendering distance, otherwise configure the second rendering distance as the second target rendering distance.

[0094] Therefore, through the specific sub-step content of executing the above steps, the present application can make the time-consuming of single-frame rendering during the actual rendering of the current game frame approach the expected time-consuming range of single-frame rendering, and finally enable the target game to continuously run around the expected frame rate while the game rendering distances of different game frames can be different from each other, so as to complete the dynamic adjustment operation of the game rendering distances of the target game in different game frames, enabling the target game to select as many game models for rendering as possible on the basis of maintaining the stability of the game rendering frame rate during the actual rendering process, thereby effectively maintaining the balance between the game fluency and the amount of game scene details and improving the player's game experience.

[0095] It can be understood that there can be multiple different game models within the same game frame. The game rendering distances of different game models in the same game frame can be the same or different. The fixed inter-frame adjustment distances corresponding to different game models can be the same or different. The lower limits of the adaptation distances corresponding to different game models can be the same or different. The upper limits of the adaptation distances corresponding to different game models can be the same or different. When the game processing device 10 reduces or increases the game rendering distance of a certain game model in the previous game frame of the current game frame, it needs to use the fixed inter-frame adjustment distance corresponding to the game model for reduction or increase processing to ensure that different game models within the same game frame respectively represent an appropriate amount of game scene details.

[0096] In addition, in an implementation manner of this embodiment, a separate original rendering distance can be configured for each game model, and then the rendering distance can be increased or decreased by adjusting the variable scaling factor acting on the original rendering distance. At this time, the fixed inter-frame adjustment distance corresponding to a single game model can be represented by the fixed scaling factor adjustment value when the rendering distance of the game model is adjusted between adjacent game frames. The lower limit of the adaptation distance corresponding to a single game model can be represented by the minimum scaling factor value. The upper limit of the adaptation distance corresponding to a single game model can be represented by the maximum scaling factor value.

[0097] For example, if the original rendering distance of a game model is D0, the variable scaling factor of the game model is S, the minimum scaling factor value corresponding to the lower limit of the adaptation distance of the game model is S1, the maximum scaling factor value corresponding to the upper limit of the adaptation distance of the game model is S2, and the fixed scaling factor adjustment value of the game model is S3, then the actual rendering distance of the game model can be represented by D0*S at this time. The lower limit of the adaptation distance of the game model can be represented by D0*S1. The upper limit of the adaptation distance of the game model can be represented by D0*S2. The fixed inter-frame adjustment distance of the game model can be represented by D0*S3.

[0098] Optionally, please refer to Figure 3 , Figure 3 is the second flowchart of the rendering distance adaptation method provided by the embodiment of the present application. In the embodiment of the present application, Figure 3 The rendering distance adaptation method shown is compared with Figure 2 The rendering distance adaptation method shown, Figure 3 The rendering distance adaptation method shown may further include step S209.

[0099] Step S209, configure the lower limit and upper limit of the expected time consumption, the fixed number, the fixed inter-frame adjustment distance, the upper limit of the adaptation distance, and the lower limit of the adaptation distance of the expected time consumption range for single-frame rendering.

[0100] In this application, to ensure that the game processing device 10 can execute the above-mentioned rendering distance adaptation method through the rendering distance adaptation device 100, this application realizes the foregoing functions by means of functional module division of the rendering distance adaptation device 100. The following describes the specific composition of the rendering distance adaptation device 100 provided in this application accordingly.

[0101] Please refer to Figure 4 , Figure 4 which is one of the schematic diagrams of the composition of the rendering distance adaptation device 100 provided in the embodiments of this application. In the embodiments of this application, the rendering distance adaptation device 100 may include a rendering time consumption acquisition module 110, a frame rate stability detection module 120, and a rendering distance adjustment module 130.

[0102] The rendering time consumption acquisition module 110 is used to acquire the time consumption of the single-frame rendering work of the target game in the current game frame.

[0103] The frame rate stability detection module 120 is used to detect whether the time consumption of the single-frame rendering work is within the range of the expected time consumption of the single-frame rendering.

[0104] The rendering distance adjustment module 130 is used to, when it is detected that the time consumption of the single-frame rendering work is outside the range of the expected time consumption of the single-frame rendering, adjust the game rendering distance of the previous game frame of the target game in the current game frame up or down as the game rendering distance of the current game frame for the purpose of adaptation, where the rendering time consumption and the game rendering distance of the same game frame are positively correlated.

[0105] Optionally, please refer to Figure 5 , Figure 5 which is another schematic diagram of the composition of the rendering distance adaptation device 100 provided in the embodiments of this application. In the embodiments of this application, the rendering distance adaptation device 100 may further include a rendering information configuration module 140.

[0106] The rendering information configuration module 140 is used to configure the lower limit of the expected time consumption, the upper limit of the expected time consumption, the fixed number, the fixed frame interval adjustment distance, the upper limit of the adaptation distance, and the lower limit of the adaptation distance of the expected time consumption range of the single-frame rendering.

[0107] It should be noted that the basic principle and the technical effects produced by the rendering distance adaptation device 100 provided in the embodiments of this application are the same as those of the foregoing rendering distance adaptation method. For a brief description, for the parts not mentioned in this embodiment, reference may be made to the description content of the above-mentioned rendering distance adaptation method.

[0108] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of the devices, methods, and computer program products according to the embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0109] In addition, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist alone, or two or more modules can be integrated to form an independent part. If the function is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The aforementioned readable storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0110] In summary, in the rendering distance adaptation method, device, game processing device, and readable storage medium provided by the present application, when the present application obtains the time taken for the single-frame rendering work of the target game in the current game frame and detects that the time taken for the single-frame rendering work is outside the expected time range for the single-frame rendering, for the purpose of adapting to place the time taken for the single-frame rendering work within the expected time range for the single-frame rendering, the game rendering distance of the target game in the previous game frame of the current game frame is increased or decreased as the game rendering distance of the current game frame, and the dynamic adjustment operation of the game rendering distance of the target game in different game frames is completed, so that the target game can select as many game models for rendering as possible on the basis of maintaining the stability of the game rendering frame rate during the actual rendering process, thereby effectively maintaining the balance between the game smoothness and the amount of game scene details and improving the player game experience.

[0111] As described above, the above are only various implementation manners of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art in the technical field disclosed by the present application can easily think of changes or substitutions, which should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A rendering distance adaptation method, characterized in that, The method includes: Obtaining the time consumption of the single-frame rendering work of the target game in the current game frame; Detecting whether the time consumption of the single-frame rendering work is within the expected time consumption range of single-frame rendering; In the case where it is detected that the time consumption of the single-frame rendering work is outside the expected time consumption range of single-frame rendering, for the purpose of adaptation to place the time consumption of the single-frame rendering work within the expected time consumption range of single-frame rendering, increasing or decreasing the game rendering distance of the previous game frame of the target game in the current game frame as the game rendering distance of the current game frame, where the rendering time consumption of the same game frame is positively correlated with the game rendering distance, and the game rendering distance is used to represent the model data size of the models that need to be rendered within the corresponding game frame; Wherein, when the time consumption of the single-frame rendering work is greater than the upper limit of the expected time consumption of the single-frame rendering expected time consumption range, decreasing the game rendering distance of the previous game frame of the target game in the current game frame to obtain the game rendering distance of the current game frame; when the time consumption of the single-frame rendering work is less than the lower limit of the expected time consumption of the single-frame rendering expected time consumption range, increasing the game rendering distance of the previous game frame of the target game in the current game frame to obtain the game rendering distance of the current game frame.

2. The method according to claim 1, characterized in that The step of obtaining the time consumption of the single-frame rendering work of the target game in the current game frame includes: Obtaining the historical rendering time consumptions of each of a consecutive fixed number of historical game frames before the current game frame of the target game, where the fixed number of historical game frames are adjacent to the current game frame; Performing an average value operation on the historical rendering time consumptions of the fixed number to obtain the time consumption of the single-frame rendering work.

3. The method according to claim 1, wherein The step of, in the case where it is detected that the time consumption of the single-frame rendering work is outside the expected time consumption range of single-frame rendering, for the purpose of adaptation to place the time consumption of the single-frame rendering work within the expected time consumption range of single-frame rendering, increasing or decreasing the game rendering distance of the previous game frame of the target game in the current game frame as the game rendering distance of the current game frame includes: In the case where it is detected that the time consumption of the single-frame rendering work is greater than the upper limit of the expected time consumption of the single-frame rendering expected time consumption range, performing a decreasing process on the game rendering distance of the previous game frame of the target game in the current game frame according to the fixed inter-frame adjustment distance to obtain a first target rendering distance; Taking the first target rendering distance as the game rendering distance of the target game in the current game frame.

4. The method according to claim 3, wherein The step of performing a decreasing process on the game rendering distance of the previous game frame of the target game in the current game frame according to the fixed inter-frame adjustment distance to obtain a target rendering distance includes: Decreasing the game rendering distance of the previous game frame of the target game in the current game frame according to the fixed inter-frame adjustment distance to obtain a corresponding first rendering distance; Comparing the first rendering distance with a preset adaptation distance lower limit to obtain a corresponding comparison result; If the comparison result is that the first rendering distance is less than the adaptation distance lower limit, configuring the adaptation distance lower limit as the first target rendering distance, otherwise configuring the first rendering distance as the first target rendering distance.

5. The method according to claim 3, wherein In the case where it is detected that the single-frame rendering work time is outside the expected single-frame rendering time range, for the purpose of adapting to place the single-frame rendering work time within the expected single-frame rendering time range, the step of adjusting the game rendering distance of the previous game frame of the target game in the current game frame up or down as the game rendering distance of the current game frame further includes: In the case where it is detected that the single-frame rendering work time is less than the lower limit of the expected time of the expected single-frame rendering time range, the game rendering distance of the previous game frame of the target game in the current game frame is increased according to the fixed inter-frame adjustment distance to obtain a second target rendering distance; The second target rendering distance is used as the game rendering distance of the target game in the current game frame.

6. The method according to claim 5, characterized in that, The step of increasing the game rendering distance of the previous game frame of the target game in the current game frame according to the fixed inter-frame adjustment distance to obtain a second target rendering distance includes: Increase the game rendering distance of the previous game frame of the target game in the current game frame according to the fixed inter-frame adjustment distance to obtain a corresponding second rendering distance; Compare the second rendering distance with a preset upper limit of the adaptation distance to obtain a corresponding comparison result; If the comparison result is that the second rendering distance is greater than the upper limit of the adaptation distance, the upper limit of the adaptation distance is configured as the second target rendering distance, otherwise the second rendering distance is configured as the second target rendering distance.

7. The method according to any one of claims 1-6, characterized in that, The method further includes: Configuring the lower limit of the expected time, the upper limit of the expected time, the fixed number, the fixed inter-frame adjustment distance, the upper limit of the adaptation distance, and the lower limit of the adaptation distance of the expected single-frame rendering time range.

8. A rendering distance adaptation device, characterized in that, The device includes: A rendering time acquisition module, configured to acquire the single-frame rendering work time of the target game in the current game frame; A frame rate stability detection module, configured to detect whether the single-frame rendering work time is within the expected single-frame rendering time range; A rendering distance adjustment module, configured to, in the case where it is detected that the single-frame rendering work time is outside the expected single-frame rendering time range, for the purpose of adapting to place the single-frame rendering work time within the expected single-frame rendering time range, adjust the game rendering distance of the previous game frame of the target game in the current game frame up or down as the game rendering distance of the current game frame, where the rendering time and the game rendering distance of the same game frame are positively correlated, and the game rendering distance is used to represent the size of the model data of the model to be rendered within the corresponding game frame; wherein, when the single-frame rendering work time is greater than the upper limit of the expected time of the expected single-frame rendering time range, the game rendering distance of the previous game frame of the target game in the current game frame is reduced to obtain the game rendering distance of the current game frame; when the single-frame rendering work time is less than the lower limit of the expected time of the expected single-frame rendering time range, the game rendering distance of the previous game frame of the target game in the current game frame is increased to obtain the game rendering distance of the current game frame.

9. A game processing device, characterized in that, It includes a processor and a memory. The memory stores a computer program that can be executed by the processor, and the processor can execute the computer program to implement the rendering distance adaptation method according to any one of claims 1-7.

10. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the rendering distance adaptation method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Method and system for dynamic adjustment of rendering level in game

    CN109771949A

  • Adaptive method and device for maintaining picture fluency

    CN113797534A