-
-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thinker ThinkerIterations
question
#74
Comments
I think I understood that the wrong way, Question still apply, is it possible to change that value ? |
You can provide a |
If I'm reading that
I could easily be missing something; either way an example on how to configure the value would help. To take the original concern one step further though:
At first glance, it seems like the implementation would be pretty trivial to allow individual thinkers to opt in/out, indicating whether they can afford to be skipped: iterations_since_time_check += 1; //(initialised to `0` before the loop)
if ! thinker.is_important_or_whatever {
if already_skipping_flair { continue }; //(initialised to `false` before the loop)
if iterations_since_time_check % 500 == 0 {
iterations_since_time_check = 0;
if start.elapsed() > iterations.max_duration {
already_skipping_flair = true;
continue;
}
}
iterations.index += 1;
}
What do you think? |
As I understand it, a thinker will run based on some
ThinkerIterations
values, and will guarantee that the thinker run at least every 10ms, or when it cycles back on the frame count if time is not elapsed.Is it possible to set this value somewhere ? as the current value is just the
Default for ThinkerIterations
Also would this be applicable to
Actions
as well, to avoid the::Executing
on all entities every frameThe text was updated successfully, but these errors were encountered: