I want certain scripts to be able to run at a higher rate than they currently are allowed to. Currently they run at 16.666… ms at 60 update frequency, and average to 16.666… still when variable update dt is checked (I thought variable dt would let scripts fun as fast as they could?)
I want to be able to assign some script to run as fast as they actually can unthrottled. I’d guess not possible or not easily possible due to the engine does updates?
Looks like headless builds are actually allowed to update as fast as they possibly can with variable dt checked? Kind of weird to see the occasional 16.666666ms
Yes, headless builds are not throttled (although you can configure them to be). Those 16ms frames look strange though. @Johan_Beck-Noren is an expert on these things and can hopefully explain this on Monday.
The update loop for components is not decoupled in a way that allows for example script components to update at different intervals than other components.
If it’s just a different dt you are after, can it be solved by placing the desired script components in a separate collectionproxy and setting the timestep of that collection?
But is it possible to set the timestep at a higher rate than the update rate of the game? I want for example a script (or collection as a whole) to have an update rate of 90. If the factor is 2 will the collection be updated at 120?
I should test this… I assume what would happen is multiple updates for the collection will happen on the same game frame, but the game will still stay at a max of 60 updates per second which wouldn’t help I think. The reason I want a higher rate is so that servers can respond more quickly without the extra latency of a frame. I don’t want to force users to run a headless server while they play for peer hosted games.
You can set the timestep for a collectionproxy to match any update frequency you like (e.g. slow-mo or fast-forward), but the collection’s update function will still only be called in sync with the rest of the engine.
Do you know the cause of the random 16.6666666 delay of dt in headless builds? This could also cause issues for servers. You can test this by printing dt on update.
I guess I’d still ask for the ability to make some scripts able to update at a higher rate even if they are forced to interact with the rest of the game engine at its own rate.