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.
W zależności od gry, komputera i tego, czego silnik gry potrzebuje do obliczeń, wyświetlanie poszczególnych klatek zajmuje mniej lub więcej czasu. Zawsze obecne będą zmiany w milisekundach czasu upływającego pomiędzy klatką a klatką. Właśnie z tego powodu funkcja [code]_process()[/code] otrzymuje parametr [code]delta[/code]. Słowo „delta” oznacza różnicę czasu. To czas, który minął od poprzedniej klatki wyrażony w sekundach. Parametr [code]delta[/code] informuje nas, ile czasu zajęło Godotowi ukończenie [b]poprzedniej klatki[/b]. Możemy go wykorzystać do upewnienia się, że różnice pomiędzy klatkami nie sprawią problemów z miarodajnością przebiegu gry.
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.
Zawsze obecne będą zmiany w milisekundach czasu upływającego pomiędzy klatką a klatką.
Właśnie z tego powodu funkcja [code]_process()[/code] otrzymuje parametr [code]delta[/code].
Słowo „delta” oznacza różnicę czasu. To czas, który minął od poprzedniej klatki wyrażony w sekundach.
Parametr [code]delta[/code] informuje nas, ile czasu zajęło Godotowi ukończenie [b]poprzedniej klatki[/b].
Możemy go wykorzystać do upewnienia się, że różnice pomiędzy klatkami nie sprawią problemów z miarodajnością przebiegu gry.