A game scene rendering method and system

By detecting the mapping relationship between game characters and light sources in real time and dynamically rendering the shadows of game characters, the problem of insufficient realism of characters in existing technologies is solved, thus improving the user experience.

CN120502097BActive Publication Date: 2026-06-09JIANGXI YUNYOU NETWORK TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JIANGXI YUNYOU NETWORK TECHNOLOGY CO LTD
Filing Date
2025-06-04
Publication Date
2026-06-09

Smart Images

  • Figure CN120502097B_ABST
    Figure CN120502097B_ABST
Patent Text Reader

Abstract

The application provides a game scene rendering method and system, the method comprises the following steps: when it is detected in real time that a game is started, a target game character controlled by a game user in real time is detected in real time, and a game scene corresponding to the target game character is detected in real time; a target simulation light source existing in the game scene is detected in real time, and a mapping relationship between the target simulation light source and the target game character is detected in real time based on a preset rule; a projection area corresponding to the target simulation light source on the target game character is calculated in real time according to the mapping relationship, and the size of a target shadow of the target game character is calculated according to the projection area, so that the rendering of the shadow of the target game character is completed correspondingly. The application can simulate the shadow of the game character in real time and dynamically, and the use experience of the user is improved correspondingly.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of scene rendering technology, and in particular to a game scene rendering method and system. Background Technology

[0002] With the advancement of technology and the rapid development of productivity, the Internet and computer technology have become ubiquitous in people's daily lives, enabling them to engage in activities such as gaming, shopping, and learning online, greatly facilitating their lives.

[0003] Among these, people have developed various types of games using computer technology. Specifically, some games render corresponding scenes within the game to simulate real-world environments, giving users an immersive experience and attracting more game users.

[0004] Furthermore, in the process of rendering game scenes, most existing technologies directly render various types of game characters. In this process, the rendering of the shadow parts of the game characters is often ignored, that is, the shadows of the game characters are not simulated in real time and dynamically. This reduces the realism of the rendered game characters and consequently reduces the user experience. Summary of the Invention

[0005] Therefore, the purpose of this invention is to provide a game scene rendering method and system to solve the problem that existing technologies cannot render the shadows of game characters in real time and dynamically, which reduces the realism of the rendered game characters.

[0006] The first aspect of the present invention proposes:

[0007] A game scene rendering method, wherein the method includes:

[0008] When the game starts in real time, the target game character controlled by the game user is detected in real time, and the game scene corresponding to the target game character is detected in real time.

[0009] The system can detect the corresponding simulated light source in the game scene in real time, and detect the mapping relationship between the simulated light source and the target game character in real time based on preset rules.

[0010] The projection area of ​​the target simulated light source on the target game character is calculated in real time according to the mapping relationship, and the size of the target shadow of the target game character is calculated according to the projection area, so as to complete the rendering of the shadow of the target game character.

[0011] The beneficial effects of this invention are as follows: by determining the target game character controlled by the game user in real time, the corresponding processing object can be clearly identified. Based on this, in order to perform real-time rendering, it is also necessary to determine the game scene corresponding to the current target game character in real time. Based on this, by determining the target simulated light source in the current scene in real time, the mapping relationship between the current game character and the current simulated light source can be determined immediately. And the projection area of ​​the current target game character can be calculated in real time based on the mapping relationship. At the same time, a shadow adapted to the current target game character can be projected synchronously, thereby rendering the shadow of each game character in real time and dynamically, which improves the realism of the game characters and enhances the user experience.

[0012] Furthermore, the step of detecting the mapping relationship between the target simulated light source and the target game character in real time based on preset rules includes:

[0013] When the target simulated light source is detected in real time, the relative straight line between the target simulated light source and the target game character is detected in real time;

[0014] The target line between the simulated light source and the ground is detected in real time, and it is determined in real time whether the relative line coincides with the target line.

[0015] If it is determined in real time that the relative straight line coincides with the target straight line, then it is determined that the target simulated light source is directly above the target game character, and the target simulated light source will change dynamically.

[0016] Furthermore, the step of detecting the mapping relationship between the target simulated light source and the target game character in real time based on preset rules also includes:

[0017] If it is determined in real time that the relative straight line does not coincide with the target straight line, then it is determined that the target simulated light source is tilted relative to the target game character.

[0018] The elevation angle of the target simulated light source relative to the ground is calculated in real time based on the relative straight line and the target straight line, and the mapping relationship between the target simulated light source and the target game character is detected in real time based on the elevation angle.

[0019] Furthermore, the step of detecting the mapping relationship between the target simulated light source and the target game character in real time based on the elevation angle includes:

[0020] When the elevation angle is obtained in real time, a first identifier is added to the target simulated light source and a second identifier is added to the target game character;

[0021] A corresponding mapping data chain is created in real time based on the first identifier, the second identifier, and the elevation angle, and the mapping data chain is set to the mapping relationship.

[0022] Furthermore, the step of calculating the size of the target shadow of the target game character based on the projection area, and then rendering the shadow of the target game character accordingly, includes:

[0023] When the projection area is determined in real time, the height and width corresponding to the target game character are detected in real time.

[0024] The target projection coefficient that matches the target game character is determined in real time based on the projection area, and the shadow of the target game character is rendered according to the target projection coefficient, the height, and the width.

[0025] Furthermore, the step of rendering the shadow of the target game character based on the target projection coefficient, the height, and the width includes:

[0026] When the target projection coefficient is obtained in real time, a target outline that matches the target game character is drawn in real time based on the height and the width.

[0027] The target outline is adaptively stretched or shortened based on the target projection coefficient to render the shadow of the target game character in real time.

[0028] Furthermore, the expression for the algorithm that adaptively stretches or shortens the target contour based on the target projection coefficient is as follows:

[0029]

[0030] Wherein, S represents the shadow of the target game character, D represents the size of the target outline, K represents the target projection coefficient, θ represents the tilt angle of the projection surface, A represents the atmospheric attenuation factor, T represents the object transparency factor, and C represents the calibration constant.

[0031] The second aspect of the present invention proposes:

[0032] A game scene rendering system, wherein the system includes:

[0033] The detection module is used to detect the target game character controlled by the game user in real time when the game is launched, and to detect the game scene corresponding to the target game character in real time.

[0034] The processing module is used to detect the corresponding target simulated light source in the game scene in real time, and to detect the mapping relationship between the target simulated light source and the target game character in real time based on preset rules;

[0035] The calculation module is used to calculate the projection area of ​​the target simulated light source on the target game character in real time according to the mapping relationship, and to calculate the size of the target shadow of the target game character according to the projection area, so as to complete the rendering of the shadow of the target game character.

[0036] Furthermore, the processing module is specifically used for:

[0037] When the target simulated light source is detected in real time, the relative straight line between the target simulated light source and the target game character is detected in real time;

[0038] The target line between the simulated light source and the ground is detected in real time, and it is determined in real time whether the relative line coincides with the target line.

[0039] If it is determined in real time that the relative straight line coincides with the target straight line, then it is determined that the target simulated light source is directly above the target game character, and the target simulated light source will change dynamically.

[0040] Furthermore, the processing module is specifically used for:

[0041] If it is determined in real time that the relative straight line does not coincide with the target straight line, then it is determined that the target simulated light source is tilted relative to the target game character.

[0042] The elevation angle of the target simulated light source relative to the ground is calculated in real time based on the relative straight line and the target straight line, and the mapping relationship between the target simulated light source and the target game character is detected in real time based on the elevation angle.

[0043] Furthermore, the processing module is specifically used for:

[0044] When the elevation angle is obtained in real time, a first identifier is added to the target simulated light source and a second identifier is added to the target game character;

[0045] A corresponding mapping data chain is created in real time based on the first identifier, the second identifier, and the elevation angle, and the mapping data chain is set to the mapping relationship.

[0046] Furthermore, the calculation module is specifically used for:

[0047] When the projection area is determined in real time, the height and width corresponding to the target game character are detected in real time.

[0048] The target projection coefficient that matches the target game character is determined in real time based on the projection area, and the shadow of the target game character is rendered according to the target projection coefficient, the height, and the width.

[0049] Furthermore, the calculation module is specifically used for:

[0050] When the target projection coefficient is obtained in real time, a target outline that matches the target game character is drawn in real time based on the height and the width.

[0051] The target outline is adaptively stretched or shortened based on the target projection coefficient to render the shadow of the target game character in real time.

[0052] Furthermore, the expression for the algorithm that adaptively stretches or shortens the target contour based on the target projection coefficient is as follows:

[0053]

[0054] Wherein, S represents the shadow of the target game character, D represents the size of the target outline, K represents the target projection coefficient, θ represents the tilt angle of the projection surface, A represents the atmospheric attenuation factor, T represents the object transparency factor, and C represents the calibration constant.

[0055] The third aspect of the present invention proposes:

[0056] A computer includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the game scene rendering method as described above.

[0057] The fourth aspect of the present invention proposes:

[0058] A readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the game scene rendering method as described above.

[0059] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0060] Figure 1 A flowchart of a game scene rendering method provided in the first embodiment of the present invention;

[0061] Figure 2 This is a structural block diagram of a game scene rendering system provided in the third embodiment of the present invention.

[0062] The following detailed description, in conjunction with the accompanying drawings, will further illustrate the present invention. Detailed Implementation

[0063] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Several embodiments of the invention are illustrated in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.

[0064] It should be noted that when a component is said to be "fixed to" another component, it can be directly on the other component or there may be an intervening component. When a component is said to be "connected to" another component, it can be directly connected to the other component or there may be an intervening component. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this document are for illustrative purposes only.

[0065] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0066] Please see Figure 1 The image shows a game scene rendering method provided in the first embodiment of the present invention. The game scene rendering method provided in this embodiment can render the shadow of the game character in real time and dynamically, thereby improving the realism of the game character and enhancing the user experience.

[0067] Specifically, this embodiment provides:

[0068] A game scene rendering method, wherein the method includes:

[0069] Step S10: When the game is detected to start in real time, the target game character controlled by the game user in real time is detected in real time, and the game scene corresponding to the target game character is detected in real time.

[0070] It's worth noting that existing simulation games render corresponding game scenes within the game, such as houses, trees, and the sun. Correspondingly, to provide a corresponding gaming experience, game characters are simulated in real-time, allowing users to control them for enjoyment. To enhance the realism of the game characters, the shadows cast by the current game character within the current game scene need to be rendered. Therefore, to achieve this, a background server detects when a user starts the game and performs real-time detection, identifying the target game character being controlled by the user. To facilitate subsequent rendering, the game scene in which the current game character exists also needs to be detected simultaneously, and the shadow of the current game character is dynamically rendered based on changes in the game scene for later processing.

[0071] Step S20: Real-time detection of the target simulated light source in the game scene, and real-time detection of the mapping relationship between the target simulated light source and the target game character based on preset rules;

[0072] It should be noted that after detecting the corresponding game scene in real time through the above steps, in order to facilitate subsequent rendering, it is also necessary to detect the target simulated light source inside the current game scene in real time. At the same time, the server set in the background can immediately detect the real-time mapping relationship between the current target simulated light source and the current target game character according to the pre-set rules, that is, to detect the real-time connection between the current target simulated light source and the current target game character in real time, so as to facilitate subsequent processing.

[0073] Step S30: Calculate the projection area of ​​the target simulated light source on the target game character in real time according to the mapping relationship, and calculate the size of the target shadow of the target game character according to the projection area, so as to complete the rendering of the shadow of the target game character.

[0074] It should be noted that after obtaining the required mapping relationship in real time through the above steps, the projection area of ​​the simulated light source on the target game character can be calculated directly based on this mapping relationship. It can be understood that when light shines on an object, the larger the area of ​​the object that blocks the light, the larger the shadow will be, and vice versa. Based on this, after calculating the required projection area in real time, the size of the target shadow corresponding to the target game character can be calculated in real time, and the shadow of the target game character can be rendered in real time based on this size. This allows for the real-time and dynamic simulation of the shadow corresponding to the target game character, effectively improving the realism of the target game character and thus enhancing the user experience.

[0075] Second Embodiment

[0076] Furthermore, the step of detecting the mapping relationship between the target simulated light source and the target game character in real time based on preset rules includes:

[0077] When the target simulated light source is detected in real time, the relative straight line between the target simulated light source and the target game character is detected in real time;

