What's 'Delta'?

Hi!
I been programming since a while.
Never knew what’s something called ‘Delta’
What’s this?
What is it for?
I think it’s something about runservice, correct if wrong.
Thanks! :smiley:

I think you’re talking about “DeltaTime” of RunService;

  • That is a value that is sent to any functions that are listening to RenderStepped, etc. that determines the time that took to render the previous frame, etc.

  • There is another thing that includes “Delta”, which is game input, mouse delta, etc. etc.
    You can learn more about it here, (service)

3 Likes

“Delta encoding” is a thing. It’s a form of storing data in the form of differences. (i.e. the changes from version 1 of a file to version 2 of the same file)
Not sure if it’s what you’re referring to though.

2 Likes

So with that render, we can determinate the FPS of a player?
Or is there a easier way?
:thinking:

It determines the seconds that it took to render the previous frame.

Yes, sorry. You can use a simple method, which just adds an integer, every frame, and using a for loop to get the frame count, and reset it back to 0.

1 Like

I might be wrong but I think it just refers to like an amount of change in a certain amount of time, or the “direction” of change between 2 times you check.

Like mouse delta checks the distance and direction it moved

image

“amount of change” or “difference”

7 Likes

Example:

local runService = game:GetService("RunService")

local frameCount = 0
local function update()
   frameCount += 1
end

runService.RenderStepped:Connect(update)

local fps = 0 -- Updates every second
while wait(1) do
    fps = frameCount
    frameCount = 0
end
1 Like

That is in fact correct.
Essentially: DeltaTime is basically a time difference between frames.

1 Like

Yeah, that’s a good definition. (You’re not wrong.) People doing math stuff or whatever outside Roblox may recognize the symbol Δ being used to represent something’s delta/change.

4 Likes