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.
A játéktól, a számítógéptől és attól, hogy az engine-nek mit kell számolnia, egy frame kirajzolása több vagy kevesebb ideig is eltarthat. Mindig lesznek milliszekundumnyi különbségek a frame-ek közt. Ezért fogad a [code]_process()[/code] függvény egy [code]delta[/code] nevű paramétert. A "delta" az időkülönbséget jelképezi. Ez az előző frame óta eltelt idő, másodpercben megadva. A [code]delta[/code] paraméter mondja meg, hogy a Godotnak mennyi időbe telt kiszámolni az [b]előző frame[/b]-et. Használhatjuk arra, hogy megbizonyosodjunk róla, hogy a frame-ek közti különbségek nem mennek a szimuláció rovására.
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.
Mindig lesznek milliszekundumnyi különbségek a frame-ek közt.
Ezért fogad a [code]_process()[/code] függvény egy [code]delta[/code] nevű paramétert.
A "delta" az időkülönbséget jelképezi. Ez az előző frame óta eltelt idő, másodpercben megadva.
A [code]delta[/code] paraméter mondja meg, hogy a Godotnak mennyi időbe telt kiszámolni az [b]előző frame[/b]-et.
Használhatjuk arra, hogy megbizonyosodjunk róla, hogy a frame-ek közti különbségek nem mennek a szimuláció rovására.