Snake Game

Hi, I a trying to design a simple snake game to get acquainted with Corona. The snake becomes longer as it takes more and more dots. My question is how do I detect when the snake's head crashes against its own body? Do I make the snake as a physics body and use collision detection? If so, then how do I make the physics body grow longer with every dot the snake eats.

The only version of Snake I ever really liked was the old-school version that came on the classic Nokie 8210's and 3310's (I believe those were the model numbers), and the snake was nothing more than a bunch of pixel blocks put together.

So, what you could do, is create little body pieces that are connected together (each with their own physical body), and then just create a new one every time the snake eats an apple. That way, you have growing taken care of, and the snake running into himself taken care of as well.

Just a starting point... good luck! Snake was awesome on oldschool nokias, and I haven't enjoyed any snake game on the iPhone yet ... maybe yours will change that!

Was your app successful?

views:1531 update:2011/10/4 17:12:07
corona forums © 2003-2011