Let's suppose you have a game similar to what is shown in the Flappy Birds demo. In the demo, the window size is 400 x 500. The game and the layout look appropriate when using Letterbox scaling, but Cocoon JS doesn't let you wrap with letterbox scaling. Scale outer mode looks OK in browser, but doesn't fit on a phone display. I tested on a Galaxy S5, and the scale outer mode appears to show a lot of space above and below the window size. However, if I adjust the window size to 1080 x 1920, then the game looks good on the S5.
The problem that I'm running into is that the memory usage greatly increases with the size of the window. A window size of 400 x 500 doesn't use much RAM. But increasing the size can make it unplayable on some devices.
I've read the tutorial for designing for a certain aspect ratio such as 4:3 or 16:9. I can use a 16:9 resolution as the window size, but any sizes lower than 1080 x 1920 will result in obstacles outside of the layout appearing on-screen.
Is there an ideal workaround to make up for the fact that CocoonJS doesn't support letterbox scaling? I used black letterbox images on the top, bottom, and right side.
Also, is there an ideal RAM usage amount? I know that you want to get it as low as possible. I built a game with 54.7 MB RAM usage and the game played great on devices with 2 GB RAM, but lagged on devices with 1 GB RAM.
Any suggestions for either question would be very helpful. Thanks in advance for taking the time to read and respond.