Questions tagged [cocos2d-iphone]

Objective-C version for iOS & OS X of Cocos2d. Cocos2d is a framework for building 2D games and graphical applications.

Cocos2D for iPhone is an framework for building 2D games and graphical applications for iOS devices and Mac OS X computers. Cocos2D for iPhone was ported from the Cocos2D Python-based framework.

"Cocos2D for iPhone" (project name: cocos2d-iphone) is a free and open source project published under an MIT License.

"Cocos2D" (project name: cocos2d) is the "grandfather" of all Cocos2D game engines. Cocos2D is written in Python and allows developers to create games and applications for Windows, Linux and Mac OS X. Cocos2D is published under a BSD License.

There are a number of other Cocos2D based game engines, the most actively updated and most widely used are:

ShinyCocos (Ruby), CocosNet (C#) and Cocos2D for Windows (C++) haven't been updated in a long time, these Cocos2D versions are considered defunct. Cocos3D is a 3D extension to Cocos2D. See the Cocos2D Game Engines list for a complete overview.

The immense popularity of Cocos2D for iPhone has the effect that most developers use the term "Cocos2D" when referring to the Cocos2D for iPhone framework.

It is recommended to use the following tags appropriately:

  • Use the tag on questions referring to the Python based framework
  • Use the tag on questions referring to the Objective-C based framework
  • Use the tag on questions referring to the C++ based cross-platform framework
  • Use the tag on questions referring to the JavaScript based framework
  • Use the tag on questions referring to the C#-MonoGame Framework.
  • Use the tag on questions referring to the Java based frameworks
  • Don't use any of the above tags together in the same question, unless your question refers to more than one Cocos2D engine. For example, if you ask "How to port from cocos2d-iphone to cocos2d-x?" you should include both and tags.

Books:

10198 questions
2
votes
1 answer

Cocos2D v3 CCTableView not scrolling

I am trying to use a CCTableView in my game. You should be able to scroll through a list of names. I am able to click on a cell and log the which cell was clicked. However when I try to scroll there is no movement. @interface…
Asdrubal
  • 2,421
  • 4
  • 29
  • 37
2
votes
0 answers

cocos2d 3.4 with Spine - Reduce draw calls / batching draw calls

I'm using Spine together with cocos2d-objc 3.4 and I'd like to get my draw calls down to 1 ideally when only using one sprite sheet. At the moment a simple animation takes 10 draw calls and adding it one more time results in double the draw…
keyboard
  • 2,137
  • 1
  • 20
  • 32
2
votes
1 answer

How to add UIViewcontroller to a spritebuilder cocos2d 3.x project?

same as the title above. Please provide helpful link if possible. Googled it but did not find anything regarding Spritebuilder and uiviewcontroller integration. As it is needed for me to set up Google Analytics screen tag method inside viewDidLoad()…
2
votes
1 answer

how to get the maximum fps in ipad?

I have developed a game for iPhone using coco2d 0.99.3. I want it to work on iPad. I have the new images which are bigger in size and resolution than iPhone images. Every thing is fine, but I got the fps problem. In iphone simulator I used to get…
srikanth rongali
  • 1,463
  • 4
  • 28
  • 53
2
votes
1 answer

Difference between JumpTo and JumpBy?

I want to know the difference between methods JumpTo and JumpBy of cocos2D? Where can I use JumpTo and where JumpBy? please Help.
B K
  • 1,554
  • 3
  • 19
  • 40
2
votes
3 answers

Running cocos2d with iPhone SDK 4 GM

I tried to build my (cocos2d 0.99.0-based) project with iPhone SDK 4 GM which was just released today. The reason is because I want to incorporate iAds in my apps. However I got 20 error messages which looks like errors in library calling. Can…
Enrico Susatyo
  • 19,372
  • 18
  • 95
  • 156
2
votes
1 answer

MPMoviePlayerController into a view

I need to play a video into a cocos2d project.. and my question is: how can I put MPMoviePlayerController into my view like this:? UIView *theView = [[CCDirector sharedDirector] openGLView]; thanks very much!!
ghiboz
  • 7,863
  • 21
  • 85
  • 131
2
votes
2 answers

Animation in Cocos2d.

I am trying to make a sprite animate in cocos2D. I believe I have the animation set up, but how do I draw the animating sprite onto the screen? Here is what I have: id anim = [[[CCAnimation alloc] initWithName:@"char_walking" delay:1/12.0]…
tallen11
  • 1,387
  • 2
  • 17
  • 33
2
votes
1 answer

Does Cocos2d-js use a webview?

I need to know if the cocos2d-js (cocos2d javascript) could build a real native application and not just use a webview to display the content. what i exactly need to know, if the animations and all parts of the game logic will be transformed to some…
2
votes
1 answer

how to handle multiple layers in single scene in cocos 2d iphone

I am learning cocos2d and that we have multiple layers in single scene. I want to manage both layers at a time I.e, first scene with 480X320 image and second one also with same size. when I try the second one is only visible. Thats ok. But whenever…
ratna
  • 71
  • 1
  • 7
2
votes
0 answers

Repeating background with cocos2d (Python)

I am trying to write a (board) game with cocos2d in python. I want to have a nice grass texture as background, and it should repeat itself when the Window is resized. Currently I loaded sprite and just drew it multiple times in a batch, depending on…
2
votes
1 answer

Change brightness of CCSprite to simulate time

I have a bunch of sprites to create a forest in my game. What I want to be able to do is simulate night and day by dimming or brightening each image, as if the sun is down or up. How can I change the brightness (NOT opacity) of a sprite. I'm using…
Minestrone-Soup
  • 399
  • 1
  • 16
2
votes
1 answer

Memory management in iphone cocos2d

I am developing an ebook app for the iPhone using cocos2d. I use over 150 images(I guess). The problem is, while turning from one page to another, images get hanged randomly...... I tried this also [[TextureMgr sharedTextureMgr] removeAllTextures];…
muthu
  • 21
  • 2
2
votes
1 answer

Double tap Cocos2d Android JAVA

Trying to detect doubletap in Android (Cocos2d Framework). What am I doing wrong? In ccTouchesEnded i have : public boolean ccTouchesEnded(MotionEvent event) { touchTapCount++; Lg("Tapcount : " + touchTapCount); if (touchTapCount == 1)…
Kees Koenen
  • 772
  • 2
  • 11
  • 27
2
votes
0 answers

SpriteKit puzzle game

The idea is to create module that will slice character on the pieces and then we can put all the pieces to theirs positions. For example I have character on the canvas that has 1536 x 1536 px so I can simple down size it to all devices. If you use…
Matrosov Oleksandr
  • 25,505
  • 44
  • 151
  • 277