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 aim to create this pattern of game play with one main Lobby Scene and other GameScene opening through window.open.  But even when i try this with empty hello world project to open multiple window, I get restricted due to high drop in FPS.  So basic...
i am trying tp use a png as a mask in Cocos2d-JS  like so:  this.mask=cc.Sprite.create(cache.getSpriteFrame("bar_mask")); this.maskedFill = cc.ClippingNode.create(this.mask); this.maskedFill.setAlphaThreshold(0.5);   But it does not work ......
I am currently developing a game using Cocos2d-JS (http://cocos2d-x.org/wiki/Cocos2d-JS). I want to integrate my game with google play service (https://developers.google.com/games/services/) for achievement and leaderboard. I had done some research b...
I'm already trying but it's not what I'm expecting.   I want create something when my mouse pointing a sprite, that sprite glowing or have red border or something notice you that mouse pointing that sprite. in this case I'm calling an...
I have used Cocos2d Studio to create a layer (layer_main.json) and add some button to it. Now, i want to load it in main scene and manipulate with buttons.  Can i put code in a separate file (like src/mainLayer.js) that defined by cc.Layer.extend({})...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.