| Trundle: New Level Out! |
| The new free level for Trundle is now available in the App Store (iPad still pending review). This new level is all about helping a young Unk Bunk get his father back from the Hunters, it's a lot of fun; So go get/update it!
Trundle in the App Store
|
| Moving Shapes with Touches |
Moving Shapes with TouchesAs per request by "nickthedude" at the cocos2d-iphone forums, this is a very quick post about using touches to move/rotate shapes. We'll be using Cocos2d, Chipmunk, and SpaceManager. So this concept we're about to discuss has been around for a bit, originally coded up by Scott Lembcke (chipmunk creator) in his example of cpMouse; I think some have even kept it alive somewhere... So anyway we're going to expand upon this original idea a bit and make it multi-touch enabled as well, this way you can use two fingers to rotate a shape for example. So the single-touch concept is quite simple. On touch-began we detect if that touch is within a shape, if it is we immediately create a pivot constraint between the shape's body and static (non-moving) body, we set the pivot's anchor to the touch's position and... voila! The shape is suddenly attached to where I put my finger down. The rest is easy. On touch-moved we just update the pivot's anchor, and on touch-ended we just get rid of the pivot altogether. Sounds fairly simple right? Well what would it take to make this multi-touch enabled? Well basically instead of keeping around just one pivot, we need to have an array of them now AND be able to tell which touch they're associated with... uh oh. Hmm well what we really need is a new class that has UITouch and cpConstraint; Read more... |
| Slider in Cocos2d-iphone |
Well someone over at the cocos2d-iphone forum expressed interest in creating a slider in their game and since I was already thinking about posting about this; I figured I'd do a quick post about my implementation and just for the heck of it, provide the src as well. So basically I created a Slider class to start out with; Read more... |
| 2D Grass Making (Animations) |
So its been a little while since we've had a post, but don't worry we've been doing a lot of behind the scenes work on a few projects. One such project we had a desire to create some 2D grass waving gently in the wind (side view). However, many google queries later with little to show except many 3D grass effects videos, we about gave up. But then.... we found this neat little site talking about programmatic animations... with actionscript source code! Read more... |
|
cocos2d for iPhone is a framework for building 2D games, demos, and other graphical/interactive applications. It is based on the cocos2d design: it uses the same concepts, but instead of using python it uses objective-c. click here to go to the cocos2d project page |
|
|
|
![]()
|
Chipmunk is a fast and lightweight 2D rigid body physics library that includes an Objective-C wrapper for the Chipmunk Physics Library as well as some sample code from shipping iPhone Apps click here to go to the chipmunk physics project page |