New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust the Time Class to Favor per-Second Metrics Over per-Frame Metrics #448

Closed
ilexp opened this Issue Dec 8, 2016 · 1 comment

Comments

1 participant
@ilexp
Member

ilexp commented Dec 8, 2016

Summary

An object moves "100 units per frame" is harder to grasp than "100 units per second", yet the reliance on Time.TimeMult reinforces per-frame metrics. To encourage users to do per-second metrics, make per-second calculations "first class citizens" in Time API.

Analysis

  • Remove LastDelta.
  • Add a new DeltaTime instead that provides the time-scaled number of seconds that passed since last frame as a float. It can be a shorthand for timeMult * SPFMult internally.
  • Rename FPSMult, MsPFMult and SPFMult to something more reasonable, even if it ends up being more verbose. With the new DeltaTime property, they're usually not needed anyway, and if they are it should be clear what they stand for.
    • New names could be "FramesPerSecond", "MillisecondsPerFrame" and "SecondsPerFrame".

@ilexp ilexp added this to the v3.0 milestone Dec 8, 2016

mfep added a commit to mfep/duality that referenced this issue Dec 9, 2016

ilexp added a commit that referenced this issue Dec 10, 2016

@ilexp

This comment has been minimized.

Member

ilexp commented Dec 10, 2016

Done by @mfep

@ilexp ilexp closed this Dec 10, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment