We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [cocos2d-x-js]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
10 views

calling function with callback inside update

I am using cocos creator with typescript to make a game. The problem I am facing is weird. check out the following code : ...
0
votes
0answers
9 views

Loading resources on OnLoad function

I am trying to load a json file using the cc.loader.load function in onLoad() function as shown below, I also have used some console.log() functions to see the order of execution. ...
0
votes
1answer
99 views

Cocos Creator - orientation change event in native build for iPhone and Android

I am making some Hybrid app which has some native part in Both iOS and Android and common functionality (which includes and games/animation and UI) which I make in Cocos Creator. The problem I am ...
1
vote
0answers
96 views

Acceptable memory size consumed by mobile game in 2017? [closed]

How do you think, what is the acceptable memory size consumed by mobile game in 2017, taking into account current state of mobile devices hardware performance? I've made a pack of optimizations using ...
1
vote
1answer
56 views

Help understanding the parkour tutorial in Cocos2d

I was practicing the parkour tutorial for chapter 7, but I failed to understand why we should move the same delta movement of this.gameLayer, which contains the ...
0
votes
0answers
57 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
1answer
436 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
406 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: ...
3
votes
1answer
422 views

Color Based Collision Javascript (Cocos2d-js)

I'm looking to make an isometric game so my partner designed the isometric map (jpg image) along with the map objects (png) on Adobe Illustrator. The thing is I would like to set the player path based ...
1
vote
0answers
122 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
235 views

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

Here is the JavaScript code: ...
2
votes
2answers
1k 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 ...
0
votes
1answer
478 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 ...
1
vote
0answers
428 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: ...
1
vote
1answer
934 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
113 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 ...
2
votes
1answer
3k 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
1k 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)?
5
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
1k 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 ...