fixed_timestep tutorial for 0.10 #8758
Replies: 3 comments 6 replies
-
The easiest solution would be to have a repeating Timer in a resource and inside your systems check if the timer has finished, and if it hasn't return early. For example the apply_deferred example uses a timer like this. You'll need a separate system that runs every frame that ticks the timer, but that's a very cheap operation. |
Beta Was this translation helpful? Give feedback.
-
The examples in the repository on the |
Beta Was this translation helpful? Give feedback.
-
Fixed timestep is NOT used to limit tickrate of your bevy application. It is used to stabilize tickrate of a specific systems within your bevy application. If you want to limit tickrate of bevy app, first check But if you are using bevy to make UI application, you can configure it to only run whenever user interacts with it. Please check out this example, I believe that's what you are looking for: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello All,
I'm writing my first bevy app and have a bit of an unusual use-case, I'm not writing a game but an ECS is the perfect fit for the data I need to store and execute on, so I thought I'd give bevy a shot. The problem is that I don't need the raw performance of an infinite loop running full blast to process what amounts to spreadsheet calculations. I see talk of using
fixed_timestep
to limit the tick rate all over the internet but every time I try to implement it, it fails. I come to the conclusion that most of the tutorials that are online are for bevy 0.9 and below and that bevy had some major updates to scheduling in 0.10.Here is my code:
I would like the entire loop to run once or twice a second. Any point in the right direction would be appreciated.
Thank you,
Beta Was this translation helpful? Give feedback.
All reactions