Technical questions

Zyme 2 years ago updated by Lazlo Bonin (Lead Developer) 2 years ago 1

Interested in this asset for time control i my game but I am wondering a bit how it works.

Does it depend on Time.timescale and the manipulation of that?

What I need is a time control for a tycoon game.

For example in the game Cities Skylines they use a "tick system" which is independent of the day/night cycle. A day or night lasts multiple days in game or else it would flip constantly as you increase the simulation speed.

I want a similar approach to my game, where I can accelerate the entire simualtion (moving of agents, calculating stuff) but also pause the entire simulation.

So does this asset use a "tick system" or does it manipulate timescale?

Does it work well with global time manipulation so I can change speed of the entire game, not just specific objects.

How does it work in multiplayer?

I also want the ability to use the UI, click on objects and retrieve their data when the game is paused etc.

Chronos Version:
Unity Version:

Hi Zyme,

Chronos does not depend on Time.timeScale. In fact, you should actually not touch it at all while using Chronos.

Your use case seems very well suited for Chronos. It can pause, rewind, accelerate and slow down the speed of your simulation, even globally. Just remember that it is not a replay plugin, although these types of games usually don't need replay.

To affect the simulated objects in the world, but not the UI, you would have two global clocks in Chronos:

  1. GUI
  2. Game

The GUI clock would stay at one. The game clock would vary depending on your simulation speed. In fact, if you ever need to pause the GUI, you can just not add any Timeline component to your GUI components.

There is no specific code or integration for multiplayer, however other users have tried it and didn't report any issue. Because Chronos just modifies component properties, it should behave correctly regardless of multiplayer.