Questions tagged [cocos2d-x-3.0]

C++ version of cocos2d. Cocos2d-x version 3 is a rewrite using the C++ 11 standard, replacing the previous Objective-C styled memory management philosophy, opting instead for Array & vector dereference signals.

1
vote
1answer
25 views

Firebase C++ admob crash for android release build in cocos2dx 3.17

I have configured Firebase Admob in cocos2dx 3.17 version. I will be able to see test ads when debug build. I have set the following dependancies. implementation 'com.google.firebase:firebase-ads:...
0
votes
0answers
15 views

cocos2dx sdkbox: How to turn personalized advertisements off for GDPR

I am using Admob + sdkbox + cocos2dx for ads. The official documentation has a function setGDPR(bool). But its not explained I should set it true or false for non-personalized-ads. For EU users for ...
2
votes
1answer
45 views

cocos2d-x What is the best practice to make a sprite every time I need it or just change its texture?

I need a similar asset changed on the screen with the same size, so, the best practice would be to change the texture of the sprite or make a new sprite and release the previous one? I see no ...
0
votes
1answer
255 views

What is “Other Linker Flags” issue in Xcode build settings?

I have a cocos2d-x project that I'm working on, I added cocoapods to it and originally all that was in "Other linker flags" was $(_COCOS_LIB_IOS_BEGIN) AND $(_COCOS_LIB_IOS_END) everything works fine ...
1
vote
1answer
94 views

Call JNI from cocos2d-x to Android is not triggered in Release Mode

I have a problem with call function from cocos2d-x (C++) to the Android Native (Java) in release mode. In cocos2d-x, I have a function: logInToGamePlayServices, which will call a function in Java side ...
0
votes
1answer
139 views

Installing cocos2d-x on windows 10 without setting python path to an older version

To install cocos2d-x, I ran C:\Python27amd64\python.exe setup.py I use the python 2.7 executable. However I get this error: Traceback (most recent call last): File "setup.py", line 738, in <...
0
votes
0answers
7 views

Ask a CCB file which version of CocosBuider was created

There is currently a UI project for CocosBuilder. The source code of CocosBuilder3.5 was downloaded from git, and the UI project was opened after compilation. All modules could not be opened in the ...
0
votes
1answer
37 views

Cocos2d-x scene moving and incorrect physics debug draw

While initializing scene I enable physics debug draw using: getPhysicsWorld()->setDebugDrawMask(PhysicsWorld::DEBUGDRAW_ALL); Then I add a sprite with physics body and add the sprite to the scene....
0
votes
0answers
49 views

Spine Meshed Animations with Cocos2d-x Runtimes Crashing

I am having major issues with Spine animator and Cocos2d-x for Android game development. I am using a Schok Mini 6 tablet to test. I have integrated the Cocos2d-x runtimes supplied by Esoteric ...
0
votes
0answers
17 views

How to call cocos2d C++ method from javascript?

How can I call the C++ method cocos2d::utils::captureScreen from javascript when using cocos2d's javascript library?
0
votes
1answer
71 views

Empty cocos2D-x project is too big

I want to create a very small (in apk size) Android game, I hope is not more than 3mb, so anyone with low avaiable space in the phone can play it. I can do it with libgdx but I want to use cocos2d-x. ...
0
votes
0answers
38 views

Korean text input issues in TextField

cocos2d-x version: 3.10 devices test on: Windows developing environments NDK version: Xcode version: VS version: browser type and version: When I input Korean Text in Text field for Win10, it makes ...
0
votes
0answers
30 views

Cocos2d-x getLocation() with EventMouse

The getLocation() member of EventMouse isn't behaving as i was expecting it to. void MouseScene::onMouseDown(EventMouse* e) { cocos2d::Vec2 location = convertToNodeSpace(e->getLocation()); ...
0
votes
1answer
26 views

Can't cross compile?

cocos2d-x-3.16 and Visual Studio 2015. I developed a game in VS15. I want to transplant it to the phone to play, but found that the cross compilation could not complete! I've tried the solution I ...
0
votes
0answers
40 views

DrawNode antialiased lines

I need to get smooth lines drawn by 'DrawNode'. I found several hacky solutions on the web. Is it possible to accomplish such a basic task elegantly? I'm using Cocos2dx 3.17.
0
votes
0answers
16 views

Recreating iOS app & uploading to iTunesConnect [duplicate]

a few years ago I made an iOS game with objective-c and now I want to remake the game using Cocos2d-x my question is will I have any trouble when uploading the new app to iTunesconnect with the same ...
1
vote
1answer
99 views

how to include Box2d in cocos2d-x project?

In cocos2d-x v3.13.1, if I wanted to use just Box2d (not the integrated chipmunk physics), all I had to do was: #include <Box2d/Box2d.h> But after upgrading to v3.17, it doesn't work. Instead ...
14
votes
2answers
9k views

Why isn't an animation flipped horizontally when I call setFlipped(true)?

I have some sprites, where the player character is facing to the right. I can create an animation from those sprites just fine. The problem is, if I want the sprites to face to the left. I do the ...
0
votes
0answers
16 views

Create custom plugin for cocos-2d-x

How to create a custom plugin for cocos-2d-x (js)? Eg: I wanted to integrate firebase to my android and ios application. Note: I dont want to use sdkbox.
0
votes
1answer
24 views

Sprite Grid Positioning issue cocosd-js 3.16

I am making a 2d(25x20) grid of sprites. But somehow sprites are getting re positioned by itself.enter image description here makeLandBlocksMatrix : function () { this.LAND_BLOCK_TAG = 1; var ...
0
votes
0answers
510 views

didRegisterUserNotificationSettings: is called, but didRegisterForRemoteNotificationsWithDeviceToken is not called in Xcode9

all. I want to ask you about push notification settings. Environments: MacOS[High Sierra10.13.3] Xcode9.2(9C40b) Devices - iPhone6S[iOS10.3.3] - iPhoneX [iOS11.2.6] Language: Cocos2d-x (...
-1
votes
1answer
78 views

Why can not load so in Cocos2d-x in Android4.1,4.2?

Background It can not load the third *.so files on Cocos2d-x in Android4.1,4.2. While at other newer android system, such as, android 4.3 etc, my project can load the *.so files correctly. ...
1
vote
1answer
102 views

cc.game.restart() carsh when extend sdkbox in cocos2d-js 3.10

I have an issue and need help. Oh, I realize not only every sdkbox facebook but also just install a sdkbox plugin (like facebook, onesignal ...), all are crashed when calling cc.game.restart(). In ...
0
votes
2answers
56 views

How to get the call coming / hanged event when in Cocos2d Android application

Question How to get the call coming / hanged event when in Cocos2d Android application ? Because, I want do some action when receive the two event ? I use coocs2d-x-3.14.1 on Android.
0
votes
1answer
26 views

Problems occurs when removed one object within Cocos CCARRAY_FOREACH

Background: Cocos Version: 3.0alpha Language: C++ Problems: Within one CCARRAY_FOREACH, it returned wrong&duplicated Object when removed one Object from the previous cycle. Test Codes: ...
0
votes
0answers
133 views

Cocos2d-x game crash on android when onResume

I am trying to solve onResume error in my game created by Cocos2d-x. When i go background and come back to game then game is crashed. and log-cat are as followed. 11:49:10.997 E/cocos2d-x: cocos2d: ...
0
votes
0answers
49 views

cocos2d-x setDesignResolution TmxTileMap scrolling flickering

When I scroll a cocos2d::TMXTiledMap in native resolution everything is fine but when the whole scene is resized by using setDesignResolution the cocos2d::TMXTiledMap is flickering when scrolled. ...
0
votes
0answers
41 views

Error when load project cocos2dx with visual studio 2015

I have a problem when I load project cocos2dx in visual studio 2015. It's check error all keyword which defined in cocos2dx, but when I built, it run normaly. Can I fix this? Here is my problem ...
0
votes
0answers
74 views

Cocoa2d-x 3.15, How to detect the focus and unfocus event in window

I am developing windows game by using cocos2d-x 3.15 version. By the way, how to detect the event of focus and unfocus of window? http://blog.cocos2d-x.org/2017/01/cocos2d-x-v3-14-released/ It says:...
2
votes
1answer
664 views

How can I detect if the notification center was opened

In a cocos2dx project, on iOS 10 devices, when the notification center is swiped down then up, a huge frame rate drop happens. As a result, when the animations resume ui elements whose motion depends ...
0
votes
1answer
93 views

Unable to setRotation to PhysicsBody::createBox in cocos2dx

I'm able to rotate the sprite 90-degree angle but unable to change the angle of the physics body. My purpose is to connect multiple sprites with createBlock() to make a breakable tower object. I want ...
0
votes
1answer
126 views

audio/android/cutils/bitops.h:65:15: error: use of undeclared identifier 'ffs'

I ndk-build my project for "APP_ABI := X86" , with cocos2d-x 3.14.1, but getting the error log: cocos2d/cocos/audio/android/../../audio/android/cutils/bitops.h:65:15: error: use of undeclared ...
0
votes
0answers
55 views

Label doesn’t print integer value received from server in cocos2dx

I am getting json data from server like this - if (response->isSucceed()) { log("Get success"); std::vector<char>* buffer = response->getResponseData(); std::string res; ...
0
votes
1answer
210 views

How fix manifest merger failed with multiple errors

First build eclipse project on cocos2dx/proj.android,how can i fix it. I use eclipse and Xcode is OK. My build.Gradle(Module:project) apply plugin: 'com.android.application' android { ...
0
votes
0answers
86 views

Cocos2d-x Background image sets required for iphone/ipad

In Cocos2d Obj.C Game, I used below code to display background. CCSprite *bg = [CCSprite spriteWithImageNamed:@"Background.png"]; In folder, I put these image sets Background.png ...
0
votes
0answers
138 views

Cocos2d-x Sprite flickers during scale animation sequence

I have a grow / shrink animation sequence. But for some reason the sprite does not scale smoothly. I did change the animation interval and disabled depth test but it did not fix this. What can be the ...
0
votes
1answer
99 views

Should gradle.properties in Cocos2d-x project with keystore passwords be placed in git or .gitignore?

With Cocos2d-x 3.15.1, I am using the following command to build release APK in Windows 10: cocos compile -s src/MyProject -p android -m release -o src/MyProject/bin --android-studio On first run it ...
2
votes
1answer
202 views

cocos 2dx version 3.15 --no-native argument not recognised

I am using cocos2dx version 3.15, python version is 2.7.12, java version is 1.8. The problem is when i try to create a web only project using cocos new projectName -l js --no-native command, it ...
0
votes
1answer
207 views

How can Cocos2dx particle system achieve a burst effect?

I am new to Cocos2dx, and I am playing with the awesome particle system in my game. However, I couldnt able to design the best effect in my mind. What I would like to see is something like in this ...
0
votes
1answer
64 views

How to create a transparent layer that absorbs touches or prevents touches getting through?

I have a layer(base layer) upon which there are several buttons. At times I would like show modal dialogue boxes on a translucent layer, which when displayed, the user should not be able to click on ...
0
votes
1answer
50 views

Cocos game Application Crash offline log

We build Android-based game Apps on the Cocos2d platform using C++ and JavaScript. App uses no internet.I can able to see the crash report when we use the android studio to debug. but how to catch the ...
0
votes
1answer
213 views

Cocos2d js How to word- wrap ccLabel

I have created a label and tried to wrap it. Its wrapping when space appears in the text but it also wrapping when comma(,) appears in the text. I do not want to wrap when comma appears. Any help. ...
1
vote
0answers
191 views

How to protect cocos creator images ?

Is there is any way that is helpful in encrypting or obfuscating the images that is used inside the cocos creator , I've tried to change it to base64 but struggled in returning back to png on loading ...
0
votes
1answer
88 views

How to make trigger area in Cocos2d

I am doing a Flappy Bird game following some tutorials. To count up the score, I have set PhysicsBody among the score area, but it is just like a Rigibody in Unity, other objects cannot get through it....
0
votes
1answer
330 views

Error occurs when cocos 2d-x-3.15.1 project compiling in android studio

Don't know how to solve this problem of cocos 2d-x-3.15.1 Warning:android-validator: Suspicious module dependency proj.android -> android: Android application module depends on other application ...
0
votes
1answer
347 views

Error occur at compiling the Cocos 2d-x project in android Studio

Cocos 2d-x-3.15.1 Error in android Studio Error occur at the time of compiling the new project in android studio EDIT I've new error in cocos2dxXXXXXX file, added screenshot below :
2
votes
0answers
221 views

Antialiased curves at cocos2dx

Does anybody know any solution for anti-aliasing problem at cocos2dx? DrawNode I can use standart DrawNode class and draw cardinal splines, which will be transformed to a set of polygons. Something ...
1
vote
1answer
380 views

Cocos2d-x fails to build android APK

I've created a cocos2d-x (3.14.1 and 3.15.1) project, I've modified template slightly and added new sprite. This compiles fine in VS and application seems to run. I wanted to build android apk so I've ...
0
votes
1answer
262 views

How to get Sprite pixel alpha information in cocos2d js/c++

I am working on a scratch and win game, I used clipper node for this. But I want to know the event when whole sprite is clippe? Is there any other way to know it, plz help me
-1
votes
1answer
76 views

Maximum number of arguments for std::bind in clang

In my iOS Cocos2dx app, std::bind doesn't seem to cope with 4 bound arguments (to a 4-parameter static function). The 4th argument is always rubbish. How can I check in XCode (using clang) the ...