To put things simply: the amount of “things you do” affects the framerate, while the amount of “things you have” in your app affects memory. In extreme cases of course things change, but you can forget about that in a lot of cases.
Using texture memory should not slow down the app - until you run up against the absolute limit where the system will begin work to hard in the background to free up memory, and you might notice a slowdown. Once again, this last scenario is pretty rare in most cases.
Graphics on screen are drawn by the GPU, so this shouldn’t affect your framerate too much. Again, yes, there is also an overhead on the CPU for every object, but this is in most cases negligeable.
So, lots of textures, no problem for the framerate. Many objects on screen, not that much of a problem for the framerate until you start running into over a hundred images, let’s say, for an iPhone 4 or iPad. Once again, I’m oversimplifying. Older builds or deprecated sprite code will runs worse than the newer sprite code using imageGroups, because it reduces the amount of OpenGL calls. Google this for more info.
So, what you “have” does not affect the framerate too much in most cases.
Now, what you “do” affects the framerate most: this includes animations, transitions and most of all the code you execute. Code you put in your enterFrame is the most crucial. This loop needs to execute 30 or 60 times per second - this means you have about 33 (at 30fps) or 16 (at 60fps) milliseconds. If you put too much code your enterFrame loop it will take longer than 33 or 16 milliseconds and your framerate will drop under 30 or 60fps.
Loading a texture is also “doing” something so this affects the framerate. Loading a sound also affects the framerate negatively, because loading is “doing” something. Once the sound is loaded it is something you “have” in your app, so it uses memory but does not affect framerate too much. Playing a sound on the other is “doing” something, so it will drop the framerate a tiny bit. Streaming audio is a tricky one: streaming means the processor is continually decoding your audio, so “doing” something.
In short: firstly, the most important thing is to keep the logic in your enterFrame event (and to a lesser degree other events) as lean as possible, secondly, minimize or even better, completely avoid loading sounds or graphics during gameplay. Thirdly, having lots of images just sitting on the screen will still be fast with the newer builds, but once you start using code to move a lot of images, you could feel a performance hit.
Does that about answer your question? [import]uid: 70134 topic_id: 34936 reply_id: 139088[/import]