Memory question

andrewm2211andrewm2211 Member Posts: 341
edited November -1 in Working with GS (Mac)
I played my game in GS view a few times, and it says that it's taking up 32mb of memory in images alone.

But all of my artwork only ads up to 651k , can someone please explain this?

My understanding is that I should stay under 40MB?

What do you think is ideal memory usage?

Comments

  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    What is the original size of the images being used?

    I don't remember the numbers offhand, but GameSalad uses set amounts of memory for different sized images. it' starts out with 32x32, 64x64, 128x128 etc…If your image is imported in at 12x12, GameSalad is still going to use the set amount of memory for an image 32x32, since that's where it starts. And if your image is 36x32, even though it's just barely over 32, GameSalad will use the set amount of memory for an image that is 64x64.

    Hope that made sense.
  • old_kipperold_kipper Member Posts: 1,420
    SlickZero said: And if your image is 36x32, even though it's just barely over 32, GameSalad will use the set amount of memory for an image that is 64x64.

    Good advise but a few minor discrepancies. It would actually use a block of memory for 64 x 32 as the shapes do not have to be square. You can use rectangles with different sizes of side but apply the rule of powers of 2 to each side but it does not have to be the same. Also 12x12 falls into 16x16.

    kipper
  • andrewm2211andrewm2211 Member Posts: 341
    That does make sense, thank you.

    And I could still be missing something.

    But the jump from 32x32 to 64x64 is 4 times the amount of information.

    All my are is 651k , even if for whatever reason gamesalad was using 10x more info than necessary , it would only be 6.5 MB
  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    The file size doesn't matter when it comes to the memory. It's based off of dimensions. And thanks kipper, for the correction. This round goes to you. Maybe worth 2 points since you got it on me? :P
  • old_kipperold_kipper Member Posts: 1,420
    The complexity of an image effects the way it is stored but not how it is held in memory. A simple image that is all black will take nothing in storage, but open in memory will take as much as detailed photo.

    I am not totally sure but my guess is that you are using images that are geared toward screen size and that this when in game memory is pushing things up hugely. By tiling parts of the image together the images you be able to drop the memory usage radically.

    edit- 15 points to mr.slick. you beat me to it this time.
  • andrewm2211andrewm2211 Member Posts: 341
    Okay, so what I'm getting here, is size does matter..
  • old_kipperold_kipper Member Posts: 1,420
    Yes indeed. Small and perfectly formed it the way to go (so I'am told).

    Kipper (big and ugly)
Sign In or Register to comment.