Home > Development, cocos2d > cocos2d Joystick

cocos2d Joystick

Developed a simple joystick using cocos2d.  Feel free to use for your game project.

The current project only use a pad and cap images. You could add a stick!

Sorry the comment in source code is Korean. ^^;;

new line

[DOWNLOAD: TheFirstGood_JoyStick XCode Project File]

new line

  1. GTekna
    May 15th, 2010 at 07:58 | #1

    The code is based on 71squared’s UIKit version.

  2. Maiko
    May 22nd, 2010 at 08:03 | #2

    Hey There!

    Your joystick looks really great! I’m new to iphone game programming, so I have a simple question.

    I’m working a 2D top down pokemon style game, and I wanted to use this joystick. How do I wire it to my sprite?

    Thank you so much!

  3. GTekna
    May 22nd, 2010 at 22:55 | #3

    1. Update your sprite position inside Moved touch handler.

    2. Use schedule with a certain interval. In the method, update the sprite position based on the angle and distance of the joystick head.

    Hope it helps.

  1. No trackbacks yet.