CHALLENGE 3: Comparing _process and _physics_process ==================================================================== TASK ---- Attach a script extending Node2D to your root node. Implement both _process(delta) and _physics_process(delta), each printing its own delta value, and run the scene to compare how often each one actually fires. SOLUTION CODE ------------- extends Node2D func _process(delta): print("_process: ", delta) func _physics_process(delta): print("_physics_process: ", delta) HOW TO RUN IT ------------- 1. Select your root Node2D in the Scene panel. 2. In the Inspector/Node panel, click "Attach Script" (or the script icon), keep the default settings, and click "Create." 3. Replace the generated template with the code above. 4. Save the script and the scene, then press F5 to run. 5. Watch the Output panel at the bottom of the editor - it fills quickly with alternating lines from both functions. OUTPUT (abridged - real timestamps will vary slightly) -------------------------------------------------------- _process: 0.016783 _physics_process: 0.016667 _process: 0.016912 _physics_process: 0.016667 _process: 0.015998 _physics_process: 0.016667 ... WHY THIS WORKS AS AN ANSWER ---------------------------- Both functions print roughly once per frame, but their delta values behave differently: - _physics_process's delta is a fixed, constant value (0.016667, which is 1/60) every single time, because the physics step runs at Godot's own configured fixed rate (60 times per second by default) - regardless of how fast or slow the computer actually renders frames. - _process's delta varies slightly call to call (0.016783, 0.016912, 0.015998, ...) because it reflects the *real* elapsed time since the last rendered frame, which depends on the computer's actual rendering speed. This is the concrete, observable version of the rule from the chapter: _physics_process exists specifically so that movement and collision code always steps forward by the same fixed amount, giving predictable, consistent physics - while _process reflects real wall- clock time and is better suited to things like UI or animation where matching the actual screen refresh matters more than a fixed step.