[0078] The target line between the simulated light source and the ground is detected in real time, and it is determined in real time whether the relative line coincides with the target line.

[0079] If it is determined in real time that the relative straight line coincides with the target straight line, then it is determined that the target simulated light source is directly above the target game character, and the target simulated light source will change dynamically.

[0080] It should be noted that after detecting the target simulated light source and the target game character appearing in the same game scene through the above steps, in order to objectively and accurately detect the real-time connection between the current target simulated light source and the current target game character, this invention will first detect the relative straight line between the current target simulated light source and the current target game character. Correspondingly, it will also detect the target straight line between the current target simulated light source and the ground in real time. Based on this, this invention will determine in real time whether the current relative straight line and the current target straight line overlap. Specifically, if they do, it can be directly stated that the current target simulated light source is directly above the current target game character, and no further shadow rendering is required. Otherwise, rendering is required for subsequent processing.

[0081] Furthermore, the step of detecting the mapping relationship between the target simulated light source and the target game character in real time based on preset rules also includes:

[0082] If it is determined in real time that the relative straight line does not coincide with the target straight line, then it is determined that the target simulated light source is tilted relative to the target game character.

[0083] The elevation angle of the target simulated light source relative to the ground is calculated in real time based on the relative straight line and the target straight line, and the mapping relationship between the target simulated light source and the target game character is detected in real time based on the elevation angle.

[0084] It should be noted that if it is determined in real time that the relative line and the target line do not coincide, it can be directly determined that there is a certain angle between the current target simulated light source and the current target game character, that is, the current target simulated light source is tilted relative to the current target game character. Based on this, since the two lines will generate a corresponding angle in real time, the present invention can calculate the height angle of the current target simulated light source relative to the ground in real time based on the current relative line and the current target line, and use the current height angle as the judgment basis to create a mapping relationship between the current target simulated light source and the current target game character in real time, so as to facilitate subsequent processing.

[0085] Furthermore, the step of detecting the mapping relationship between the target simulated light source and the target game character in real time based on the elevation angle includes:

[0086] When the elevation angle is acquired in real time, a first identifier is added to the target simulated light source and a second identifier is added to the target game character;

[0087] A corresponding mapping data chain is created in real time based on the first identifier, the second identifier, and the elevation angle, and the mapping data chain is set to the mapping relationship.

[0088] It should be noted that after determining the elevation angle of the target simulated light source in real time through the above steps, a first identifier is immediately added to the current target simulated light source to facilitate subsequent tracking and judgment. Correspondingly, a second identifier is immediately added to the current target game character. Based on this, a corresponding mapping data chain can be created in real time according to the current first identifier, second identifier, and current elevation angle. The current mapping data chain can be set to the required mapping relationship, so that the current target game character and the current target simulated light source can be tracked in real time according to the mapping relationship and rendered in real time. During this process, corresponding changes can be made according to the changing states of both to improve the realism of the game character for subsequent processing.

[0089] Furthermore, the step of calculating the size of the target shadow of the target game character based on the projection area, and then rendering the shadow of the target game character accordingly, includes:

[0090] When the projection area is determined in real time, the height and width corresponding to the target game character are detected in real time.

[0091] The target projection coefficient that matches the target game character is determined in real time based on the projection area, and the shadow of the target game character is rendered according to the target projection coefficient, the height, and the width.

[0092] It should be noted that after determining the height angle of the current target simulated light source in real time through the above steps, the projection area generated by the current target simulated light source on the current target game character can be detected simultaneously. At the same time, for the convenience of subsequent processing, the height and width of the current target game character also need to be detected simultaneously. It should be pointed out that the size of the projection area generated by the current target simulated light source can affect the size of the shadow rendered later. Based on this, for the convenience of subsequent rendering, this invention will determine the target projection coefficient adapted to the current target game character in real time based on the current projection area. It should be noted that the target projection coefficient is between 0 and 2. Specifically, when the target projection coefficient is greater than 0 and less than 1, corresponding compression processing will be performed; correspondingly, when the target projection coefficient is greater than 1 and less than 2, corresponding stretching processing will be performed. Based on this, subsequent rendering can be effectively completed to facilitate subsequent processing.

