The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
0answers
20 views

Cocos2D - Detect how many items an object collided with / negating more than one object

In creating a small breakout clone, I've managed to get the ball to bounce whenever it hits a block by negating (or multiplying by -1) either the X or the Y values. This works, at least until the ...
0
votes
0answers
23 views

set customize attribute value in a sprite in cocos2d

I want to make a puzzle game by cocos2d ios. For that, I want to set value in customized attribute. Like: In cocos2d js:(value, power, picked attribute) var sprite = cc.Sprite.createWithSpriteFrame("...
0
votes
1answer
109 views

How to include a new file js in a project cocos2d js?

I'm trying to include a new js file containing a new scene on a cocos2d js project, but every time try occurs the following error: Uncaught ReferenceError: GameScene is not defined. I included my ...
1
vote
0answers
150 views

How can I make a sprite based animation using Cocos2d JS?

I am learning Cocos2d JS, but I can find very few tutorials and I find the documentation very vague. I can put a simple image on a layer like this: var sprite = new cc.Sprite(res.my_image_png); ...
3
votes
1answer
191 views

Color Based Collision Javascript (Cocos2d-js)

Im looking to make an isometric game...so my partner designed the isometric map (jpg image) along with the map objects (png) on adobe ilustrator... so the thing is i would like to set the player path ...
1
vote
0answers
68 views

Can project.json jsList accept folder names?

Using cocos2d for the web/js, it seems every script file must be explicitly added to project.json. Is there a way to give it a path instead, and it will load all scripts in the folder (and sub-folders ...
1
vote
0answers
135 views

Error with Cocos2d-JS when using Skeletal animation from Cocos Studio

Here is the JavaScript code: var size = cc.winSize; ccs.ArmatureDataManager.getInstance().addArmatureFileInfo(res.skeleton); // The error comes from the following line var armature = ccs.Armature....
1
vote
2answers
619 views

Saving data in the local computer with cocos2d-js

Making a game with cocos2d-js, is there a reliable way to create saved data in my local computer? I see that there is cc.sys.localStorage but it is removed if the user clears the browser's cache or ...
0
votes
1answer
223 views

Location of project.json in Cocos2d-JS

I am learning Cocos2d-JS to develop web-based games with Javascript. In Cocos2d-JS there is project.json file which defines game configuration. Is it possible to place this file in another location ...
-1
votes
0answers
173 views

Embedding a video inside cocos2-js for browser

Is there a way to insert a video frame, a video popup, or maybe a video as a sprite with audio as separate asset in a layer? The project will be a browser app and I am using cocos2d-js, and apart ...
1
vote
0answers
292 views

Best way to transition between multiple Cocostudio defined scenes

I'm designing a game that has to switch between multiple game scenes. Each scene has been created in cocostudio and is imported into the code as a json file as: var obj = ccs.load(res.Symbols_json); ...
1
vote
1answer
654 views

Cocos2D-JS Windows App in fullscreen mode (Win32)

I've been looking for a way to make my Cocos2D-JS app go into fullscreen mode, but there doesn't seem to be much documentation on Cocos2D-JS (or Cocos2D-x-js as some seem to call it.) This app is to ...
0
votes
1answer
109 views

Cocos Code IDE unable to find python

I am trying to create a new JavaScript project on Cocos Code IDE but every time it immediately give me the error message: Unable to find python. Please, click the setting button to set the python ...
2
votes
1answer
2k views

What is the difference between a Facebook Canvas and Facebook Web project?

I am making a game on cocos2d-JS for Facebook. What is the difference between Facebook Canvas & Facebook Web project. From what I can tell, Facebook Canvas ask for the secure url and Web ask for ...
5
votes
1answer
859 views

How to read a color of a pixel from texture (cocos2d-js)?

How to read a color of a pixel at [x,y] from a texture (in cocos2d-js)?
3
votes
2answers
2k views

How do I create a message box that fires a callback on button press?

I need to create a message box with an "OK"-button. When the user touches the button, it should execute a callback. I'm new to this and couldn't find any articles in the docs.
5
votes
1answer
7k views

difference between cocos2d-x vs cocos2d-js

I'm just moving towards native apps... A friend of mine told me to start with cocos2d, I'm good in javascript. While searching google for cocos2d, and within cocos2d-x.org I found cocos2d-x cocos2d-...
1
vote
2answers
905 views

How can I list files in a folder from JavaScript in cocos2d-x?

I need to list all the files in the res folder from a JavaScript script in cocos2d-x. What would be the most efficient way to do this? To keep compatibility with Cocos2d-html5 a JavaScript-only ...