Questions tagged [cocos2d-iphone-3]

Tag for questions specifically about v3.x of cocos2d-iphone. v3 is a rewrite with a largely new API and differing best practices compared to previous versions.

30 questions
1
vote
1 answer

CCActionSequence/CCActionDelay not delaying each action?

I have a function which creates a CCSprite and moves it across the screen: func fireWeapon(target: CGPoint) { let projectile = CCBReader.load("Projectile") as! CCSprite projectile.position = player.position; self.addChild(projectile); …
1
vote
1 answer

CCClippingNode on Android not working

I started a new iOS project recently. I'd like to support also Android so I choose SpriteBuilder with newest cocos2d-iphone (cocos2d-swift). I use CCClippingNode for clipping contents. It needs 24bit depth buffer and 8 bit stencil buffer, so I…
Gergely
  • 3,025
  • 2
  • 14
  • 13
1
vote
2 answers

-[__NSCFNumber value1]: unrecognized selector sent to instance

-(FileGame *)objectAtXandY:(int) posX secondPos:(int)posY { if (posX < 0 || posX >= kBoxWidth || posY < 0 || posY >= kBoxHeight) return OutBorderStart; return (FileGame*)[[content objectAtIndex:posY]objectAtIndex:posX]; } -(void)…
Prabakaran
  • 258
  • 2
  • 14
1
vote
1 answer

How to set two different splash screen in cocos2d v3.x in ios

I'm working with the cocos2d 3.x and Xcode 5.1.1.I'm having two images image1.png and image2.png.In my game i already change the default image (splash screen) to my image(image1.png).Here i need to display image1.png for 2 seconds and the image2.png…
Prabakaran
  • 258
  • 2
  • 14
1
vote
1 answer

CCAnimation and moving Sprite in Cocos2d Properly with physicsBody?

It appears that my character seems to animate as expected using CCAnimation and Cocoa2d 3.x. The problem is when I set my CCAnimatedSprite to have the physicsBody, just as my previous CCSprite did, I get a crash Aborting due to Chipmunk error:…
1
vote
1 answer

why collision not working , cocos2d v3?

i create simple game like flapy bird with cocos2d v3 . Interface class: @interface GameScene : CCScene // ----------------------------------------------------------------------- + (GameScene *)scene; - (id)init; //…
user3530550
  • 25
  • 1
  • 6
0
votes
1 answer

CCSpine by cocos2d-objc-ext not working

I am trying to use CCSpine in my cocos2d-swift V3.3 project, there is a issue: not found CCDictionary.h Where is the CCDictionary.h? Dose it in a low version of coco2d-iphone?But I didn't find it.
luoyeshu
  • 15
  • 1
  • 5
0
votes
1 answer

How can you programmatically bring up keyboard with CCTextField?

I have a CCTextField that is hidden until the user taps on an object, which then adds it to the node tree and it's visible. Currently, the user must then tap the CCTextField to activate the iOS keyboard and begin entering text. Is there a way to…
prototypical
  • 6,731
  • 3
  • 24
  • 34
0
votes
0 answers

Opacity issues with Cocos2d iPhone

I'm having issues with opacity on several animations in Spine after an upgrade to Cocos2D 3.1.1 from Cocos2D 2.1 To better ilustrate what I am talking about, here are two videos that show the difference between the animations: YouTube Video: Cocos2D…
dornad
  • 1,274
  • 3
  • 17
  • 36
0
votes
0 answers

applyImpulse on CCSprite not making realistic moves, need to speed up the sprite moves

I am developing a jump game, in that when tapped on screen, I need to make the player jump up. So, I used following code. [_player.physicsBody applyImpulse: ccp(0, player.physicsBody.mass * 155)]; in touchBegan method. The code for CCSprite *_player…
Paresh Thakor
  • 1,795
  • 2
  • 27
  • 47
0
votes
1 answer

CCSprite (Player) falls off from Platform while moving left side of the device

In my game, I have placed continuously moving platforms and a player. Player goes up jumping through each platform but platforms are moving from left to right and when player sits on moving platform, it slides with platform as well. But the problem…
Paresh Thakor
  • 1,795
  • 2
  • 27
  • 47
0
votes
1 answer

Cocos2d CCActionSequence order and delay messed up

I'm working on cocos2d V3.x project (SpriteBuilder V1.2.1). Currently trying to run this action sequence with a delay on a CCSprite. I'm not sure if there is a problem or maybe I just don't understand how CCActionSequence works. I want action 'a' to…
Fdo
  • 1,053
  • 4
  • 15
  • 38
0
votes
1 answer

Cocos2d V3 can't switch scenes after using the UIImagePickerController Class

I'm having a little trouble switching scenes (or even displaying sprites) on my CCscene UserLevelCreation, but it only happens after i use the UIImagePickerController to take/accept a picture, And then when I try to switch scenes, It crashes with…
0
votes
2 answers

Cocos2D v3 CCParallaxNode scrolling can't keep player in focus

I am very fresher to game development and I need to develop a game like NinjaJump. I have created a CCParallaxNode to setup scrolling background and added CCPhysicsNode to setup Physics world. I have created player object as shown below. // Add a…
Paresh Thakor
  • 1,795
  • 2
  • 27
  • 47
0
votes
0 answers

Creating a CCSpriteFrame from texture in 3.x compared to 2.1

In a cocos2d 2.1 project (kobold2d), I had some code that takes pieces of a spriteframes out of sprite sheets and creates an animation. i'm having trouble getting a similar result in 3.2.1 2.1 code //subclassed CCSprite //inits a LargeSquare Sprite…
kidnim
  • 1,477
  • 2
  • 10
  • 13
1
2