Method, apparatus, device, and storage medium for processing game scenes
By determining the lighting type according to the day-night change configuration table and rendering the game scene, the lack of perception caused by the light changes frame by frame is solved, and more realistic light simulation is achieved, which improves the game experience.
Patent Information
- Application Number
- CN202110722136.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-28
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2041-06-28
AI Technical Summary
In the prior art, the change of light in a game scene frame by frame leads to a weak perception of light transformation and is unable to truly simulate light changes in the real world.
By determining the lighting type corresponding to the current time period based on the preset day and night change configuration table, and rendering and displaying the game scene of the corresponding lighting type on the graphical user interface, the lighting transformation method is adopted in units of time period, combined with the adjustment of elements such as temperature, lighting, smoke and virtual animals.
It improves players' perception of light transformation, enhances the realism and immersion of the game scene, and enhances the game experience.
Smart Images

Figure CN113457134B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of games. Specifically, it relates to a method, device, equipment, and storage medium for processing game scenes. Background Art
[0002] In a game scene environment, such as in a large-scale multiplayer online role-playing game, it is necessary to present a simulated day-night transformation in the game scene, so that players can have a more realistic experience when controlling virtual characters to play the game.
[0003] In the prior art, the day-night transformation in a game scene generally involves continuously playing the day-night lighting changes within the game scene, that is, according to the current time point within the game scene, controlling the lighting within the game scene to change frame by frame, and different time points correspond to different lighting.
[0004] However, in this way of performing day-night transformation, since the lighting within the game scene changes frame by frame, the change in lighting between adjacent moments is not significant, resulting in a weak perception of light changes by players and being unable to truly simulate and restore the light changes in the real world for the virtual game scene on the graphical user interface. Summary of the Invention
[0005] The purpose of this application is to provide a method, device, equipment, and storage medium for processing game scenes to solve the problem in the prior art that players have a weak perception of light changes and are unable to truly simulate and restore the light changes in the real world for the virtual game scene on the graphical user interface.
[0006] To achieve the above purpose, the technical solutions adopted in the embodiments of this application are as follows:
[0007] In a first aspect, an embodiment of this application provides a method for processing a game scene. A graphical user interface is provided through a first terminal device, and at least a part or all of the game scene is displayed on the graphical user interface. The method includes:
[0008] According to the current time in the game, determine the first lighting type corresponding to the first time period where the current time is located from a preset day-night change configuration table; the day-night change configuration table includes the corresponding relationships between multiple time periods and lighting types, and different time periods correspond to different lighting types;
[0009] Render and display the game scene under the first lighting type on the graphical user interface.
[0010] Optionally, the method further includes:
[0011] Control the current time in the game to advance at a preset speed;
[0012] In response to the current time in the game entering a second time period, switch the first lighting type to a second lighting type within a preset transition time, where the second time period is a different time period from the first time period;
[0013] Render and display the game scene under the second lighting type on the graphical user interface.
[0014] Optionally, before rendering and displaying the game scene under the second lighting type on the graphical user interface, it further includes:
[0015] Within the preset transition time, render and display the lighting change effect of the game scene switching from the first lighting type to the second lighting type on the graphical user interface.
[0016] Optionally, the day-night change configuration table further includes: the corresponding relationship between the multiple time periods and the temperature impact, where the temperature impact is the temperature change value in the game scene under the action of the lighting type corresponding to each time period; the method further includes:
[0017] Determine the temperature impact corresponding to the first time period where the current time is located from the day-night change configuration table according to the current time;
[0018] Control the temperature in the game scene to be adjusted according to the temperature impact.
[0019] Optionally, the controlling the temperature in the game scene to be adjusted according to the temperature impact includes:
[0020] Control the base temperature of the game scene to be adjusted based on the initial base temperature in the first time period according to the temperature impact.
[0021] Optionally, before controlling the base temperature of the game scene to be adjusted based on the initial base temperature in the first time period according to the temperature impact, the method further includes:
[0022] Determine the initial base temperature according to the state parameters of the virtual city in the game scene.
[0023] Optionally, the day-night change configuration table further includes: the corresponding relationship between the multiple time periods and the lighting state information, where the lighting state information is used to characterize the on-off state of the lights in the game scene in each time period; the method further includes:
[0024] Determine the lighting state information corresponding to the first time period where the current time is located from the day-night change configuration table according to the current time;
[0025] According to the lighting state information, control the opening and closing state of the lights at the preset positions in the game scene to be adjusted.
[0026] Optionally, the day-night change configuration table further includes: the correspondence between the multiple time periods and the smoking state information, where the smoking state information is used to represent whether the virtual buildings in the game scene are smoking in each time period; the method further includes:
[0027] According to the current time, determine the smoking information corresponding to the first time period in which the current time is located from the day-night change configuration table;
[0028] According to the smoking information, control the smoking state of the preset virtual buildings in the game scene to be adjusted.
[0029] Optionally, the method further includes:
[0030] According to the current time, obtain the weather state of the game scene at the current time;
[0031] According to the weather state, render and display the weather state and the game scene under the first lighting type on the graphical user interface.
[0032] Optionally, the day-night change configuration table further includes: the correspondence between the multiple time periods and the virtual animal appearance information, where the virtual animal appearance information is used to indicate the appearance information of the virtual animals in the game scene within each time period; the method further includes:
[0033] According to the current time, determine the virtual animal appearance information corresponding to the first time period in which the current time is located from the day-night change configuration table;
[0034] According to the virtual animal appearance information, render and display the virtual animal appearance information and the game scene under the first lighting type on the graphical user interface.
[0035] Optionally, the different lighting types are: lighting types with different light angles and / or different light intensities.
[0036] In a second aspect, another embodiment of the present application provides a processing device for a game scene. A graphical user interface is provided through a first terminal device, and at least a part or all of the game scene is displayed on the graphical user interface. The device includes: a determination module and a display module, where:
[0037] The determining module is configured to determine, according to the current time in the game, a first lighting type corresponding to a first time period in which the current time is located from a preset day-night change configuration table; the day-night change configuration table includes the corresponding relationships between multiple time periods and lighting types, and different time periods correspond to different lighting types;
[0038] The display module is configured to render and display the game scene under the first lighting type on the graphical user interface.
[0039] Optionally, the device further includes: a control module and a switching module, where:
[0040] The control module is configured to control the current time in the game to advance at a preset speed;
[0041] The switching module is configured to, in response to the current time in the game entering a second time period, switch the first lighting type to a second lighting type within a preset transition time, where the second time period is different from the first time period;
[0042] The display module is specifically configured to render and display the game scene under the second lighting type on the graphical user interface.
[0043] Optionally, the display module is specifically configured to, within the preset transition time, render and display the lighting change effect of the game scene that switches from the first lighting type to the second lighting type on the graphical user interface.
[0044] Optionally, the day-night change configuration table further includes: the corresponding relationships between the multiple time periods and the temperature influence, where the temperature influence is the temperature change value in the game scene under the action of the lighting type corresponding to each time period;
[0045] The determining module is specifically configured to determine, according to the current time, the temperature influence corresponding to the first time period in which the current time is located from the day-night change configuration table;
[0046] The control module is specifically configured to control the temperature in the game scene to be adjusted according to the temperature influence.
[0047] Optionally, the control module is specifically configured to control the base temperature in the game scene to be adjusted on the basis of the initial base temperature in the first time period according to the temperature influence.
[0048] Optionally, the determining module is specifically configured to determine the initial base temperature according to the state parameters of the virtual city in the game scene.
[0049] Optionally, the day-night change configuration table further includes: the correspondence between the multiple time periods and the lighting state information, where the lighting state information is used to characterize the on / off state of the lights in the game scene for each time period;
[0050] The determining module is specifically configured to determine, according to the current time, the lighting state information corresponding to the first time period in which the current time is located from the day-night change configuration table;
[0051] The control module is specifically configured to adjust the on / off state of the lights at a preset position in the game scene according to the lighting state information.
[0052] Optionally, the day-night change configuration table further includes: the correspondence between the multiple time periods and the smoking state information, where the smoking state information is used to characterize whether the virtual buildings in the game scene are smoking for each time period;
[0053] The determining module is specifically configured to determine, according to the current time, the smoking information corresponding to the first time period in which the current time is located from the day-night change configuration table;
[0054] The control module is specifically configured to adjust the smoking state of the preset virtual buildings in the game scene according to the smoking information.
[0055] Optionally, the device further includes: an acquisition module, configured to acquire the weather state of the game scene at the current time according to the current time;
[0056] The display control module is specifically configured to render and display the weather state and the game scene under the first lighting type on the graphical user interface according to the weather state.
[0057] Optionally, the day-night change configuration table further includes: the correspondence between the multiple time periods and the virtual animal appearance information, where the virtual animal appearance information is used to indicate the appearance information of the virtual animals in the game scene for each time period;
[0058] The determining module is specifically configured to determine, according to the current time, the virtual animal appearance information corresponding to the first time period in which the current time is located from the day-night change configuration table;
[0059] The display module is specifically configured to render and display the virtual animal appearance information and the game scene under the first lighting type on the graphical user interface according to the virtual animal appearance information.
[0060] Optionally, the different lighting types are: lighting types with different light angles and / or different light intensities.
[0061] In a third aspect, another embodiment of the present application provides a processing device for a game scene, including: a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the processing device for the game scene runs, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of any of the methods described in the first aspect above.
[0062] In a fourth aspect, another embodiment of the present application provides a storage medium, on which a computer program is stored. When the computer program is run by a processor, it performs the steps of any of the methods described in the first aspect above.
[0063] The beneficial effects of the present application are as follows: By using the method for processing a game scene provided by the present application, the first lighting type corresponding to the first time period in which the current time is located can be determined from a preset day-night change table according to the current time, and then the game scene under the first lighting type is rendered and displayed on the graphical user interface. That is, the transformation of the lighting type in the present application is in units of time periods, and different time periods may correspond to different lighting types. Since the lighting types corresponding to different time periods change more significantly than those corresponding to different time points, the transformation method of lighting provided by the present application can improve the player's perception of lighting transformation, and truly simulate and restore the light change in the real world for the virtual game scene on the graphical user interface, making the game more realistic, thereby improving the player's gaming experience. Description of the Drawings
[0064] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0065] Figure 1 It is a schematic flowchart of a method for processing a game scene provided by an embodiment of the present application;
[0066] Figure 2 It is a schematic flowchart of a method for processing a game scene provided by another embodiment of the present application;
[0067] Figure 3 It is a schematic flowchart of a method for processing a game scene provided by another embodiment of the present application;
[0068] Figure 4 It is a schematic structural diagram of a device for processing a game scene provided by an embodiment of the present application;
[0069] Figure 5 Structural schematic diagram of a processing device for a game scenario provided in another embodiment of the present application;
[0070] Figure 6 Structural schematic diagram of a processing device for a game scenario provided in an embodiment of the present application. Detailed implementation manners
[0071] 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.
[0072] Generally, 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. 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 claimed present application, but merely represents selected embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0073] In addition, the flowcharts used in the present application illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations in the flowchart may not be implemented in sequence, and steps without a logical context relationship may be reversed or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart or remove one or more operations from the flowchart under the guidance of the content of the present application.
[0074] The processing method for a game scenario in one of the embodiments of the present disclosure can run on a terminal device or a server. Among them, the terminal device can be a local terminal device. When the processing method for a game scenario runs on the server, the method can be implemented and executed based on a cloud interaction system, where the cloud interaction system includes a server and a client device.
[0075] In an optional implementation, various cloud applications can be run under the cloud interaction system, such as cloud games. Taking cloud games as an example, cloud games refer to a game mode based on cloud computing. In the operation mode of cloud games, the operating body of the game program and the main body of the game screen presentation are separated. The storage and operation of the game scene processing method are completed on the cloud game server. The role of the client device is used for receiving and sending data and presenting the game screen. For example, the client device can be a display device with data transmission function close to the user side, such as a mobile terminal, a TV, a computer, a handheld computer, etc.; but the terminal device for information processing is a cloud game server in the cloud. When playing the game, the player operates the client device to send an operation instruction to the cloud game server. The cloud game server runs the game according to the operation instruction, encodes and compresses the game screen and other data, and returns it to the client device through the network. Finally, the client device decodes and outputs the game screen.
[0076] In an optional embodiment, the terminal device may be a local terminal device. Taking a game as an example, the local terminal device stores a game program and is used to present a game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, the game program is downloaded and installed by an electronic device and run conventionally. The local terminal device may provide the graphical user interface to the player in a variety of ways, for example, it may be rendered and displayed on a display screen of the terminal, or provided to the player through a holographic projection. For example, the local terminal device may include a display screen and a processor, the display screen is used to present a graphical user interface, the graphical user interface includes a game screen, and the processor is used to run the game, generate a graphical user interface, and control the display of the graphical user interface on the display screen.
[0077] In a possible implementation, an embodiment of the present invention provides a method for processing a game scene, providing a graphical user interface through a first terminal device, wherein the first terminal device can be the local terminal device mentioned above, or can be a client device in the cloud interaction system mentioned above.
[0078] The following is an explanation of a method for processing a game scene provided in an embodiment of the present application in combination with a number of specific application examples. Figure 1 A flowchart of a method for processing a game scene provided in one embodiment of the present application is shown as follows: Figure 1 As shown, the method includes:
[0079] S101: According to the current time in the game, determine a first lighting type corresponding to a first time period where the current time is located from a preset day and night change configuration table.
[0080] Among them, the day-night change configuration table includes the corresponding relationships between multiple time periods and lighting types, and different time periods correspond to different lighting types.
[0081] In an embodiment of the present application, for example, a day-night in the game can be divided into five time periods, and each time period corresponds to a different lighting type. The lighting information in the game scene is rendered and displayed cyclically according to the lighting types of a day-night. The lighting types of a day-night in the game can be divided into the following five time periods: 10:00-12:00; 12:00-14:00; 14:00-20:00; 20:00-03:00; 03:00-10:00. It should be understood that the above embodiments are only exemplary illustrations. Of course, a day-night in a game can also be divided into four, six or any other arbitrary number of time periods. The specific number of time periods corresponding to a day-night in the game can be flexibly adjusted and configured according to user needs, and is not limited to those given in the above embodiments.
[0082] S102: Render and display the game scene under the first lighting type on the graphical user interface.
[0083] Such a setting method makes the lighting type in the game scene the same within the same time period, that is, the lighting in the game scene does not change within the same time period. Only in different time periods, the lighting in the game scene will be different. Thus, players can intuitively feel the lighting changes in the game scene at different time periods, improving the players' perception of the lighting changes in the game scene.
[0084] By using the game scene processing method provided by the present application, the first lighting type corresponding to the first time period in which the current time is located can be determined from the preset day-night change table according to the current time, and then the game scene under the first lighting type is rendered and displayed on the graphical user interface. That is, the transformation of the lighting types in the present application is based on time periods, and different time periods may correspond to different lighting types. Since the lighting types corresponding to different time periods change greatly compared with the lighting types corresponding to different time points, the transformation method of lighting provided by the present application can improve the players' perception of the lighting transformation, thereby improving the players' game experience.
[0085] In some possible embodiments, different lighting types can be: lighting types with different light angles and / or different light intensities.
[0086] Optionally, on the basis of the above embodiments, an embodiment of the present application can also provide a game scene processing method. The implementation process of the above method is illustrated by the following with reference to the accompanying drawings. Figure 2 It is a schematic flowchart of a game scene processing method provided by another embodiment of the present application. As Figure 2 shown, the method further includes:
[0087] S103: Control the current time in the game to advance at a preset speed.
[0088] Among them, the advancing speed of the in-game time can be the same as that of the real-world time, that is, the in-game time can be the same as the real-world time and advance at the advancing speed of the real-world time; the advancing speed of the in-game time can be different from that of the real-world time, advance at a preset speed, or be open to users for custom settings.
[0089] S104: In response to the current time in the game entering the second time period, switch the first lighting type to the second lighting type within a preset transition time.
[0090] Among them, the second time period and the first time period are different time periods.
[0091] In the embodiments of the present application, during the switching process between the two time periods, since the lighting types corresponding to the respective time periods are different, during the switching process between the two time periods, the lighting in the game scene also needs to be switched, and the switching of the lighting needs to be completed within a preset transition time. The duration of the preset transition time can be flexibly configured according to user needs. In an embodiment of the present application, the preset transition time can be, for example, 10S. Within the preset transition time, players can clearly observe how the lighting changes between the two time periods in the game scene, further enhancing the players' perception of the lighting change in the scene. Moreover, when the lighting is switched between adjacent time periods in the game scene, the lighting in the game scene is not directly switched, but is switched within the preset transition time, so that there is a switching time between the lighting switches, and the switching of the lighting is gradually transitional and not abrupt or rigid, further improving the players' gaming experience.
[0092] S105: Render and display the game scene under the second lighting type on the graphical user interface.
[0093] After the transition of the lighting type is completed, that is, render and display the game scene under the second lighting type on the graphical user, and control the current time in the game to continue advancing at a preset speed.
[0094] In some possible embodiments, when the lighting type in S104 is in transition, for example, within the preset transition time, render and display the lighting change effect of the game scene switching from the first lighting type to the second lighting type on the graphical user interface. Among them, the lighting change effect can be pre-configured during the configuration phase, and the lighting change effects corresponding to different lighting types during the switching process may not be the same. By pre-configuring the lighting change effect, the ornamental value of the lighting change in the game can be improved, and the players' gaming experience can be further enhanced.
[0095] In some possible embodiments, the day-night change configuration table further includes, for example: the correspondence between multiple time periods and the temperature impact, where the temperature impact is the temperature change value in the game scene under the action of the light type corresponding to each time period; among them, the temperature impact can be, for example, a temperature impact value or a temperature impact range value, and the specific type of temperature impact can be flexibly set according to user needs, and this application does not make any restrictions here.
[0096] Correspondingly, the method may further include: determining, according to the current time, the temperature impact corresponding to the first time period in which the current time is located from the day-night change configuration table; and controlling the temperature in the game scene to be adjusted according to the temperature impact.
[0097] In some possible embodiments, the adjustment of the temperature can be, for example, controlling the base temperature in the game scene to be adjusted based on the initial base temperature in the first time period according to the temperature impact, that is, the adjustment value of the base temperature is the sum of the initial base temperature and the day-night temperature. Taking the temperature impact as an example of a temperature impact range, the day-night temperature can be any value within the temperature impact range. In the embodiments of this application, the initial base temperature can be determined by the state parameters of the virtual city, that is, the initial base temperature can be determined according to the state parameters of the virtual city in the game scene. The specific setting method of the initial base temperature can be flexibly adjusted according to user needs and is not limited to that given in the above embodiments.
[0098] In some other possible embodiments, the day-night change configuration table further includes: the correspondence between multiple time periods and the light state information, where the light state information is used to represent the on-off state of the lights in the game scene in each time period.
[0099] Correspondingly, the method further includes: determining, according to the current time, the light state information corresponding to the first time period in which the current time is located from the day-night change configuration table; and controlling the on-off state of the lights at the preset positions in the game scene to be adjusted according to the light state information.
[0100] Exemplarily, in some possible embodiments, the on / off state of the lights in the game scene is determined not only according to the configuration in the day-night change configuration table, but also according to the actual situation of the virtual buildings at the preset positions. For example, for the lights of the virtual buildings at some preset positions in the game scene that are uninhabited or cannot work, regardless of which time period the current time is in, their on / off state is in the off state. That is, for example, when the current time is in the time period from 20:00 to 03:00, the on / off state of the lights should be on during this time period, but since the first virtual building in the current game scene cannot work, the on / off state of the lights of the first virtual building is off. It should be understood that the above embodiments are only illustrative, and how the on / off state of the specific lights is determined can be flexibly adjusted according to user needs, and is not limited to those given in the above embodiments.
[0101] In some other possible embodiments, the day-night change configuration table further includes: the correspondence between multiple time periods and the smoking state information, and the smoking state information is used to characterize whether the virtual buildings in the game scene are smoking in each time period.
[0102] Correspondingly, the method may further include: determining, according to the current time, the smoking information corresponding to the first time period in which the current time is located from the day-night change configuration table; and controlling the smoking state of the preset virtual buildings in the game scene to be adjusted according to the smoking information.
[0103] Exemplarily, in some possible embodiments, the smoking state in the game scene is determined not only according to the configuration in the day-night change configuration table, but also according to the actual situation at the preset positions. For example, the smoking state of the virtual buildings at the preset positions that are uninhabited or cannot work is in the off state regardless of which time period the current time is in. It should be understood that the above embodiments are only illustrative, and how the specific smoking state is determined can be flexibly adjusted according to user needs, and is not limited to those given in the above embodiments.
[0104] In an embodiment of the present application, taking the day-night change configuration table including: multiple time period information, the duration ratio information corresponding to each time period, the influence temperature range information corresponding to each time period, the light state information corresponding to each time period, and the smoking information corresponding to each time period as an example for illustration. Among them, the multiple time period information can be divided into the following five time periods, for example: 10:00 - 12:00; 12:00 - 14:00; 14:00 - 20:00; 20:00 - 03:00; 03:00 - 10:00. At this time, the corresponding day-night change configuration table can be as shown in Table 1, for example.
[0105] Time period Duration ratio Influencing temperature range Lighting status Smoke information 10:00-12:00 8.3% +(3-5) 0 1 12:00-14:00 8.3% +(5-10) 0 1 14:00-20:00 25% +(3-5) 1 1 20:00-03:00 29.2% -(5-10) 1 0 03:00-10:00 29.2% -(10-20) 1 0
[0106] Table 1
[0107] Among them, the duration ratio is determined according to the proportion of each time period in a day and night. The influencing temperature within each time period can take any value or fluctuate arbitrarily within the influencing temperature range. When the lighting state is 0, it means that the opening and closing state of the light at the preset position in the current game scene is the off state. When the lighting state is 1, it means that the opening and closing state of the light at the preset position in the current game scene is the on state; when the smoking information is 0, it means that the smoking state of the preset virtual building in the game scene is non-smoking. When the smoking information is 1, it means that the smoking state of the preset virtual building in the game scene is smoking. It should be understood that the above embodiments are only illustrative. The information included in the specific day and night change configuration table and the content corresponding to each information can be flexibly adjusted according to user needs and is not limited to those given in the above embodiments.
[0108] In some other possible embodiments, the day and night change configuration table further includes: the correspondence between a plurality of time periods and virtual animal appearance information, and the virtual animal appearance information is used to indicate the appearance information of virtual animals in the game scene within each time period.
[0109] Correspondingly, the method may further include: determining, according to the current time, the virtual animal appearance information corresponding to the first time period in which the current time is located from the day and night change configuration table; rendering and displaying, according to the virtual animal appearance information, the virtual animal appearance information and the game scene under the first lighting type on the graphical user interface; wherein, different positions in the game scene may have different possible virtual animals, and different virtual animals may correspond to different appearance times. For example, some animals that travel at night may only appear at night in the game scene and will not appear during the day. For some animals that travel during the day, they may only appear during the day in the game scene and will not appear at night. How to configure the appearance information of specific virtual animals can be flexibly adjusted according to user needs and is not limited to those given in the above embodiments.
[0110] Optionally, on the basis of the above embodiments, an embodiment of the present application may further provide a processing method for a game scene. The implementation process of the above method will be exemplarily described below with reference to the accompanying drawings. Figure 3 It is a schematic flowchart of a processing method for a game scene provided by another embodiment of the present application, as Figure 3 shown, the method may further include:
[0111] S106: Obtain the weather state of the game scene at the current time according to the current time.
[0112] In some possible embodiments, the weather in the game scene can be configured according to a preset weather switching rule. The weather can be played cyclically or randomly according to the preset weather switching rule, and any one of the preset weathers can be played. The weather state can include, for example, any weather state such as sunny, light rain, heavy rain, storm, light snow, heavy snow, blizzard, sandstorm, etc., and is not limited to those given in the above embodiments.
[0113] S107: Render and display the game scene with the weather state and the first lighting type on the graphical user interface according to the weather state.
[0114] For example, the lighting of the first lighting type corresponding to 10 am on a sunny day and 10 am with light snow may be different, that is, the current lighting type in the game scene is corresponding to the superposition of the weather and time.
[0115] In some possible embodiments, the relationship between the day-night transformation and the weather effect in the game scene is a superposition relationship. For example, in some preset extremely bad weather, since all virtual factories in the game scene cannot work under the extremely bad weather, no matter what the current time is within which preset time period, the on-off state of the lights of all virtual factories in the game scene is the off state, and the smoking state of all virtual factories is non-smoking. It should be understood that the above embodiments are only for illustrative purposes. How the specific day-night rules and weather rules are superimposed, and whether the superimposed effect has priority, etc. can all be flexibly adjusted according to user needs, and is not limited to those given in the above embodiments.
[0116] This way of superimposing the day-night change and the weather effect enriches the diversity of the environmental effects in the game scene because both the day-night change and the weather effect have their own corresponding independent change rules, and further improves the game experience of players during the game process.
[0117] Adopting the game scene processing method provided by the present application can not only improve the visual experience of the game, but also improve the player's perception of the day-night change. Moreover, the method provided by the present application can also achieve the linkage performance within the game scene with other elements in the scene, such as lights, smoking or animals, etc., thereby enhancing the immersion and realism of players during the game process.
[0118] The following explains the game scene processing device provided by the present application in conjunction with the accompanying drawings. The game scene processing device can execute any of the above Figures 1 - 3 game scene processing methods, and its specific implementation and beneficial effects are referred to the above, and will not be elaborated below.
[0119] Figure 4 is a schematic structural diagram of the game scene processing device provided by an embodiment of the present application, as Figure 4As shown, a graphical user interface is provided by a first terminal device, and at least a part or all of the game scenes are displayed on the graphical user interface. The device includes: a determination module 201 and a display module 202, where:
[0120] The determination module 201 is configured to determine, according to the current time in the game, a first lighting type corresponding to a first time period in which the current time is located from a preset day-night change configuration table; the day-night change configuration table includes the corresponding relationships between multiple time periods and lighting types, and different time periods correspond to different lighting types.
[0121] The display module 202 is configured to render and display the game scene under the first lighting type on the graphical user interface.
[0122] Optionally, on the basis of the above embodiments, an embodiment of the present application may further provide a processing device for a game scene. The implementation process of the device given above is illustrated by the following with reference to the drawings. Figure 4 The implementation process of the given device is illustrated by examples. Figure 5 FIG. is a schematic structural diagram of a processing device for a game scene provided by another embodiment of the present application. As Figure 5 shown, the device further includes: a control module 203 and a switching module 204, where:
[0123] The control module 203 is configured to control the current time in the game to advance at a preset speed;
[0124] The switching module 204 is configured to, in response to the current time in the game entering a second time period, switch the first lighting type to a second lighting type within a preset transition time, where the second time period is different from the first time period;
[0125] The display module 202 is specifically configured to render and display the game scene under the second lighting type on the graphical user interface.
[0126] Optionally, the display module 202 is specifically configured to, within a preset transition time, render and display the lighting change effect of the game scene when switching from the first lighting type to the second lighting type on the graphical user interface.
[0127] Optionally, the day-night change configuration table further includes: the corresponding relationships between multiple time periods and the temperature influence. The temperature influence is the temperature change value in the game scene under the action of the lighting type corresponding to each time period;
[0128] The determination module 201 is specifically configured to determine, according to the current time, the temperature influence corresponding to the first time period in which the current time is located from the day-night change configuration table;
[0129] The control module 203 is specifically configured to control the temperature in the game scene to be adjusted according to the temperature influence.
[0130] Optionally, the control module 203 is specifically configured to adjust the base temperature of the game scene based on the ambient temperature on the basis of the initial base temperature in the first time period.
[0131] Optionally, the determination module 201 is specifically configured to determine the initial base temperature according to the state parameters of the virtual city in the game scene.
[0132] Optionally, the day-night change configuration table further includes: the correspondence between multiple time periods and the lighting state information, where the lighting state information is used to represent the on-off state of the lights in the game scene in each time period;
[0133] The determination module 201 is specifically configured to determine the lighting state information corresponding to the first time period in which the current time is located from the day-night change configuration table according to the current time;
[0134] The control module 203 is specifically configured to adjust the on-off state of the lights at the preset positions in the game scene according to the lighting state information.
[0135] Optionally, the day-night change configuration table further includes: the correspondence between multiple time periods and the smoking state information, where the smoking state information is used to represent whether the virtual buildings in the game scene are smoking in each time period.
[0136] The determination module 201 is specifically configured to determine the smoking information corresponding to the first time period in which the current time is located from the day-night change configuration table according to the current time;
[0137] The control module 203 is specifically configured to adjust the smoking state of the preset virtual buildings in the game scene according to the smoking information.
[0138] Continue as Figure 5 As shown, the device further includes: an acquisition module 205, configured to acquire the weather state of the game scene at the current time according to the current time;
[0139] The display module 202 is specifically configured to render and display the weather state and the game scene under the first light type on the graphical user interface according to the weather state.
[0140] Optionally, the day-night change configuration table further includes: the correspondence between multiple time periods and the virtual animal appearance information, where the virtual animal appearance information is used to indicate the appearance information of the virtual animals in the game scene within each time period.
[0141] The determination module 201 is specifically configured to determine the virtual animal appearance information corresponding to the first time period in which the current time is located from the day-night change configuration table according to the current time;
[0142] The display module 202 is specifically configured to render and display the virtual animal appearance information and the game scene under the first lighting type on the graphical user interface according to the virtual animal appearance information.
[0143] Optionally, the different lighting types are: lighting types with different light angles and / or different light intensities.
[0144] The above device is used to execute the method provided in the foregoing embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here.
[0145] The above modules can be one or more integrated circuits configured to implement the above method. For example: one or more application specific integrated circuits (ASICs), or, one or more microprocessors, or, one or more field programmable gate arrays (FPGAs), etc. Again, when a certain module above is implemented in the form of a processing element scheduling program code, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call program code. Again, these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0146] Figure 6 This is a schematic structural diagram of a processing device for a game scene provided by an embodiment of the present application. The processing device for the game scene can be integrated into a terminal device or a chip of the terminal device.
[0147] As Figure 6 shown, the processing device for the game scene includes: a processor 501, a storage medium 502, and a bus 503.
[0148] The processor 501 is used to store programs. The processor 501 calls the programs stored in the storage medium 502 to execute the above Figures 1 - 3 corresponding method embodiments. The specific implementation manners and technical effects are similar and will not be elaborated here.
[0149] Optionally, the present application further provides a program product, such as a storage medium, on which a computer program is stored, including a program that executes the corresponding embodiments of the above method when run by a processor.
[0150] In several embodiments provided by this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling, direct coupling, or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the devices or units can be in electrical, mechanical, or other forms.
[0151] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0152] In addition, in each embodiment of this application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of a combination of hardware and software functional units.
[0153] The above-mentioned integrated units implemented in the form of software functional units can be stored in a computer-readable storage medium. The above-mentioned software functional units are stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to execute some steps of the methods described in each embodiment of this application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (English: Read-Only Memory, abbreviated as: ROM), random access memories (English: Random Access Memory, abbreviated as: RAM), magnetic disks, or optical discs that can store program codes.
Claims
1. A method for processing a game scene, characterized in that Provide a graphical user interface through a first terminal device, with at least part or all of the game scene displayed on the graphical user interface. The method includes: According to the current time in the game, determine the first lighting type corresponding to the first time period where the current time is located from a preset day-night change configuration table; the day-night change configuration table includes the corresponding relationships between multiple time periods and lighting types, and different time periods correspond to different lighting types; Render and display the game scene under the first lighting type on the graphical user interface; The day-night change configuration table further includes: the corresponding relationships between the multiple time periods and the temperature effects, where the temperature effect is the temperature change value in the game scene under the action of the lighting type corresponding to each time period; the method further includes: According to the current time, determine the temperature effect corresponding to the first time period where the current time is located from the day-night change configuration table; According to the temperature effect, control the base temperature of the game scene to be adjusted based on the initial base temperature in the first time period; The day-night change configuration table further includes: the corresponding relationships between the multiple time periods and the lighting state information, where the lighting state information is used to represent the on-off state of the lights in the game scene in each time period; the method further includes: According to the current time, based on the day-night change configuration table and the status information of the virtual building at a preset position in the game scene, determine the lighting state information corresponding to the first time period where the current time is located for the virtual building, where the status information of the virtual building is used to indicate whether the virtual building is a residential or working building. If the virtual building is an uninhabited or non-working building, the on-off state of the lights at the preset position is off; According to the lighting state information, control the on-off state of the lights at the preset position in the game scene to be adjusted; The day-night change configuration table further includes: the corresponding relationships between the multiple time periods and the smoking state information, where the smoking state information is used to represent whether the virtual buildings in the game scene are smoking in each time period; the method further includes: According to the current time, based on the day-night change configuration table and the status information of the preset virtual building in the game scene, determine the smoking state information corresponding to the first time period where the current time is located for the preset virtual building, where the status information of the preset virtual building is used to indicate whether the preset virtual building is a residential or working building. If the preset virtual building is an uninhabited or non-working building, the smoking state information is non-smoking; According to the smoking state information, control the smoking state of the preset virtual building to be adjusted.
2. The method according to claim 1, characterized in that, The method further includes: Control the current time in the game to advance at a preset speed; In response to the current time in the game entering a second time period, switch the first lighting type to a second lighting type within a preset transition time, where the second time period is different from the first time period; Render and display the game scene under the second lighting type on the graphical user interface.
3. The method according to claim 2, wherein Before rendering and displaying the game scene under the second lighting type on the graphical user interface, it further includes: During the preset transition time, render and display the lighting change effect of the game scene switching from the first lighting type to the second lighting type on the graphical user interface.
4. The method according to claim 1, wherein Before controlling the base temperature of the game scene to be adjusted based on the initial base temperature in the first time period according to the influencing temperature, the method further includes: Determine the initial base temperature according to the state parameters of the virtual city in the game scene.
5. The method according to claim 1, characterized in that, The method further includes: Obtain the weather state of the game scene at the current time according to the current time; Render and display the weather state and the game scene under the first lighting type on the graphical user interface according to the weather state.
6. The method according to claim 1, wherein The day-night change configuration table further includes: the correspondence between the multiple time periods and the virtual animal appearance information, and the virtual animal appearance information is used to indicate the appearance information of virtual animals in the game scene in each time period; the method further includes: Determine the virtual animal appearance information corresponding to the first time period where the current time is located from the day-night change configuration table according to the current time; Render and display the virtual animal appearance information and the game scene under the first lighting type on the graphical user interface according to the virtual animal appearance information.
7. The method according to any one of claims 1 to 6, characterized in that, The different lighting types are: lighting types with different light angles and / or different light intensities.
8. A processing device for a game scene, characterized in that, Provide a graphical user interface through a first terminal device, and at least part or all of the game scene is displayed on the graphical user interface. The device includes: a determination module and a display module, where: The determination module is used to determine the first lighting type corresponding to the first time period where the current time is located from a preset day-night change configuration table according to the current time in the game; the day-night change configuration table includes the correspondence between multiple time periods and lighting types, and different time periods correspond to different lighting types; The display module is used to render and display the game scene under the first lighting type on the graphical user interface; The device further includes: a control module, where: The day-night change configuration table further includes: the correspondence between the multiple time periods and the influencing temperature, and the influencing temperature is the temperature change value in the game scene under the action of the lighting type corresponding to each time period; the determination module is specifically used to determine the influencing temperature corresponding to the first time period where the current time is located from the day-night change configuration table according to the current time; The control module is used to control the base temperature of the game scene to be adjusted based on the initial base temperature in the first time period according to the influencing temperature; The day-night change configuration table further includes: the correspondence between the multiple time periods and the lighting state information, and the lighting state information is used to characterize the on-off state of the lights in the game scene in each time period; The determining module is specifically configured to determine, according to the current time, based on the day-night change configuration table and the status information of the virtual building at a preset position in the game scene, the lighting status information corresponding to the first time period in which the virtual building is located at the current time, where the status information of the virtual building is used to indicate whether the virtual building is a building for living or working. If the virtual building is a building without people living or working, the on-off state of the light at the preset position is off; The control module is specifically configured to control the on-off state of the light at a preset position in the game scene to be adjusted according to the lighting status information; The day-night change configuration table further includes: the correspondence between the multiple time periods and the smoking status information, where the smoking status information is used to represent whether the virtual buildings in the game scene are smoking in each time period; The determining module is specifically configured to determine, according to the current time, based on the day-night change configuration table and the status information of the preset virtual building in the game scene, the smoking status information corresponding to the first time period in which the preset virtual building is located at the current time, where the status information of the preset virtual building is used to indicate whether the preset virtual building is a building for living or working. If the preset virtual building is a building without people living or working, the smoking status information is no smoking; The control module is specifically configured to control the smoking status of the preset virtual building in the game scene to be adjusted according to the smoking status information.
9. A processing device for a game scenario, characterized in that, The device includes: a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the processing device of the game scene runs, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to execute the method according to any one of the above claims 1-7.
10. A storage medium, characterized in that, A computer program is stored on the storage medium, and when the computer program is run by the processor, it executes the method according to any one of the above claims 1-7.
Citation Information
Patent Citations
Weather rendering method and device in virtual environment, equipment and storage medium
CN112263837A
Entertainment apparatus, storage medium and method of deciding weather
CN1366465A