Quantcast
Channel: Cocos Forums - Latest topics
Viewing all 17068 articles
Browse latest View live

popScene() after popScene() not working

$
0
0

@xxYxx wrote:

In my game, I start off with my start scene and then I push to the main game scene. Once the game has finished, I push to a finish scene. If the user presses the home button, I want to be able to popScene() back to the start scene however, all it does is go back to the game scene and doesn’t go back to the start scene. I know that the game calls the function as I have a CCLOG before and after the popScene().

How do I make the second popScene() work?

Thanks in advance.

Posts: 1

Participants: 1

Read full topic


Camera and Sprite3D rendering issue

Problem with prefab upgrading from v1.5.2 to v1.6.2

$
0
0

@BugsKiller wrote:

I have a project running well with Cocos Creator 1.5.2 on iOS. I’m trying to upgrade to CC 1.6.2 but the game took 15 minutes to instantiate some prefabs. Others prefabs are instantiated normally. How do I fix this issue?

Related log from Xcode is just: “basic_object_finalize 0x586bf60 …”

Posts: 1

Participants: 1

Read full topic

Android release problem

$
0
0

@PZsolt27 wrote:

Hi all,

I would like to build a release version of my game and I should select a .keystore file, but I have only a .jks file created in Android Studio 2.3. What should I do? Should I create a new keystore with CC?

Best regards,
Zsolt

Posts: 2

Participants: 2

Read full topic

Help us with Android project setup

$
0
0

@slackmoehrle wrote:

Hi All,

It seems to me that our Android tool chain might be suffering and therefor not easy for users.

  1. I know that as of some SDK release the command-line app android no longer exists. This makes part of our install instructions wrong and also means you can’t run cocos compile -p android, IIRC.

  2. Android Studio seems to be the new tool pushed for Android development, but I am not very familiar with it. Some recent topics help layout how to get started.

Can anyone afford the time to write something up about what works, what doesn’t and what the fixes need to be? Perhaps we can use this as a way to guide what we need to fix but also I can update our Android docs so new users are not suffering so much.

Posts: 2

Participants: 1

Read full topic

Android build failed with Google Play Services

$
0
0

@dmkoi wrote:

I have a problem with compiling for android. Did not find any information about this issue

  • android-ndk-r13b

  • gradle 3.3

  • cocos creator 1.6.2

    FAILURE: Build failed with an exception.

      * What went wrong:
      A problem occurred configuring project ':gps'.
      > Failed to notify project evaluation listener.
         > Could not initialize class com.android.sdklib.repository.AndroidSdkHandler
    
      * Try:
      Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
    
      BUILD FAILED
    
      Total time: 1.904 secs
      Stopped 0 worker daemon(s).
      Received result Failure[value=org.gradle.initialization.ReportedException: 
      org.gradle.internal.exceptions.LocationAwareException: A problem occurred configuring project ':gps'.] from daemon 
      DaemonInfo{pid=76480, address=[266057ba-b137-4f1b-8f8a-81d80f17762d port:54433, addresses:[/0:0:0:0:0:0:0:1, 
      /127.0.0.1]], state=Idle, lastBusy=1508763333722, context=DefaultDaemonContext[uid=b2f15abf-79a1-4419-8d16-
      bf07d815366f,javaHome=/Library/Java/JavaVirtualMachines/jdk-
    

    9.jdk/Contents/Home,daemonRegistryDir=/Users/dkokorev/.gradle/daemon,pid=76480,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=BY,-Duser.language=en,-Duser.variant]} (build should be done).

Posts: 1

Participants: 1

Read full topic

Page View or pager to one direction

$
0
0

@Abulbisht wrote:

Hello , Is it possible to implement a page view that swipes to only one side to the left or the right without reverse , I’ve searched here in the forum but seems that the references for the page view is quite little , in android it’s possible to disable swiping feature , is it possible in cocos creator ?

Best Regards
Abulbisht

Posts: 1

Participants: 1

Read full topic

SimpleAudioEngine playEffect - no sound

$
0
0

@azimuthent wrote:

ThSimpleAudioEngine on iOS doesn’t seem to work, have tested on multiple devices, multiple file formats (wav, ogg, caf).

I’m preloading audio:
auto audio = SimpleAudioEngine::getInstance();
audio->preloadEffect("/sound/jump.wav");

And playing sound:
SimpleAudioEngine::getInstance()->playEffect("/sound/jump.wav");

