[Chipmunk physic] Error & stuff

Discussion and feedback on Construct 2

Post » Tue Feb 02, 2016 2:18 pm

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 :

Image

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 :

Image

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 :ugeek:

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

Thanks !
B
2
Posts: 5
Reputation: 160

Post » Tue Feb 02, 2016 6:58 pm

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.
B
94
S
33
G
114
Posts: 5,359
Reputation: 73,779

Post » Tue Feb 02, 2016 7:14 pm

Ok, so I have to "reverse" everything to make it works ? (Not sure If I understood or not)
B
2
Posts: 5
Reputation: 160

Post » Tue Feb 02, 2016 7:44 pm

Yeah. So if your polygon is like this:
Code: Select all
1----2
|    |
|    |
|    |
|    3----4
|         |
|         |
6---------5


drag the points around so it's like this:
Code: Select all
1----6
|    |
|    |
|    |
|    5----4
|         |
|         |
2---------3
B
94
S
33
G
114
Posts: 5,359
Reputation: 73,779

Post » Tue Feb 02, 2016 8:15 pm

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)
B
2
Posts: 5
Reputation: 160

Post » Tue Feb 02, 2016 8:59 pm

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.
B
94
S
33
G
114
Posts: 5,359
Reputation: 73,779

Post » Tue Feb 02, 2016 9:20 pm

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.
B
2
Posts: 5
Reputation: 160

Post » Tue Feb 02, 2016 9:23 pm

No, it's just an issue with my plugin.
B
94
S
33
G
114
Posts: 5,359
Reputation: 73,779

Post » Thu Feb 04, 2016 3:42 pm

Indeed. Ok, anyway, your solution works, I just have to modify the order of my points. Noted. Thank you R0j0hound !
B
2
Posts: 5
Reputation: 160


Return to Construct 2 General

Who is online

Users browsing this forum: humanescape and 9 guests