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
7 answers

Cocos2d for this?

I just finished my concept for an iphone app. I have a main program and in that program I want to start a game. MAIN PROGRAM (BUTTON 1 / BUTTON 2 / START GAME) | | …
Marins
  • 31
  • 2
2
votes
0 answers

Move Sprite based on UILongPressGesture duration

Summary: I am trying to move a CCSprite "up" while the user is holding down on the screen. I am using Cocos2d v3.1 and working with Xcode 5.1.1 I believe I am supposed to use UILongPressGestureRecognizer to identify when the user is holding down on…
Asdrubal
  • 2,421
  • 4
  • 29
  • 37
2
votes
2 answers

Should I use Core Animation or SpriteKit/Cocos2D for simple, blinking 2D animation?

I need guidance in how to animate small 2d things such as, for example, a character that simply remains blinking. Are SpriteKit and cocos2d "too much" to implement this sort of things? I'm not planning to make a game, I just want to mix standard iOS…
AppsDev
  • 12,319
  • 23
  • 93
  • 186
2
votes
2 answers

"disable" button-->method until operation is done

I am using the following method that invoked by pressing a button thru sprite builder. - (void)method { //static dispatch_once_t pred; // //dispatch_once(&pred, ^{ // run only once code below [self performSelector:@selector(aaa)…
2
votes
0 answers

Realistic underwater movement of Light weight rigid body through Spritekit

A rigid light weight ring is moving under water (device's motion). I couldn't figure any other logic or code to accomplish realistic simulated underwater movement.I would really like some insight on how to accomplish this through spritekit ,or…
user3978087
2
votes
0 answers

How to add a custom font to SpriteBuilder for ios and android (font appears on IOS)

Hi All Hoping someone can tell me what I'm doing wrong My sprite builder version is 1.1.0 (not sure if that helps?) xcode version is 5.1.1 (5B1008) running cocos2d 3.1.0 I've tried some of the suggestions already on the forum here and on…
StackBuddy
  • 577
  • 5
  • 17
2
votes
1 answer

moving a sprite causes jerky movement

I've got some jerky movement of my sprite. Basically, when the user touches a point on the screen, the sprite should move to that point. This is working mostly fine... it's even taking into account a delta - because frame rate may not be…
mac_55
  • 4,130
  • 7
  • 31
  • 40
2
votes
1 answer

How to use self.view in cocos2d?

I am implementing Flurry ads into my app, and I've come across an issue that I've gotten stumped on. The integration of a banner ad is as follows: [FlurryAds setAdDelegate:self]; [FlurryAds fetchAndDisplayAdForSpace:@"BANNER_MAIN_VIEW"…
SaleenS7
  • 402
  • 4
  • 15
2
votes
1 answer

"const" In Objective-C and Cocos2D: Is It Me, Or Does It Seem To Be Taboo?

I'm not sure if this is the right place to ask this, since it's not really a technical question but more a question of style and coding practices... I've always ben a fan of using "const" to define variables that will not be changing throughout…
miwalsh
  • 111
  • 2
  • 9
2
votes
1 answer

Call ccTouchesBegan when i touch a ccMenuItem without overriding the ccMenuItem class

Is it possible to let the system call ccTouchesBegan of the ccLayer on moving on a CCMenuItem element without overriding the CCMenuItem class ?
Claudio Ferraro
  • 4,551
  • 6
  • 43
  • 78
2
votes
0 answers

cocos2d+box2d application freeze/stopped

My cocos2d+box2d application freeze/stop sometimes. Pause from debugger get this line from b2World.cpp. What does it mean? Maybe problem with my contactlistener, without it app work at normal mode. **// Clear all the island flags. for (b2Body* b =…
flowmachine1
  • 111
  • 2
  • 7
2
votes
1 answer

-[CCFileUtils fullPathForFilename:resolutionType:] : cocos2d: Warning: File not found:

-[CCFileUtils fullPathForFilename:resolutionType:] : cocos2d: Warning: File not found: play.png Cocos2d game....extremely simple just started it. This is the entire class and the "play.png" and "sound.png" are not being found. They are both…
Surz
  • 984
  • 3
  • 11
  • 36
2
votes
1 answer

SpriteBuilder image file not found

I have added a .png image in sprit builder resource folder and I have published it. I see the added image in sprite builder all folder in Resources under Published-IOS. Here I have tried to access the added image in following…
nik
  • 2,289
  • 6
  • 37
  • 60
2
votes
1 answer

AR-iPhone -> cocos2D?

I am currently planning a little sightseeing-app (game) for my iPhone. It should be something like geocaching with Augmented-Reality features. The user should search and then pick up virtual elements. These elements should be "stored". Would you…
Rapid
  • 21
  • 1
2
votes
1 answer

Problems importing Cocos 3.0 class into Cocos 2.X project

I've had heaps of trouble importing OALSimpleAudio into my Cocos 2.X project. The app is quite big. What is the best way for me to import Cocos 3.0 into an existing project? The final error looks like this: This is what I've done so far: The…
Pointo Senshi
  • 541
  • 5
  • 17