[BEHAVIOR] Chipmunk Physics

Post your completed addons to share with the community

Post » Fri May 01, 2015 5:37 pm

I'm trying to use this plugin for my top-down game. I found a tutorial that shows how to do this, but I need to be able to change the "maxBias" property of a joint. I can't seem to find a way to do this- is there one? Thanks.
B
3
Posts: 7
Reputation: 189

Post » Sat May 02, 2015 1:19 pm

what is the best way to stop bridge vibration (I attached capx file)?
https://www.dropbox.com/s/9ludf1q1ne148 ... .capx?dl=0

I have a few possible solutions:
1) if both joint impulses are great than some limit than set object's max speed to zero;
2) compensate object's velocity by space damping;
3) setting damping velocity manually by tracking Y velocity of object.

@R0J0hound, could you help, please?
B
4
Posts: 4
Reputation: 208

Post » Sat May 02, 2015 5:07 pm

Hey R0jo, I'm still battling that one issue I encountered earlier, and it is quite weird since it only happens in certain levels.

I have had some difficulty in pinpointing the problem, but now I will scrap rest of my game and try to gather just bare bones version for demonstrating the error.. it happens when you make joints between sprites, and then one sprite's frame has been changed on the fly and it undergoes several collisions. Attached below is what I get in the console:

Uncaught TypeError: Cannot read property 'parent' of undefined
subtreeRemove @ rojoChipmunkBeta_behavior.js:2378
BBTree.remove @ rojoChipmunkBeta_behavior.js:2519
Space.removeStaticShape @ rojoChipmunkBeta_behavior.js:3961
Space.removeShape @ rojoChipmunkBeta_behavior.js:3912
behinstProto.updateShape @ rojoChipmunkBeta_behavior.js:6710
behinstProto.changeShapeCheck @ rojoChipmunkBeta_behavior.js:7016
behinstProto.tick @ rojoChipmunkBeta_behavior.js:7056
Runtime.logic @ preview.js:2303
Runtime.tick @ preview.js:2056tickFunc


.capx to be followed as soon as I manage to strip it =)
B
14
S
3
G
1
Posts: 78
Reputation: 1,037

Post » Sun May 03, 2015 4:51 am

@fizzick
There currently isn't a way to access that property.

@valex
You might be able to set the joints max force to limit the impulses of the joints. Another thing you could try is lowering the fixed time step from1/30 to 1/60.

@striiimix
Thanks for the bug report, I'll look into it when I have a chance.
B
94
S
33
G
113
Posts: 5,356
Reputation: 73,273

Post » Tue May 05, 2015 5:24 pm

So I'm late to the party and don't have hours to search through these 30 + pages, how does this work on Mobile devices if anyone has tried? I have my Pixel Golf game running through with Cordova export and it runs quite well on my iOS devices but the physics options are so limited that this would be great if it works well.

I might just have to try later today for myself, but are there any active examples around of this being implemented for me to see how it runs?
Twitter: https://twitter.com/pudgyplatypus

Learn to make a clicker game for cheap!
https://www.scirra.com/store/games-with ... e-game-666

Try out Pixel Golf on the Scirra Arcade!
https://www.scirra.com/arcade/sports-ga ... el-golf-67

Pudgy Platypus Games website!
www.pudgyplatypus.com
B
59
S
20
G
5
Posts: 212
Reputation: 7,390

Post » Tue May 05, 2015 5:31 pm

I haven't exported with Cordova at all, but from my Moto G's Chrome for mobile, my lil test project seemed to run better than the engine(s) packaged with C2.
ImageImageImageImage
B
62
S
19
G
51
Posts: 633
Reputation: 30,836

Post » Wed May 06, 2015 10:04 am

R0J0hound wrote:@DatapawWolf
It's not using the object's origin, it's just using the center of the object regardless of where the origin is. It was an oversight to not take into account the center of a polygon shape. I'll be taking a look into it.


Dont want to seem pushy :) but how is this coming along.

Thanks
B
49
S
16
G
9
Posts: 1,098
Reputation: 11,222

Post » Thu May 07, 2015 1:39 am

Hi,

I'm wondering if this plugin can handle the complex apparatus I'm attempting to build, mentioned here in another post a few days ago?: https://www.scirra.com/forum/how-do-i-slide-pivot-catapult-from-a-movable-platform_t129971

I've read through all 31 pages here, and numerous tutorials, but so far I haven't been able to pick out (or recognize) the correct combination of material and/or examples that would help me get this built. The previous post contained a capx based on the Physics-Catapult template. This is as far as I've gotten with the Chipmunk2D addon:

http://www.webmagi.com/media/uploads/scirra/Slide-Pivot-Catapult-2.capx

Can this be done with Construct2?

Thx
Last edited by WebMagi on Thu May 07, 2015 2:15 pm, edited 1 time in total.
B
5
Posts: 12
Reputation: 249

Post » Thu May 07, 2015 2:13 pm

R0J0hound wrote:Pin joints aren't like the pin behavior. They are a rod connecting two objects. So when you add the joint the distance between the anchor points are kept. See the js demo of it here:
https://dl.dropboxusercontent.com/u/249 ... oints.html


@R0J0hound
Are there examples of these joints used in Construct2?
B
5
Posts: 12
Reputation: 249

Post » Fri May 08, 2015 8:00 pm

@spongehammer
Haven't started working on it yet.

@WebMagi
This behavior would be useful for the simulation part of what you're doing. Adding the joints should be as easy as using one of the add joint actions and specifying the two objects and stuff like where the joint should be.
To make the object manipulable with the mouse you can use something like the drag n drop behavior as a base. To move other objects when dragging one you would need to move them by the same amount, the pin behavior could be used for it.
B
94
S
33
G
113
Posts: 5,356
Reputation: 73,273

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 3 guests