Zoom causes temporary frame drop?
by BeyondtheTech · in Torque 2D for the iPhone · 07/10/2009 (1:36 pm) · 2 replies
One of the things I noticed about my game Archangel: Fate of the Galactic Commonwealth is that when I hit the Sensors button, it simply zooms out with an instantaneous setCurrentCameraZoom (to 0.025 - I think) command. When it returns to 1.0 zoom (normal viewing), the frame rate looks a bit choppy for several seconds.
If I zoom in and out again with my Sensors button, it occasionally comes back at full speed.
I'll see if I can post a video of it soon.
In the meantime, is there any known reason why this would be happening? Anyone might want to come up with a theory as to how to fix it?
If I zoom in and out again with my Sensors button, it occasionally comes back at full speed.
I'll see if I can post a video of it soon.
In the meantime, is there any known reason why this would be happening? Anyone might want to come up with a theory as to how to fix it?
#2
zooming in makes the textures larger which directly results in a raised fillrate.
You can zoom but only if you ensure that the amount of objects that a present is low enough to not overfill it.
zooming out on the other hand means that it must instantanous switch to lower mipmap levels (if present otherwise it actually must calculate them first too) and if more objects come into view, potentially textures need to be reuploaded to the graphics memory etc.
Its the instantanous that makes these behaviours even more obvious
07/11/2009 (3:05 pm)
There are multiple potential causes:zooming in makes the textures larger which directly results in a raised fillrate.
You can zoom but only if you ensure that the amount of objects that a present is low enough to not overfill it.
zooming out on the other hand means that it must instantanous switch to lower mipmap levels (if present otherwise it actually must calculate them first too) and if more objects come into view, potentially textures need to be reuploaded to the graphics memory etc.
Its the instantanous that makes these behaviours even more obvious
Associate Dave Calabrese