Skip to content
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

Any way to run the simulation at normal game speed? #179

Closed
edwinsaunders opened this issue Nov 5, 2017 · 3 comments
Closed

Any way to run the simulation at normal game speed? #179

edwinsaunders opened this issue Nov 5, 2017 · 3 comments

Comments

@edwinsaunders
Copy link

I tried using coordinator.SetStepSize(), but it only takes int values, and the default value of 1 is already much faster than a normal game.

@alkurbatov
Copy link
Contributor

I used the following workaround:

    while (coordinator.Update()) {
        // Slow down game speed for better look & feel while making experiments.
        sc2::SleepFor(15);
    }

It seems that we have no other way.

@KevinCalderone
Copy link

Another option is:

coordinator.SetRealtime(true);

However this also has the effect where a variable number of GameLoops may pass between calls to your OnStep depending on how slow your logic is. If this is undesirable I suggest alkurbatov's solution.

@herodrigues
Copy link
Contributor

herodrigues commented Nov 7, 2017

@KevinCalderone, @alkurbatov's solution works, but keep in mind that you have to include manage_process header.

#include <sc2utils/sc2_manage_process.h>

jrepp pushed a commit to jrepp/s2client-api that referenced this issue Nov 18, 2017
Added helpers for detecting whether a worker is carrying minerals/ves…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants