Questions tagged [spritebuilder]

SpriteBuilder is a free and open source visual game editor for building iOS, Android and OS X apps. It comes bundled with the Objective-C & Swift version of Cocos2D, also free and open source. The editor runs on OS X and its development is sponsored by Apportable.

272 questions
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
  • 15
2
votes
1 answer

Spritebuilder how can I change the animation ( CCB file ) of a CCNode programmatically?

I'm trying to make a Spritebuilder iPhone game, and my main character _player is a CCNode whose child is a CCBFile which holds the character's idle animation. I want to change this _player's CCBFile to another CCBFile called ForwardDash.ccbi which…
Waterfak
  • 54
  • 3
2
votes
1 answer

How to add seperate iPad and iPhone images in spritebuilder- Cocos2d 3.2

I love that Spritebuilder takes the retina iPad image and automatically makes the scaled down iPhone images. I make one image (ipad retina), And spritebuilder makes the iPhone ones automatically: But for certain buttons/sprites, I wanted to make…
Stan Tatarnykov
  • 593
  • 7
  • 16
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

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
  • 567
  • 3
  • 16
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,181
  • 5
  • 34
  • 60
2
votes
1 answer

Admob in Cocos2d and SpriteBuilder

Hello! My game is almost done. But now I want to add ads. I use ADMob. I red the instructions but I don't have a ViewController. Because I am coding in Cocos2d & using SpriteBuilder to connect everything I only have a MainScene.m and MainScene.h. I…
Jonte
  • 23
  • 3
2
votes
2 answers

Cocos2d - Change CCNode Image Programmatically

Does anyone know how to change a CCNode's image programmatically? I'm using SpriteBuilder to make a simple game.
Jude Michael Murphy
  • 1,184
  • 2
  • 11
  • 22
2
votes
2 answers

Present GKGameCenterViewController in a Cocos2d 3 project

I'm trying to make a leaderboard for a game I created using SpriteBuilder. I have the following code. if (gameCenterController != nil) { gameCenterController.gameCenterDelegate = self; gameCenterController.viewState =…
Jude Michael Murphy
  • 1,184
  • 2
  • 11
  • 22
1
vote
0 answers

Load CCBi files in Cocos Creator

I am a game developer and Develop Games using cocos2dx, I have just started to move on cocos creator for game development.I have used cocosbuilder binary animation files with cocos2dx but I am not able to use it with cocos creator as there is not…
1
vote
2 answers

ScreenShot taken with UIGraphicsGetImageFromCurrentImageContext is blank when using Cocos2D/SpriteBuilder

I've got trouble taking a screenshot of my application using a button and the following code: func takeAScreenshot() { var screenshotImage :UIImage? let layer = UIApplication.shared.keyWindow!.layer let scale = UIScreen.main.scale …
Dorian A
  • 11
  • 3
1
vote
1 answer

Spritebuilder touch

I have a problem in using touches in my scene. I’ ve created a sprite (player.ccb) working in Sprite Builder that has a name =player in CCnode section. Here it is the main code written in GameScene : So after opening the simulator nothing doesn’t…
fabi8
  • 11
  • 2
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
2 answers

How to set a fixed background image for CCButton

I'm trying to set a background image for a CCButton and make sure it stretches or minimizes to the exact size of the CCButton: -(void)setBackgroundSpriteFrame: (NSString*)spriteFrameFileName { NSString* fullFileName = [NSString…
Loves2Develop
  • 614
  • 6
  • 27
1
vote
1 answer

Replacing Occurrences of Strings in NSMutableArray Only Working Once

I am confounded, and perhaps have missed something simple, but I can't find it. I'll do this problem in theoretical, because I have done a test and still cannot get it to work with stripped down code. I am using SpriteBuilder, but that shouldn't be…
Misha Stone
  • 531
  • 5
  • 18
1
2
3
18 19