GameSalad

RAM & Memory Usage - what has the biggest impact?

supafly129supafly129 Posts: 412Member, PRO

From what I've read, it seems as though there are several factors that impact RAM, but are images the biggest culprit for high RAM?

I've seen some people also mention the number of actors, how big the sound files are, etc. but still not sure what's fact or fiction.

And if sounds/actors do play a role in memory usage, is there an optimal number of actors/size for sound & music files?

Comments

  • SocksSocks London, UK.Posts: 12,324Member, BASIC
    edited February 22

    @supafly129 said:****.

    And if sounds/actors do play a role in memory usage, is there an optimal number of actors/size for sound & music files?

    'Optimal' ?

    Optimal would be zero for all these things ! :smile: (Except for 'music' which doesn't use up RAM), if you want to see your game run perfectly on any device, even with limited RAM, never dropping a frame, then delete everything. :tongue:

    Everything (except for music) uses RAM so you need to optimise everything really, make your code as clean as possible, make your images the absolute size they need to be (no bigger) and trim your sounds down (no 8 seconds of silence at the end !).

    To answer the question 'what has the biggest impact on RAM usage', that would depend on the size of the asset, a 12MB sound file will use more RAM than a 5MB image asset . . . And a 12MB image asset will use more RAM than a 5MB sound file.

    The only obvious thing I can think to mention is to bear in mind the powers-of-two rule for image assets.

  • pHghostpHghost London, UKPosts: 1,863Member

    @supafly129 said:
    is there an optimal number of actors/size for sound & music files?

    Adding to what @Socks said, obviously the optimal number of actors equals the minimum amount you can get away with while keeping the functionality of your game.

    If you have a game that relies mostly on static actors, without any physics (e.g. a hidden item puzzle game), you can obviously pack in more actors and get away with it, compared to an action-packed platformer with flying bullets, AI-enabled enemies etc.

  • PhilipCCPhilipCC Encounter Bay, South AustraliaPosts: 1,159Member, PRO
    edited February 22

    @Socks said:
    @supafly129 said:****.

    And if sounds/actors do play a role in memory usage, is there an optimal number of actors/size for sound & music files?

    'Optimal' ?

    Optimal would be zero for all these things ! :smile: (Except for 'music' which doesn't use up RAM)

    I tried that. An app which played one piece of music, after the loading wheel stopped.

    Apple rejected it! :o

    I even composed and played the music... B) maybe that's why they rejected it. :D

  • SocksSocks London, UK.Posts: 12,324Member, BASIC

    @PhilipCC said:
    I even composed and played the music... B) maybe that's why they rejected it. :D

    :) :D

  • The_Gamesalad_GuruThe_Gamesalad_Guru Posts: 9,840Member

    Lean mean code is most always the solution to lag. If you want to see integrated code in action doing fast heavy lifting with no problem see my custom collision shape animation videos.

Sign In or Register to comment.