Questions tagged [cocos2d-x-3.x]

Cocos2d-x is an open source game engine under MIT license. It can be used to build games, apps and other cross platform GUI based interactive programs.

Cocos2d-x is an open source game engine under MIT license. It can be used to build games, apps and other cross platform GUI based interactive programs.

Cocos2d-x allows developers to exploit their existing C++, Lua and Javascript knowledge for cross-platform deployment into iOS, Android, Windows Phone, Mac OS X, Windows Desktop and Linux, saving time, effort and cost. Cocos2d-x is fast, easy to use and loaded with powerful features.

Source: http://www.cocos2d-x.org/wiki

56 questions
1
vote
2 answers

How to create a white square as a sprite, without having to load an image file?

Normally we either create a sprite from a sprite frame, a file, or a texture by doing something like: Sprite* foo = Sprite::create(filename); How can one create a white square of specified dimensions without using DrawNode or passing a file to a…
Rahul Iyer
  • 19,924
  • 21
  • 96
  • 190
1
vote
2 answers

Import cocos2d-x 3.10 project int to android studio

I successfully imported a simple cocos2d-x 3.10 project(created by cocos studio) by viewing this video https://www.youtube.com/watch?v=gdOkbXYsf04 After a week of developing my app with a lot of codes (on xCode everything run ok). Then when I…
phuongho
  • 1,147
  • 2
  • 9
  • 15
1
vote
1 answer

How to change Sprite texture in cocos2dx C++ v3.10?

I am using this https://github.com/qiankanglai/ImagePicker ImagePicker utility I am using this code to set sprite texture: void HelloWorldScene::didFinishPickingWithResult(cocos2d::Texture2D* result) { Size visibleSize =…
Shahid Sarwar
  • 1,209
  • 14
  • 29
1
vote
0 answers

AttributeError: ‘CCPluginCompile’ object has no attribute android_package

Unable to run android project on android device . I am using Cocos2d-x 3.9.
1
vote
0 answers

How to load Plist file in Cocos2dx v3.9

I am developing one game using Cocos2d-x 3.9. I tried to load the plist file in my game with following code. But the size of data is 0. It returns no data. How can I load plist? CCDictionary was deprecated in Cocos2d-x v3.9 ValueMap…
1
vote
1 answer

Error while compiling cocos2d-x v3 IOS project,on integrating AdMob (IOS) framework

When i compile my cocos2d-x V3 project in Xcode, it runs fine but on including AdMob framework, it displays following linker error. I already have included "-ObjC" in "Other linker" section under Build Settings. Undefined symbols for architecture…
Bilal Ahmed
  • 258
  • 3
  • 10
0
votes
0 answers

Anyone still using Cocos2dx 3.17.2 in Javascript for Android?

I have an old project in cocos2dx 3.16 javascript version, I needed to upgrade the targetSdkVersion to 31. So I created a new project with cocos2dx 3.17.2 in Javascript, I tried to run the blank project on an android device but it’s showing black…
zivz
  • 71
  • 5
0
votes
1 answer

Cocos2dx 3.17.2 Project size over 10 gb After compiling For android

After compiling for Android in Debug and Release APK the compiled files are Taking so much space. is there any way to reduce it? .ccx is taking 5 gb space and .externalNativeBuild taking 2 gb space
Hardik Mistry
  • 25
  • 1
  • 4
0
votes
1 answer

How to create new function and excute it while the game is running?

I'm making a game with Cocos2d-x v3.17. I want player write their code in the game scene, then they press Submit and the game execute it. I think about save their code to a file and call a function from it, so I create 2 files like…
0
votes
0 answers

winapi bypass Windows high contrast limit fps

I'm using Windows 10 Professional high contrast mode for working at night. I'm working in a Cocos2d-x 3.15 project, which using these following Win32 API: UINT TARGET_RESOLUTION = 1; // 1 millisecond target resolution TIMECAPS tc; UINT wTimerRes =…
0
votes
1 answer

Cocos2dx : CheckBox above PageView not take touch

I added PageView first to scene then added CheckBox. Now I can't click CheckBox. Touches goes to pageView scroll. How to fix this problem ? COCOS2D_VERSION 0x00031501 Here is my code: bool FOURScrollPageScene::init() { // 1. super init first …
Guru
  • 21,652
  • 10
  • 63
  • 102
0
votes
1 answer

Cocos2dx, How to detect touch on a part of a sprite?

I want to seperately detect touch on a part of the sprite. For example if the sprite is a character consisting of face, arms, legs and other body parts. To be precise, these body parts are not separate sprites. Is there any way I can detect which…
0
votes
1 answer

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 anything below translucent layer - ie. they should…
Rahul Iyer
  • 19,924
  • 21
  • 96
  • 190
0
votes
1 answer

Cocos2d js (Cocos2d x 3.14) on android with deepstream io

Have anyone use cocos2d js with deepstream io ? I tried to use deepstream client js but it seem to be fail when try to connect server via network (websocket) : this is adb log: 06-06 09:43:19.227: D/cocos2d-x debug info(26288): connectDeepStream …
0
votes
1 answer

how to place a sprite at touch position

I follow the lecture of this website: website My code is same as first part of the website.But the position where the label placed in is uppon the place I clicked at. Could anybody help me?
cloudending
  • 95
  • 1
  • 10