User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 16

Thread: Tips for speeding up frame loading?

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,245
    Mentioned
    87 Post(s)
    Tagged
    0 Thread(s)

    Tips for speeding up frame loading?

    I'm trying to optimise the loading times for my game, and create a non-static loading bar for the loading that does happen. Currently, an average level takes about 10 seconds to load (though I'm on an SSD with a decent CPU - a slower PC would take longer). The 10 second loading time is roughly split in two:

    (A)the frame actually loading up after I "jump to frame" (no animated loading bar is possible at this stage - the previous frame completely freezes while the new frame loads)
    (B) the frame has loaded and has begun executing (all the start of frame events get executed, the level gets created from an array in a big fastloop etc.......a loading bar is possible during this period)

    To decrease A, I've selected "load on call" on many of my larger and/or animated objects (and deleted them from the frame editor, since "load on call" doesn't do anything otherwise - which is a quirk that I really dislike, but oh well).

    For B, I'm doing what someone suggested to me a while ago: I've removed almost all "start of frame" conditions and replaced them with a fastloop ("initialisation"). This will enable me to immediate create a moving loading bar on start of frame that will be displayed even while the rest of the code (level being loaded, gameplay being setup, etc.) is still being parsed. This is what I've got:




    Does what I'm doing seem right? Is there anything else I can do to further decrease loading times?

  2. #2
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    3,006
    Mentioned
    21 Post(s)
    Tagged
    2 Thread(s)
    The initialization routine is your best bet here. What I would do is this:
    Create the splash loading screen on the frame before-hand, after 5%, call the next frame. That's your first jump done. Preload your loading materials on the next frame ready, so the user doesn't see the transition. Start it off at 5%. Then, call your initialization loop to start loading the level.

    So pretty much what you got above, I think, from what I can see. I always create the same loading assets on the frame beforehand, so they are most definitely created before the load of the next frame and the user can see it is indeed loading. Fusion then loads the next frame where the transition can't be seen as it's preloaded them up. Then in the background you can work loading up your level with the loops etc. until completion.
    Want to learn Clickteam Fusion 2.5?




  3. #3
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,245
    Mentioned
    87 Post(s)
    Tagged
    0 Thread(s)
    Thanks Danny. Can you just clarify what you mean by this:
    I always create the same loading assets on the frame beforehand, so they are most definitely created before the load of the next frame
    How can I create the assets in a previous frame? Do you just mean that I should use the same global objects for the loading materials, and that once they've been created once, they'll already be in RAM once the 2nd frame gets loaded?

    If so, then does that mean that once a global object is loaded, it is never purged from RAM, even if I load a frame that doesn't use it? If so, can using lots of global objects (I use many in my game) end up slowing down loading times and/or performance for this reason? (and if so, is there a way to manually purge the RAM)

  4. #4
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    3,006
    Mentioned
    21 Post(s)
    Tagged
    2 Thread(s)
    Yes, however, you don't need to set them global to be kept in memory. If the images are used in both frames, they will be kept in memory. This is a great advantage of the Fusion 2.5 runtime, you could preload all of your heavy graphics across previous frames or (a loading frame) before hand and they will all be kept in memory if they are to be used in the next frame.

    It's a very cool and handy thing to know, especially if you're looking to create a more seamless and realistic loading sequence.

    Also when it comes to purging ram, unfortunately it can't be done manually but the routines the runtime uses, garbage is automatically dealt with when not needed. This is to keep the game performance as optimised as possible.
    Want to learn Clickteam Fusion 2.5?




  5. #5
    Clicker Fusion 2.5Fusion 2.5 Mac
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    zip2kx's Avatar
    Join Date
    Jun 2015
    Posts
    781
    Mentioned
    17 Post(s)
    Tagged
    0 Thread(s)
    So practically i make a seperate frame where i load from my Array and create the objects i need. Switch to my game frame where it places Everything to X/Y positions?

  6. #6
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,245
    Mentioned
    87 Post(s)
    Tagged
    0 Thread(s)
    Ok, so am I right to suppose that if an object is used in frame 1 and frame 2, it gets kept in memory. But if it only gets used in frame 1 and frame 3, then it'll automatically get purged at the beginning of frame 2, and then need to load again at frame 3?

  7. #7
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    3,006
    Mentioned
    21 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by Volnaiskra View Post
    Ok, so am I right to suppose that if an object is used in frame 1 and frame 2, it gets kept in memory. But if it only gets used in frame 1 and frame 3, then it'll automatically get purged at the beginning of frame 2, and then need to load again at frame 3?
    That's correct. It's a cool thing to know, especially for creating loading frames prior to the actual game frame, giving you time to actually load the assets into memory.
    Want to learn Clickteam Fusion 2.5?




  8. #8
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    3,006
    Mentioned
    21 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by zip2kx View Post
    So practically i make a seperate frame where i load from my Array and create the objects i need. Switch to my game frame where it places Everything to X/Y positions?
    Sure you can do that. You will still need to reload them at the start of the game frame to ensure everything you needed to load is loaded but they will be memory-ready for when the next frame loads.
    Want to learn Clickteam Fusion 2.5?




  9. #9
    Clicker Fusion 2.5Fusion 2.5 Mac
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    zip2kx's Avatar
    Join Date
    Jun 2015
    Posts
    781
    Mentioned
    17 Post(s)
    Tagged
    0 Thread(s)
    Thanks danny!

  10. #10
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,245
    Mentioned
    87 Post(s)
    Tagged
    0 Thread(s)
    Cheers Danny. Good to know.

    Are there any other tips regarding minimising RAM usage? For example, does it make any difference whether you import 3-channel (RGB) or 4-channel (RGB+alpha) PNG files into your actives, or do all actives automatically have alpha channels created?

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Replies: 1
    Last Post: 18th October 2015, 09:17 PM
  2. Delay when loading new frame
    By rndpro in forum iOS Export Module 2.5
    Replies: 0
    Last Post: 7th February 2014, 09:12 PM
  3. Tips on speeding up fastloops?
    By Sumo in forum iOS Export Module Version 2.0
    Replies: 9
    Last Post: 16th May 2013, 01:20 PM
  4. what's your tips on speeding up workflow?
    By foyzul2002 in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 10th June 2012, 11:09 AM
  5. Loading frame
    By Bruto in forum iOS Export Module Version 2.0
    Replies: 6
    Last Post: 26th May 2011, 04:38 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
  •