-
Notifications
You must be signed in to change notification settings - Fork 204
-
Notifications
You must be signed in to change notification settings - Fork 204
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
Debug Module Clocks Not Accurate? #66
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue comes from: https://impactjs.com/forums/impact-engine/bug-debug-module-clocks-not-accurate
Someone correct me if I'm wrong here, but it seems that the debug module clocks are not necessarily accurate. Or at least, not what you might expect.
This is due to the order of operations that occur when classes inject/extend to and from each other.
For example, the debug module injects a clock into ig.Game:
However, since this module is always loaded before our custom game class (lib/game/main.js), that means any modifications to draw we make in our game class won't be clocked.
The same applies to the other clocks, such as the "update" clock. It's only measuring the
ig.Game.update
logic, which includes updateEntities and checkEntities for example, but none of your own custom game code.The text was updated successfully, but these errors were encountered: