Page 4 of 8

Re: Chipmunk 6.0 Beta

Posted: Sat Apr 09, 2011 9:25 am
by slembcke
Oh. Yep. I'm probably missing a couple of those actually. I'll have to do a grep.

Re: Chipmunk 6.0 Beta

Posted: Sat Apr 09, 2011 1:03 pm
by mobilebros
Oops, I'm late; I'll try and get this going with SpaceManager, as I'm doing all sorts of reaching internally it should be a good time. ;)

Re: Chipmunk 6.0 Beta

Posted: Mon Apr 11, 2011 8:52 am
by viblo
slembcke wrote:Oh. Yep. I'm probably missing a couple of those actually. I'll have to do a grep.
Ok :)

What about my edit? Maybe you missed it:
Found another: the asserts in cpBodySleepWithGroup that check if the bodies are sleeping when passed into the method seems wrong? Either the assert comment or a missing !.

Re: Chipmunk 6.0 Beta

Posted: Mon Apr 11, 2011 10:21 am
by slembcke
Yup, that's a bug. :oops: I really need to write some more unit tests... Ugh unit tests. There are a few easily testable, high impact areas of Chipmunk that would probably save me time if I wrote unit tests for them. The tests I do have are part of Objective-Chipmunk which means they generally get left as the last thing done. Write the C code, wrap it, then maaaaybe test it. :-\

Re: Chipmunk 6.0 Beta

Posted: Tue Apr 12, 2011 12:52 pm
by akamal
I figured that some of the time, shapes do not collide with static shapes in 6.0.
i could not debug yet because its random and possibilities are around 2%

Re: Chipmunk 6.0 Beta

Posted: Tue Apr 12, 2011 12:57 pm
by slembcke
Hmm. Hopefully that is not due to bugs in the AABB tree. I really hope I squashed all of those. You could try calling void cpSpaceUseSpatialHash(cpSpace *space, cpFloat dim, int count) to switch it back to using a spatial hash to see if that fixes the problem. That's probably a good place to start.

Re: Chipmunk 6.0 Beta

Posted: Wed Apr 13, 2011 9:13 am
by mobilebros
Is anyone else having trouble compiling with iOS. cpBBTree.c will not compile all because of these lines:

Code: Select all

	union {
		// Internal nodes
		struct { Node *a, *b; };
		
		// Leaves
		struct {
			cpTimestamp stamp;
			Pair *pairs;
		};
	};
First it warns that the struct declarations "Declaration does not declare anything" and then of course below it cannot find stamp, pairs, etc. Sorry if someone has already addressed this.

Re: Chipmunk 6.0 Beta

Posted: Wed Apr 13, 2011 10:08 am
by mobilebros
I figured out the issue, It needed the -fms-extensions flag set on the file's build settings tab (other compiler flags). This issue might have come about because I have -std=c99 set in my project settings build section.... I'm not positive though.

Re: Chipmunk 6.0 Beta

Posted: Wed Apr 13, 2011 10:11 am
by slembcke
Oh, so I am using anonymous structs and anonymous unions there because it made the code waaaay easier to read/write. It's a C++ feature, but is supported in GCC and Clang as extensions. If you are compiling using GCC, you have to set GNU99 as the language dialect. I'm considering rewriting it if it turns into a compiler compatibility problem.

Re: Chipmunk 6.0 Beta

Posted: Wed Apr 13, 2011 2:14 pm
by mobilebros
ok that's good to know, tried it out and worked perfectly. I'm going to try and compile a list of the evil I'm doing with chipmunk privates along with the reasons for doing it and send it your way at some point... better late than never I guess :?