I am trying to save a high score integer to the user's Android system, so that it can persist throughout all game-play experience.  I have read that using Cocos2D-X one can use NSUserDefaults but this doesn't seem to be available in the Cocos...
How can I connect to a nodejs socket.io server from a cocos2djs game? I've google all the way to no avail. I tried this but it does not work:  socket = io.connect('http://192.168.254.102:7714'); if ( socket === undefined ) {     cc.log(&#...
I am researching how to use swipe gestures in cocos2d-js and found that in cocos2d UISwipeGestureRecognizer is used. But I couldn't find it for cocos2d-js.  Gestures in cocos2d  And also for cocos2d-x in github:  CCGestureRecognizer  For cocos2d-...
We are getting a crash whenever user changes device language & if game is in background. we are using cocos2dJs3.17.1 to build our games. It seems it is framework issue because to test this scenario we created new blank project & tried the sa...
I'm trying to extend the cc.LabelTTF class in cocos2d-js. I'm having problems with the following code:  var FlowingText = cc.LabelTTF.extend({     update : function(dt) {         console.log("update. dt:"+dt);     } });    I'm exp...
I add a sprite that has eventListener to layer.When I touch it no error but no effect yet.  Here is my code:    onTouchBegan : function (event) {                 var spriteFrames = [];                 var frame = cc.spriteFrameCache.getSpriteFrame(re...
I have a mobile game written in cocos2d-js (c++ && javascript && spidermonkey).  Now the game performance is not that good so I'm trying to do some code-level optimization.  One thing I want to do is to record the data of "how...
I've existing AngularJS based web app. It is supposed to be like a game portal, so that user can choose which game he wants to play. The games are written with cocos2d-js.  Are there any restrictions/rules to follow to embed AngularJS into cocos2...
I am looking for a javascript animation framework. I have found some:  http://www.pixijs.com/  http://phaser.io/  http://paperjs.org/  These all are good.    But I would like a GUI based animation creater framework, so that I can create translation,...
I'm trying to get started with Cocos2d using Javascript, but I wanted to compile from ES6 and manage my dependencies using Browserify. So I'm outputting my compiled javascript to my Cocos2d project directory as main.js.  When I try to run the...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.