Games using the Chipmunk4PB wrapper (2D physic engine)
Re: Who is also working on a Chipmunk wrapper (2D physic eng
I had a couple of questions:
1. When the output wrapper to version 6?
2. In this version of the wrapper is missing a lot of commands, and in some procedures do not match the number of parameters. The author has no plans to add a brief description of the structures and commands?
3. What exactly does this function: cpSpaceHashEach (*space\activeShapes,@DrawShape(),#Null) ?
Little things will not ask, I will try to understand them myself.
1. When the output wrapper to version 6?
2. In this version of the wrapper is missing a lot of commands, and in some procedures do not match the number of parameters. The author has no plans to add a brief description of the structures and commands?
3. What exactly does this function: cpSpaceHashEach (*space\activeShapes,@DrawShape(),#Null) ?
Little things will not ask, I will try to understand them myself.
'Happiness for everybody, free, and no one will go away unsatisfied!'
SMsF town: http://www.youtube.com/watch?v=g6RRKYf_Pd0
SMf locations module (Ogre). Game video: http://www.youtube.com/watch?v=ZlhBgPJhAxI
SMsF town: http://www.youtube.com/watch?v=g6RRKYf_Pd0
SMf locations module (Ogre). Game video: http://www.youtube.com/watch?v=ZlhBgPJhAxI
Re: Who is also working on a Chipmunk wrapper (2D physic eng
1) When it is done and not before the 4.60 is released. Sorry.AndyLy wrote:I had a couple of questions:
1. When the output wrapper to version 6?
2. In this version of the wrapper is missing a lot of commands, and in some procedures do not match the number of parameters. The author has no plans to add a brief description of the structures and commands?
3. What exactly does this function: cpSpaceHashEach (*space\activeShapes,@DrawShape(),#Null) ?
Little things will not ask, I will try to understand them myself.
2) Tell me what you are missing and I will add it to the wrapper. Some function have to wrap a little bit more. That's the reason for different parameter. In most cases it is the return value of a structure which PureBasic can not handle correct.
3) Read the docu here: http://chipmunk-physics.net/release/Chi ... test-Docs/ or ask in this forum:http://chipmunk-physics.net/forum/
Belive! C++ version of Puzzle of Mystralia
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Re: Who is also working on a Chipmunk wrapper (2D physic eng
I do not hurry you, just want to know: I continue to write under the current version of the procedure, or should wait for a new one.
"Tell me what you are missing..."
Without some procedures you can do if you know the description of the structures .But when some have additional parameters, it is not clear that there sent. I wanted to try a code, taken from the forum and could not implement it for lack of commands and mismatches.
Here
cpvsub, cpvmult - need 3 parameters instead of 2. What are they?
"Tell me what you are missing..."
Without some procedures you can do if you know the description of the structures .But when some have additional parameters, it is not clear that there sent. I wanted to try a code, taken from the forum and could not implement it for lack of commands and mismatches.
Code: Select all
// velocity of the two surfaces in relation to the collision normal at the collision point
static inline cpFloat
hit_velocity(cpBody *a, cpBody *b, cpVect p, cpVect n){
cpVect r1 = cpvsub(p, a->p);
cpVect r2 = cpvsub(p, b->p);
cpVect v1_sum = cpvadd(a->v, cpvmult(cpvperp(r1), a->w));
cpVect v2_sum = cpvadd(b->v, cpvmult(cpvperp(r2), b->w));
return cpvdot(cpvsub(v2_sum, v1_sum), n);
}
// This is a pre-solve callback
static bool
bumpSoundCallback(cpArbiter *arb, cpSpace *space, void *unused)
{
cpShape *a, *b; cpArbiterGetShapes(arb, &a, &b);
cpContact *contacts = arb->contacts;
const cpFloat min = 10.0f;
const cpFloat max = 300.0f;
cpFloat nspeed = cpfabs(hit_velocity(a->body, b->body, contacts[0].p, contacts[0].n));
if(nspeed > min){
ALfloat volume = fmax(fminf((nspeed - min)/(max - min), 1.0f), 0.0f);
playSound(bumpSound, volume, 1.0f);
}
return TRUE;
}cpvsub, cpvmult - need 3 parameters instead of 2. What are they?
'Happiness for everybody, free, and no one will go away unsatisfied!'
SMsF town: http://www.youtube.com/watch?v=g6RRKYf_Pd0
SMf locations module (Ogre). Game video: http://www.youtube.com/watch?v=ZlhBgPJhAxI
SMsF town: http://www.youtube.com/watch?v=g6RRKYf_Pd0
SMf locations module (Ogre). Game video: http://www.youtube.com/watch?v=ZlhBgPJhAxI
Re: Who is also working on a Chipmunk wrapper (2D physic eng
1) PLease continue with your work. The Chimunk 6.x wrapper will not be free like the 5.x wrapper version.AndyLy wrote: 1) I continue to write under the current version of the procedure, or should wait for a new one.
2) Without some procedures you can do if you know the description of the structures .But when some have additional parameters, it is not clear that there sent. I wanted to try a code, taken from the forum and could not implement it for lack of commands and mismatches.HereCode: Select all
// velocity of the two surfaces in relation to the collision normal at the collision point static inline cpFloat hit_velocity(cpBody *a, cpBody *b, cpVect p, cpVect n){ cpVect r1 = cpvsub(p, a->p); cpVect r2 = cpvsub(p, b->p); cpVect v1_sum = cpvadd(a->v, cpvmult(cpvperp(r1), a->w)); cpVect v2_sum = cpvadd(b->v, cpvmult(cpvperp(r2), b->w)); return cpvdot(cpvsub(v2_sum, v1_sum), n); } // This is a pre-solve callback static bool bumpSoundCallback(cpArbiter *arb, cpSpace *space, void *unused) { cpShape *a, *b; cpArbiterGetShapes(arb, &a, &b); cpContact *contacts = arb->contacts; const cpFloat min = 10.0f; const cpFloat max = 300.0f; cpFloat nspeed = cpfabs(hit_velocity(a->body, b->body, contacts[0].p, contacts[0].n)); if(nspeed > min){ ALfloat volume = fmax(fminf((nspeed - min)/(max - min), 1.0f), 0.0f); playSound(bumpSound, volume, 1.0f); } return TRUE; }
3) cpvsub, cpvmult - need 3 parameters instead of 2. What are they?
Only 5.x will be still free. I will make a update to ther latest 5x version (5.3.5) after release of PureBasic 4.60.
2) Only cp* functions are public functions. Were you have this example source?
3) cpvsub, cpvmult, ... returning a structure of cpVect. As long PureBasic cannot handle structures as return value as long such kind of functions have to be wrapped. The first parameter is the return value.
Belive! C++ version of Puzzle of Mystralia
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Re: Who is also working on a Chipmunk wrapper (2D physic eng
This code is taken from the chipmunk-physics forum. Posted some guy with a nick slembcke.Were you have this example source?
Thank you. Somehow I figured out that code. There were link errors due to cpfabs, cpfmax, cpfmin - had to throw them away.
In general, it seems I am close to completing a wrapper for your wrapper.
'Happiness for everybody, free, and no one will go away unsatisfied!'
SMsF town: http://www.youtube.com/watch?v=g6RRKYf_Pd0
SMf locations module (Ogre). Game video: http://www.youtube.com/watch?v=ZlhBgPJhAxI
SMsF town: http://www.youtube.com/watch?v=g6RRKYf_Pd0
SMf locations module (Ogre). Game video: http://www.youtube.com/watch?v=ZlhBgPJhAxI
Re: Who is also working on a Chipmunk wrapper (2D physic eng
1) There is a lot of such examples on the Chipmunk forum. I do not knowing all.AndyLy wrote:1)This code is taken from the chipmunk-physics forum. Posted some guy with a nick slembcke.Were you have this example source?![]()
Thank you. Somehow I figured out that code.
2) There were link errors due to cpfabs, cpfmax, cpfmin - had to throw them away.![]()
3)In general, it seems I am close to completing a wrapper for your wrapper.
2) Polink errors?
3) Fine. You are not alone
Belive! C++ version of Puzzle of Mystralia
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Re: Who is also working on a Chipmunk wrapper (2D physic eng
And who else mpz?Fine. You are not alone
I'm writing it for my little game, so it will not be universal.
POLINK: error Unresolved external symbol 'cpfabs@@YANN@Z'Polink errors?
POLINK: error Unresolved external symbol 'cpfmax@@YANN@Z'
POLINK: error Unresolved external symbol 'cpfmin@@YANN@Z'
Add
Test program today, changed all the settings. The slowdown started after 1000 (small) objects, that I was not happy. Hoped for more. In connection with the question: cpSpaceResizeActiveHash shure works? I tried different settings, even removed it, no effect.
'Happiness for everybody, free, and no one will go away unsatisfied!'
SMsF town: http://www.youtube.com/watch?v=g6RRKYf_Pd0
SMf locations module (Ogre). Game video: http://www.youtube.com/watch?v=ZlhBgPJhAxI
SMsF town: http://www.youtube.com/watch?v=g6RRKYf_Pd0
SMf locations module (Ogre). Game video: http://www.youtube.com/watch?v=ZlhBgPJhAxI
Re: Who is also working on a Chipmunk wrapper (2D physic eng
AndyLy wrote:And who else mpz?Fine. You are not alone
I'm writing it for my little game, so it will not be universal.
POLINK: error Unresolved external symbol 'cpfabs@@YANN@Z'Polink errors?
POLINK: error Unresolved external symbol 'cpfmax@@YANN@Z'
POLINK: error Unresolved external symbol 'cpfmin@@YANN@Z'
Add
Test program today, changed all the settings. The slowdown started after 1000 (small) objects, that I was not happy. Hoped for more. In connection with the question: cpSpaceResizeActiveHash shure works? I tried different settings, even removed it, no effect.
Belive! C++ version of Puzzle of Mystralia
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Re: Who is also working on a Chipmunk wrapper (2D physic eng
Post your code and I can say moreAndyLy wrote:And who else mpz?Fine. You are not alone
I'm writing it for my little game, so it will not be universal.
POLINK: error Unresolved external symbol 'cpfabs@@YANN@Z'Polink errors?
POLINK: error Unresolved external symbol 'cpfmax@@YANN@Z'
POLINK: error Unresolved external symbol 'cpfmin@@YANN@Z'
Add
Test program today, changed all the settings. The slowdown started after 1000 (small) objects, that I was not happy. Hoped for more. In connection with the question: cpSpaceResizeActiveHash shure works? I tried different settings, even removed it, no effect.
Belive! C++ version of Puzzle of Mystralia
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Re: Who is also working on a Chipmunk wrapper (2D physic eng
It will be difficult. But I tried the example that you put a wrapper, Chipmunk4PB_Demo.pb- there exact same situation.Post your code and I can say more
I do not see any difference with or without cpSpaceResizeActiveHash.
'Happiness for everybody, free, and no one will go away unsatisfied!'
SMsF town: http://www.youtube.com/watch?v=g6RRKYf_Pd0
SMf locations module (Ogre). Game video: http://www.youtube.com/watch?v=ZlhBgPJhAxI
SMsF town: http://www.youtube.com/watch?v=g6RRKYf_Pd0
SMf locations module (Ogre). Game video: http://www.youtube.com/watch?v=ZlhBgPJhAxI
Re: Who is also working on a Chipmunk wrapper (2D physic eng
Maybe this answer is the right for you:
http://chipmunk-physics.net/forum/viewt ... Hash#p6887
Question about Chipmunk functions should be be better ask on the Chipmunk board
http://chipmunk-physics.net/forum/viewt ... Hash#p6887
Question about Chipmunk functions should be be better ask on the Chipmunk board
Belive! C++ version of Puzzle of Mystralia
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Re: Who is also working on a Chipmunk wrapper (2D physic eng
The point is that I first looked at the forum and judging by the posts it works for them. Change the settings have a visible effect, but I do not have any effect, even if I delete the hash command.
'Happiness for everybody, free, and no one will go away unsatisfied!'
SMsF town: http://www.youtube.com/watch?v=g6RRKYf_Pd0
SMf locations module (Ogre). Game video: http://www.youtube.com/watch?v=ZlhBgPJhAxI
SMsF town: http://www.youtube.com/watch?v=g6RRKYf_Pd0
SMf locations module (Ogre). Game video: http://www.youtube.com/watch?v=ZlhBgPJhAxI
Re: Who is also working on a Chipmunk wrapper (2D physic eng
'Happiness for everybody, free, and no one will go away unsatisfied!'
SMsF town: http://www.youtube.com/watch?v=g6RRKYf_Pd0
SMf locations module (Ogre). Game video: http://www.youtube.com/watch?v=ZlhBgPJhAxI
SMsF town: http://www.youtube.com/watch?v=g6RRKYf_Pd0
SMf locations module (Ogre). Game video: http://www.youtube.com/watch?v=ZlhBgPJhAxI
Re: Who is also working on a Chipmunk wrapper (2D physic eng
Sweet. But I think it is not using PureBasic. Right?
Belive! C++ version of Puzzle of Mystralia
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Re: Who is also working on a Chipmunk wrapper (2D physic eng
Why have you decided so? Of course this is PureBasic! Pure PureBasic.Sweet. But I think it is not using PureBasic. Right?
'Happiness for everybody, free, and no one will go away unsatisfied!'
SMsF town: http://www.youtube.com/watch?v=g6RRKYf_Pd0
SMf locations module (Ogre). Game video: http://www.youtube.com/watch?v=ZlhBgPJhAxI
SMsF town: http://www.youtube.com/watch?v=g6RRKYf_Pd0
SMf locations module (Ogre). Game video: http://www.youtube.com/watch?v=ZlhBgPJhAxI