I’ve confirmed the directory is correct, and I’m not sure what the problem could be. Am I missing something? Some initialization of SimpleAudioEngine? I’m using cocos2d-x-3.15.1

Posts: 2

Participants: 2

Read full topic


Main loop stops on applicationWillResignActive in iOS

$
0
0

@mops wrote:

Is there any reason for pausing main loop on UIApplicationWillResignActiveNotification (CCDirectorCaller-ios.mm)? So all updates will stop on any system dialog. It happens only in latest versions of Cocos, in version 3.10 there wasn’t such a behaviour. More over, in AppController.mm we could see this:

- (void)applicationWillResignActive:(UIApplication *)application {
// We don’t need to call this method any more. It will interrupt user defined game pause&resume logic
/* cocos2d::Director::getInstance()->pause(); */
}

So code in CCDirectorCaller class definitely breaks it, cause sometimes you need updates to be called, even when application is inactive.

Posts: 1

Participants: 1

Read full topic

On windows Latest sdkbox with cocos2d-x 3.16 is not working

Creator sdk integration error

$
0
0

@muralkz wrote:

Hi there,had some problem when importing chartboost with creator 1.6.2 ,here the log:

jni/…/…/Classes/PluginChartboostJS.cpp:92: error: undefined reference to ‘sdkbox::PluginChartboost::handleOpenURL(std::string const&, std::string const&)’

jni/…/…/Classes/PluginChartboostJS.cpp:131: error: undefined reference to ‘sdkbox::PluginChartboost::setAutoCacheAds(bool)’

jni/…/…/Classes/PluginChartboostJS.cpp:164: error: undefined reference to ‘sdkbox::PluginChartboost::setStatusBarBehavior(sdkbox::CB_StatusBarBehavior)’

jni/…/…/Classes/PluginChartboostJS.cpp:193: error: undefined reference to ‘sdkbox::PluginChartboost::isAnyViewVisible()’

jni/…/…/Classes/PluginChartboostJS.cpp:221: error: undefined reference to ‘sdkbox::PluginChartboost::getCustomID()’

jni/…/…/Classes/PluginChartboostJS.cpp:253: error: undefined reference to ‘sdkbox::PluginChartboost::show(std::string const&)’

jni/…/…/Classes/PluginChartboostJS.cpp:286: error: undefined reference to ‘sdkbox::PluginChartboost::cache(std::string const&)’

jni/…/…/Classes/PluginChartboostJS.cpp:319: error: undefined reference to ‘sdkbox::PluginChartboost::setShouldDisplayLoadingViewForMoreApps(bool)’

jni/…/…/Classes/PluginChartboostJS.cpp:352: error: undefined reference to ‘sdkbox::PluginChartboost::setShouldRequestInterstitialsInFirstSession(bool)’

jni/…/…/Classes/PluginChartboostJS.cpp:385: error: undefined reference to ‘sdkbox::PluginChartboost::didPassAgeGate(bool)’

jni/…/…/Classes/PluginChartboostJS.cpp:418: error: undefined reference to ‘sdkbox::PluginChartboost::setShouldPrefetchVideoContent(bool)’

jni/…/…/Classes/PluginChartboostJS.cpp:448: error: undefined reference to ‘sdkbox::PluginChartboost::init(char const*)’

jni/…/…/Classes/PluginChartboostJS.cpp:456: error: undefined reference to ‘sdkbox::PluginChartboost::init(char const*)’

jni/…/…/Classes/PluginChartboostJS.cpp:490: error: undefined reference to ‘sdkbox::PluginChartboost::getAutoCacheAds()’

jni/…/…/Classes/PluginChartboostJS.cpp:518: error: undefined reference to ‘sdkbox::PluginChartboost::closeImpression()’

jni/…/…/Classes/PluginChartboostJS.cpp:546: error: undefined reference to ‘sdkbox::PluginChartboost::setCustomID(std::string const&)’

jni/…/…/Classes/PluginChartboostJS.cpp:579: error: undefined reference to ‘sdkbox::PluginChartboost::isAvailable(std::string const&)’

jni/…/…/Classes/PluginChartboostJS.cpp:616: error: undefined reference to ‘sdkbox::PluginChartboost::setShouldPauseClickForConfirmation(bool)’

jni/…/…/Classes/PluginChartboostJS.cpp:885: error: undefined reference to ‘sdkbox::setProjectType(char const*)’

