@86lemonade68 gave you some pretty solid answers, but I want to expand on them.
1. There are many factors that can cause your game’s performance to fall off. Taking up too much memory, doing too much in tight loops or enterFrame listeners. Image size does create problems on multiple fronts. First, big images take up large amounts of memory. For instance a 1024x1024 image uses 4 megabytes of memory. A 2048x2048 image uses 16mb (It’s 4 times the size) and a 4096x4096 image is a whopping 64mb. Given your app may only be able to get 64-128mb for its usage, it doesn’t take long for big images to overtake your available memory. This is why Corona SDK supports dynamic image selection. If you need a big image to support a Retina iPad’s resolution, it generally has the memory to handle your needs. But that same image would cripple an iPhone 4. By allowing you to have a 2x resolution file and a 4x resolution file, Corona can pick the image that’s the best fit for the screen keeping memory usage somewhat in check. Also using large images and scaling them down to smaller screens takes up processing time.
- While you can certainly load your images in enterScene, you will never see any scene transitions take place. Storyboard and Composer assume you will create the scene in createScene() so that we can position it hidden from view and then transition it on screen prior to enterScene() triggering. If you don’t care about transitioning the scenes, then you can. There may need to be at least one thing created in createScene.
3. For the most part, no. Corona Labs does occasionally release some of it’s pure-lua modules as Open source on hour github account. An example of this is Widgets, Storyboard is now open source, since we are moving everyone to Composer. Widgets is the only module that is current, most of the opensource items are things we have replaced and let the community who has been using the older libraries to maintain them themselves.
- No. That’s beyond the scope of any application outside of Apple and Google’s direct control. They of course have the power to write apps that can do that, however they don’t give developers that power. I don’t know about Android but in low memory situation, Apple will begin shutting down apps that have been backgrounded.
5. You should write your app with plans to free up memory you’re no longer using. You can set an event to notify you when you get a low memory warning and then flush things using a lot of memory, like purging your old storyboard scenes, etc. But you are limited to what your app is doing.
Rob