[Chipmunk physic] Error & stuff

0 favourites
  • 9 posts
From the Asset Store
Use this game pack to create your own game, modify the existing game or simply take a look and see how it was made.
  • EDIT : This topic already existed, but then I've been IP banned by mistake (confirmed by scirra's support) and the topic has been deleted...so here's the topic again. Before being banned, I've been told that an example capx was required to study the problem. It's done, and available at the end on this post.

    Hello everyone,

    I have a problem with Chipmunk Physic behavior. Everything was fine with it until today : I can't test anything without Firefox constantly crashing. Or any other browsers anyway. I don't understand what is going on, I didn't do any special thing this morning.

    So, when I try to lauch the preview for some test, I end up with this :

    It says "A script on this page is maybe busy ou doesn't respond. You can stop the script right now, open it in the debogger or let it continue"

    • Stop the script : I just keep a black screen, without surprise.
    • Open it in the debogger : I end up with some code that I can't modify anyway
    • let it continue : The browser crashes or the previous dialog appears once again

    Here's another screen of the situation when I open the debogger :

    Yup. I tried several things in Contrusct 2. I supposed that the error is provided by too much physic stuff with too much polygons points maybe. Nope, I deleted every single object except one or two (each one with less than 8 polygons points), I still had the same error as before. So now I'm clueless. If anyone has an idea or if R0j0hound is passing there, I would like to understand what is going in there

    Example capx : h*tp://www.mediafire.com/download/7u6ndr3qnh5gfic/Error_example.capx (replace the "*" by "t" of course)

    Thanks !

  • Changing the collision polygon so the points are ordered opposite what they are now seems to fix it. I'm backlogged on plugin fixes, and I've been avoiding them, so no eta on a proper fix.

  • Ok, so I have to "reverse" everything to make it works ? (Not sure If I understood or not)

  • Yeah. So if your polygon is like this:

    1----2
    |    |
    |    |
    |    |
    |    3----4
    |         |
    |         |
    6---------5[/code:3r7n7a4h]
    
    drag the points around so it's like this:
    [code:3r7n7a4h]1----6
    |    |
    |    |
    |    |
    |    5----4
    |         |
    |         |
    2---------3[/code:3r7n7a4h]
  • Ok ! I'll test that. I suppose you don't know why it's happening now ? I've never had any problem with Chimpmunk before, I'm surprised x)

  • It's probably happening because the plugin expects the points to be placed in a certain direction (cw or ccw). The fix would involve detecting the direction and re-ordering the points.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well, that's strange, I've always been able to place the points wherever I want, and this bug has never been reported in the behavior's topic. I mean, come on, even the goddamn round object in my example capx is causing a crash ! Your work is far above this kind of odd stuff. I wonder if there is a problem in the current version of C2 or if I have too much effects or behaviors installed. I'll try to reinstall the whole thing, even an older version maybe. I'm curious.

  • No, it's just an issue with my plugin.

  • Indeed. Ok, anyway, your solution works, I just have to modify the order of my points. Noted. Thank you R0j0hound !

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