Simple Cocos2d Iphone Game. Just some basic questions - iphone

I'm making an app, where the sprite has to run across the screen pressing buttons and jumping and ducking. Kind of like line runner. Anyways, I'm using cocos2d. Is this what i should be using. If it is, how would i make it. Im not asking for all the code, just the basic objectives and what i should do! thanks so much!

Cocos2d is one of the best platform to make game i think what you want to do can be done by cocos2d and you need to know how to move object(sprite) across the scene and how to detect the collation.
there is lots of way to move the sprite across the screen you can also move then by the cocos2d built in methods.
search for move method which will help you.

I would definitely advise you to use Cocos2d for this purpose and also Box2d if you need real physics simulation in your game.
Regarding of writing your game have a look here : It contains very useful cocos2d tutorials and even have a tutorial of how to write a full functioning game (Look for the monkey game)
Note : It seems that the link does not work right now but I am sure it will be fixed soon..

Related

How to make sprite moving forward continuously in cocos2d?

Need your help again.
I am currently working on my first iPhone game. In my game i want my car to move forward continuously. I also want my background which is a road, of course, to give the like it is moving.
Thanking you in anticipation.
You can accomplish this using the Parallax in Cocos2D. Here is a video tutorial on how to do that Parallax Scrolling with Cocos2D.
Here is another great site with many free tutorials on how to accomplish many things with Cocos2D that will most likely be very helpful to you Cocos2D Tutorials
I would also highly recommend the top 3 books in the following list on amazon Cocos2D game programming books
That's not a lot of information to work with. To do the basics of what you are asking for, the car wouldn't actually move it all. It would just stay in the middle of the screen while the background moves. You can just create a scrolling parallax background.

how to move images in openGL ES?

I have developed some how 5 iphone application, but now there is one game, and still I haven't any idea except word open GL ES, I read it a bit but I need some explanation and guidance for developing it.
The theme of game is like "there are many objects are moving from down to upside and i have to pick them and drag in boxes according to their color"
can anyone help me for showing proper way how to achieve, the study sources and other material,,
Thanks in Advance,,,
Not a direct answer but why don't you use an objective-c wrapper like cocos2d. That would speed up the things.
Not a real answer either, but are you sure you need OpenGL ES for that?
If your game is simple enough, you can use only custom UIViews. That would be much easier, especially to handle touch interactions.

Iphone game cocos2d and box2d

I have image named "platform.png" that represents one brick for platform of a IPhone game. I have a cartoon character that will jump on this platform.
A series of platform.png will form one complete platform. These series will be generated by swiping finger across Iphone screen. When character will jump on this platform it should go down like elastic and bounce back up. Can anyone tell me how to do this ?
Thanks in advance.
What yo want is Collision Detection. I don't think using Cocos2d will be a great idea to use in this case because you want to show elastic and bounce effects which should seem real. For this, what I suggest, is using Box2d which clearly help in showing the effects in a natural way. Here Collision Detection can be handled in a separate class known as ContactListener. You can study Box2d and ContactListener here. In ContactListener you can generate these effects and this class is very easy to handle. Two or three months back I used the same to create my game Pogo Jump and believe me I was very easy to work on Box2d.
Good luck..!!
heye ,
you have two options for this , either use box-2d/chipmunk or dont.
If you have prior experience with Physics then i would say box-2d/chipmunk would look more realistic.

what element i need to use to build game like this

i am building a game which is similar to the Plain Jane Flash Game for the iPad. I have decided to use cocos2d for the same, while exploring the cocos2d there are lots of option i am having. i am confuse in which elements/controls would be best for this type of game Please guide me or share any link/tutorial on cocos2d which have similar user interface.
I mean shall i use CCMenu/CCmenuItem or there is another control which is more suitable...
shall i use Sprite or simple image would be sufficent as i do not need to move anything in it.
Thanks
Although your question was not very clear, I assume your referring to the functionality of dragging and dropping different clothing items onto the game avatars. A custom CCSprite object would be much more appropriate for doing that.
However, there is not an easy answer for what you are asking. Creating a game like "Plane Jane" will involve many problems that I'm sure have not crossed your mind. I recommend you complete a few Cocos2d-iPhone tutorials before you go any further. Once you do that, you will have a much better understanding of the functionality you will need to create your game.
Here is a nice tutorial for starters:
http://www.cocos2d-iphone.org/archives/582

Iphone GUI physics code

When you drag an iphone GUI element like a list, it scrolls in a physics correct way, and also has a nice bounce effect at the end.
I would like to write a GUI element in my game, without using UIKit. I wonder where is the code implementing this, and if I can use it instead of trying to write something similar.
Any ideas?
I think that a physics engine would be overkill for just animating a gui element (unless you already have a physics engine in your game).
You could try using animations but I've no experience of doing this without UIKit but I suppose you would start here?
If you didn't want to use Core Animation, I would take a look at Robert Penner's easing equations - they're in actionscript but are pretty simple to port to C and would be a good start to get your own animation code started.
Hope this helps,
Sam
You can perhaps use animations to achieve this, you can define animation paths for bouncing or doing whatever it is you need and activate them when needed. I think the example project MoveMe can help you out
I can recommend the O'Reilly book "Physics for Game Developers" by David Bourg, which has great coverage of algorithms and code for all sorts of simulations. You probably want to start with motion affected by drag for the flick and gradual slowing, then look at a spring model to simulate the damping at the end.
box2d is an open source project that provides a great 2d physics engine.
this library is used by Intel clutter, which is a nice physics oriented UI library that is capable of running on mobile devices. that means that box2d is already optimized for mobile platforms like the iphone.