Chatar Veer Suthar
Chatar Veer Suthar

Reputation: 15639

Cocos2d Bubble Shooting Game

I have worked with cocos2d before, that was simple game with moving objects (CCSprite), but now I want to make a bubbleshooter game , Can anyone briefly give me idea how it will work, the flow of game and what should I use, like as I think there will be on layer, and CCSprite over it, but still not clear idea in mind

I would be thankful if someone will describe the whole flow, and classes, more briefly I will specify some major points

  1. What are bubbles used in game? (Image with CCSprites or something else)
  2. How would I know the direction of shooting.
  3. How would I know the collision is occured, and other balloons of same color connect to hitting balloon will also be vanished.

I would be thankful if someone provide the related task tutorials or source codes, so that I would get better idea about it.

Upvotes: 0

Views: 1699

Answers (1)

banu
banu

Reputation: 787

  1. Bubbles are sprite Images.
  2. Read this link http://www.raywenderlich.com/692/rotating-turrets it gives how to find the direction of Touch position.
  3. collision detection as usual.In scheduler method find if the Moving ball is collide with other ball.

     -(void)checkCollision
    {
       for(CCSprite *ball In ballArray)
     {
        if(CGRectIntersectRect([ball boundingBox],[movingBall boundingBox]))
         {
    
             CCLOG(@"collision Occurs");
    
              }
       }
    }
    

Upvotes: 1

Related Questions