[KongchangAI]
· 2 min read· 1,244 words

Gemini 4 vs DeepSeek: Who's Better at Coding a Tesla Flying Car Game? Test Results Are Surprising

Gemini 4 vs DeepSeek: Who's Better at Coding a Tesla Flying Car Game? Test Results Are Surprising

Creator had Gemini 4 and DeepSeek V4 Pro replicate Tesla flying car physics in vanilla JS—Gemini wins.

A Bilibili creator tested Gemini 4 and DeepSeek V4 Pro by asking each to write a real-physics webpage in vanilla JS for the Tesla flying car scene, with ramp flip and jumping five cars. Gemini 4 produced a working draft in three minutes: ramp flip ran first try (only tuning needed), and jump-five-cars crashed initially but self-fixed after vague feedback. DeepSeek V4 Pro had longer code and a complete UI but misjudged landing on the first frame due to initial position coinciding with the ground; even after rewriting, it didn't fix it, and smaller model B4.1 Flash also underperformed. The creator stresses this is a single-task comparison, not representative of overall model ability.

When AI Meets the Tesla Flying Car: A Physics Simulation Showdown

The flying car from Tesla's recent launch event has sparked a lot of discussion—its chassis fans stick to the ramp, allowing it to climb upside down; after launching off the ramp, it flips mid-air, then uses cold-gas thrusters to decelerate and land. A Bilibili creator had a sudden idea: could AI replicate this scene?

He picked two contenders: Google's Gemini 4 and DeepSeekAd V4 Pro. The task was to write a webpage using vanilla JS, with real physics calculations—no faking it with animations—and two gameplay modes: ramp flip and jumping over five parked cars. Each got only one initial attempt, and the results were dramatically different.

No one has tested this independently anyway

Round 1: Ramp Flip—Gemini Nails It on the First Try

Gemini 4 finished in just over three minutes. The creator clicked start, and the car actually drove up the ramp, climbed upside down, flipped in the air, and used thrusters to decelerate—all in one smooth sequence. However, with default parameters it crashed on landing—increasing the thrust and jet parameters slightly allowed it to land stably.

DeepSeek V4 Pro took six and a half minutes, produced longer code, and had a complete interface. But the moment he clicked start, it immediately displayed "crashed"—the car didn't move at all. The creator dug into the code and found that the car's initial position height was exactly equal to the ground, and the code had a line saying "touching the ground counts as landing," so it judged itself as landed on the very first frame. He tried nine different window sizes and various initial setups—same result every time.

Height exactly equals ground

The "upside-down climbing" mentioned in the article relies on adhesion force rather than ordinary tire friction: when the vehicle is upside down beneath the ramp, gravity points opposite to the ramp surface normal, so the chassis fans must continuously provide negative pressure (suction) pointing toward the ramp surface to give the tires enough normal force to generate friction. In physics simulation, this typically requires applying a separate force inward along the ramp surface normal, solved together with the normal support force and friction—otherwise the vehicle will simply detach and fall. This is also why this scenario is harder to model correctly than ordinary climbing.

Round 2: Jumping Five Cars—Gemini Fixes It in One Revision

In the jump-five-cars mode, Gemini 4's first attempt hit the first car no matter how the parameters were adjusted—the takeoff point was only about one meter from the first car, so it crashed before even getting airborne. The creator simply told it "what's wrong," and Gemini fixed it itself—landing stably on the second try.

DeepSeek V4 Pro rewrote the entire code after being told the problem, but clicking start still resulted in an immediate crash. The creator also tried DeepSeek's smaller model B4.1 Flash: it could climb and flip on the ramp but crashed at the end, and in jump-five-cars it just crawled slowly.

Gemini runs on the first try

"Jumping five cars" is a classic projectile motion + collision detection scenario: after launching off the ramp, the vehicle is only subject to gravity (and jet thrust), horizontal velocity determines how far it can fly, and the takeoff point's position and angle together determine the trajectory. Gemini's first failure was because the takeoff point was only about one meter from the first car—the vehicle entered the collision body's range before gaining enough vertical displacement. The correct approach is usually to move the takeoff point back, increase the launch angle, or raise the initial velocity so that the trajectory rises above the car roof height before reaching the first car, and to make the landing detection distinguish between "hitting an obstacle" and "touching the ground."

Results and Reflections: A Single Test Can't Determine a Winner

The creator's conclusion is clear: Gemini won this challenge. But he also emphasized that he only tested this one task—a different one could yield completely different results. DeepSeek was called directly via the official API without special environment setup, different from Gemini's environment, so speed wasn't compared.

This test reveals several key points: AI's depth of understanding of physics simulation, the rigor of code initial states, and the ability to iteratively fix based on feedback. Gemini was closer to a runnable state on first generation, while DeepSeek's code, though longer, made basic logic errors.

It crashed on landing

The Technical Differences Behind It: Physics Engines and State Management

At the code level, Gemini seems better at handling state transitions in physics simulation—for example, "landing" detection needs to combine velocity, position, and contact state, rather than simple ground collision. DeepSeek's code may have over-relied on simple conditional checks, leading to the first-frame misjudgment.

Additionally, Gemini could precisely fix the takeoff position after receiving vague feedback like "what's wrong," indicating a better understanding of spatial relationships. DeepSeek's rewrite, though substantial in engineering effort, didn't grasp the core issue.

Of course, this is just a non-rigorous controlled experiment. Different models have their strengths and weaknesses on different tasks, and prompts, environments, and API calling methods all affect results. The creator posted the prompts in the comments section, encouraging everyone to try it themselves.

"Landing detection" is the most error-prone state machine logic in this type of simulation. A reasonable implementation typically requires multiple conditions to be met simultaneously: the distance between the vehicle's lowest point and the ground is below a threshold, the vertical velocity is downward (or near zero), and the previous frame was in an "airborne" state—only then does it trigger the landing event and switch to the "grounded" state, with a brief tolerance frame to avoid jitter. If only "position intersecting with ground counts as landing" is used, then when the initial placement is exactly at ground level, the first frame will be misjudged as landing, locking the vehicle before it even moves. This is the direct cause of DeepSeek's code "crashing without moving" in the article.

Conclusion: How Far Is AI from Writing Game Physics?

A complex physics scenario like the Tesla flying car is a great stress test for AI's code generation capabilities. Gemini 4 performed more steadily in this test, but DeepSeek V4 Pro's longer code and complete interface also show potential. As models iterate, such tasks may become easier in the future.

If you want to try it too, why not run the same prompts and see which one works for you.

One-line Summary

A Bilibili creator had Gemini 4 and DeepSeek V4 Pro replicate the Tesla flying car physics scene in vanilla JS—Gemini won.

Paragraph Summary

A Bilibili creator used the flying car scene from Tesla's launch event as a test, asking Gemini 4 and DeepSeek V4 Pro to each write a webpage with real physics calculations in vanilla JS, featuring two gameplay modes: ramp flip and jumping five cars. Gemini 4 produced a draft in three minutes; ramp flip worked on the first try, needing only parameter tweaks to land stably; jump-five-cars crashed on the first attempt but self-fixed successfully after vague feedback. DeepSeek V4 Pro's code was longer with a complete interface, but due to the initial position coinciding with the ground, it misjudged landing on the first frame; even after rewriting, the issue persisted, and the smaller model B4.1 Flash also performed poorly. The creator emphasized this is only a single-task comparison and doesn't represent overall model capability.

#Gemini 4#DeepSeek V4 Pro#Tesla flying car#physics simulation#AI code generation#vanilla JS game
Share:

Related articles