Physical interaction verification method and terminal for real-time weather system in game
By dynamically generating weather parameters and building a meteorological-physical coupled model, triggering chain events and measuring actual values, the verification problems of dynamic weather changes and complex reactions in the game physics engine are solved, and efficient automated testing is achieved.
Patent Information
- Application Number
- CN202510405976.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-08-15
AI Technical Summary
The existing technology lacks dynamic coupling testing in game physics engines, and cannot simulate extreme weather changes and complex weather chain reactions. The test efficiency is inefficient, it is difficult to cover all weather parameter combinations, and it is impossible to quantify the impact of weather events on game performance.
Weather parameters are dynamically generated through the meteorological parameter generator, a meteorological-physical coupling model is constructed, chain events are triggered, and the game engine is called to perform physical interaction parameters measurements. The synchronization detector is used to verify the interaction consistency between weather events and the physics engine.
It realizes automated verification of real-time weather systems in the game, can cover extreme weather scenarios, significantly improve testing efficiency, reduce manual operation time and cost, and improve the accuracy and reproducibility of test results.
Smart Images

Figure CN120492287A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of game physics engine testing, and in particular to a physical interaction verification method and terminal for a real-time weather system in a game. Background Art
[0002] The mainstream technology used in current game physics engines to verify in-game weather system physics interactions is typically static weather system testing. This involves using predefined weather parameters (such as fixed wind speed and rainfall) to test in-game visual effects, and manually verifying the impact of weather events on player control (such as a character falling due to slippery roads in the rain). This often has the following drawbacks: 1. Lack of dynamic coupling testing: Static weather parameters cannot simulate the dynamic changes of extreme weather (such as wind speed gradually increasing from 0 to hurricane level); The in-depth interaction between weather events and the physics engine (such as the real-time effect of wind on the character's jump trajectory) is not covered.
[0003] 2. Insufficient coverage of chain events: Manual testing makes it difficult to trigger complex weather chain reactions (e.g., lightning strike → fire → terrain damage → character injury). It's impossible to quantify the impact of weather events on game performance (such as frame rate drops during large-scale fire spreads).
[0004] 3. Low testing efficiency: Relying on manual operation, the test cycle is long (average 10 hours / weather scenario); It is difficult to cover all combinations of weather parameters (such as the combined effects of wind speed + humidity + temperature). Summary of the Invention
[0005] The technical problem to be solved by the present invention is: to provide a physical interaction verification method and terminal for the real-time weather system in the game, which realizes the automated physical interaction verification of the real-time weather system in the game through the meteorological-physical coupling model and the chain event triggering mechanism, breaking through the limitations of static testing.
[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is: A method for verifying physical interaction of a real-time weather system in a game, comprising the steps of: S1. Dynamically generate weather parameters using a meteorological parameter generator, wherein the weather parameters include wind speed, humidity, and temperature; S2. Mapping the weather parameters to calculation rules of a physical engine through a physical engine coupler to construct a meteorological-physical coupling model to simulate changes in the weather parameters over time; S3. Using a chain event trigger to trigger a corresponding chain event according to the meteorological-physical coupling model, and calling a game engine to measure physical interaction parameters for the chain event to obtain actual values; S4. Comparing the actual value with the theoretical value of the theoretical model through a synchronization detector to verify the consistency of the interaction between the weather event and the physical engine.
[0007] In order to solve the above technical problems, another technical solution adopted by the present invention is: A terminal for verifying physical interaction of a real-time weather system in a game comprises a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method for verifying physical interaction of a real-time weather system in a game as described above are implemented.
[0008] The beneficial effects of the present invention are: providing a physical interaction verification method and terminal for a real-time weather system in a game, which realizes the automated verification of the interaction between the real-time weather system in the game and the physical engine by dynamically generating weather parameters, constructing a meteorological-physical coupling model, triggering chain events, measuring actual values and verifying their consistency with theoretical values, solving the problem that traditional static weather tests cannot simulate dynamic weather changes, and can cover the testing requirements of extreme weather scenarios. At the same time, through automated measurement and verification, the test efficiency is significantly improved, the time and cost of manual operation are reduced, the quantitative verification of the interaction between weather events and the physical engine is effectively realized, and the accuracy and reproducibility of the test results are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 This is an overall flow chart of a method for verifying physical interaction of a real-time weather system in a game according to an embodiment of the present invention; Figure 2 This is a structural diagram of a physical interaction verification terminal for a real-time weather system in a game according to an embodiment of the present invention.
[0010] Description of labels: 1. A physical interaction verification terminal for a real-time weather system in a game; 2. Memory; 3. Processor. DETAILED DESCRIPTION
[0011] To illustrate the technical content, achieved objectives and effects of the present invention in detail, the following description is given in conjunction with the embodiments and accompanying drawings.
[0012] Please refer to Figure 1 , a physical interaction verification method for a real-time weather system in a game, comprising the steps of: S1. Dynamically generate weather parameters using a meteorological parameter generator, wherein the weather parameters include wind speed, humidity, and temperature; S2. Mapping the weather parameters to calculation rules of a physical engine through a physical engine coupler to construct a meteorological-physical coupling model to simulate changes in the weather parameters over time; S3. Using a chain event trigger to trigger a corresponding chain event according to the meteorological-physical coupling model, and calling a game engine to measure physical interaction parameters for the chain event to obtain actual values; S4. Comparing the actual value with the theoretical value of the theoretical model through a synchronization detector to verify the consistency of the interaction between the weather event and the physical engine.
[0013] From the above description, it can be seen that the beneficial effects of the present invention are: providing a method for verifying the physical interaction of the real-time weather system in the game, by dynamically generating weather parameters, constructing a meteorological-physical coupling model, triggering chain events, measuring actual values and verifying consistency with theoretical values, thereby realizing automated verification of the interaction between the real-time weather system in the game and the physical engine, solving the problem that traditional static weather tests cannot simulate dynamic weather changes, and can cover the testing requirements of extreme weather scenarios. At the same time, through automated measurement and verification, the test efficiency is significantly improved, the time and cost of manual operation are reduced, the quantitative verification of the interaction between weather events and the physical engine is effectively realized, and the accuracy and reproducibility of the test results are improved.
[0014] Furthermore, before step S2, the following steps are further included: Define the mapping rules between weather parameters and the physics engine. The mapping rules include the influence of wind speed on the character's movement resistance coefficient, the influence of humidity on the ground friction coefficient, and the influence of temperature on the object's volume expansion / contraction rate.
[0015] As can be seen from the above description, by defining the mapping rules between weather parameters and the physical engine, the specific interaction relationship between weather parameters and the physical engine is clarified, making the testing process more systematic and standardized. At the same time, by quantifying the mapping rules, the impact of weather parameters on the physical engine can be precisely controlled, ensuring the scientific nature and reliability of the test results, providing basic rule support for the subsequent construction of the meteorological-physical coupling model, and enhancing the practicality and scalability of the model.
[0016] Furthermore, the step S2 is specifically as follows: S21. Based on the mapping rule, mapping the weather parameters to the physical engine in real time through a physical engine coupler; S22. Use a time series model to generate a dynamic change curve of the weather parameters to simulate the changes in wind speed, humidity, and temperature over time, and obtain a meteorological-physical coupling model that integrates the wind speed changes over time, humidity changes over time, and temperature changes over time based on the dynamic change curve.
[0017] As can be seen from the above description, real-time mapping of weather parameters based on mapping rules and the use of time series models to generate dynamic change curves can simulate the dynamic changes of weather parameters in the real world, improving the authenticity and complexity of the test scenarios. At the same time, the generation of dynamic change curves enables the test to cover the transition process from stable weather to extreme weather, verifying the stability of the physics engine in a dynamic environment. In addition, the integration of multiple weather parameter change models can simultaneously test the combined impact of multiple weather factors on the physics engine, improving the comprehensiveness of the test.
[0018] Furthermore, in step S3, a chain event trigger is used to trigger a corresponding chain event according to the meteorological-physical coupling model, specifically: S31. Define an event chain, where the event chain includes a lightning strike event, a fire spread event, and a terrain damage event; S32. The dynamic change of the weather parameter simulated by the meteorological-physical coupling model triggers the event chain.
[0019] As can be seen from the above description, the automated triggering of complex weather event chains has been achieved, which can simulate the chain reaction of weather events in the real world, that is, lightning strikes first trigger fires and then trigger terrain damage. By dynamically triggering the event chain, it is possible to detect the consistency of game logic and the real-time computing capabilities of the physics engine, discover potential system vulnerabilities, improve the complexity and diversity of test scenarios, cover more extreme and edge cases, and enhance the comprehensiveness of the test.
[0020] Furthermore, the triggering conditions of the event chain are specifically: When the cloud thickness reaches a first preset value or the humidity reaches a second preset value, triggering the lightning strike event; When the triggered lightning strike event meets the fire condition and when the acquired wind speed reaches a third preset value or when the acquired vegetation density data is less than a fourth preset value, triggering the fire spread event; When the fire spread event is triggered and the fire duration exceeds a fifth preset value, the terrain destruction event is triggered.
[0021] As can be seen from the above description, by setting specific trigger conditions, the triggering timing and conditions of the event chain can be precisely controlled, ensuring the controllability and repeatability of the test. It can also simulate chain events under different weather conditions and verify the performance of the game logic and physics engine under various extreme conditions. This improves the degree of test automation, reduces manual intervention, and reduces testing costs and time.
[0022] Furthermore, in step S3, the game engine is called to measure the physical interaction parameters for the chain event to obtain actual values, specifically: S33. Capture the actual values of the character's movement trajectory, ground friction coefficient, and object volume expansion / contraction rate in real time through the API or log system provided by the game engine.
[0023] As can be seen from the above description, real-time monitoring and data collection of the physics engine calculation results are achieved, which can accurately obtain the actual effects of physical interactions in the game. By capturing the actual values of multiple physical parameters, the impact of weather events on objects and characters in the game can be comprehensively evaluated, which improves the coverage of the test and provides a data basis for subsequent comparisons with actual values and theoretical values, ensuring the scientific nature and accuracy of the verification process.
[0024] Furthermore, the step S4 further includes calculating the theoretical value of the physical interaction parameter using a theoretical model, specifically: Calculate the theoretical value of the character's movement trajectory affected by wind speed under the current weather parameters based on the Newtonian mechanics theoretical model; Calculate the theoretical value of the friction coefficient of the ground affected by humidity under the current weather parameters based on the fluid dynamics theoretical model; The theoretical value of the volume expansion / contraction rate of the object under the influence of temperature under the current weather parameters is calculated based on the material thermodynamics theoretical model.
[0025] As can be seen from the above description, the theoretical model provides a baseline value for the physical interaction parameters, which can be compared with the actual calculation results of the physics engine to verify the accuracy of the physics engine. The theoretical model based on the principles of physics is highly scientific and reliable, which can ensure the authority of the test results, and can quantify the calculation deviations of the physics engine, discover potential calculation errors or logical loopholes, and improve the accuracy and credibility of the test.
[0026] Furthermore, the step S4 is specifically as follows: S41. The synchronization detector uses a synchronization detection algorithm to calculate the deviation between the actual value and the corresponding theoretical value: ; Wherein, Δ represents the absolute difference between the actual value and the theoretical value, and τ is a preset threshold; S42. If the absolute difference Δ exceeds a threshold τ, the interaction between the weather event and the physics engine is marked as inconsistent; otherwise, it is marked as consistent.
[0027] As can be seen from the above description, by quantifying deviations, the calculation accuracy of the physical engine can be accurately evaluated and potential calculation errors can be discovered. The preset threshold τ method provides a clear judgment standard, which can quickly identify inconsistent interaction results, improve test efficiency, further realize automated consistency detection, reduce the subjectivity and errors of manual judgment, and enhance the objectivity and reliability of the test.
[0028] Furthermore, after step S4, the following steps are further included: S5. Generate a test report based on the verification results and mark inconsistent results as potential vulnerabilities.
[0029] As can be seen from the above description, by generating a test report, the test results can be systematically recorded, which is convenient for subsequent analysis and troubleshooting. At the same time, inconsistent results are marked as potential vulnerabilities, which can quickly locate the problem and improve the efficiency of problem repair. As a whole, a complete test closed loop is provided, which ensures the standardization and traceability of the test process and enhances the practicality and value of the test.
[0030] Please refer to Figure 2 A physical interaction verification terminal for a real-time weather system in a game includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the above-mentioned method for physical interaction verification of a real-time weather system in a game are implemented.
[0031] From the above description, it can be seen that the beneficial effects of the present invention are: based on the same technical concept, in conjunction with the above-mentioned in-game real-time weather system physical interaction verification method, a real-time weather system physical interaction verification terminal is provided. By dynamically generating weather parameters, constructing a meteorological-physical coupling model, triggering chain events, measuring actual values and verifying consistency with theoretical values, the automatic verification of the interaction between the real-time weather system and the physical engine in the game is realized, which solves the problem that traditional static weather tests cannot simulate dynamic weather changes, and can cover the testing requirements of extreme weather scenarios. At the same time, through automated measurement and verification, the test efficiency is significantly improved, the time and cost of manual operation are reduced, the quantitative verification of the interaction between weather events and the physical engine is effectively realized, and the accuracy and reproducibility of the test results are improved.
[0032] The present invention provides a method and terminal for verifying physical interaction with a real-time weather system in a game. The method and terminal are mainly used in dynamic simulation of the weather system in the game and testing scenarios of its physical interaction. The following is a detailed description with reference to specific embodiments: Please refer to Figure 1 , embodiment 1 of the present invention is: A physical interaction verification method for real-time weather system in game, such as Figure 1 As shown, the steps include: S1. Dynamically generate weather parameters through a meteorological parameter generator. In this embodiment, the weather parameters include wind speed, humidity and temperature.
[0033] S2. Mapping weather parameters to the calculation rules of the physical engine through the physical engine coupler, and constructing a meteorological-physical coupling model to simulate the changes of weather parameters over time.
[0034] S3. Use chain event triggers to trigger corresponding chain events according to the meteorological-physical coupling model, and call the game engine to measure the physical interaction parameters for the chain events to obtain actual values.
[0035] S4. Compare the actual values with the theoretical values of the theoretical model through the synchronization detector to verify the consistency of the interaction between the weather event and the physical engine.
[0036] That is, in this embodiment, by dynamically generating weather parameters, constructing a meteorological-physical coupling model, triggering chain events, measuring actual values and verifying their consistency with theoretical values, automated verification of the interaction between the real-time weather system and the physics engine in the game is achieved, which solves the problem that traditional static weather tests cannot simulate dynamic weather changes, and can cover the testing requirements of extreme weather scenarios. At the same time, through automated measurement and verification, the testing efficiency is significantly improved, the time and cost of manual operations are reduced, the quantitative verification of the interaction between weather events and the physics engine is effectively achieved, and the accuracy and reproducibility of the test results are improved.
[0037] The second embodiment of the present invention is: A method for verifying physical interaction of a real-time weather system in a game, based on the above-mentioned embodiment 1, in this embodiment, before step S2, further includes: Define the mapping rules between weather parameters and the physics engine. The mapping rules include the influence of wind speed on the character's movement resistance coefficient, the influence of humidity on the ground friction coefficient, and the influence of temperature on the object's volume expansion / contraction rate.
[0038] In this embodiment, the parameter mapping rules may be as shown in Table 1 below: Table 1. Parameter mapping rules
[0039] That is, in this embodiment, by defining the mapping rules between weather parameters and the physical engine, the specific interaction relationship between weather parameters and the physical engine is clarified, making the testing process more systematic and standardized; at the same time, by quantifying the mapping rules, the impact of weather parameters on the physical engine can be accurately controlled, ensuring the scientificity and reliability of the test results, providing basic rule support for the subsequent construction of the meteorological-physical coupling model, and enhancing the practicality and scalability of the model.
[0040] Then step S2 is specifically as follows: S21. Based on the mapping rules, the weather parameters are mapped to the physical engine in real time through the physical engine coupler.
[0041] S22. Use a time series model to generate a dynamic change curve of weather parameters to simulate the changes in wind speed, humidity, and temperature over time. According to the dynamic change curve, a meteorological-physical coupling model is obtained that integrates the wind speed changes over time, the humidity changes over time, and the temperature changes over time.
[0042] In this embodiment, the dynamic change simulation can be shown in Table 2 below: Table 2. Dynamic change simulation
[0043] in: 1. The model function of wind speed changing with time is as follows: wind_speed=max_wind·(1-np.exp(-t / time_constant)) Where t represents the time from the start of wind speed growth to the current moment; time_constant is the time constant, representing the time required for the wind speed to reach 63% of the maximum speed. The smaller the time constant, the faster the wind speed increases; max_wind is the maximum wind speed, representing the peak wind speed (such as hurricane-force wind speed); np.exp(-t / time_constant) is an exponential decay function used to simulate the dynamic change of wind speed over time.
[0044] 2. The model function of humidity changing with time t is as follows: humidity=base_humidity+(max_humidity-base_humidity)·(1-np.exp(-t / humidity_time_constant))·np.sin(2πt / 24) This function shows exponential growth and periodic fluctuations. t represents the time from the start of the humidity change to the current moment; base_humidity is the base humidity, representing the initial humidity value, which can be set to 50%; max_humidity is the peak humidity, representing the maximum humidity value, which can be set to 90%; humidity_time_constant is the humidity change time constant, representing the time required for the humidity to reach 63% of the peak humidity, which is used to control the growth rate. A smaller time constant results in a faster humidity change; np.exp(-t / humidity_time_constant) is an exponential decay function used to simulate the dynamic change of humidity over time; and np.sin(2πt / 24) is a sine function used to simulate the periodic fluctuation of humidity during the day and night (with a period of 24 hours).
[0045] 3. The model function of temperature changing with time is as follows: if t <day_duration: temperature=day_base_temp+(t / day_duration) temp_increase_rate+np.random.normal(0,0.5) else: temperature=night_base_temp-((t-day_duration) / night_duration) temp_decrease_rate+np.random.normal(0,0.3) This function simulates diurnal temperature fluctuations using a piecewise linear model combined with random perturbations. day_duration represents the length of daytime, which can be set to 12 hours; temp_increase_rate represents the daytime temperature increase rate, which can be set to 2°C / hour; night_duration represents the length of nighttime, which can be set to 12 hours; and temp_decrease_rate represents the nighttime temperature decrease rate, which can be set to 1°C / hour. np.random.normal() is used to add random perturbations to simulate real-world environmental fluctuations.
[0046] That is, weather parameters are mapped in real time based on mapping rules, and dynamic change curves are generated using time series models, which can simulate the dynamic changes of weather parameters in the real world and improve the authenticity and complexity of the test scenarios. At the same time, the generation of dynamic change curves enables the test to cover the transition process from stable weather to extreme weather, verifying the stability of the physical engine in a dynamic environment. It also integrates the change models of multiple weather parameters and can simultaneously test the combined impact of multiple weather factors on the physical engine, improving the comprehensiveness of the test.
[0047] The third embodiment of the present invention is: A method for verifying physical interaction of a real-time weather system in a game is provided. Based on the above-mentioned second embodiment, in this embodiment, a chain event trigger is used in step S3 to trigger a corresponding chain event according to a meteorological-physical coupling model, specifically: S31. Define the event chain, which includes lightning strike events, fire spread events, and terrain damage events.
[0048] S32. Dynamic changes in weather parameters simulated by a meteorological-physical coupling model trigger an event chain.
[0049] That is, in this embodiment, the automatic triggering of complex weather event chains is realized, which can simulate the chain reaction of weather events in the real world, that is, lightning strikes first trigger fires and then trigger terrain destruction. By dynamically triggering the event chain, the consistency of game logic and the real-time computing capabilities of the physics engine can be detected, potential system vulnerabilities can be discovered, the complexity and diversity of the test scenarios are improved, more extreme and edge cases can be covered, and the comprehensiveness of the test is enhanced.
[0050] The triggering conditions of the event chain are as follows: When the cloud thickness reaches a first preset value or the humidity reaches a second preset value, a lightning strike event is triggered. That is, the triggering probability of a lightning strike event is positively correlated with the cloud thickness and humidity.
[0051] When the triggered lightning strike event meets the fire conditions and when the acquired wind speed reaches the third preset value or when the acquired vegetation density data is less than the fourth preset value, a fire spread event is triggered, that is, the flame spread speed is positively correlated with the wind speed and vegetation density.
[0052] When a fire spread event is triggered and the fire duration exceeds a fifth preset value, a terrain destruction event, such as terrain collapse, is triggered.
[0053] By setting specific trigger conditions, the triggering timing and conditions of the event chain can be precisely controlled to ensure the controllability and repeatability of the test. It can also simulate chain events under different weather conditions and verify the performance of the game logic and physics engine under various extreme conditions. This improves the degree of test automation, reduces manual intervention, and reduces testing costs and time.
[0054] At the same time, in this embodiment, the game engine is called in step S3 to measure the physical interaction parameters for the chain event to obtain the actual value, specifically: S33. Capture the character's movement trajectory, the actual values of the ground friction coefficient, and the object's volume expansion / contraction rate in real time through the game engine's API or logging system. The character's movement trajectory can be obtained by recording the sequence of the character's coordinates (x, y, z) changing over time.
[0055] That is, it realizes real-time monitoring and data collection of the calculation results of the physics engine, and can accurately obtain the actual effects of physical interactions in the game; by capturing the actual values of multiple physical parameters, it can comprehensively evaluate the impact of weather events on objects and characters in the game, improve the coverage of the test, and provide a data basis for subsequent comparison of actual values with theoretical values, ensuring the scientific nature and accuracy of the verification process.
[0056] In addition, in this embodiment, step S4 also includes calculating the theoretical value of the physical interaction parameter using a theoretical model, specifically: The theoretical value of the character's movement trajectory affected by wind speed under current weather parameters is calculated based on the Newtonian mechanics theoretical model, such as the parabola equation.
[0057] The theoretical value of the friction coefficient of the ground affected by humidity under current weather parameters is calculated based on a fluid dynamics theoretical model, such as a simplified model based on the Navier-Stokes equation.
[0058] The theoretical value of the volume expansion / contraction rate of an object affected by temperature under current weather parameters is calculated based on the material thermodynamics theoretical model. For example, the linear expansion formula is: ΔL=αL0×ΔT, where α is the material expansion coefficient of the metal object, L0 is the initial length of the metal object, and ΔT is the temperature change.
[0059] That is, the theoretical model provides a benchmark value for the physical interaction parameters, which can be compared with the actual calculation results of the physical engine to verify the accuracy of the physical engine. The theoretical model based on the principles of physics is highly scientific and reliable, which can ensure the authority of the test results, and can quantify the calculation deviation of the physical engine, discover potential calculation errors or logical loopholes, and improve the accuracy and credibility of the test.
[0060] Then step S4 is specifically as follows: S41. The synchronism detector uses a synchronism detection algorithm to calculate the deviation between the actual value and the corresponding theoretical value: ; Where Δ represents the absolute difference between the actual value and the theoretical value, and τ is a preset threshold used to determine whether the difference between the actual value and the theoretical value is acceptable.
[0061] S42. If the absolute difference Δ exceeds a threshold τ, the interaction between the weather event and the physics engine is marked as inconsistent; otherwise, it is marked as consistent.
[0062] That is, by quantifying the deviation, the calculation accuracy of the physical engine can be accurately evaluated and potential calculation errors can be discovered; the preset threshold τ method provides a clear judgment standard, which can quickly identify inconsistent interaction results, improve test efficiency, further realize automated consistency detection, reduce the subjectivity and errors of manual judgment, and improve the objectivity and reliability of the test.
[0063] In addition, in this embodiment, after step S4, the following steps are further included: S5. Generate a test report based on the verification results and mark inconsistent results as potential vulnerabilities.
[0064] That is, by generating a test report, the test results can be systematically recorded, which is convenient for subsequent analysis and troubleshooting. At the same time, inconsistent results can be marked as potential vulnerabilities, which can quickly locate the problem and improve the efficiency of problem repair. The overall test loop is provided, ensuring the standardization and traceability of the test process, and enhancing the practicality and value of the test.
[0065] The following provides the verification process of weather system and physical interaction in several specific scenarios.
[0066] Scene 1: Character movement test in hurricane weather Test goal: Verify the physical plausibility of the character moving in the hurricane Implementation process: Dynamically adjust the wind speed (0→30m / s), record the character's movement trajectory, and compare the deviation between the actual trajectory and the theoretical trajectory. The dynamic adjustment of wind speed is as follows: (1) Uniform speed adjustment: wind_speed=initial_speed+(target_speed-initial_speed)·(t / total_time) Among them, initial_speed is the initial wind speed, which indicates the starting value of the wind speed (such as 0m / s); target_speed is the target wind speed, which indicates the final value of the wind speed (such as 30m / s); t is the time from the beginning of the wind speed change to the current moment; total_time is the total time required for the wind speed to change from the initial value to the target value; (t / total_time) is the time scale factor, which indicates the proportion of the current time to the total time.
[0067] Features: Linear changes, suitable for testing steady-state physical effects (such as character movement resistance under constant wind force).
[0068] (2) Speed adjustment (simulating a real hurricane): wind_speed=max_wind·(1-np.exp(-t / time_constant))·np.sin(2πt / period) Here, period is the cycle, which represents the length of a complete cycle of wind speed fluctuations (such as 24 hours to simulate day and night changes).
[0069] Features: Introducing exponential growth and periodic fluctuations to test the impact of dynamic wind speed on character balance.
[0070] The effects of different adjustment methods are shown in Table 3 below: Table 3: Impact of different adjustment methods
[0071] Scenario 2: Chain event test of a forest fire caused by a lightning strike Test goal: Check the synchronization between fire spread logic and character damage calculation Implementation process: simulate a lightning strike to trigger a fire; then monitor the consistency of the flame spread speed and terrain destruction logic; finally verify the accuracy of the character's injury determination in the fire. The monitoring method is as follows: (1) Flame spread rate monitoring: Vertex coordinate sampling: collect the boundary vertex coordinates of the flame coverage area every second; The diffusion rate calculation formula is as follows: ; in, v 实际 is the actual speed at which the flame spreads in the game, ( x 1, y 1) For flame in time t 1, the boundary vertex coordinates, ( x 2, y 2) For flame in time t 2, the boundary vertex coordinates, ( t 2- t 1) is the time interval, indicating the flame from ( x 1, y 1) spread to ( x 2, y 2) The time taken.
[0072] (2) Terrain destruction consistency detection: a. Terrain grid status comparison: Compare the damage state of the terrain mesh (such as vertex height, texture ID) before and after the fire is triggered; Use hash algorithm to generate terrain status fingerprint and quickly determine whether it is consistent.
[0073] b. Theoretical model predictions: The expected damage range is calculated based on the flame temperature, duration, and terrain material combustion coefficient. The formula is as follows: ; in, R 破坏半径 is the radius of the terrain damage caused by the fire, in length units (e.g., meters); k 材质 The combustion coefficient of the terrain material, which indicates the sensitivity of the material to flames. Different materials (such as wood, stone, and metal) have different combustion coefficients. T ( t ) is the flame at time tThe temperature function at time t represents the change of flame temperature with time; f 0 t T ( t ) dt is the integral of flame temperature over time, indicating the t The cumulative thermal effect of the internal flame on the terrain. The consistency determination rules are as follows: If the actual diffusion rate deviates from the theoretical value by >10%, or the range of terrain damage does not match the prediction, it is marked as a logical error.
[0074] A physical interaction verification method for a real-time weather system in a game according to this embodiment significantly improves the effect compared to the prior art, as shown in Table 4 below: Table 4. Advantages compared to existing technologies
[0075] Please refer to Figure 2 , the fourth embodiment of the present invention is: A physical interaction verification terminal 1 for a real-time weather system in a game includes a memory 2, a processor 3, and a computer program stored in the memory 2 and executable on the processor 3. When the processor 3 executes the computer program, the steps of a physical interaction verification method for a real-time weather system in a game are completed in any one of the above-mentioned embodiments 1 to 4.
[0076] In summary, the present invention provides a method and terminal for verifying physical interaction of a real-time weather system in a game, which has the following beneficial effects: 1. Dynamic Weather Simulation: Dynamic weather parameters are generated through time series models, covering scenarios that cannot be simulated by traditional static testing. Weather parameters are mapped to the physics engine in real time to verify interactive stability under extreme conditions. The meteorological-physical coupling model quantifies and controls the impact of weather parameters on the physics engine, improving the reproducibility of test results by 95%.
[0077] 2. Chain Event Coverage: Automatically trigger complex event chains (e.g., lightning strike → fire → terrain damage), test logical consistency, and quantify the impact of weather events on game performance (e.g., frame rate, memory usage). The chain event triggering mechanism enables automated testing of complex weather event chains for the first time, increasing the probability of discovering hidden vulnerabilities by 70%.
[0078] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's description and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A physical interaction verification method for a real-time weather system in a game, characterized in that: Including steps: S1. Dynamically generate weather parameters using a meteorological parameter generator, wherein the weather parameters include wind speed, humidity, and temperature; S2. Mapping the weather parameters to calculation rules of a physical engine through a physical engine coupler to construct a meteorological-physical coupling model to simulate changes in the weather parameters over time; S3. Using a chain event trigger to trigger a corresponding chain event according to the meteorological-physical coupling model, and calling a game engine to measure physical interaction parameters for the chain event to obtain actual values; S4. Comparing the actual value with the theoretical value of the theoretical model through a synchronization detector to verify the consistency of the interaction between the weather event and the physical engine.
2. A physical interaction verification method for a real-time weather system in a game according to claim 1, characterized in that: Before step S2, the following steps are also included: Define the mapping rules between weather parameters and the physics engine. The mapping rules include the influence of wind speed on the character's movement resistance coefficient, the influence of humidity on the ground friction coefficient, and the influence of temperature on the object's volume expansion / contraction rate.
3. A physical interaction verification method for a real-time weather system in a game according to claim 2, characterized in that: The step S2 is specifically as follows: S21. Mapping the weather parameters to a physical engine in real time through a physical engine coupler based on the mapping rule; S22. Use a time series model to generate a dynamic change curve of the weather parameters to simulate the changes in wind speed, humidity, and temperature over time, and obtain a meteorological-physical coupling model that integrates the wind speed changes over time, humidity changes over time, and temperature changes over time based on the dynamic change curve.
4. A physical interaction verification method for a real-time weather system in a game according to claim 1, characterized in that: In step S3, a chain event trigger is used to trigger a corresponding chain event according to the meteorological-physical coupling model, specifically: S31. Define an event chain, where the event chain includes a lightning strike event, a fire spread event, and a terrain damage event; S32. The dynamic change of the weather parameter simulated by the meteorological-physical coupling model triggers the event chain.
5. A physical interaction verification method for a real-time weather system in a game according to claim 4, characterized in that: The triggering conditions of the event chain are specifically: When the cloud thickness reaches a first preset value or the humidity reaches a second preset value, triggering the lightning strike event; When the triggered lightning strike event meets the fire condition and when the acquired wind speed reaches a third preset value or when the acquired vegetation density data is less than a fourth preset value, triggering the fire spread event; When the fire spread event is triggered and the fire duration exceeds a fifth preset value, the terrain destruction event is triggered.
6. A physical interaction verification method for a real-time weather system in a game according to claim 5, characterized in that: In step S3, the game engine is called to measure the physical interaction parameters for the chain event to obtain actual values, specifically: S33. Capture the actual values of the character's movement trajectory, ground friction coefficient, and object volume expansion / contraction rate in real time through the API or log system provided by the game engine.
7. A physical interaction verification method for a real-time weather system in a game according to claim 6, characterized in that: The step S4 also includes calculating the theoretical value of the physical interaction parameter using a theoretical model, specifically: Calculate the theoretical value of the character's movement trajectory affected by wind speed under the current weather parameters based on the Newtonian mechanics theoretical model; Calculate the theoretical value of the friction coefficient of the ground affected by humidity under the current weather parameters based on the fluid dynamics theoretical model; The theoretical value of the volume expansion / contraction rate of the object under the influence of temperature under the current weather parameters is calculated based on the material thermodynamics theoretical model.
8. The method for verifying physical interaction of a real-time weather system in a game according to claim 1, characterized in that: The step S4 is specifically as follows: S41. The synchronization detector uses a synchronization detection algorithm to calculate the deviation between the actual value and the corresponding theoretical value: ; Wherein, Δ represents the absolute difference between the actual value and the theoretical value, and τ is a preset threshold; S42. If the absolute difference Δ exceeds a threshold τ, the interaction between the weather event and the physics engine is marked as inconsistent; otherwise, it is marked as consistent.
9. The method for verifying physical interaction of a real-time weather system in a game according to claim 1, characterized in that: After step S4, the following steps are also included: S5. Generate a test report based on the verification results and mark inconsistent results as potential vulnerabilities.
10. A physical interactive verification terminal for a real-time weather system in a game, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the physical interaction verification method of a real-time weather system in a game as described in any one of claims 1 to 9 are implemented.