Questions tagged [cocos2d-x-js]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
24 views

Stop mouse joint from dragging current rigidBody without mouse-up?

I have a hero, I drag him with-mouse joint attached to his rigidBody. But I want to stop dragging him when he hits a trap. I want the mouse-joint stop working without event "touch-end" being ...
0 votes
0 answers
187 views

How to take input from featured mobile phone in cocos creator?

I am beginner to cocos creator and I came to know cocos has Keyboard,DeviceMotion and Mouse input event but I want to know how to take input from featured mobile phone having number pad? Will it be ...
2 votes
0 answers
50 views

What is the right way to implement a loading screen in cocos2d-js?

We have two scenes that are loaded with heavy computation; a map screen and a puzzle screen. When we change the scene from A to B, the app gets stuck on scene A for a while before it renders scene B. ...
0 votes
1 answer
683 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
0 answers
168 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 ...
  • 111
1 vote
1 answer
59 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
0 answers
78 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
1 answer
496 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
0 answers
420 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
1 answer
624 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 ...
  • 31
1 vote
0 answers
127 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 ...
  • 11
1 vote
0 answers
268 views

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

Here is the JavaScript code: ...
2 votes
2 answers
2k 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 ...
  • 1,589
0 votes
1 answer
494 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
0 answers
432 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: ...
  • 11
1 vote
1 answer
1k 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 ...
  • 121
0 votes
1 answer
119 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 ...
  • 111
2 votes
1 answer
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
1 answer
2k 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)?
  • 1,300
5 votes
2 answers
3k 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
1 answer
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-...
  • 153
1 vote
2 answers
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 ...
  • 3,210