Memory use, huge problem for large games on mobile

0 favourites
From the Asset Store
A terrifying package of 101 professional-quality sound effects for monsters, small beasts, huge behemoths, dragons and m
  • Afaik, while it has webgl, it does not yet support layout by layout loading.

  • Arima, can you advise some ways to solve memory warning issues with large projects? I face those on iOS devices... android feels good and runs smoothly....

  • leveraging the topic, I have a doubt. When the game is physical, it is usually very slow in mobile, and in some browsers. I believe that because of the amount of calculations.

    the solution would have the option to reduce the next decimal place after zero, for example, rather than 2.14356789 would be 2.14. It could be something optional. What do you think?

  • filippileonardo something like half or quarter calculations?

  • filippileonardo Scirra C2 have accuracy between pixels, and other things, like time ticks, making it near to impossible, or your game could start looking like 5 fps, while playing at 30 fps.

    You can have an idea of what can happen by using the pixel rounding with the another pixel alignment options inside your projects.

  • ghost exactly, decrease the decimal places of the calculation. It's just a theory, but I think it can reduce memory usage.

    TELLES0808 I did these tests, but has not changed much. Suddenly a plugin solve.

  • ghost exactly, decrease the decimal places of the calculation. It's just a theory, but I think it can reduce memory usage.I think Unity has these options lemme check

  • found it:

    Floating point operations

    You should always specify the precision of floating point variables when writing custom shaders. It is critical to pick the smallest possible floating point format in order to get the best performance. Precision of operations is completely ignored on many desktop GPUs, but is critical for performance on many mobile GPUs.

    If the shader is written in Cg/HLSL then precision is specified as follows:

        float - full 32-bit floating point format, suitable for vertex transformations but has the slowest performance.

        half - reduced 16-bit floating point format, suitable for texture UV coordinates and roughly twice as fast as highp.

        fixed - 10-bit fixed point format, suitable for colors, lighting calculation and other high-performance operations and roughly four times faster than highp.


    Below are some guidelines that are most important for mobile and low-end PC graphics cards:

    Complex mathematical operations

    Transcendental mathematical functions (such as pow, exp, log, cos, sin, tan, etc) are quite expensive, so a good rule of thumb is to have no more than one such operation per pixel. Consider using lookup textures as an alternative where applicable.

  • I also saw someone recommend a max fps option in a different thread, adding an this to SC2 could also be a critical boost for mobile webapps done in SC2.

  • filippileonardo - any memory savings would probably be minuscule, if it would even save any at all.

  • Arima

    How much memory does your game use ? Whats the value in the construct 2 editor ?


  • 300 mb, but that's not really a useful number to give you, because:

    "Construct 2 displays an estimated memory use in the status bar. You should keep an eye on that. The estimate is based on the largest layout's image memory use, plus the memory used by two images the size of the window (which will probably be necessary by the OS or engine rendering system). With good image re-use, it should be easy to keep this under 60-80mb."

    I have a layout where I've been sticking most of the objects from the game, so the memory use is listed as much higher than the game ever gets to when it's actually being played if layout by layout loading is working. Since it isn't on cocoonjs, the decompressed memory usage of the entirety of the current c2 version of loot pursuit, which probably doesn't even have half the graphics of the whole game yet, is probably somewhere around 400mb.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Arima

    Wow. 400MB. Maybe using Spriter could lower your mem usage ? However right now it does not support CocoonJS yet. Maybe can try to ask lucid ?

  • it's always tricky how to compress things on games, the game I'm working on is based on big backgrounds, going to be interesting to see how much memory it will eat up for me. Aiming to make it for PC (Mac, Windows & Linux) first, to see if people like it or not and then make the full game and release it on EVERYTHING! *evil laugh* which will be tricky with downsizing everything and making it work =)

  • When layout by layout loading is implemented on cocoonjs, it should solve the problem. Spriter isn't really an option for loot pursuit for various reasons, not through any fault of the program, but rather what I'm trying to achieve. If I've set it up right, memory usage probably won't go above somewhere around 100 mb at any one time with layout by layout loading working (I'm not targeting lower end mobile hardware, so it should be fine for recent devices).

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)