[0093] Furthermore, the step of rendering the shadow of the target game character based on the target projection coefficient, the height, and the width includes:

[0094] When the target projection coefficient is obtained in real time, a target outline that matches the target game character is drawn in real time based on the height and the width.

[0095] The target outline is adaptively stretched or shortened based on the target projection coefficient to render the shadow of the target game character in real time.

[0096] It should be noted that after obtaining the required target projection coefficients through the above steps, in order to complete the subsequent rendering, the outline of the current target game character will be drawn immediately within the above height and width range. That is, the target outline of the current target game character will be drawn in real time. Based on this, the current target outline will be adaptively stretched or shortened according to the above target projection coefficients, so that the shadow of the current target game character can be rendered in real time and dynamically. It will also change with the change of light source, improving the realism of the game character and enhancing the user experience.

[0097] Furthermore, the expression for the algorithm that adaptively stretches or shortens the target contour based on the target projection coefficient is as follows:

[0098]

[0099] Wherein, S represents the shadow of the target game character, D represents the size of the target outline, K represents the target projection coefficient, θ represents the tilt angle of the projection surface, A represents the atmospheric attenuation factor, T represents the object transparency factor, and C represents the calibration constant.

[0100] Please see Figure 2 The third embodiment of the present invention provides:

[0101] A game scene rendering system, wherein the system includes:

[0102] The detection module is used to detect the target game character controlled by the game user in real time when the game is launched, and to detect the game scene corresponding to the target game character in real time.

[0103] The processing module is used to detect the corresponding target simulated light source in the game scene in real time, and to detect the mapping relationship between the target simulated light source and the target game character in real time based on preset rules;

[0104] The calculation module is used to calculate the projection area of ​​the target simulated light source on the target game character in real time according to the mapping relationship, and to calculate the size of the target shadow of the target game character according to the projection area, so as to complete the rendering of the shadow of the target game character.

[0105] Furthermore, the processing module is specifically used for:

[0106] When the target simulated light source is detected in real time, the relative straight line between the target simulated light source and the target game character is detected in real time;

[0107] The target line between the simulated light source and the ground is detected in real time, and it is determined in real time whether the relative line coincides with the target line.

[0108] If it is determined in real time that the relative straight line coincides with the target straight line, then it is determined that the target simulated light source is directly above the target game character, and the target simulated light source will change dynamically.

[0109] Furthermore, the processing module is specifically used for:

[0110] If it is determined in real time that the relative straight line does not coincide with the target straight line, then it is determined that the target simulated light source is tilted relative to the target game character.

[0111] The elevation angle of the target simulated light source relative to the ground is calculated in real time based on the relative straight line and the target straight line, and the mapping relationship between the target simulated light source and the target game character is detected in real time based on the elevation angle.

[0112] Furthermore, the processing module is specifically used for:

[0113] When the elevation angle is acquired in real time, a first identifier is added to the target simulated light source and a second identifier is added to the target game character;

[0114] A corresponding mapping data chain is created in real time based on the first identifier, the second identifier, and the elevation angle, and the mapping data chain is set to the mapping relationship.

[0115] Furthermore, the calculation module is specifically used for:

[0116] When the projection area is determined in real time, the height and width corresponding to the target game character are detected in real time.

[0117] The target projection coefficient that matches the target game character is determined in real time based on the projection area, and the shadow of the target game character is rendered according to the target projection coefficient, the height, and the width.

[0118] Furthermore, the calculation module is specifically used for:

[0119] When the target projection coefficient is obtained in real time, a target outline that matches the target game character is drawn in real time based on the height and the width.

[0120] The target outline is adaptively stretched or shortened based on the target projection coefficient to render the shadow of the target game character in real time.

[0121] Furthermore, the expression for the algorithm that adaptively stretches or shortens the target contour based on the target projection coefficient is as follows:

[0122]

[0123] Wherein, S represents the shadow of the target game character, D represents the size of the target outline, K represents the target projection coefficient, θ represents the tilt angle of the projection surface, A represents the atmospheric attenuation factor, T represents the object transparency factor, and C represents the calibration constant.

[0124] The fourth embodiment of the present invention provides a computer, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the game scene rendering method as described above.

