1

I want to make a simple 2D game where the user has to navigate a ball through a maze (using the accelerometer of course). I used a simple view to make use of the accelerometer and move a ball on the screen. Now how do I go about building the maze? Would I have to use cocos2d or something similar? How do I make the ball stop or rebound when it hits the wall of the maze?

Zaheer Ahmed
  • 28,160
  • 11
  • 74
  • 110
Rohith Nandakumar
  • 11,367
  • 11
  • 50
  • 60

2 Answers2

0

Check out this game... it does a great job with the accelerometer and also setting boundaries.

http://github.com/haqu/tweejump

iwasrobbed
  • 46,496
  • 21
  • 150
  • 195
0

This one is for Android rather than iPhone, but it has some parts that are very relevant to your project, such as moving a ball. Does not include ball rebounding or building a random maze; it loads mazes from a file.

For ball/wall bouncing, try this question.

For generating a maze, see this question.

Community
  • 1
  • 1
LarsH
  • 27,481
  • 8
  • 94
  • 152