Why doth "Other Memory" be bane of my existence?

MrshoestoreMrshoestore Member Posts: 181
edited November -1 in Working with GS (Mac)
I am working on a game, and as of now this is the setup

I have a BG image that is a blue gradient

then I have 3 cloud layers for parallax scrolling, set to screen. (there are 2 of each image, so that when one goes off screen the other appears, etc.) Each image is 480x320

so, that's 7 layers

then there is a 32x64 actor (player) that has no image, just color.

And 3 enemy actors, from 32x32 to 64x64, that spawn and destroy randomly over time.

In Viewer (on simulated iPhone), My performance is:
fps:18-20

images: 3.5mb
sound: 0
Game engine: 3.9 mb
Other 43.1 mb
total:50.5mb

I've had problems in the past with the other memory. In fact I once did a test where I created a blank game, ran it through Viewer, and still got a 40+mb reading for Other Memory.

I'm really hoping that the Scrolling cloud images aren't too much for GS, because it looks really good, and needs the 3 layers to look that good. In fact, I'm looking to add 1-2 more layers on top periodically to enhance the effect even more.

any way to get my FPS up a lot (at least to 30)??

And does anyone else have a similar problem with GS Viewer and the "Other" Memory??

Comments

  • quantumsheepquantumsheep Member Posts: 8,188
    I would try and recycle your spawning actors. Not always possible, but continually spawning (randomly over time as you say) will hit your memory I think.

    In my next game (for iPad) I spawn 50 actors. Each one spawns particles. Reducing the amount of particles spawned by just 1 for each actor made a huge difference.

    I'd make a copy of your project, and start taking things out, laborious as it might sound, to ascertain what it is that's causing you these problems. Then you'll have a better idea of how to deal with it!

    Hope that helps!

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • MrshoestoreMrshoestore Member Posts: 181
    Ok, so here are the results of my test

    1: Deleted all Spawn actors and player actors (so only scrolling BG images)
    FPS - 10
    Images - 3.5mb
    Sound - 0
    Game Engine - 3.5 mb
    Other - 40.8
    total - 47.8mb

    2: Set all Cloud images to normal instead of screen
    FPS - 10
    Images - 3.5mb
    Sound - 0
    Game Engine - 3.5 mb
    Other - 41.7
    total - 48.7mb

    3: Deleted EVERYTHING
    FPS - 60
    Images - 0
    Sound - 0
    Game Engine - 3.5 mb
    Other - 44.9
    total - 48.4mb

    So.... I have a problem... That I don't know how to solve.
  • quantumsheepquantumsheep Member Posts: 8,188
    ouch :(

    More useful perhaps:

    Are all your graphics power of 2?
    How big are they in relation to your actors? (i.e. is your cloud graphic 512x512 while your actual cloud is 64x64 for example?)

    QS

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • MrshoestoreMrshoestore Member Posts: 181
    Well, the cloud image/graphic are both 320x480 (so I suppose 512x512)

    my plan was to set all my images for a 320x480 game, then set resolution independence on so that the game would be half resolution for all devices (320x480 for 640x960 devices, and 160x240 for 320x480 devices)
  • gamedivisiongamedivision Member Posts: 807
    It's your 480 x 320 images for parallax scrolling same happened to me try to make your parallax images as small as possible,I had like a hazy smoke across the front of my screen and my ram was 74mb,so make individual clouds say 3 of them then recycle .
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    Are you using the viewer on your device or the device simulator?
  • MrshoestoreMrshoestore Member Posts: 181
    well, 2 things

    1: The cloud images are fractal noise with filter effects designed to look like actual clouds, so making individual small clouds doesn't have the same effect, because it wouldn't have quite the same organic fluid look. I understand there are limits to GS, and making the images smaller will certainly help memory in any case, but I don't want to give up my targeted look. Heck, if I had my way, they would all animate!

    2: The most important thing to note that despite the sizes of my images, I'm still having memory usage. When you look at the numbers I posted, there is just something not right. When I had the moving clouds active, I had a memory reading of 47.8mb. But when I deleted everything from the game, images and actors alike, I had a reading of 48.4mb.

    So I will work on finding a way to make my cloud images look good using smaller individual images, but that still leaves me a problem with memory usage.

    hence.. "Other Memory" is the bane of my game developer existence.
  • MrshoestoreMrshoestore Member Posts: 181
    HoneyTribeStudios said:
    Are you using the viewer on your device or the device simulator?

    Device Simulator, I am currently without an iPod to test asides from a 1g touch, which I have only had problems with when using GS or playing GS games.
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    Don't worry about it then. The simulator figures add that 'other' 40 or so MB. Test on a device and you'll see your game is ok ;o)

    Also the simulator will give different performance (play smoothly or choppy) depending on which OS you select it to simulate. Try them all and you'll see.
  • MrshoestoreMrshoestore Member Posts: 181
    ok, so basically the simulator is worthless :)

    so is this difference in choppy-ness in each OS strictly a simulator thing, or is it like that for actual devices as well. Im at the beginning stages with this game, and there is so much that I want going on the screen at once that I worry about performance issues a lot.

    Looks like i'll be searching ebay for a new device. I think I may try to create my cloud layers at half the current res (which would be a fourth of full res) and see how the stretching looks.

    Thanks a lot you guys.

    But while I have you here, and we're sort of talking about parallax scrolling, my cloud layers appear to be separated by one pixel, which they shouldn't be. they are 480 tall, and positioned at y240 and y-240. As far as my brain and math go, they should be touching. So if they move at the same speed and recycle, I shouldn't see an empty space. Any thoughts?
  • ORBZORBZ Member Posts: 1,304
    kill the GS Viewer app on the device or the simulator double tap the home button to bring up the taskbar then press and hold the GS viewer in the taskbar until it jiggles then press the red x to kill the task. Restart GS Viewer.

    This frees the cached "Other memory" that is a bug in the latest viewers.
  • allornothingallornothing Member, PRO Posts: 126
    Does the memory usage displayed in the preview also take into consideration other memory usage from outside the app? I.e. if you are multitasking and have another app open, does it factor that in?
  • MrshoestoreMrshoestore Member Posts: 181
    ORBZ said:
    kill the GS Viewer app on the device or the simulator double tap the home button to bring up the taskbar then press and hold the GS viewer in the taskbar until it jiggles then press the red x to kill the task. Restart GS Viewer.

    This frees the cached "Other memory" that is a bug in the latest viewers.

    Tried this, and still getting a reaingy of 40+ other memory for my actual game, and 26mb for a blank game
  • MagoNicolasMagoNicolas Member, PRO Posts: 2,090
    Mrshoestore said:
    ok, so basically the simulator is worthless :)

    so is this difference in choppy-ness in each OS strictly a simulator thing, or is it like that for actual devices as well. Im at the beginning stages with this game, and there is so much that I want going on the screen at once that I worry about performance issues a lot.

    Looks like i'll be searching ebay for a new device. I think I may try to create my cloud layers at half the current res (which would be a fourth of full res) and see how the stretching looks.

    Thanks a lot you guys.

    But while I have you here, and we're sort of talking about parallax scrolling, my cloud layers appear to be separated by one pixel, which they shouldn't be. they are 480 tall, and positioned at y240 and y-240. As far as my brain and math go, they should be touching. So if they move at the same speed and recycle, I shouldn't see an empty space. Any thoughts?

    this Happen... and This Sucks! MY Solution is to make them overlap a little bit....

    About the momory usage.... Gs please Fix this! We can create games with to much details or to much things in on scene because of memory!
Sign In or Register to comment.