cocos2d-iphone

Applying a vortex / whirlpool effect in Box2d / Cocos2d for iPhone

元气小坏坏 提交于 2019-12-18 07:19:33
问题 I've used Nick Vellios' tutorial to create radial gravity with a Box2D object. I am aware of Make a Vortex here on SO, but I couldn't figure out how to implement it in my project. I have made a vortex object, which is a Box2D circleShape sensor that rotates with a consistent angular velocity. When other Box2D objects contact this vortex object I want them to rotate around at the same angular velocity as the vortex, gradually getting closer to the vortex's centre. At the moment the object is

Cocos vs AndEngine for android [closed]

谁说我不能喝 提交于 2019-12-18 05:56:07
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 6 years ago . I want to make a game using Tiled Map Editor and I want to move the character around using a D-Pad for moving the character So I'm wondering which Engine would be better AndEngine or Cocos2d Keep in mind i'm a beginner at this so I'd like to stare at a lot of tutorials. :-D

Does the .visible property affect performance?

喜夏-厌秋 提交于 2019-12-18 05:12:44
问题 I can turn the .visible value for CCNodes, but I wonder, can an insivisible node consume less memory/processing than a visible one? Can I set the .visible property to NO when my objects are outside the screen to optimize? Or does cocos2d already do that stuff for me? 回答1: Invisible nodes are typically skipped when it comes to being rendered. On the other hand, nodes with visible set to YES will invoke OpenGL draw calls, regardless of whether they are on or off the screen (See Riq's comment

combining multiple CCSprites into one grouped object in cocos2d

别说谁变了你拦得住时间么 提交于 2019-12-18 04:55:23
问题 I wonder what's the best approach to combine several CCSprites dynamically into one grouped object using cocos2d. I have to dynamically create characters from a set of multiple CCSprites. The elements can't move relative to each other after combined - and are never separated again. When combined they should behave just like one CCSprite in terms of moving and turning etc. I couldn't find anything in cocos2d, or do I have to use a physics engine just to achieve this? I am afraid, using Box2d

Create layer mask with custom-shaped hole

*爱你&永不变心* 提交于 2019-12-17 23:07:18
问题 I've spent too much time trying to figure this out and simply cannot find a workable solution. Situation: 1. A picture of 'something' is displayed on the phone. 2. A semi-transparent (e.g. blue) layer is placed on top of the image, completely covering it. 3. A 'hole' in this layer exists where that part of the layer is fully transparent and is movable. An example could be a zoom effect where you move this 'hole' around the image. Inside the hole you can see the image normally, while outside

cocos2d sprite repeat animation forever

假装没事ソ 提交于 2019-12-17 19:56:06
问题 In my iOS game, I hope the hero keep running until screen is touched and the hero should jump. So I write: In .h file: @interface Hero : CCSprite { CCSprite *_hero; id _keepRunning; } @property(nonatomic,retain) id keepRunning; In .m file: @synthesize keepRunning = _keepRunning; -(id) init { _keepRunning = [CCRepeatForever actionWithAction:[CCAnimate actionWithSpriteSequence:@"heroRun%04d.png" numFrames:30 delay:0.02f restoreOriginalFrame:NO]]; } Then when the game starts, I call run ()

Xcode : How To Set App To Be iPhone Only?

荒凉一梦 提交于 2019-12-17 19:46:00
问题 We have set the following app settings to be iPhone only, but in the App Store the app is listed as iPhone/iPad compatible. As you can see in the following image, the device family is set to be just iPhones: Here is App: http://itunes.apple.com/us/app/carrom-pro/id525961441?mt=8. Is there anything wrong with these settings? 回答1: All iPhone applications can be run on the iPad as well, just not "fullscreen" (see image below). Applications can be designed for iPhone and iPad separately, or a

How to disable iPhone 6 native resolution?

北城余情 提交于 2019-12-17 12:05:38
问题 I have several games made with Cocos2d-iphone. All of them are old projects created with Xcode 4 or 5. All games scale fine on the new iPhone 6 and 6 Plus except one that seems to avoid the scaling mode and is running on native iPhone 6/6 Plus resolution. The project does not contain Launch images with the resolutions that seem to disable the scaling mode as explained here Is there anything else that unlocks the native resolutions? I want the game to run in scaling mode for now until the HD

How to disable iPhone 6 native resolution?

二次信任 提交于 2019-12-17 12:05:37
问题 I have several games made with Cocos2d-iphone. All of them are old projects created with Xcode 4 or 5. All games scale fine on the new iPhone 6 and 6 Plus except one that seems to avoid the scaling mode and is running on native iPhone 6/6 Plus resolution. The project does not contain Launch images with the resolutions that seem to disable the scaling mode as explained here Is there anything else that unlocks the native resolutions? I want the game to run in scaling mode for now until the HD

How to disable iPhone 6 native resolution?

六月ゝ 毕业季﹏ 提交于 2019-12-17 12:04:31
问题 I have several games made with Cocos2d-iphone. All of them are old projects created with Xcode 4 or 5. All games scale fine on the new iPhone 6 and 6 Plus except one that seems to avoid the scaling mode and is running on native iPhone 6/6 Plus resolution. The project does not contain Launch images with the resolutions that seem to disable the scaling mode as explained here Is there anything else that unlocks the native resolutions? I want the game to run in scaling mode for now until the HD