User Tag List

Results 1 to 4 of 4

Thread: Global Objects and memory useage

  1. #1
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,132
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)

    Global Objects and memory useage

    I'd like to make my player/enemy sprites etc. global to my .mfa simply so I can easily edit/update them later on. I understand that creating a "clear cache" screen with no objects is a good way to free up memory, will having global objects effect this at all? I think I remember reading Francois say that global objects will stay in the memory even if you have an empty 'clear cache' screen.. can anyone confirm whether this would have a positive or negative impact on my game?

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    No, global objects are normal objects. We keep a table of the values of the alterable values and other data between frames, but it does not take a lot of memory.

  3. #3
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,132
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    awesome!

  4. #4
    Forum Moderator Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleMac Export ModuleSWF Export Module
    AndyH's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,445
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I use globals all the time in my iOS apps and have not had any problems with them or memory

    I use them for the same reason - so I can change the graphics and event behaviours in one frame and have those changes reflected in every other frame. I don't use the alterable values as global so often, but note a common gotcha is as soon as you turn on the global flag for an object, its values will persist across frames, so make sure you put a Start of Frame event in your event behaviour on the object to reset the values to a starting value if that is important to your object & game logic
    Andy H @ ovine.net
    Awful Jokes - a new cartoon every day: http://awful.ovine.net/
    Ovine's games: http://www.ovine.net

Similar Threads

  1. Saving on Memory - Cutting Up Objects
    By Corlen in forum Android Export Module Version 2.0
    Replies: 4
    Last Post: 24th April 2013, 05:55 PM
  2. Little question about objects loaded in memory
    By paobrasil in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 23rd May 2012, 04:21 PM
  3. Global objects in global events
    By Boba Fonts in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 8th October 2010, 12:12 PM
  4. Removing objects from MMF2's memory
    By Cossin in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 7th July 2009, 12:59 AM
  5. Memory usage: objects needs how much?
    By Leander in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 26th July 2008, 10:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •