This is how it looks in chrome and mozilla  I am using cocos2dx-3.10  I have used this code  var TestLayer = cc.LayerColor.extend({     ctor: function () {         this._super(cc.color(255, 255, 255));           var lineUp = new cc.DrawNode();...
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...
Context: I'm creating a Cocos2d-JS Game. I have already created the Project and am in development phase.  I can run cocos run -p web or cocos run -p web --source-map from the project directory in the Console. These commands work and allow me to r...
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 wrote a game with Phaser engine but sadly i didn't get any good performance even with cocoonjs. I tried to optimize it but i don't think i can optimize enough.   So i'm trying to switch to cocos2d-js. I tried some examples with cocos2d...
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...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.