"Not Responding" windows reaction to intense calculations

This forum is currently in read-only mode.
From the Asset Store
Plant a bomb and Destroy as Many Zombies as Possible
  • The simplest way would be to split the x over 100 ticks, like this:

    http://dl.dropbox.com/u/326175/freezemeunfreezed.cap

    That doesn't seem to work.

    The outer loop isn't a loop, if you know what I mean.

    But I can see what you guys meant now by splitting it over many ticks.

    But is this going to restrict my use of Functions?

    Krush.

  • Ok, I think I'm onto something now.

    I'm using a disabled group so I can enable it when I need the data worked on, and I'm using a variable to keep tabs on the x loops (1-500), and each x loop contains a real "Y For Loop" that runs 1-10000, with the group disabling itself when x has reached 501.

    I've only done this in a test cap, and it runs fine without any "Not Responding" messages, enabling me to move the window about and everything.

    The real test will be when I add it to the project tomorrow, but I'm optimistic.

    I'll let you know how it goes.

    Krush.

  • I wasn't able to get either threading or multiprocessing to fully work with Python. For some reason, I can't seem to populate the entire Construct array inside the thread (only the first element). It is like it runs the loop once then just stops.... also can't set globalvars from inside the thread, etc... For multiprocessing I get an error "AttributeError: 'module' object has no attribute 'argv'...perhaps related to running the program via the Construct IDE and not commandline.

    That's really too bad. I assume that Construct's objects are only updated per tick and threads are running outside the scope. Threading might only be usable with a Python array/list/dict etc.

    AttributeError: 'module' object has no attribute... most often indicates that there is no correct path to the module. Maybe a 'sys.path.append' with the working or temp directory in the script before calling any other functions could help? Also, try saving the script to Construct's python directory and import it.

    A few weeks left until I can really test things out instead of just proposing them and hoping for the best ^.^

  • Right, I've just set aside a couple of hours to sort this out, and I'm looking forward to it, but something did occur to me.

    I'm going to have to replace the Perlin Noise plugin by Arsonide because it causes this "Not Responding" state when generating the noise.

    That's not a problem, as I had most of that written before Arsonide released his plugin (several Seeded number generators and interpolation, easy), but I did wonder if there was anything that plugin authors could do to avoid the "Not Responding" state when writing their plugins.

    I haven't looked at the plugin SDK, so I don't know how much control you allow plugins to have, but could they use multiple threads in their plugins?

    Anyway, I'm going to have a couple of hours of fun coding, with Chris Moyles on the iPlayer acting as white noise to the outside world.

    Krush.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • [quote:26njzfjd]I'm going to have to replace the Perlin Noise plugin by Arsonide because it causes this "Not Responding" state when generating the noise.

    Perlin shouldn't slow down anything, it's just data.

  • Perlin shouldn't slow down anything, it's just data.

    Well, I thought that the perlin noise plugin was causing a small similar "Not Responding" message at the start of the level when generating the noise, but you're right, it's not causing any problems.

    So that's something.

    What I have discovered is that it's the creation of 2 large arrays that hold my world data that's the cause of another freeze.

    This isn't a problem though, as I can make them global and create them when the game first boots up.

    Hopefully, in a couple of hours time I'll have eradicated all the freezes from the game.

    And I know to avoid nested loops in the future too.

    Krush.

  • Just an update, as promised.

    After avoiding using nested loops for large arrays, and tidying up the code in other areas (long overdue), I now have no "Not Responding" messages across all of my layouts, and I can now display the progress on screen.

    Thanks again for the advice guys.

    Maybe this thread will be useful for others who hit the same brick wall.

    Krush.

  • Glad to hear you got it sorted

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)