Questions tagged [cocos2d-x-2.x]

cocos2d-x is a game engine. cocos2d-x is a multi-platform framework for building 2d games, interactive books, demos and other graphical applications.

104 questions
32
votes
6 answers

Error "Cast from pointer to smaller type 'int' loses information" in EAGLView.mm when update Xcode to 5.1 (5B130a)

Yesterday, I updated Xcode to the newest version (5.1 (5B130a)) to compatible with iOS 7.1. Then I build my project, I get the error "Cast from pointer to smaller type 'int' loses information" in EAGLView.mm file (line 408) when 64-bit simulators…
nvg58
  • 891
  • 1
  • 8
  • 17
11
votes
5 answers

How do I draw a line using Cocos2D-X?

I have been playing around with Cocos2D-X on my computer, and I have got it to build the hello world program on all the devices I would like to be able to build it on. I know how to make the program display a sprite, and display a label, but I have…
Jon
  • 495
  • 2
  • 9
  • 22
9
votes
2 answers

get array data from json file using rapidjson

I'm new in rapidjson. I have test.json which contains {"points": [1,2,3,4]} and I use following code to get data of array "points" std::string fullPath = CCFileUtils::sharedFileUtils()->fullPathForFilename("json/deluxe/treasurebag.json"); …
Nikel Arteta
  • 548
  • 1
  • 6
  • 25
5
votes
5 answers

Cocos2dx: dlopen failed: cannot locate symbol "atof" referenced by "libcocos2dcpp.so"

I am trying to run my cocos2d-x game on android devices, it works perfectly on android 5.0(lollipop), but crashes on lower android versions. I am getting the following error: 02-25 10:41:09.787: E/ResourceType(18090): 0x5ad385b8: Failed to…
Bhavuk Sehgal
  • 121
  • 2
  • 10
4
votes
1 answer

Submission deny with non-public API MPMoviePlayerContenPreloadDidFinishNotification

I just received the following rejection when submitting an update to my game using Xcode 5.1.1: Your app contains non-public API usage. Please review the errors, correct them, and resubmit your application. The app references non-public symbols in…
Nikel Arteta
  • 548
  • 1
  • 6
  • 25
3
votes
1 answer

OpenGL errors 0x0501 and 0x0505 cocos2d-x, samsung quattro Gl_out_of_memory

Our cocos2dx game heavily uses batchnodes but in some devices like samsung quattro and grand after few sessions of gameplay some SpriteSheets go black. And eventually all the sprite sheets go black. We are using CCTextureAtlas to load our batch…
user1847220
  • 119
  • 3
3
votes
0 answers

Cocos2d-x Android project random crash libc fatal signal 11 error?

I am using Cocos2d-x to build both Win32 and Android application. However I met a fatal problem when I try to port to Android from Win32. I wrote following code in Android try to read a file from assets. But, each time Android application crashes at…
einverne
  • 6,454
  • 6
  • 45
  • 91
3
votes
1 answer

cocos2dx save image in to gallery android

I want to take screenshots and save it in the gallery. What I have tried: CCSize size = CCDirector::sharedDirector()->getWinSize(); CCRenderTexture* texture = CCRenderTexture::create((int)size.width, (int)size.height,…
AnjDenny
  • 468
  • 5
  • 16
2
votes
1 answer

Cocos2dx. How to get length of 1cm(in real life) in pixel for any screen resolutions?

I have admob banner set up at the bottom of the screen. I want to offset everything so that nothing is covered up by the banner. I have no idea how to get the height of the admob banner DYNAMICALLY. For iphone4, 120 is the height of admob, but for…
2
votes
1 answer

cocos2d-x-2.2.6 Android integration

I'm using cocos2d-x-2.2.6 and my app crashes, when runnin on a device. logcat points me on Cocos2dxRenderer.java file and it crashes in @Override public void onSurfaceCreated(final GL10 pGL10, final EGLConfig pEGLConfig) { …
Arseniy
  • 305
  • 3
  • 8
2
votes
2 answers

UnsatisfiedLinkError, Cocos2D-x app crash on startup

My Cocos2D-x app is working only on android 22+ and crash in lower platforms throwing an exception java.lang.UnsatisfiedLinkError App config: Target SDK version 22 (Android Lollipop). Min SDK is 14. NDK r10c with eclipse.
Dania Delbani
  • 816
  • 1
  • 11
  • 27
2
votes
0 answers

Implementing flurry analytics in android

I am trying to integrate flurry analytics in game which is written in cocos2dx and i am testing for android. I have just written initing code in onCreate method and i am getting following error in LogCat: 03-10 15:03:11.890: E/dalvikvm(29821):…
jitenagarwal19
  • 308
  • 1
  • 9
2
votes
1 answer

cocos2dx android AppDelegate Error while linking

Hi I have problem compiling project for android - it works ok for win32 and BB10 but when I try to compile it in android NDK iget following Messages: [armeabi] SharedLibrary :…
bunny1985
  • 762
  • 6
  • 21
2
votes
0 answers

Bad access error in EAGLView.mm

I'm getting a weird error in my game. EXC_BAD_ACCESS (code=1, address=0x1) in EAGLView.mm line 319 if(![context_ presentRenderbuffer:GL_RENDERBUFFER]) ***Error { // CCLOG(@"cocos2d: Failed to swap renderbuffer in %s\n",…
hOOks7
  • 71
  • 1
  • 8
1
vote
0 answers

Strange dotted line in Cocos2d / Python

I'm trying to create a single straight line using Cocos2d with Python. Why in this code, I get a random dotted line? import cocos from cocos.director import director from cocos import draw class TestLayer(cocos.layer.Layer): def…
Rogério Dec
  • 801
  • 8
  • 31
1
2 3 4 5 6 7