Pac-it-up! The final lesson on Box2D is available for download…

The final video of Session 4 of our iOS and Cocos2D tutorial series is now available!  In this video we modify our previous project in the session to create a gravity-less Box2D maze environment. Okay, obviously you can see from the image above its a mini Pac-man level. The fun things we explore in this tutorial…

  • Applying force to move the character around the level in up, down, left, or right directions
  • Adding a ContactListener to detect collisions between the character and maze boundaries
  • Adding 4 sensors arounds our character  to detect when openings in the maze are available
  • Programming a virtual swipe joystick to move in available directions and store a desired direction which allows the character to move into openings only when possible
  • Jumping the character from one side of the screen to the other.
  • Stopping movement completely (and pausing the mouth opening animation)
  • Applying different types of force to the character to experiment with spin

Sounds awesome right. Here’s the rub. I’m having some troubles this morning sending out a bulk of updated download links to the course, so if you’re reading this, you can just return to any of your past download links pages and request an additional download. Otherwise, I’m sure the problem will be resolved soon and I’ll be able to blast out an update to everyone.

ALSO if you bought this course with the Starter Kits included, the Angry Ninjas kit has been updated for the iPad 3!


2 thoughts on “Pac-it-up! The final lesson on Box2D is available for download…

  1. Got the new Angry Ninjas, now it looks great on the new iPad. I am seeing one issue though and I’m not sure why it’s happening, the coding looks fine.

    Say you throw a ninja it collides and doesn’t kill any fruit. Then after a couple seconds it rolls down the boards and ends up killing the fruit giving you the score you need to pass the level. The game doesn’t say Level Passed when this happens, instead you’re forced to throw another ninja just to get the game to continue and lose part of your bonus. I haven’t been able to get it to happen with the final ninja, but I’m wondering what would happen if you were out of ninjas completely and had nothing else to throw, would it say level failed?

  2. No matter what when all the ninjas are gone the code will refresh the level. Pass or not, I don’t know. I can’t think of any reason why it would say “failed” if the score was higher than needed to pass. Put it this way, It all depends on when the game counts the score. The way its coded now, the auto-pan shouldn’t go back to the slingshot until a couple seconds after a score has been counted. So the score gets added, waits, then pans back. Once it pans back to the sling shot, it should decide to run the code to check for passing the level or not. From what I remember =)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s