10.03.2019 - Round 1 results of our "A Love Letter For FreeBASIC" game dev competition have been published. Please be sure to check the results thread: http://games.freebasic.net/forum/index.php?topic=629.0. Don't forget that the competition is continuing with a round 2, lasting till 29th of April, 300 USD first prize. Stay tuned!

### Author Topic: Chipmunk FB (2D Physics Library), and a minigame (compo?)!  (Read 8756 times)

#### Dr_D

• Forum Sage
• Posts: 256
##### Re: Chipmunk FB (2D Physics Library), and a minigame (compo?)!
« Reply #15 on: March 16, 2008, 01:35:48 AM »
Has anyone been messing with this? I've been playing around with it a bit and it seems like cpPolyShapeNew() doesn't like it when you try to create a shape with more than 4 vertices. Does anyone know anything about it? I double checked for ccw winding order and everything, so it wasn't that. I didn't find anything in the docs about it, but then I could have overlooked it... wouldn't be the first time.

#### Lithium

• Recruit
• Posts: 28
##### Re: Chipmunk FB (2D Physics Library), and a minigame (compo?)!
« Reply #16 on: March 16, 2008, 06:16:26 AM »
Is it convex?

#### Dr_D

• Forum Sage
• Posts: 256
##### Re: Chipmunk FB (2D Physics Library), and a minigame (compo?)!
« Reply #17 on: March 16, 2008, 10:55:37 AM »
Hmm... Nope. I didn't realize it had to be. I was trying to assign a set of data for a terrain using it. I guess I'll have to use cpSegmentShapeNew() on each line segment. Normally, I use Newton, and it has a function to create a convex hull from a point cloud, so I assumed this was the same thing.

EDIT: Actually, the Newton function creates a "collision tree", which can be concave or convex, but is only used for static collisions, like terrains. cpSegmentShapeNew() seems to be what I was after though.

Has anyone had any luck compiling this lib for linux? If not, does anyone have any idea where we could get the compiled object files? Thanks.
« Last Edit: March 16, 2008, 12:50:22 PM by Dr_D »