Reading Settings
Font Size
16px
Line Spacing
1.6
Reading Width
900px
Font Share
Theme
Text To Speech

14: Midnight Revolution of Physics Engine

Cheng Mo stared at the screen, his fingers hovering over the keyboard without moving. The jumping platform trajectory that had just run traced a bizarre arc in the air—the first half was relatively smooth, but the second half seemed as if it had been rubbed out by an eraser, suddenly collapsing as the character plummeted straight into the void. He narrowed his eyes, pulled the playback to the frame of the fourteenth failure, and dragged it millisecond by millisecond.

"That's not right," he whispered. "It's not a rhythm issue; the underlying logic has collapsed."

Chen Hao looked up from the secondary station, a half-unwrapped lollipop still dangling from his mouth. "You want to rewrite it again?"

"It's not that I want to." Cheng Mo stood up, walked to the whiteboard, and wiped away the "g=9.8" he had written earlier, chalk dust fluttering into the folds of his cargo pants. "It's that I must. I just adjusted the data from 'Lone Wolf's' last cycle and drew a heat map—look here."

He turned on the projector, and a dense cluster of red dots appeared on the wall. "All take-off angles are concentrated in the ±2.3-degree range, and the convergence speed of landing deviations is four times faster than expected. What does that mean? It means even with reflective disturbances added, gravity itself is still fixed. As long as you try enough times, the human brain can model and predict it."

Chen Hao took off his glasses, wiped the lenses with the corner of his shirt, and put them back on. "So what you're trying to do now is make physics itself unlearnable?"

"Exactly." Cheng Mo turned around, his right fingertips unconsciously rubbing his ear stud. "I want every jump to look different, not because the operation changed, but because the air, the time, and the input signals are all changing. This isn't just parameter tuning; it's tearing it all down and starting over."

Chen Hao didn't speak. He turned and walked toward the bookshelf in the corner. Three minutes later, he returned carrying a copy of Advanced Physics thick enough to be used as a brick, thumping it down on the table. He flipped to the chapter on fluid mechanics and pointed his finger at the formula for the air resistance coefficient.

"If gravity can change, why can't wind resistance follow the player's heartbeat?" he said. "Rising blood pressure, tensed muscles, distorted operations—all of these affect the precision of micro-management. If we can translate this sense of physiological pressure into real resistance within the game..."

"You're full of it," Cheng Mo scoffed. "We don't even have a heart rate belt. How are we supposed to measure blood pressure? Rely on players to voluntarily report it?"

"We don't need real measurements." Chen Hao sat back in his chair, hands crossed over his knees, his tone as calm as if he were talking about the weather. "We can simulate it. When a person is nervous, the frequency of mouse jitter increases, the interval between keystrokes shortens, and invalid clicks multiply. This behavioral data can be collected right now. We'll treat it as a 'pseudo-blood pressure fluctuation' proxy variable and feed it into the resistance function."

Cheng Mo stared at him for two seconds and suddenly smiled. "Are you serious?"

"Why wouldn't I be?" Chen Hao pushed up his glasses. "If you want to make it unpredictable, then don't just change gravity. Even the air has to learn how to read people's hearts."

The two fell silent for a few seconds. The hum of the server fans filled the gap.

Cheng Mo turned back to the main console and created a new script file, naming it "v0.2.0a_phys_revolution.py". He typed the first line of code:

`def calculate_gravity(delta_time, input_velocity):`

Then he stopped and turned back to ask, "What should we use for the noise source? System time is too prone to cycle collisions, and pseudo-randomness isn't crazy enough."

"Use the standard deviation of the input velocity." Chen Hao leaned over. "Sample the mouse movement vector every 0.5 seconds and calculate the fluctuation intensity to use as a perturbation seed. The more panicked the player, the more unstable the gravity."

Cheng Mo nodded and continued writing:

`noise_seed = np.std(input_buffer[-50:]) * 1000`

`g_baseise_seed`

"Add another layer of inertial memory." Chen Hao pointed at the screen. "Don't make the changes too abrupt. Otherwise, players will think it's a bug, not a design."

"Understood." Cheng Mo created a new buffer variable. "The operational characteristics of the previous 0.5 seconds will be smoothly inherited. The changes will have a traceable logic but will be impossible to replicate."

They began to work separately. Cheng Mo restructured the gravity module, while Chen Hao wrote the wind resistance linkage logic. Only the sound of keyboard clicks and occasional complaints remained in the room.

"Is setting this coefficient to 0.68 too clean? It looks intentional."

"Then change it to √(2)/2. No one will understand it anyway."

"You're lazy, just copying mathematical constants."

"As long as it's practical."

Time slipped through the afternoon as the light outside turned from bright to dim. Instant noodle cups piled up in the corner of the desk, and three empty Red Bull cans lay side-by-side on the edge of the trash can. Cheng Mo's right hand began to twirl a pen, the barrel rolling between his knuckles so fast it was almost a blur. Chen Hao glanced over but said nothing, silently switching the sixth backup phone to screen recording mode and naming it "Engine Verification_Channel 6".

