Skip to main content

Questions tagged [ccsprite]

Filter by
Sorted by
Tagged with
4 votes
1 answer
255 views

I am using Cocos2D for Android: I have two scenes MainScene and LogoScene. I want to show a Splash screen on ...
sn0wfall's user avatar
0 votes
0 answers
108 views

I am in need of the basic understanding of how velocity changing works? i.e. how CCSprite is able to jump at particular height when some velocity is set? Let me give you an example on which I am ...
Paresh Thakor's user avatar
0 votes
1 answer
60 views

So I've been seeing this issue for a while now. When using a delta method to change the location of a CCSprite, the placement of texture of my sprite slightly moves into the direction where I'm headed,...
Salmiak's user avatar
  • 21
0 votes
0 answers
572 views

I am trying to create pause screen for my game. The game is developed upon continuous scrolling background (top to bottom) with obstacles which are moving independently (left to right). Below is the ...
Paresh Thakor's user avatar
5 votes
1 answer
2k views

How to read a color of a pixel at [x,y] from a texture (in cocos2d-js)?
topright's user avatar
  • 1,310
3 votes
2 answers
652 views

Now I am a little confused in my cocos2d-x cpp project. I want to draw lines with user's finger touch. Following the screenshot of a CCScene: In the screen, there are two squares. I want show an ...
einverne's user avatar
  • 141
0 votes
1 answer
660 views

I have a CCparallaxNodeExtras that scrolls infinite (following the space game tutorial). I added as a child a CCSprite made of other CCSprite, like this: ...
nosmirck's user avatar
  • 785
0 votes
2 answers
128 views

So I built my first game app, and it was a lot of fun. I'm really trying to expand on some of the ideas, but I'm running in to some serious variable scope issue. What I want to do is encapsulate a ...
OneChillDude's user avatar
1 vote
2 answers
353 views

So, here's how it goes. I am currently working on Cocos2d game, which consists of many Obstacles. One obstacle gets added on the screen at an interval of 10 seconds like this. ...
mayuur's user avatar
  • 115
0 votes
1 answer
844 views

In my cocos2d app I have a CCSprite moving on the screen but it moves off the screen. How can I prevent the CCSprite from moving off the screen? Thanks
Coder404's user avatar
  • 219
2 votes
1 answer
429 views

I would like to show a second image appearing while a "door" is closing on my character. I've got my character in the middle of the screen and a door coming from the left. When the door passes my ...
Paul's user avatar
  • 679
-2 votes
1 answer
189 views

I have a cocos2d iOS app. I have a CCSprite that I need to come up from the bottom of the screen every few seconds (like 2 or 3 seconds). How would I do this?
Coder404's user avatar
  • 219
0 votes
1 answer
171 views

I have 2 CCSprites and I want to tell if their x and y are equal I tried this: ...
Coder404's user avatar
  • 219
2 votes
2 answers
1k views

Consider the following simple game: 20 squares floating around an iPhone's screen. Tapping a square causes that square to disappear. What's the "best practices" way to set this up in Cocos2D? Here's ...
MrDatabase's user avatar
  • 1,951
1 vote
1 answer
614 views

I am making a 2D scroller game where the player controls an airplane via the accelerometer I would like to know if it is possible to scale in and to scale out the sprite/airplane using the ...
user1068384's user avatar
1 vote
1 answer
2k views

I move a simple CCSprite around the screen of an iOS device using this code: ...
MrDatabase's user avatar
  • 1,951
1 vote
1 answer
406 views

I convert the image into texture in a thread using the following line of code to reduce the image to texture converting time. [[CCTextureCache sharedTextureCache] addImage:@"imageName"]; But when i ...
user760321's user avatar
1 vote
3 answers
2k views

In my simple game I use boundingBox for pick coins and other stuff, but I need use irregular area detection of Sprite(with out Alpha)... There is alternative to boundingBox? Here is code: ...
SeriiZ's user avatar
  • 13
1 vote
1 answer
2k views

Does cocos2d has a method that returns the amount of CCSprites added to a CCLayer? A have SceneControlLayer object, and I added some CCSprites to it. ...
Bob Rivers's user avatar
4 votes
1 answer
2k views

When I am working with cocos2d I can add CCSprites to the layer or 'stage' and manipulate them. Now, to do my ongoing calculations for movement AI and such, things that will always run, should I: ...
MetaGuru's user avatar
  • 263
3 votes
1 answer
2k views

In my basic Cocos2D + Box2D iPhone app I have a bunch of circular Box2D bodies. I'd like to change the color of the circles programatically. What's the easiest way to do this? So far I'm just ...
MrDatabase's user avatar
  • 1,951
1 vote
1 answer
1k views

I'm making a game for iPhone and iPad w/ Cocos2D and Box2D. I scale the size of square objects ("blocks") using a pixel-to-meters ratio depending on the particular device. Can I stretch or shrink ...
MrDatabase's user avatar
  • 1,951