Tools of the Trade: Part 3 Miscellaneous Tools
July 29, 2010 Leave a comment
In my earlier posts, we have talked about tools for planning your app / game and graphics resources. In this installment we will discuss a hodgepodge of tools to help you create buttons, joysticks and maps for your iPhone / iPad / iPod game project.
Joysticks:
This tends to be a popular request in all the iPhone development forums. A joystick is actually a tricky thing for a beginner programmer to understand, especially if that person is weak in math. Fortunately, some smarter people that me have already done most of the heavy lifting for us. Here are some projects you can use in your own game.
- SneakyInput: This is a feature rich class that has all the bells and whistles. You can configure it to be a single joystick, double joystick, d-pad, buttons or any combination therein. There isn’t very much documentation but there is plenty of sample code. I will post a tutorial soon about how to implement this properly.
- This post has a very good, simple to use Joystick example. I used this to prototype before using SneakyInput. Read all the comments and they explain how to implement in a variety of ways. I suggest reading this thread even if you do not use the code as it explains how to do some things like rotating your sprite based on joystick values etc.
- There is also this GamePack which includes a joystick. It does cost $7 though but it looks very powerful and easy to implement. The author lets you buy it separate or you buy their GamePack for an extra couple $$$. Part of the proceeds supposedly go to Riq, the lead developer for cocos2d.
- cocos2d has a joystick class in the /examples folder. Also Riq offers another example here.
Looked at all of these. I am liking SneakInput the best at the moment.
Buttons:
- Again, SneakyInput is your friend here.
- You can use a Ray Wenderlich’s excellent button tutorial if you would like to do it yourself.
Maps:
cocos2d can handle the tmx file type which means you can use a tool called Tiled to create some tile maps which you can import into your cocos2d project. This makes map editting a fairly simple task. You basically import a texture map which you then use to paint your map with. Another one of Ray’s excellent tutorials covers this whole process here.
Enjoy.
Recent Comments