Which to use when - COCOS2d or simple UIImageView with animation? - iphone

I am going to create simple iPad game, in which arrow going to hit balls. Where balls are moving in random direction with random speed. When arrow hits ball there is blast like animation with sound (Collision detection is main thing here). So for this what should i prefer. Should I use simple UIImageView and animation or use COCOS2D. Also I am new to COCOS 2d. Any other options are also appreciated. Thank You.

Use cocos2d Animation .Refer below link
if u have spritesheets try this:
1) http://www.raywenderlich.com/1271/how-to-use-animations-and-sprite-sheets-in-cocos2d
or u have separate images refer this:
2) http://cocos2d-iphone.org/wiki/doku.php/prog_guide:animation

Using cocos2d has a lot od advantages over UIKit. One of the things is box2d which will be very helpful for game like this [at least I got this impression for your question].
Do some research about box2d collision detection.

Related

Parabolic sprite movement of swipe with speed

I want to move a sprite with swipe gesture, like it start from one place and with angle it end with trajectory, I really don't know where to start this thats why i am not posting any code here. Any direction or piece of code will be appreciated. Note: Should I use cocos2d for this or any physics engine like box2d or chipmunk would be needed?
Regards
I would recommend you start here: http://www.raywenderlich.com/tutorials. There are tons of great a well explained tutorials to help you get started with cocos2d. I might recommend looking into using a physics engine like Box2D. An introduction tutorial is here: http://www.raywenderlich.com/457/intro-to-box2d-with-cocos2d-tutorial-bouncing-balls.

Bouncing Particles in a CCParticleSystemQuad

I'm using cocos2d to make a game on iOS. I have a particle emitter that I want the particles to bounce when they hit the bottom of the screen. Thing is I cannot seem to find a way to do this and with my limited understand of open GL the answer my be obviously in front of me but I don't see it. Is there an example of this or a way to use the CCBounce or box2d or something?
Here is a bouncing ball tutorial which uses cocos2d + Box2D:
http://www.raywenderlich.com/457/intro-to-box2d-with-cocos2d-tutorial-bouncing-balls
There is also EaseBounce actions (CCEaseBounceIn, CCEaseBounceOut, CCEaseBounceInOut) in cocos2d for you to run on sprites. See "EaseBounce actions" section in "cocos2d Programming Guide: Actions - Ease".

does anybody know slicing effect for iphone + cocos2d

in my game i want to give slicing effect , like after moving my finger on monster it should kill and monster blood should come on screen ,and disappear after few seconds ..
please help me ..
help will be appreciated ..
check this tutorial :- http://blog.roychowdhury.org/2010/11/19/cocos2d-iphone-tutorial-die-grossini-die-part-i/ they create blood particle effect manually
Take a look at MotionStreakTest example coming with cocos2d. I Think you can create your own effect based on this.
Or take a look at particle effects. Create a blood emitter and move it with your finger

Problem in using CCCamera

I am going to work on a game project. I am using cocos2d. I want to use cccamera class of cocos2d. Please tell me about any tutorial on cccamera. I want to implement more or less like angry birds, throwing the ball that reaches its destination facing the obstacles in the way.
So when the ball moves ahead the scene accordingly moves back depending on speed of the ball.
How to manage all that. I think i should use cccamera.
Thanx.
CCCamera, per the documentation is used for 3D effects (http://www.cocos2d-iphone.org/api-ref/latest-stable/interface_c_c_camera.html) and recommends the use of CCFollow (http://www.cocos2d-iphone.org/api-ref/latest-stable/interface_c_c_follow.html) for 2D related effects (such as following the birds forward, etc).

iPhone: Camera following player in cocos2d

I'm making an iPhone game in cocos2d.
I was wondering how I would make the camera / the view follow a specific sprite?
would I use the CCCamera class?
Yes, CCCamera would work. However, it has some drawbacks that make it undesirable for some uses. Moving the layers respectively all other objects relative to that sprite may be a better solution. It depends on the game.
First, read up what the different approaches and their drawbacks are, you can get a lot out of this cocos2d forum thread:
http://www.cocos2d-iphone.org/forum/topic/5363
It would be helpful if you could describe what your game is about and why you need the camera attached to that sprite.
For example, if you're thinking of a running game like Canabalt, i would not use the camera to scroll over the world, but instead scroll everything relative to the player (towards him) with the player sticking at about the same x coordinate while running. Perfect examples of games where you would not move the camera at all are the iCopter games, they are basically simplified versions of Canabalt. Notice that the player sprite always stays at the exact same x coordinate, and the game world just scrolls
Scrolling the camera itself in my opinion makes the most sense if you have a large game world that the player can traverse in all directions, and the number of objects are simply too numerous and also moving about in various directions, so updating their positions individually each frame would be both overkill and prone to errors. And since the game world is so huge, you would want to use the camera's position to limit what is drawn on screen.
use CCFollow actions
Like these :-
[self runAction:[CCFollow actionWithTarget:(u r hero) worldBoundary:CGRectMake(0,0,1050,350)]];
it will helps