At 11:17 PM, the first version of the composite model was completed. Cheng Mo pressed the run key.

The screen flickered, and the character appeared at the edge of the jumping platform.

They held their breath.

The first step of the run-up was normal, the second was slightly delayed, and the third suddenly accelerated—at the moment of take-off, the screen jittered slightly, as if the air itself were breathing. After the character took flight, the trajectory unfolded in a slight wave pattern, the descent speed fluctuating, eventually landing on the right edge of the platform, wobbling twice before stabilizing.

"Did it work?" Chen Hao asked softly.

"Wait." Cheng Mo shook his head. "Look at the second time."

They manually reset the level. The parameters were unchanged, and the input conditions were the same. The character jumped again.

This time the arc was higher, but midway through it seemed to hit an invisible air current, shifting horizontally by nearly half a meter, barely stepping onto the left side of the platform, almost falling off.

The third time, the trajectory was flatter, and the landing point was centered.

The fourth time, it crashed directly.

"It's different." Cheng Mo's lips twitched. "Completely different. With the same input, every result fluctuates within a reasonable range, but they never repeat."

"Wind resistance is also in effect." Chen Hao pointed at the data panel. "During the second jump, the system detected a 17% increase in mouse jitter frequency and automatically raised the air density coefficient."

"Good." Cheng Mo took a deep breath. "Now let's make it a little crazier."

He opened the noise function, removed the normalization limits, and increased the upper bound of the perturbation amplitude from ±0.3 to ±0.8. Save, deploy, restart simulation.

The fifth run began.

As soon as the character jumped, it plummeted violently in mid-air, the trajectory turning into a jagged, broken line as if being torn by an invisible hand. The sixth time was worse, dropping vertically on the spot. The seventh time, it jumped right off the screen boundaries.

"The amplitude is too large." Chen Hao frowned. "This isn't a challenge; it's a punishment."

"I know." The speed of the pen twirling in Cheng Mo's right hand increased, the tip rubbing against the edge of the keyboard with a faint sound. The eighth time, the ninth time... after six consecutive failures, his movements grew increasingly frantic until there was a soft "snap"—the tip of the pen broke, black plastic fragments flew out, and a drop of ink splashed onto the Enter key.

He froze for half a second, shook his hand, and threw the broken pen into the trash.

"The problem isn't the algorithm," he said. "It's the experience disconnect. The changes need to have memory; it can't be a new world in every frame."

Chen Hao nodded. "Add an inertial buffer. Let the current frame's physics parameters inherit the operational trends from the previous 0.5 seconds. It should change, but not chaotically."

Cheng Mo reopened the code and added a new sliding average queue, incorporating the input fluctuations of the past fifty frames into the weight calculation. He typed the final line:

`gravity_current = smooth_interpolate(g_buffer, window=50)`

Pressed save.

He didn't run it immediately.

He stared at the screen, his right hand resting above the keyboard and his left hand touching his ear stud. Chen Hao stood by the secondary station, his glasses reflecting the blue light from the code window, a notebook in his hand, the tip of his pen hovering over the paper.

2:59 AM.

Cheng Mo pressed run.

The character jumped.

This time, the arc stretched out like a breath, rising and falling naturally yet irregularly. As it crossed the air, it seemed to be gently nudged by invisible currents, finally landing in the center of the platform with steady steps and no wobbling.

They didn't speak.

Cheng Mo dragged the playback back and checked it frame by frame. The gravity value of every frame was being fine-tuned, and the wind resistance coefficient fluctuated with the operations, but the overall trajectory always remained within a "reasonable accident" range acceptable to humans—neither reproducible nor so extreme that it felt like a program crash.

"It's done," Chen Hao said softly, looking down to write in his notebook: "v0.2.0a – Physics engine reconstruction successful."

Cheng Mo didn't respond. He reset the simulation and ran it again.

Same input.

Different trajectory.

Run again.

Another new path.

Seven tests, seven unique jumping curves, all landing within the safe landing zone.

He leaned back into his chair, the dark circles under his eyes appearing deeper in the cold light of the monitor, stubble messily clinging to his jaw. Beside his right hand were the broken pen barrel and the ink-stained keyboard. His eyes were fixed on the perfectly looping jumping platform trajectory on the screen, his expression solemn, neither claiming victory nor calling it quits.

Chen Hao stood by the secondary station, leaning forward slightly as if wanting to continue optimizing the parameters, not yet leaving his post. The server fans continued their low hum, slightly louder than yesterday, perhaps due to the increased load. The old wall clock was still stopped, the minute hand stuck between seven and eight, but the electronic clock on the desk showed that the time had reached 3:07 AM.

Cheng Mo's left hand slowly rose, hovering over the Enter key.

He was prepared to run it one more time.

Prev Next

🔊 Text To Speech

Listen while reading

Ready