The game I’m working on keeps track of the time it takes to complete a level, which is sent to the Leaderboards. The plan is to just have a global Leaderboard across all platforms since that’ll result in more scores/competition/whatever.
Currently, I’m keeping track of game time using the following code:
void Update()
{
CompletionTime += Time.deltaTime;
}
A few questions have popped up that I’m not entirely sure about:
- Will this be handled exactly the same across all platforms? FPS doesn’t change on a per-platform basis does it?
- What happens if the game starts running slow (slower device, framerate glitch, etc.)? A longer frame will result in a greater deltaTime so that should also remain consistent whether the game runs buttery smooth or really slow.
- Is Time.deltaTime appropriate for this? Should I just grab the ‘Time.time’ when the game completes instead?