News for hackers. Stuff that matters.
Re:Show HN: Flappy Block – Flappy Bird clone using the iOS7 ... by interpol_p on Monday February 10, 2014 @01:29AM (#7209482)
There are two physics engines in iOS 7.

SpriteKit - Contains a 2D physics engine similar to Box 2D but not as full featured (joints, rigid bodies, shapes, polygons). The whole engine is similar to Cocos2D but ships with iOS 7. A particle editor and texture atlas generator is now built-in to Xcode because of it.

UI Dynamics - Contains a set of constraints and joints which can be used to flip and throw views around the screen. Lots of API hooks for responding to / taking user interaction into account. This is used for effects like when you scroll the messages list (the message bubbles bounce and collide) or when you drop notification center down (it bounces).

Edit: from a brief look at the source code, this example uses the UIDynamicAnimator API, so it is simulated entirely with the UI dynamics stuff.

Re:Show HN: Flappy Block – Flappy Bird clone using the iOS7 ... by seivan on Monday February 10, 2014 @03:38AM (#7209823)
SpriteKit itself isn't a physics engine, it comes with one Also, the Physics Engine isn't 'similar' to Box 2D - it _IS_ Box 2D with an OBJ-C wrapper.

Same thing applies to UIKit Dynamics, except it plays along with UIKit stuff.

Re:Show HN: Flappy Block – Flappy Bird clone using the iOS7 ... by interpol_p on Monday February 10, 2014 @03:43AM (#7209840)
Yes, that's what I meant when I said SpriteKit contains an engine similar to Box 2D. I thought my comment was reasonably clear about SpriteKit not just being the physics engine.

According to my tests it is not Box 2D, it produces significantly different results and only implements a subset of functionality. I've been told by others with more experience that it isn't Box 2D also, but if you have more information I'd like to know for sure.

Re:Show HN: Flappy Block – Flappy Bird clone using the iOS7 ... by cncool on Monday February 10, 2014 @03:55AM (#7209881)
The SpriteKit physics engine uses Box2D internally. Here is a dump of the SpriteKit framework:

https://ghostbin.com/paste/tm4ko

b2* shows up in there many times.

edit: slow pony

Re:Show HN: Flappy Block – Flappy Bird clone using the iOS7 ... by interpol_p on Monday February 10, 2014 @04:41AM (#7210019)
Thanks for that, that's really interesting. It behaved differently in my experiments so I assumed it wasn't the same — but it must just be a different configuration.
Re:Show HN: Flappy Block – Flappy Bird clone using the iOS7 ... by ceve on Monday February 10, 2014 @03:54AM (#7209873)
If you look at this dump, you can see references to b2World, b2Body etc, https://ghostbin.com/paste/tm4ko
Re:Show HN: Flappy Block – Flappy Bird clone using the iOS7 ... by joeblau on Monday February 10, 2014 @01:36AM (#7209503)
This is correct. It's all UIDynamicsAnimators using Pushes, Collisions, and Gravity.