jni/…/…/Classes/PluginChartboostJSHelper.cpp:139: error: undefined reference to ‘sdkbox::PluginChartboost::setListener(sdkbox::ChartboostListener*)’

collect2.exe: error: ld returned 1 exit status

make.exe: *** [obj/local/armeabi/libcocos2djs.so] Error 1
make.exe: Leaving directory `F:/cc_projects/helloworld/build/jsb-default/frameworks/runtime-src/proj.android’

Posts: 1

Participants: 1

Read full topic

Change node's parent and keep position

$
0
0

@darksepho wrote:

Hi, I want to change a node’s parent but I also want it to keep the same position on screen.
Right now I’m doing something like this:

var tempPos = this.myNode.parent.convertToWorldSpace(animIcon.getPosition());
this.myNode.parent = null;
this.newParent.addChild(this.myNode);
this.myNode.setPosition(this.newParent.convertToNodeSpace(tempPos));

It kind of works, but the node gets shifted a bit on the left… Am i doing something wrong?

Posts: 1

Participants: 1

Read full topic

Need some basic solution for a Tower defense game

$
0
0

@QuocDat wrote:

Hi guys, i am learning cocos2dx and want to apply what i learn along the way into a Tower defense game.
Most of the TD games, monsters have one or two paths to run on, if they reach the end of the path player lose. I am thinking about a TD where player start with a map that have their base on the middle, all of the map will be walkable for the the monster and the monster will find the shortest way to the player’s base. Player can add obstacles on the map to block, redirect monster walk path. But i am wondering on how to add obstacles on the map:

  • Do i add obstacles as a sprite with static body?
  • Or add obstacles as a tile in tilemap and set it property to not walkable so monster can’t go pass that tile?

Anyone who did this kind of game before have any experiences about this problem can you share some insight?

Posts: 2

Participants: 2

Read full topic

Bindable Hotkeys in Editor

$
0
0

@aschenoni wrote:

Hi there, is there a way to set new hotkeys or is there a list of current hotkeys we can use in the editor? I’m less interested in system wide standard hotkeys (ctrl + z is undo, ctrl + n is open new, etc.) but more like quick access to node properties of a currently selected node (Scale, anchor, skew, etc).

Posts: 1

Participants: 1

Read full topic

Telling me 2 different NDK version's for Android Studio setup

$
0
0

@IzzyJM wrote:

Hello I am following ( http://cocos2d-x.org/docs/installation/Android-Studio/ ) and just now setting up cocos2d-x for android studio but am confused to which version of NDK I should have because under the first prerequisite ( http://cocos2d-x.org/docs/installation/A/index.html#build-requirements ) it tells me “NDK r11+ and API level 19 is required to build Android games”, but in the second prerequisite ( http://cocos2d-x.org/docs/installation/Android-terminal/index.html ) it says “NDKr10c”. Is this something that just forgot to get updated to NDK r11+, and should I use NDK r11+ ?

Posts: 4

Participants: 2

Read full topic


How to integrate AdMob for web in cocos2d js

Building Cocos2d-x-src on Arch Linux fails on new project

$
0
0

@menuan wrote:

Hello!

I am trying to build a freshly generated project on Linux (it builds fine for iOS on Mac, haven’t tried for Android yet) and I am wondering how to fix this. It seems it fails to automatically build an .so of the engine itself or something.

Here is the log:

Building mode: debug
running: ‘cmake -DCMAKE_BUILD_TYPE=Debug -DDEBUG_MODE=ON …’

It appears you are building natively for Linux with GCC
– chipmunk CHIPMUNK_LIBRARIES: /home/simon/git/brickt/cocos2d/external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a
– curl CURL_LIBRARIES: curl
– freetype2 FREETYPE_LIBRARIES: /home/simon/git/brickt/cocos2d/external/freetype2/prebuilt/linux/64-bit/libfreetype.a
– jpeg JPEG_LIBRARIES: /home/simon/git/brickt/cocos2d/external/jpeg/prebuilt/linux/64-bit/libjpeg.a
– png PNG_LIBRARIES:
– tiff TIFF_LIBRARIES: /home/simon/git/brickt/cocos2d/external/tiff/prebuilt/linux/64-bit/libtiff.a
– webp WEBP_LIBRARIES: /home/simon/git/brickt/cocos2d/external/webp/prebuilt/linux/64-bit/libwebp.a
– websockets WEBSOCKETS_LIBRARIES: /home/simon/git/brickt/cocos2d/external/websockets/prebuilt/linux/64-bit/libwebsockets.a
– openssl OPENSSL_LIBRARIES: /home/simon/git/brickt/cocos2d/external/openssl/prebuilt/linux/64-bit/libssl.a;/home/simon/git/brickt/cocos2d/external/openssl/prebuilt/linux/64-bit/libcrypto.a
– bullet BULLET_LIBRARIES: /home/simon/git/brickt/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletDynamics.a;/home/simon/git/brickt/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a;/home/simon/git/brickt/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletMultiThreaded.a;/home/simon/git/brickt/cocos2d/external/bullet/prebuilt/linux/64-bit/libLinearMath.a;/home/simon/git/brickt/cocos2d/external/bullet/prebuilt/linux/64-bit/libMiniCL.a
– fmod FMOD_LIBRARIES: /home/simon/git/brickt/cocos2d/external/linux-specific/fmod/prebuilt/64-bit/libfmod.so;/home/simon/git/brickt/cocos2d/external/linux-specific/fmod/prebuilt/64-bit/libfmod.so
– OpenGL include dirs: /usr/include
– GLEW include dirs: /usr/include
– PkgConfig found
– GLFW3 include dirs: /usr/include/GLFW
– SQLite3 include dirs: /usr/include
– FMOD include dirs: /home/simon/git/brickt/cocos2d/external/linux-specific/fmod/include
– Fontconfig include dirs: /usr/include/freetype2;/usr/include/libpng16;/usr/include/harfbuzz;/usr/include/glib-2.0;/usr/lib/glib-2.0/include;/usr/include/freetype2;/usr/include/libpng16;/usr/include/harfbuzz;/usr/include/glib-2.0;/usr/lib/glib-2.0/include
– GTK3 include dirs: /usr/include/gtk-3.0;/usr/include/at-spi2-atk/2.0;/usr/include/at-spi-2.0;/usr/include/dbus-1.0;/usr/lib/dbus-1.0/include;/usr/include/gtk-3.0;/usr/include/gio-unix-2.0/;/usr/include/cairo;/usr/include/pango-1.0;/usr/include/atk-1.0;/usr/include/cairo;/usr/include/pixman-1;/usr/include/freetype2;/usr/include/libpng16;/usr/include/harfbuzz;/usr/include/glib-2.0;/usr/lib/glib-2.0/include;/usr/include/freetype2;/usr/include/harfbuzz;/usr/include/libpng16;/usr/include/gdk-pixbuf-2.0;/usr/include/glib-2.0;/usr/lib/glib-2.0/include
– Freetype include dirs: /home/simon/git/brickt/cocos2d/external/freetype2/include/linux;/home/simon/git/brickt/cocos2d/external/freetype2/include/linux
– WebP include dirs: /home/simon/git/brickt/cocos2d/external/webp/include/linux
– Chipmunk include dirs: /home/simon/git/brickt/cocos2d/external/chipmunk/include
– bullet include dirs: /home/simon/git/brickt/cocos2d/external/bullet/include;/home/simon/git/brickt/cocos2d/external/bullet/include/bullet
– Bullet include dirs: /home/simon/git/brickt/cocos2d/external/bullet/include;/home/simon/git/brickt/cocos2d/external/bullet/include/bullet
– Recast include dirs: /home/simon/git/brickt/cocos2d/external/recast
– TinyXML2 include dirs: /home/simon/git/brickt/cocos2d/external/tinyxml2
– JPEG include dirs: /home/simon/git/brickt/cocos2d/external/jpeg/include/linux
– ZLIB include dirs: /usr/include
– MINIZIP include dirs: /home/simon/git/brickt/cocos2d/external/unzip;/usr/include
– PNG include dirs: /usr/include;/usr/include
– TIFF include dirs: /home/simon/git/brickt/cocos2d/external/tiff/include/linux
– WEBSOCKETS include dirs: /home/simon/git/brickt/cocos2d/external/websockets/include/linux
– CURL include dirs:
– Flatbuffers include dirs: /home/simon/git/brickt/cocos2d/external
– OPENGL add to include_dirs: /usr/include
– OPENGL libs added to ‘cocos2dInternal’: /usr/lib/libGLU.so;/usr/lib/libGL.so
– GLEW add to include_dirs: /usr/include
– GLEW libs added to ‘cocos2dInternal’: /usr/lib/libGLEW.so
– GLFW3 add to include_dirs: /usr/include/GLFW
– GLFW3 libs added to ‘cocos2dInternal’: glfw
– GLFW3 add definitions: -DGLFW_DLL
– FMOD add to include_dirs: /home/simon/git/brickt/cocos2d/external/linux-specific/fmod/include
– FMOD libs added to ‘cocos2dInternal’: /home/simon/git/brickt/cocos2d/external/linux-specific/fmod/prebuilt/64-bit/libfmod.so;/home/simon/git/brickt/cocos2d/external/linux-specific/fmod/prebuilt/64-bit/libfmod.so
– FONTCONFIG add to include_dirs: /usr/include/freetype2;/usr/include/libpng16;/usr/include/harfbuzz;/usr/include/glib-2.0;/usr/lib/glib-2.0/include;/usr/include/freetype2;/usr/include/libpng16;/usr/include/harfbuzz;/usr/include/glib-2.0;/usr/lib/glib-2.0/include
– FONTCONFIG libs added to ‘cocos2dInternal’: fontconfig;freetype
– THREADS libs added to ‘cocos2dInternal’: -lpthread
– GTK3 add to include_dirs: /usr/include/gtk-3.0;/usr/include/at-spi2-atk/2.0;/usr/include/at-spi-2.0;/usr/include/dbus-1.0;/usr/lib/dbus-1.0/include;/usr/include/gtk-3.0;/usr/include/gio-unix-2.0/;/usr/include/cairo;/usr/include/pango-1.0;/usr/include/atk-1.0;/usr/include/cairo;/usr/include/pixman-1;/usr/include/freetype2;/usr/include/libpng16;/usr/include/harfbuzz;/usr/include/glib-2.0;/usr/lib/glib-2.0/include;/usr/include/freetype2;/usr/include/harfbuzz;/usr/include/libpng16;/usr/include/gdk-pixbuf-2.0;/usr/include/glib-2.0;/usr/lib/glib-2.0/include
– GTK3 libs added to ‘cocos2dInternal’: gtk-3;gdk-3;pangocairo-1.0;pango-1.0;atk-1.0;cairo-gobject;cairo;gdk_pixbuf-2.0;gio-2.0;gobject-2.0;glib-2.0
– GTK3 add definitions: -pthread
– ZLIB add to include_dirs: /usr/include
– ZLIB libs added to ‘cocos2dInternal’: /usr/lib/libz.so
– MINIZIP add to include_dirs: /home/simon/git/brickt/cocos2d/external/unzip;/usr/include
– MINIZIP libs added to ‘cocos2dInternal’: unzip;/usr/lib/libz.so
– JPEG add to include_dirs: /home/simon/git/brickt/cocos2d/external/jpeg/include/linux
– JPEG libs added to ‘cocos2dInternal’: /home/simon/git/brickt/cocos2d/external/jpeg/prebuilt/linux/64-bit/libjpeg.a
– PNG add to include_dirs: /usr/include;/usr/include
– PNG libs added to ‘cocos2dInternal’: /usr/lib/libpng.so;/usr/lib/libz.so
– TIFF add to include_dirs: /home/simon/git/brickt/cocos2d/external/tiff/include/linux
– TIFF libs added to ‘cocos2dInternal’: /home/simon/git/brickt/cocos2d/external/tiff/prebuilt/linux/64-bit/libtiff.a
– TinyXML2 add to include_dirs: /home/simon/git/brickt/cocos2d/external/tinyxml2
– TinyXML2 libs added to ‘cocos2dInternal’: tinyxml2
– FREETYPE add to include_dirs: /home/simon/git/brickt/cocos2d/external/freetype2/include/linux;/home/simon/git/brickt/cocos2d/external/freetype2/include/linux
– FREETYPE libs added to ‘cocos2dInternal’: /home/simon/git/brickt/cocos2d/external/freetype2/prebuilt/linux/64-bit/libfreetype.a
– WEBSOCKETS add to include_dirs: /home/simon/git/brickt/cocos2d/external/websockets/include/linux
– WEBSOCKETS libs added to ‘cocos2dInternal’: /home/simon/git/brickt/cocos2d/external/websockets/prebuilt/linux/64-bit/libwebsockets.a
– CURL libs added to ‘cocos2dInternal’: curl
– OPENSSL add to include_dirs: /home/simon/git/brickt/cocos2d/external/openssl/include/linux
– OPENSSL libs added to ‘cocos2dInternal’: /home/simon/git/brickt/cocos2d/external/openssl/prebuilt/linux/64-bit/libssl.a;/home/simon/git/brickt/cocos2d/external/openssl/prebuilt/linux/64-bit/libcrypto.a
– FLATBUFFERS add to include_dirs: /home/simon/git/brickt/cocos2d/external
– XXHASH add to include_dirs: /home/simon/git/brickt/cocos2d/external/xxhash
– XXHASH libs added to ‘cocos2dInternal’: xxhash
– WEBP add to include_dirs: /home/simon/git/brickt/cocos2d/external/webp/include/linux
– WEBP libs added to ‘cocos2dInternal’: /home/simon/git/brickt/cocos2d/external/webp/prebuilt/linux/64-bit/libwebp.a
– CHIPMUNK add to include_dirs: /home/simon/git/brickt/cocos2d/external/chipmunk/include
– CHIPMUNK libs added to ‘cocos2dInternal’: /home/simon/git/brickt/cocos2d/external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a
– BULLET add to include_dirs: /home/simon/git/brickt/cocos2d/external/bullet/include;/home/simon/git/brickt/cocos2d/external/bullet/include/bullet
– BULLET libs added to ‘cocos2dInternal’: /home/simon/git/brickt/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletDynamics.a;/home/simon/git/brickt/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a;/home/simon/git/brickt/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletMultiThreaded.a;/home/simon/git/brickt/cocos2d/external/bullet/prebuilt/linux/64-bit/libLinearMath.a;/home/simon/git/brickt/cocos2d/external/bullet/prebuilt/linux/64-bit/libMiniCL.a
– RECAST add to include_dirs: /home/simon/git/brickt/cocos2d/external/recast
– RECAST libs added to ‘cocos2dInternal’: recast
– Configuring done
– Generating done
– Build files have been written to: /home/simon/git/brickt/linux-build
running: ‘make -j4’

[ 1%] Built target unzip
[ 1%] Built target xxhash
[ 2%] Built target tinyxml2
[ 5%] Built target recast
[ 6%] Built target flatbuffers
[100%] Built target cocos2dInternal
[100%] Built target cocos2d
[100%] Linking CXX executable bin/MyGame
/usr/bin/ld: …/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletDynamics.a(btSequentialImpulseConstraintSolver.o): relocation R_X86_64_32 against .rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletDynamics.a(btTypedConstraint.o): relocation R_X86_64_32S against symbol_ZTV17btTypedConstraint’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: …/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletDynamics.a(btDiscreteDynamicsWorld.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletDynamics.a(btRigidBody.o): relocation R_X86_64_32S against symbol_ZN17btCollisionObject17setCollisionShapeEP16btCollisionShape’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: …/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletDynamics.a(btConeTwistConstraint.o): relocation R_X86_64_32S against symbol _ZTV21btConeTwistConstraint' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletDynamics.a(btGeneric6DofConstraint.o): relocation R_X86_64_32S against symbol_ZTV23btGeneric6DofConstraint’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: …/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btDbvtBroadphase.o): relocation R_X86_64_32S against symbol _ZTV16btDbvtBroadphase' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btOverlappingPairCache.o): relocation R_X86_64_32S against.rodata’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: …/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btCollisionDispatcher.o): relocation R_X86_64_32S against symbol _ZTV23btCollisionPairCallback' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btCollisionObject.o): relocation R_X86_64_32S against symbol_ZTV17btCollisionObject’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: …/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btCollisionWorld.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btDefaultCollisionConfiguration.o): relocation R_X86_64_32S against symbol_ZTV31btDefaultCollisionConfiguration’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: …/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btEmptyCollisionAlgorithm.o): relocation R_X86_64_32S against symbol _ZTV16btEmptyAlgorithm' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btGhostObject.o): relocation R_X86_64_32S against symbol_ZTV13btGhostObject’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: …/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btManifoldResult.o): relocation R_X86_64_32S against symbol _ZTV16btManifoldResult' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btSimulationIslandManager.o): relocation R_X86_64_32S against symbol_ZTV25btSimulationIslandManager’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: …/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btSphereSphereCollisionAlgorithm.o): relocation R_X86_64_32S against symbol _ZTV32btSphereSphereCollisionAlgorithm' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btSphereTriangleCollisionAlgorithm.o): relocation R_X86_64_32S against symbol_ZTV34btSphereTriangleCollisionAlgorithm’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: …/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btUnionFind.o): relocation R_X86_64_32 against symbol __gxx_personality_v0@@CXXABI_1.3' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(SphereTriangleDetector.o): relocation R_X86_64_32S against symbol_ZTV22SphereTriangleDetector’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: …/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btBvhTriangleMeshShape.o): relocation R_X86_64_32S against symbol _ZTV22btBvhTriangleMeshShape' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btCollisionShape.o): relocation R_X86_64_32S against symbol_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: …/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btConvexInternalShape.o): relocation R_X86_64_32S against symbol _ZNK21btConvexInternalShape9getMarginEv' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btConvexShape.o): relocation R_X86_64_32S against symbol_ZTV13btConvexShape’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: …/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btOptimizedBvh.o): relocation R_X86_64_32S against symbol _ZTV14btOptimizedBvh' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btSphereShape.o): relocation R_X86_64_32S against symbol_ZNK13btSphereShape37localGetSupportingVertexWithoutMarginERK9btVector3’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: …/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btTriangleMeshShape.o): relocation R_X86_64_32S against symbol _ZTV19btTriangleMeshShape' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btContinuousConvexCollision.o): relocation R_X86_64_32S against symbol_ZTV27btContinuousConvexCollision’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: …/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btGjkConvexCast.o): relocation R_X86_64_32S against symbol _ZTV16btPointCollector' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btGjkPairDetector.o): relocation R_X86_64_32S against symbol_ZTV17btGjkPairDetector’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: …/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btMinkowskiPenetrationDepthSolver.o): relocation R_X86_64_32 against .bss' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btRaycastCallback.o): relocation R_X86_64_32S against symbol_ZTV15btTriangleShape’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: …/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btSubSimplexConvexCast.o): relocation R_X86_64_32S against symbol _ZTV22btSubsimplexConvexCast' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btVoronoiSimplexSolver.o): relocation R_X86_64_32S against.rodata’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: …/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btCollisionAlgorithm.o): relocation R_X86_64_32S against symbol _ZTV20btCollisionAlgorithm' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btDbvt.o): relocation R_X86_64_32S against symbol_ZN6btDbvt6IClone9CloneLeafEP10btDbvtNode’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: …/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btQuantizedBvh.o): relocation R_X86_64_32S against symbol _ZTV14btQuantizedBvh' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btActivatingCollisionAlgorithm.o): relocation R_X86_64_32S against symbol_ZTV30btActivatingCollisionAlgorithm’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: …/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btBoxBoxCollisionAlgorithm.o): relocation R_X86_64_32S against symbol _ZTV26btBoxBoxCollisionAlgorithm' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btBoxBoxDetector.o): relocation R_X86_64_32S against symbol_ZTV16btBoxBoxDetector’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: …/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btCompoundCollisionAlgorithm.o): relocation R_X86_64_32S against symbol _ZTV28btCompoundCollisionAlgorithm' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btCompoundCompoundCollisionAlgorithm.o): relocation R_X86_64_32S against symbol_ZN36btCompoundCompoundCollisionAlgorithm22getAllContactManifoldsER20btAlignedObjectArrayIP20btPersistentManifoldE’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: …/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btConvexConcaveCollisionAlgorithm.o): relocation R_X86_64_32S against .rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btConvexConvexAlgorithm.o): relocation R_X86_64_32S against symbol_ZTV23btConvexConvexAlgorithm’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: …/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btConvexPlaneCollisionAlgorithm.o): relocation R_X86_64_32S against symbol _ZTV31btConvexPlaneCollisionAlgorithm' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btHashedSimplePairCache.o): relocation R_X86_64_32S against symbol_ZTV23btHashedSimplePairCache’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: …/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btConcaveShape.o): relocation R_X86_64_32S against symbol _ZTV14btConcaveShape' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btPolyhedralConvexShape.o): relocation R_X86_64_32S against.bss’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: …/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btGjkEpa2.o): relocation R_X86_64_32 against symbol _ZNK13btConvexShape31localGetSupportVertexNonVirtualERK9btVector3' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btPolyhedralContactClipping.o): relocation R_X86_64_32S against symbol_ZN15btStorageResult15addContactPointERK9btVector3S2_f’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: …/cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletCollision.a(btConvexPolyhedron.o): relocation R_X86_64_32S against symbol _ZTV18btConvexPolyhedron' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../cocos2d/external/bullet/prebuilt/linux/64-bit/libLinearMath.a(btAlignedAllocator.o): relocation R_X86_64_32 against.text’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: …/cocos2d/external/bullet/prebuilt/linux/64-bit/libLinearMath.a(btConvexHullComputer.o): relocation R_X86_64_32 against symbol __gxx_personality_v0@@CXXABI_1.3' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../cocos2d/external/bullet/prebuilt/linux/64-bit/libLinearMath.a(btQuickprof.o): relocation R_X86_64_32 against symbol_ZN15CProfileManager4RootE’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/MyGame.dir/build.make:175: bin/MyGame] Error 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/MyGame.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
Error running command, return code: 2.

My intention is to have this game be availaboe on iOS and Android mainly, but I’d like it to be able to compile and run on Linux as well just for my own game testing purposes.

Posts: 1

Participants: 1

Read full topic

SDKBOX AdMob for iPhone X

$
0
0

@0mega wrote:

The current version of the AdMob plugin for SDKBOX only allows you to specify anchors for the ad. (Bottom, top, center, etc.)

With the new iPhone X, this will no longer do, as the banner will be underneath the home bar. iPhone X has a ‘safe area’ as well as an ‘unsafe’ area that you need to design for properly.

Will SDKBOX support better ad placement for iPhone X? (So that the banner is only placed in the safe area, or by allowing us to place it with specific coordinates)

And if so, when is this update coming?

Posts: 1

Participants: 1

Read full topic

Combine with Tangram-ES

$
0
0

@MyZeD wrote:

I trying to implementing Cocos2D-X (C++) with Tangram-ES [C++].

This Code works, but very strange.
If i loaded them, it works generally ok, it shown me the result from Tangram.
But the problems are:

  • if i hover the app with the mouse it’s switching in black screen in the time im hovering it
  • No Cocos Nodes (Menu etc.) are shown in this time

This is the Class for the Tangram:

void MapScene::create() {
	if(!map) {
		platform = std::make_shared<Tangram::LinuxPlatform>();
		map = new Tangram::Map(platform);
		map->loadSceneAsync("Resources/scene.yaml", true, {}, nullptr, {});
	}
	
	mWindow = glfwGetCurrentContext();
	
	if(!mWindow) {
		glfwTerminate();
	}
	
	map->setupGL();
	
	int fWidth = 0, fHeight = 0;
	glfwGetWindowSize(mWindow, &fWidth, &fHeight);
	framebufferResizeCallback(mWindow, fWidth, fHeight);
	
	lastTime = glfwGetTime();
}

void MapScene::update(float dt) {
	map->update(dt);
	map->render();
	
	glfwSwapBuffers(mWindow);

	// Poll for and process events
	if(platform->isContinuousRendering()) {
		glfwPollEvents();
	} else {
		glfwWaitEvents();
	}
}

void MapScene::framebufferResizeCallback(GLFWwindow* mWindow, int fWidth, int fHeight) {
	int wWidth = 0, wHeight = 0;
	glfwGetWindowSize(mWindow, &wWidth, &wHeight);
	float new_density = (float)fWidth / (float)wWidth;
	if(new_density != density) {
		recreate_context = true;
		density = new_density;
	}
	
	map->setPixelScale(density);
	map->resize(fWidth, fHeight);
}

What can i do, to rendering Tangram correctly in Background ?

Thank you and best regards,
Roman H.

Posts: 1

Participants: 1

Read full topic

Need help label fnt about spacing

$
0
0

@hahazzls wrote:

hello everyone,
i have a problem with function: Sprite* Label::getLetter(int letterIndex) of CCLabel
in cocos2dx 3.15 when my label have spacing (example:: my dog)
mylabel = CCLabelBMFontAnimated::createWithBMFont(“fonts/font_en.fnt”, “my dog”, cocos2d::TextHAlignment::CENTER, 1300, cocos2d::Vec2(0, 0));
mylabel->animateInRevealFromLeft(0.5);
mylabel->setPosition(100, 100);
this->addChild(mylabel);
when getLetter(2) it return nullptr because letterInfo.atlasIndex < 0 in function return value = -1, so can do action animateInRevealFromLeft for all string, it only action string "my"
So what i have to to, please help me,
in cocos2dx 3.14 it still work because getLetter not same as 3.15

Posts: 1

Participants: 1

Read full topic

Viewing all 17068 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>