[0125] The fifth embodiment of the present invention provides a readable storage medium on which a computer program is stored, wherein the program, when executed by a processor, implements the game scene rendering method as described above.

[0126] In summary, the game scene rendering method and system provided by the above embodiments of the present invention can simulate the shadow of game characters in real time and dynamically, thereby improving the realism of game characters and enhancing the user experience.

[0127] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.

[0128] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-including system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0129] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0130] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0131] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0132] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.

Claims

1. A method for rendering game scenes, characterized in that, The method includes: When the game starts in real time, the target game character controlled by the game user is detected in real time, and the game scene corresponding to the target game character is detected in real time. The system can detect the corresponding simulated light source in the game scene in real time, and detect the mapping relationship between the simulated light source and the target game character in real time based on preset rules. The projection area of ​​the target simulated light source on the target game character is calculated in real time according to the mapping relationship, and the size of the target shadow of the target game character is calculated according to the projection area, so as to complete the rendering of the shadow of the target game character. The step of detecting the mapping relationship between the target simulated light source and the target game character in real time based on preset rules includes: When the target simulated light source is detected in real time, the relative straight line between the target simulated light source and the target game character is detected in real time; The target line between the simulated light source and the ground is detected in real time, and it is determined in real time whether the relative line coincides with the target line. If it is determined in real time that the relative straight line coincides with the target straight line, then it is determined that the target simulated light source is directly above the target game character, and the target simulated light source will change dynamically; The step of detecting the mapping relationship between the target simulated light source and the target game character in real time based on preset rules further includes: If it is determined in real time that the relative straight line does not coincide with the target straight line, then it is determined that the target simulated light source is tilted relative to the target game character. The elevation angle of the target simulated light source relative to the ground is calculated in real time based on the relative straight line and the target straight line, and the mapping relationship between the target simulated light source and the target game character is detected in real time based on the elevation angle. The step of detecting the mapping relationship between the target simulated light source and the target game character in real time based on the elevation angle includes: When the elevation angle is acquired in real time, a first identifier is added to the target simulated light source and a second identifier is added to the target game character; A corresponding mapping data chain is created in real time based on the first identifier, the second identifier, and the elevation angle, and the mapping data chain is set to the mapping relationship.

2. The game scene rendering method according to claim 1, characterized in that: The step of calculating the size of the target shadow of the target game character based on the projection area, and then rendering the shadow of the target game character accordingly, includes: When the projection area is determined in real time, the height and width corresponding to the target game character are detected in real time. The target projection coefficient that matches the target game character is determined in real time based on the projection area, and the shadow of the target game character is rendered according to the target projection coefficient, the height, and the width.

3. The game scene rendering method according to claim 2, characterized in that: The step of rendering the shadow of the target game character based on the target projection coefficient, the height, and the width includes: When the target projection coefficient is obtained in real time, a target outline that matches the target game character is drawn in real time based on the height and the width. The target outline is adaptively stretched or shortened based on the target projection coefficient to render the shadow of the target game character in real time.

4. The game scene rendering method according to claim 3, characterized in that: The expression for the algorithm that adaptively stretches or shortens the target contour based on the target projection coefficient is as follows: Wherein, S represents the shadow of the target game character, D represents the size of the target outline, K represents the target projection coefficient, θ represents the tilt angle of the projection surface, A represents the atmospheric attenuation factor, T represents the object transparency factor, and C represents the calibration constant.

5. A game scene rendering system, characterized in that, The system, used to implement the game scene rendering method as described in any one of claims 1 to 4, comprises: The detection module is used to detect the target game character controlled by the game user in real time when the game is launched, and to detect the game scene corresponding to the target game character in real time. The processing module is used to detect the corresponding target simulated light source in the game scene in real time, and to detect the mapping relationship between the target simulated light source and the target game character in real time based on preset rules; The calculation module is used to calculate the projection area of ​​the target simulated light source on the target game character in real time according to the mapping relationship, and to calculate the size of the target shadow of the target game character according to the projection area, so as to complete the rendering of the shadow of the target game character.

6. A computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the game scene rendering method as described in any one of claims 1 to 4.

7. A readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the game scene rendering method as described in any one of claims 1 to 4.