Skip to content

Delta time should be capped #58

@silverweed

Description

@silverweed

I tried the "underrun" example on browser and my PC had a couple of hiccups since I was compiling some code in the meantime.
Every time this happens the character gets "teleported" a long distance because the delta time between frames is never capped to a maximum amount, so it may grow huge when the browser freezes for more than a fraction of a second.

I'm not sure if this would be preferably done at the "engine" level (basically here) or if every game should decide what's its delta time cap - I'd probably go with the first but there's no right answer here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions