Chipmunk and Core Animation?

Official forum for the Chipmunk2D Physics Library.
Post Reply
idler
Posts: 5
Joined: Wed Dec 21, 2011 3:52 pm
Contact:

Chipmunk and Core Animation?

Post by idler »

I assume most people use Cocos or OpenGL to render Chipmunk object. Are there any drawbacks to using Core Animation and CALayers? Does it perform terribly or wind up complicated to use? I looked at the SimpleObjectiveChipmunk example but that's only a single object. I guess I could experiment some but it might be nice to know if anyone has any experience using CA.

I have used CA for things so I know it can perform well but I haven't done much where everything is rotating and/or flipping sprite images every frame.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Chipmunk and Core Animation?

Post by slembcke »

Yeah, honestly it works just fine as long as you keep the number of rendered objects down to a couple dozen. It's much much slower than Cocos2D or straight up OpenGL yes, but for a lot of simpler games the performance is irrelevant. I would certainly opt to use UIKit for a board game for example as it makes it much easier to idle the CPU when you don't need to re-render the screen. With Cocos2D, that's nearly impossible without hacking the library source significantly.

I also have another older example project that uses UIKit/CA: http://chipmunk-physics.net/tutorials/iPhoneSnap.tgz
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
idler
Posts: 5
Joined: Wed Dec 21, 2011 3:52 pm
Contact:

Re: Chipmunk and Core Animation?

Post by idler »

I guess I will try some experiments. My previous usage of CALayers performed well but I wasn't doing anything more than animating the positions.
bentford
Posts: 1
Joined: Fri Jan 06, 2012 3:32 pm
Contact:

Re: Chipmunk and Core Animation?

Post by bentford »

I'm build a iOS game using CoreAnimation. In my prototype, I have 50+ sprites as chipmunk objects running on my iPad 1 with no noticeable lag. They are actually UIView's, not just CALayers and it still runs fine.

Granted, my sprites are only two small graphics, but CoreAnimation is very performant for me.
Post Reply

Who is online

Users browsing this forum: Heise IT-Markt [Crawler] and 2 guests