How do I fix this (Solved)

  • I think that the error could be easily found since there is a strict error mentioned if one could only understand those javascript lines. It seems to be doing something with physics and something with a problem when creating sprite. Is it possible that there are too many ticks going on and the machine or software just can´t handle it?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That´s why I moved those ground images (background images) separately (which now looks bad of course). There still was an error.

    No, no. Objects can overlap.

    The collision polygones insides objects with a physics behavior can not overlap. Worser. Often Construct cant auto find colission polygones when you import a frame. In that case there wil not be 1 collision polygone set. And that gives countless errors if you give such an object a physics behavior.

    Lesson 1: When you import an animationframe, check the collision polygones. Be in control.

    Ok, here is the capx i looked into.

    https://www.dropbox.com/s/tkpi3u9y14di1 ... .capx?dl=0

    I have totaly no errors anymore. But then again, i am to stupid to play the whole level. (althaught you can just fall on the lunchbox in the space between the walls on the left, completing the level in seconds)

    Best try yourself. I hope you dont have errors too this time.

    I did two things. I kinda fixed the animation of your main character. Now it has a stable origin. And stable colission polygones. And it rolls so much nicer.

    I lifted the chain creation out of the 'on start of layout', and made it only happen in the levels where they are actualy present.

    I am a bit suprised that it all runs at a acceptable pace. Yet. That event sheet is full of unneeded events for a certain level. You have one sheet for all levels. As a result, lots of events check for objects that are not in the layout. I dont understand how you understand all this. Hat off.

    The events about the Boss, for example, run in every level.

    Would it not be a lot easyer if you used groups ?

    https://www.scirra.com/manual/80/groups

    You can set groups active & inactive. That way you can still have 1 eventsheet.

    Have a group for events that are needed in every Level. Like the events that move the player. This is always active.

    Have groups for things that only happen in a certain level, and set this group active based on the level name.

    Now, the chain creation, for example, gave objects that are not in the layout and not global, a physics behaviour. The chains are not in every level.

    WIth not in the level i mean: they have no grafic representation. They have no 'sprite' and therefor no collission polygones. Because they are not global. Yet they get the physics behavior set. But physics cant find polygones. And then you get that error.

    Well thats my 'unconfirmd' analysis of what is happening. Ofcours, i can be wrong (again).

    zenox98

    You can not account for everything a users does, or tries to do. I agree that this is impossible.

    Yet, is it a good practice to allow the physics behavior on objects that are set as not global? Physics is global though ? Else setting gravity in one object would not set gravity for all.

  • Thanks. Those are certainly the steps to the right direction. I had thought it also that should I make more event sheets for the reason you said (e.g Boss is not in every level etc.)

    Tried it now with beta r229 (latest beta). It ran couple of times (timer to zero and restart layout/level) but ended in error. I try next to remove the chain fully.

    edit: disabled the chain. Still error. Next: I try to remove the birds and see what happens. Yep. Error. Now adding birds back and removing the rotating beam... sigh... ("error") and now removing birds AND rotating beam. I remember at one time when I tested, I put many rotating beams and the error became sooner. I wonder if this has something to do with "resources" (too many things going on etc)

  • Those events that were only used in certain layouts had been removed in the "stripped down" version of the game in page 1. Yet there still was that same error. The error doesn´t come right away. It took 18 minutes in one case. Sometimes it can come right after "restart level" when timer goes 0 and game restarts the level (layout).

    I am now removing the emboss effect for those edge beams (that makes them look metallic) and all the bolts that are rotating constantly are not any more. I am testing the "efficiency" or how do you say it

    edit: Also removed all the leftover sprites (when I have tested things etc.). Running now. Waiting for an error..

  • Error. Horror. Soon out of options. Trying....

  • Hmm, i had running it for an houre in the background, no errors after the updates.

  • Hmm, i had running it for an houre in the background, no errors after the updates.

    Yes. It is really strange. I am removing all sorts of things now and checking which ones could be a problem. Removed all left over sprites. Removed all disabled lines (almost all). Removed those huge beams and left only one for Clark to sit and wait for an error.

    I wonder could the sprites z-position give a problem. When spawning an object. Is it possible that two sprites are on same z level or something like that. (just a question that popped in my mind)

  • Nope at last question. Its still running in the background now.

  • Nope at last question. Its still running in the background now.

    Good to know.

    ...and I prefer the problem being a computer than software (if it is)

    I am previewing this with google chrome. Which browser are you using with this now?

    I wonder how the error would manifest itself if I tried .exe. Would it just stuck... must find out.

    edit: are you running the ERROR layout?

  • Can I suggest something 99Instances2Go? If you are still running it. How about copying that rotbeam (rotating beam) say 5-10 times and see if it brings an error. At least when I tried with one beam it worked fine longer. When added more it brought the error much sooner. That´s why I thought about the efficiency.

    edit: Also I give timer 100 000 so that it runs long time. I wonder if you are running it with the 107 and it restarts very often and that´s why no error.

  • Running the "Testi" layout now. 5000 gameseconds has gone and no error. I wonder what is wrong with the ERROR layout (if it´s that)

    edit. No error even still. This gives me hope.

    edit2: Added rotating beam to testi layout to see if that is the culprit.

    edit3: so far so good.

    edit4: Still running great!

    edit5: maybe the ERROR layout has something not right?

    edit6: I don´t want to say it. Error in Testi layout.

    I think that something is building up. Memory should be freed at some point. I am only guessing.

    How to read this error message? It says what´s the problem. How to read it?

    Anybody knowing how to read it?

  • Just one last guess... could it have something to do with Wait.

    edit: now testing with an older version.

  • GdiA, i did not see that this chunk of rust also contains an animation with way to differend framesizes. And therefor messy polygones. I fixed also that animation now, the same way as i fixed your other animations. Hope that is it for now. Would you plz keep all frames in an animation at the same size !

    https://www.dropbox.com/s/tkpi3u9y14di1 ... .capx?dl=0

  • GdiA, i did not see that this chunk of rust also contains an animation with way to differend framesizes. And therefor messy polygones. I fixed also that animation now, the same way as i fixed your other animations. Hope that is it for now. Would you plz keep all frames in an animation at the same size !

    https://www.dropbox.com/s/tkpi3u9y14di1 ... .capx?dl=0

    Are you talking about the rotating beam? It is absolutely same size (except the horizontal). I cropped all of them in photoshop. I noticed it too that Construct 2 makes them look different size.

    Thanks. I´ll check if it runs without error.

  • I don´t know how you did it. But I must say that all the images were cropped in photoshop to make them same size. I wonder why C2 made them different size? I certainly cropped all the left out for them. Only the beam in every frame. I thought that why c2 shows the little ones more big. You somehow managed to make them exactly the same

    What did you do?

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