KrushBrother's Forum Posts

  • Hmm.

    Well, looking at your code, I can see no reason why it doesn't work.

    For example, place a text object on the layout and use "Always" to display both the crouchingVar and the current animation name of Link, and you'll see that the states are all as you'd expect when pressing the buttons, except for the crouchAttack animation, which doesn't show up at all.

    I think that it might be a quirk with Construct.

    To prove this, change the

    + link: Value 'crouchingVar' Equal to 1

    -> link: Set animation to "crouchAttack"

    to

    + link: Value 'crouchingVar' Equal to 1

    -> link: Set animation to "attacking"

    so that it's the same as when 'crouchingVar' equals 0, just to prove that the conditions work.

    It seems that the "crouchAttack" animation just won't play.

    Try deleting that animation, and then set it up again.

    Construct can be like this sometimes.

    Krush.

  • Can't take a look at it because it looks like the download is private.

    Krush.

  • Here is my post to thank Scidave for the tutorial of this awesome subject. Have not tried the tutorial yet. Hoping it is "foolproof".

    Here is my post to thank Scidave for the tutorial of this awesome subject. Have not tried the tutorial yet. Hoping it is "foolproof".

    If it's worth saying, it's worth saying twice!

    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.

  • Plus, once Construct 2 has an .exe exporter (aren't you fed up with hearing me say that? ), it'll be well worth the money.

    Krush.

  • There's some good inventory tutorials/examples somewhere on here.

    Do a search for "inventory" and you should find something useful.

    Maybe one of the authors will post here too.

    Krush.

  • Here's what you said in your post:

    "...and i cant but notice that everyone seems to "hate me" so i would like a divorce, how do i delete my account/posts or i just should stop writing?"

    Deadeye then closed your account/banned you, as you wished.

    Take a look at your posts under your old name and see if you come across a bit spiky.

    Apart from the occasional person, most people here are agreeable, and I've seen communities far, far worse than this.

    Personally, going only on your posts, it looks to me as if you don't know how to communicate with others at a decent level.

    How old are you?

    Remember, people's opinions of you can only be based on what you write on the forums, and how you behave to other people's comments.

    Other than that, there's not a lot else to say.

    I hope you're only a kid, because at least then it's almost excusable.

    Krush.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

  • 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.

  • 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, plenty of food for thought.

    While I try some of the suggestions, here's the most basic way I could find of making the "Not Responding" message happen using 2 nested loops, with minimum reading and writing to an array.

    http://www.smileydesign.co.uk/FreezeMe.cap

    How would you go about stopping that from freezing?

    Krush.

  • But why does your game need to do such an extraordinary amount of processing that the window is locked up? It seems unusual.

    Well, as SciDave has also pointed out when he did his speed tests in Python, this is just manipulating data in loops, which also gave him the Not Responding window.

    Ok, it's a lot of data, manipulated in nested FOR loops, with data being read and written to an array, with several conditions in each loop.

    There's nothing more than that.

    Nothing graphical or audible.

    Nothing.

    The "DoEvents" type function that was in VB is widely regarded as an ugly hack, but I guess that wouldn't be out of place in Classic

    Yes, it was a hack, but it was an option.

    The only other solution is to break up the work over multiple ticks. For example, instead of doing a million loop iterations which takes ten seconds and goes in to "not responding" mode, break it up in to 10,000 iterations per tick over 100 ticks. Not only does this keep the app responding during the processing, but it also gives you the opportunity to update the screen with the progress. That's probably your best bet for the time being.

    Yes this sounds fine for what I want, but I am wondering how best to go about it.

    As I said, it's 2 nested loops manipulating the whole array (well, most of it), with conditions as to what is written back into the array for each loop.

    Now, if Construct is trying to do all this at once, what's the best practice to slow it down?

    newt; No, this process is only required at the start of the level, and only the first time it's played.

    Thanks again guys.

    Krush

    Edit: Lucid, you posted while I was posting. I'll download it and take a look.

  • Yeah, years ago if you didn't use a "DoEvents" in a VB program, it was very easy to lock up even the tamest of programs.

    I'm also aware of the C++ equivalent using PeekMessage, but I was sure that Construct would have something built-in, and that I must have missed it.

    lucid; The window frame will be hidden when the game is finished, but it's not just the message that's annoying.

    Even hiding the message, it's clear that the program isn't responding (not letting Windows do anything in the background while the calculations are being done) as it loses focus and you get the spinning cursor.

    And without pausing the process first, the "loading Screen" won't show up, because Windows isn't allowed to draw it.

    I even locked up a Train Simulator years ago with one of my busy scripts, and people were complaining that they had to restart their computers to get out of it, lol.

    I'll look into this a bit more.

    Please feel free to add to your comments if you have further ideas, as I'm quite disappointed that Construct doesn't handle this for us.

    Krush.

  • Hi guys.

    This one has needed solving my end for a long time, but while I was testing the core of my engine, I was prepared to put up with it.

    When computing large amounts of data, whether by nested loops or other means, including generating noise via a plugin for instance, the game window becomes inaccessible, with the message "Not Responding" in the title.

    Now, I know it hasn't crashed (it obviously goes back to normal when the computations are done) and that it's just Windows not being able to get any cycles from the processor because Construct is hogging them, but is there a way to avoid this?

    Is there a setting in the applications properties I'm missing.

    To give a clearer picture of how it's affecting me, at first, I was concentrating on the main game level, and I'd set up the splash screens and title screen to just jump straight to the main game screen (layout), which meant that when running the game, I got that "Not Responding" for a while and then the game would start.

    Now I've started to tidy up the splash screens and title screen, I'm using them, and as expected, I get the "Not Responding" message as soon as I select start game from the title menu, with no sign of the game screen until all the calculations are done.

    Is there any way of forcing Construct not to hog all the CPU?

    It just looks unprofessional to have the game window freeze like that.

    Hope you can help.

    Cheers,

    Krush.