Page 2 of 2 FirstFirst 1 2
Results 11 to 16 of 16

Thread: Hanging issue with nesting loops

  1. #11
    Semi-related question;

    If I have too many loops in open groups, could this relate to a crash?

    I believe I've read somewhere that every time a loop is called, the program has to find said loop, which involves parsing through each loop written (and not in closed groups or whatever) and then executing the one that matches. So that being the case, would forcing the program to find the loop in an event list that contains hundreds or potentially over a thousand loops written become an overload/bottleneck for the program?

  2. #12
    This usually cause very little overhead,
    I think it's more likely the things you "do" on loop are the issue

    ...but it's just speculation, so maybe you can try and see,
    if deactivating some of the biggest loops before/after run makes any difference?
    a selection of my Fusion examples can be found here

  3. #13
    So bizarrely enough I can't replicate the crashes. All the upgrade loops are done, and all working with the array and everything, so no idea why it was crashing last night. I'm thinking it may have something to do with the fact that Chrome is a huge resource hog, so trying to run the MFA and a multi-tabbed Chrome browser at the same time might be too much for my little computer sometimes.

    Or maybe, since I was half-asleep, I was doing something I stupid which I deleted before bed.

    Perhaps both.

  4. #14
    SO.

    Lesson learned here; If running ~2000 loops from a single instance, don't!

    I was getting a reliable hanging error if I was selecting too many upgrades on the units, due to the fact that the upgrade loops themselves can be quite complicated (in addition to writing a value to the array to represent the purchase, upgrades would also change some existing array values, resulting in a lot of work-per-loop in jumping all over the array and changing numbers). So instead of running 100 Upgrade loops from a single event, I broke it down to a system where it runs a single upgrade loop, iterates a counter, then runs the loop again, only stopping the system when it iterates a counter to 100.

    And now, with the boring work done, I can boot into the actual game frame with zero pre-game overhead events clogging up my engine, with my array (ie army details for both players) pre-loaded, and just requiring some events to create player objects from the values given.

    Exciting Friday night at the 4burner Manor!

    Also, as an aside, I set up my array-writing system so well that by simply changing a single counter, the events work for both player 1 and 2. It in fact worked so well that I spent over an hour looking for a bug that didn't exist. Don't know whether to be proud or embarrassed. Probably both.

    Proudbarrassed.

  5. #15
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    Melbourne
    Posts
    1,507
    In my testing, closing off all fastloops into groups (thereby preventing Fusion wasting time searching through them all for the correct loop) actually made a huge difference. I can't remember specifics, but I gave the specifics of my test setup in the recent optimisation thread.

    I wouldn't expect having lots of unhidden loops to cause a crash. But it could certainly cause a noticeable fps drop

  6. #16
    Thanks Vol - I don't think it was the optimisation thread (which is very interesting, btw) in which I read about the looping search, but I do recall it was in one of your posts that I did initially read about it.

    Regardless, it feels like best practice to close off groups that contain unused events/loops. I kinda gut-feeled onto that a while ago, but to have it confirmed is great. Especially when said groups could contain hundreds of events.

Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. I Need Help With Climbing and Hanging
    By Bly_B3k in forum Fusion 2.5
    Replies: 2
    Last Post: 29th December 2015, 01:23 AM
  2. ForEach Loops fps issue!
    By piscesdreams in forum Android Export Module 2.5
    Replies: 5
    Last Post: 24th January 2014, 01:23 PM
  3. hanging on ledge help
    By Oreo in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 6th May 2008, 01:05 AM
  4. Better Logic Flow: Nesting Conditions, Else, Or
    By Michael_Gummelt in forum Multimedia Fusion 2 - Technical Support
    Replies: 39
    Last Post: 22nd July 2006, 08:22 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
  •