Depending on the game, the computer, and what the game engine needs to calculate, frames take more or less time to display. There will always be milliseconds variations from frame to frame. That is why the [code]_process()[/code] function receives a [code]delta[/code] parameter. Delta represents a time difference. It's the time passed since the previous frame, in seconds. We can use it to ensure that the changes between frames don't make the game's behavior unreliable. This is because different computers run differently, so a fast computer will have more frames per second than a slow computer. If we ignore [code]delta[/code], the game experience will vary, depending on the computer. Delta helps to make the game experience consistent for everyone.
V závislosti na hře, počítači a na tom, co herní engine potřebuje vypočítat, trvá zobrazení snímků déle nebo kratší dobu. Mezi jednotlivými snímky budou vždy existovat milisekundové rozdíly. Proto funkce [code]_process()[/code] obdrží parametr [code]delta[/code]. Slovo "delta" představuje časový rozdíl. Je to čas, který uplynul od předchozího snímku, v sekundách. Parametr [code]delta[/code] nám říká, jak dlouho trvalo, než Godot dokončil [b]předchozí snímek[/b]. Můžeme jej použít k zajištění toho, aby výkyvy mezi jednotlivými snímky nezpůsobily nespolehlivost simulace hry.
There will always be milliseconds variations from frame to frame.
That is why the [code]_process()[/code] function receives a [code]delta[/code] parameter.
Delta represents a time difference. It's the time passed since the previous frame, in seconds.
We can use it to ensure that the changes between frames don't make the game's behavior unreliable.
This is because different computers run differently, so a fast computer will have more frames per second than a slow computer.
If we ignore [code]delta[/code], the game experience will vary, depending on the computer. Delta helps to make the game experience consistent for everyone.
Mezi jednotlivými snímky budou vždy existovat milisekundové rozdíly.
Proto funkce [code]_process()[/code] obdrží parametr [code]delta[/code].
Slovo "delta" představuje časový rozdíl. Je to čas, který uplynul od předchozího snímku, v sekundách.
Parametr [code]delta[/code] nám říká, jak dlouho trvalo, než Godot dokončil [b]předchozí snímek[/b].
Můžeme jej použít k zajištění toho, aby výkyvy mezi jednotlivými snímky nezpůsobily nespolehlivost simulace hry.