Skip to content

Engine is now aware of being reloaded#198

Open
nazgee wants to merge 1 commit into
nicolasgramlich:GLES2-AnchorCenterfrom
nazgee:for-nicolas-smooth-reloading
Open

Engine is now aware of being reloaded#198
nazgee wants to merge 1 commit into
nicolasgramlich:GLES2-AnchorCenterfrom
nazgee:for-nicolas-smooth-reloading

Conversation

@nazgee

@nazgee nazgee commented Feb 4, 2013

Copy link
Copy Markdown
Contributor

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

nazgee commented Feb 6, 2013

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown

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

@nazgee

nazgee commented Feb 26, 2013

Copy link
Copy Markdown
Contributor Author

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