Memory usage numbers

kentarosankentarosan Member Posts: 18
edited November -1 in Working with GS (Mac)
Hi all,

I´m testing at Viewer my game, is far away from finished, there are still many actors to be on it that aren´t yet on the program.

When I test the game on the viewer, everything works fine, but the numbers seems very high to me:

Frames per second: 59/60

Images: 47.4 MB
Sounds: 0 KB
Game Engine: 5.9 MB
Other: 24.2 MB
Total: 77.5 MB

Are these numbers ok? I´m not sure if the game will work on the devices or not, I mean. If it works on the Viewer, will it work on the final device?

I´m working with retina display images, when I test the game on an iphone 3gs the total goes down to 20 MB.

I´m triying the retina images with an iPod.

Actually, there are only two actors on scene, but at the end there will be more or less 8 actors, and they are big...

What do you think?

Comments

  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    In my experience the viewer is pretty much the same as the final build. But you should make an ad-hoc to make sure.

    If you are releasing on 3GS and above only (arm 7) your total RAM usage is ok at the moment as a 3rd gen device can handle around 80-100mb of RAM before crashing.

    2nd gen devices van handle about 40mb.

    Your 'other' memory seems quite large - I'm guessing you're using a lot of constrains and/or timers? You could try to limit their use to bring that figure down.

    If you haven't already, try and make your images fit into the smallest possible power of 2 (so long as it still looks good and makes sense to the game. So dimensions of 2,4,8,16,32,64,128 etc

    -------
    image
    "Honey Tribe is not only a remarkably endearing little game, but it's also incredibly addictive." Pocket Gamer
    "...a touch above the rest in the endless running genre" 148apps.com
    Say hi on Twitter
    Like us on Facebook
    www.HoneyTribeStudios.com
  • kentarosankentarosan Member Posts: 18
    Thanks for your reply!

    Not quite sure how to make and ad-hoc, I have been looking for a tutorial on doing it, but can´t find anything.

    The objective is to launch it in 3gs as the lowest available. How much is the maximum for the iphone 4 and ipod with retina display? There are only 2 actors in scene at the moment, so i´m quite worry when all actors are in the game, and the images just look awful if not doing it in retina...

    I will try that power of 2, and about the "other" memory. Yes, the game uses a lot of constrains and timers, but not sure if I can take them down.

    Thanks again for your answer!
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    4th gen devices can handle double the RAM of 3rd gen devices. StusApps posted recently it's around 200mb for an iphone 4.

    It depends what you use the constrains and timers for. For some things you can replace them by using the modulo function (which is displayed as %) in conjunction with the game time. Or you can limit when they are active with your choice of rules.

    TshirtBooth has made good tutorial videos for all the stuff you do in the apple dev site: http://www.youtube.com/user/GameSaladCookbook

    -------
    image
    "Honey Tribe is not only a remarkably endearing little game, but it's also incredibly addictive." Pocket Gamer
    "...a touch above the rest in the endless running genre" 148apps.com
    Say hi on Twitter
    Like us on Facebook
    www.HoneyTribeStudios.com
  • kentarosankentarosan Member Posts: 18
    Thanks again.

    I´ll take a look at the videos and the modulo function (never heard of it o.0?) If 200 MB is the limit, then maybe I will be ok...

    Greetings!
  • gariantrollgariantroll Member Posts: 219
    This was really helpful information. I just replaced my constraints with rules I will report my results.
  • gariantrollgariantroll Member Posts: 219
    I did the test but I got some poor performance when I used a rule instead of a constraint. What also sucks is that is seems that every time I switch between scenes my total memory keeps increasing. The best example is that my main menu's total menu is about 22MB total. If I play the first level and go back, the main menu's total memory is 65MB. Can someone explain?
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    gariantroll said:
    I did the test but I got some poor performance when I used a rule instead of a constraint. What also sucks is that is seems that every time I switch between scenes my total memory keeps increasing. The best example is that my main menu's total menu is about 22MB total. If I play the first level and go back, the main menu's total memory is 65MB. Can someone explain?

    Well of course that depends on what your rules are ;)

    If you're using GS 0.9.7 many people reported a memory leak on changing scenes. They released a fix, 0.9.7.1 so that may help.

    -------
    image
    "Honey Tribe is not only a remarkably endearing little game, but it's also incredibly addictive." Pocket Gamer
    "...a touch above the rest in the endless running genre" 148apps.com
    Say hi on Twitter
    Like us on Facebook
    www.HoneyTribeStudios.com
  • gariantrollgariantroll Member Posts: 219
    What is the most ideal way to program an actor to stay with another actor with out using a constraint. What I did was Made an attribute that states if Condition = 0 and game.X not equal self.x and game.y not equal self.y then game.x = self.x and game.y = self.y and condition = 1

    Then it goes into

    if Condition = 1 and game.X not equal self.x and game.y not equal self.y then game.x = self.x and game.y = self.y and condition = 0

    So basically I have it bouncing back and forth, which must eat up a lot of processing. Is there a better way? Would appreciate your help.
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    kentarosan said:
    Thanks again.

    I´ll take a look at the videos and the modulo function (never heard of it o.0?) If 200 MB is the limit, then maybe I will be ok...

    Greetings!

    Ok, so modulo (%) basically means 'what is the remainder after you divide integers'

    e.g 4 goes into 10 twice with a remainder of 2

    so 10%4 = 2

    But 5 can fit into 10 twice with no remainder.

    So 10%5 = 0

    So with this you can have things occur on regular occasions without the need for long lists of rules.

    e.g You have an integer attribute that increases by 1 every time you kill an enemy. You want the screen to flash blue on every 10th enemy destroyed.

    Now you COULD have a big list of rules.
    When atrribute = 10
    when attribute = 20
    when attribute = 30
    etc

    or (first create another integer/index attribute called zero and give it a value zero)

    when zero = attribute%10

    ... do the stuff that makes the screen flash blue

    So that just means every time you divide the attribute by 10 and are left with a reminder of 0, do stuff. Or another way to put it is, do stuff whenever the attribute is a multiple of 10.

    Edit: also useful to know http://gamesalad.com/wiki/interface_reference:expression_editor
    gariantroll said:
    What is the most ideal way to program an actor to stay with another actor with out using a constraint. What I did was Made an attribute that states if Condition = 0 and game.X not equal self.x and game.y not equal self.y then game.x = self.x and game.y = self.y and condition = 1

    Then it goes into

    if Condition = 1 and game.X not equal self.x and game.y not equal self.y then game.x = self.x and game.y = self.y and condition = 0

    So basically I have it bouncing back and forth, which must eat up a lot of processing. Is there a better way? Would appreciate your help.

    Ok, you can email me your game file if you want and I'll see if I have some better suggestions. Also point me in the right direction so i know where the rules are.

    Shaz [at] honeytribestudios.com
    --------------

    image
    "Honey Tribe is not only a remarkably endearing little game, but it's also incredibly addictive." Pocket Gamer
    "...a touch above the rest in the endless running genre" 148apps.com
    Say hi on Twitter
    Like us on Facebook
    Sound design and music service available: http://tiny.cc/MusicService
    www.HoneyTribeStudios.com
  • gariantrollgariantroll Member Posts: 219
    Sorry, my man, I can't give you my game. I have a team of people over here and the game is top secret. I realized that the constraints are actually only taking up a little more Memory compared to the rules and the performance is twice as good, so I am going to stick with it. Thanks though. My real issue is that when I change scenes my memory isn't resetting and I have tried an abundance of things.
Sign In or Register to comment.