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

Engine is now aware of being reloaded #198

Open
wants to merge 1 commit into
base: GLES2-AnchorCenter
Choose a base branch
from

Conversation

nazgee
Copy link
Contributor

@nazgee nazgee commented Feb 4, 2013

When game was resumed, Engine::onUpdate(pNanosecondsElapsed)
was called with unusually big value of pNanosecondsElapsed.
This caused Box2D simulation instability or undesired behavior of particle systems.

This patch fixes this issue by adding lag awarness to the Engine.
Vertex, Texture and Font managers will return true from theirs update* method
if feeling guilty of unusually long execution time (due to reloading).

When game was resumed, Engine::onUpdate(pNanosecondsElapsed)
was called with unusually big value of pNanosecondsElapsed.
This caused Box2D simulation instability or undesired behavior of particle systems.

This patch fixes this issue by adding lag awarness to the Engine.
Vertex, Texture and Font managers will return true from theirs update* method
if feeling guilty of unusually long execution time (due to reloading).
@nazgee
Copy link
Contributor Author

nazgee commented Feb 6, 2013

This change can be made smaller if you do not like that it changes *Manager classes. Just let me know what you want to have changed.

@icesteve
Copy link

Great fix! No more problems with my particle systems when resuming since I added this. Thanks

@nazgee
Copy link
Contributor Author

nazgee commented Feb 26, 2013

Apparently there is something wrong with it, and Nicolas does not want to say what it is... :)

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

Successfully merging this pull request may close these issues.

2 participants