Questions tagged [kobold2d]

Kobold2D is an extended and improved version of the popular Cocos2D for iPhone game engine

Kobold2D is an extended and improved version of the popular Cocos2D for iPhone game engine. Everything you know about Cocos2D can still be applied, and Kobold2D is easier to get started with, more convenient to use, more powerful and flexible than Cocos2D with all the documentation available online and offline. Use Kobold2D to develop iPhone, iPod touch, iPad and Mac OS X games for both Apple App Stores. Kobold2D is free and open source with additional premium content to support its development. It was established by Steffen Itterheim, author of the book Learn Cocos2D Game Development with iOS 5.

141 questions
0
votes
1 answer

deleting shaders in cocos2d 2.1

I have a subclassed sprite with a custom shader in a cocos2d 2.1 / kobold2d project (ARC enabled). i'm getting a crash in CCGLProgram when changing scenes. dealloc is being called and i crash on an NSAssert that: 'Vertex Shaders should have been…
kidnim
  • 1,477
  • 2
  • 10
  • 13
0
votes
1 answer

Box2d collision between dynamic objects

I'm trying to make a simple shooting game with Box2d. Enemies and bullets are both dynamic bodies. I create enemies on the left side of screen, and then apply a linear force to them to make them move towards right. The player needs to hit an enemy…
alanlzl
  • 41
  • 7
0
votes
1 answer

+(id) scene not called after replaceScene

I have a menu item which will call goToGameLayer when tapped. The goToGameLayer method simply does the following: [[CCDirector sharedDirector] replaceScene:(CCScene*)[[GameLayer alloc] init]]; However, after replaceScene, the +(id)scene method in…
alanlzl
  • 41
  • 7
0
votes
1 answer

Background position alternating position every time I build in Xcode 5

I am just beginning programming games in Xcode 5 using cocos2D and found this pretty strange. I'm starting out fresh on a menu scene and was importing a background and a button. The following code positions my background just fine sometimes, but…
spaderdabomb
  • 942
  • 12
  • 28
0
votes
0 answers

getting off the ground with kobold2d and xcode 5, cant get simulator to open

I have some experience with iOS development and now I want to get my feet wet with game development. It seems like cocos2d is a great option but may be complicated to set up post ARC. So i went with kobold2d thinking it would get me off the ground…
hamobi
  • 7,940
  • 4
  • 35
  • 64
0
votes
1 answer

Converting position with regarding anchorPoint?

I have a sprite, which is added to CCSpriteBatchNode. Then I fix position of the sprite, changing anchor point the way so I can rotate sprite around that point. Hierarchy is sprite <- batchNode <- scene Basically sprite is moving but it's .position…
Pablo
  • 28,133
  • 34
  • 125
  • 215
0
votes
0 answers

Is CCScene replace during CCTransition possible?

Calling replaceScene: with a CCScene on CCDirector which is during a CCTransition results in dealloc not being called on any scene used, moreover, after this operation any scene is not being displayed. Here is a link to the sample project Shortest…
Wladek Surala
  • 2,590
  • 1
  • 26
  • 31
0
votes
0 answers

Texture atlases limitations on big resolution sprite images with many frames used in cocos2d

On what good serves me a texture atlas if my 3D character is big enough and fits only a few on the 4k*4K spritesheet? Seems like big resolution (420x768px) graphics are not best suited for such textures and used in cocos2d 2 to create nice…
man
  • 1
  • 1
0
votes
1 answer

Subclassing CCSprite and using CCSpriteBatchNode

i have a subclassed CCNode to which I add several of the same small subclassed CCSprite WHICH IN TURN have several subclassed sprite children. I thought I was using CCSpriteBatchNode properly but I'm noticing hundreds of draw calls are registering…
kidnim
  • 1,477
  • 2
  • 10
  • 13
0
votes
1 answer

Incompatible pointer types sending 'class' to parameter of type CCMenuItem

I am making a 14 year old kid making a game in cocos2d. I am pretty new to cocos2d. I want to display the same coin sprite next to each other to make a pattern. So I added this in my main gameplay layer: - (void)coinPatterns { menu =…
Shalin Shah
  • 8,145
  • 6
  • 31
  • 44
0
votes
1 answer

Objective C - Detect mouse position without event

I'm an objective C noob and I'm making a 2d game that allows players to move a tank with the arrow keys, and aim the turret with the mouse. Currently, the turret direction is updated (by the method below) using ccMouseMoved. This passes an NSEvent…
user985867
0
votes
2 answers

passing userData via ccmenuitem with ARC enabled

I'm trying to pass an NSString via a menuitem using the following code CCMenuItem * buyButton = [CCMenuItemLabel itemWithLabel:buyLabel target:self selector:@selector(buyItem:)]; buyButton.userData = (__bridge void *)((NSString*)(itemName)); to the…
kidnim
  • 1,477
  • 2
  • 10
  • 13
0
votes
1 answer

How can I offset a self CCFollow?

I used a CCFollow on my layer to follow a Player sprite. Is there anyway to offset so the Player is not directly in the center? I would like to offset the sprite by +100 Y of the center. [self runAction: [CCFollow actionWithTarget:Player]];
Troy R
  • 426
  • 2
  • 16
0
votes
0 answers

Kobold2d Multiple Project Workspace - Xcode Confuses Files

I really love using Kobold2d - it makes many aspects of Cocos2d development simpler. But a major annoyance I've found is that since all new projects are contained within the Kobold2d workspace, if I try to recycle a class name, ie use the same class…
0
votes
2 answers

How to schedule a method from another cclayer implementation file

How can I get my scheduler to call a method inside another implementation files ccLayer? Here are the files I have: GameHUD.h GameHUD.m GameScene.h GameScene.m Scene setup under GameScene.m +(id) scene { CCScene *scene = [CCScene node]; …
Troy R
  • 426
  • 2
  • 16