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

Console version!

$
0
0

@C_Stefano wrote:

Today we have few possible features to add for cocos creator (if possible :blush:)

  1. When a console version (Switch, PS4, XBOX) for CocosCreator? :star_struck:
  2. Could will be interesting a possible version for build a “playable ads” mraid compatibility :yum:

Bye!

Stefano

Posts: 1

Participants: 1

Read full topic


Migrating to androidX

$
0
0

@Yathiraj_karkera wrote:

I am trying to migrate the cocos2d project to AndroidX
any help?

cocos2d-x 3.15

// Play Services
implementation “com.google.android.gms:play-services-ads:18.2.0”
implementation “com.google.android.gms:play-services-games:15.0.1”
implementation “com.google.android.gms:play-services-plus:15.0.1”
implementation “com.google.android.gms:play-services-auth:15.0.1”

// Firebase
implementation "com.google.firebase:firebase-core:16.0.0"
implementation "com.google.firebase:firebase-messaging:17.0.0"
implementation "com.google.firebase:firebase-config:16.0.0"
implementation "com.google.firebase:firebase-auth:16.0.1"
implementation "com.google.firebase:firebase-invites:16.0.0"

implementation "com.google.firebase:firebase-perf:16.0.0"
implementation "com.google.android.gms:play-services-ads:18.2.0" -

Reason for "Migrate to androidX"

Posts: 1

Participants: 1

Read full topic

Error when run cocos2d-x v3

$
0
0

@minato243 wrote:

When I run/compile a new Project on Mac, I get error: No matching function for call to ‘fill_memory_filefunc’

Do any one know how to solve it.

Posts: 1

Participants: 1

Read full topic

How can i work with gravity in cocos creator?

$
0
0

@tanvir wrote:

How can i remove physicsboxcollider and physicscirclecollider? Or at least make it transparent? and how to detect boxcollider and circlecollider collision separately? i mean if i hit the box collider it will say box.Please help me. TIA.

prblm

Posts: 1

Participants: 1

Read full topic

runOnUiThread - purpose

$
0
0

@vyshnav_s_deepak wrote:

We have recently developed a game on Cocos2dx-JS.
Plugins were implemented in JAVA for Ironsource and Google play services and are called via jsb reflection.

Can someone tell us whether runOnUiThread has to be used on methods like showRewardedAds, signIn() or submitScore() ?

And if that is not used, what will be the default thread ?

Posts: 2

Participants: 2

Read full topic

Clicked the mouse - added a sprite

$
0
0

@achkasovmaxim wrote:

My task is very simple, but I have not found a solution for a couple of days. I need a sprite to appear at this point when I click the mouse button. Tracking a mouse event is not a problem; set a position too. Does anyone have a code to add a sprite to the scene? I already reread everything.
If you can, show the code.

Posts: 3

Participants: 2

Read full topic

Unable to use tmx files exported with TIled (v 1.0.3)

$
0
0

@ItzMoksh wrote:

I’m trying to create a new tilemap using Tiled. The xml file of the generated map doesn’t contain the tag and cocos throws this error:

TypeError: Cannot read property ‘getAttribute’ of undefined
at cc.TMXMapInfo.parseXMLString (C:\CocosCreator_2.1.3\resources\engine\bin.cache\dev\cocos2d\tilemap\CCTMXXMLParser.js:354:46)
at cc.TMXMapInfo.initWithXML (C:\CocosCreator_2.1.3\resources\engine\bin.cache\dev\cocos2d\tilemap\CCTMXXMLParser.js:280:29)
at new cc.TMXMapInfo (C:\CocosCreator_2.1.3\resources\engine\bin.cache\dev\cocos2d\tilemap\CCTMXXMLParser.js:148:18)
at cc_TiledMap._applyFile (C:\CocosCreator_2.1.3\resources\engine\bin.cache\dev\cocos2d\tilemap\CCTiledMap.js:169:35)
at cc_TiledMap.set (C:\CocosCreator_2.1.3\resources\engine\bin.cache\dev\cocos2d\tilemap\CCTiledMap.js:91:34)
at cc_TiledMap.a.set [as tmxAsset] (C:\CocosCreator_2.1.3\resources\app.asar\editor\page\scene-utils\lib\asset-watcher.js:1:973)
at cc_TiledMapAsset.cc.Class.createNode (C:\CocosCreator_2.1.3\resources\engine\bin.cache\dev\cocos2d\tilemap\CCTiledMapAsset.js:32:35)
at cc.AssetLibrary.loadAsset (C:\CocosCreator_2.1.3\resources\app.asar\editor\page\scene-utils\utils\node.js:1:5038)
at CCLoader. (C:\CocosCreator_2.1.3\resources\engine\bin.cache\dev\cocos2d\core\platform\CCAssetLibrary.js:65:25)
at C:\CocosCreator_2.1.3\resources\engine\bin.cache\dev\cocos2d\core\load-pipeline\CCLoader.js:141:46

If I try to edit an already existing tilemap (From cocos creator example project) I’m able to use it in my project.

I tried adding the image tag forcefully, cocos creator stopped showing the error and map gets added to the node tree but it’s blank and shows nothing in the scene.

Posts: 1

Participants: 1

Read full topic

Canvas Size For Vertical UI


project build gets stuck

$
0
0

@wugols2004 wrote:

Hello, currently my cocos creator 2.2.0 project is not finishing the build process. gets stuck in the ‘compile’ process. im building for web-mobile as well

Posts: 1

Participants: 1

Read full topic

Change node parent with EventListener

$
0
0

@Donmizzi wrote:

Hi, I have a code like this (TouchObj is a Node):

test = TouchObj::Create("image");
test->retain();
test->setSelectorRelease("testMethod");
Layer_1->addChild(test);

void testMethod()
{
  test->removeFromParent();
  Layer_2->addChild(test)
}

TouchObj has an EventListerner in the onEnter():

  _listener = EventListenerTouchOneByOne::create();
  _listener->onTouchBegan = CC_CALLBACK_2(TouchObj::onTouchBegan, this);
  _listener->onTouchMoved = CC_CALLBACK_2(TouchObj::onTouchMoved, this);
  _listener->onTouchEnded = CC_CALLBACK_2(TouchObj::onTouchEnded, this);
  _listener->onTouchCancelled = CC_CALLBACK_2(TouchObj::onTouchCancelled, this);
  _listener->retain();
  this->getEventDispatcher()->addEventListenerWithSceneGraphPriority(_listener, this);

With this cosa, when I try to change parent, I have an ASSERT in the CCEventDispatcher

CCASSERT(!listener->isRegistered(), "The listener has been registered.");

because isRegistered is true, infact removeEventListener is not called if the object is live.

There is a proper way to manage change parent for a Node with EventListener?

Thank you
Regards
Don

Posts: 3

Participants: 2

Read full topic

Particle System cc.ParticleSystem.TYPE_FREE, issue related to rotation

$
0
0

@Jack_Wiebe wrote:

I am creating a particle system that is attached to a parent node. The parent node moves and rotates over the life of the game.

currently my particle position type is set to FREE, and when translating the parent node, the particles behave as expected. The particle that already exist in the scene move freely from the emitter, and new particles that spawn start from the new emitter location. This all falls apart when I start rotating the parent.

I have found other topics on the forum relating to this bug (https://github.com/cocos2d/cocos2d-x/issues/8384), but it doesn’t look like there is a fix implemented yet.

I know the issue needs to be addressed in the update loop of CCParticleSystem.js, and I have a basic understanding that I need to convert the particle into world space and inverse the rotation, but this is where I get a bit lost. My matrix math is not what I would like it to be :slight_smile:

Any help or advise on the matter would be very helpful, please let me know if I can provide any more relevant information

Posts: 1

Participants: 1

Read full topic

Why not cache ProgramState in cocos2d-x-v4?

How to generate prebuilt with v3.17.2 for iOS?

$
0
0

@Zinitter wrote:

My Prebuilt Issue

  1. Cmake
    i try using cmake with above code to generate Cocos2d-x.xcodeproj and compile the library which generate libcocos2d.a and libjscocos2d.a. Then i link these 2 files to my Xcode project but get compile error Undefined symbols for architecture arm64 for more than 100 function related to cocos2dx

  2. using cocos2d_libs.xcodeproj in build and cocos2d_js_bindings.xcodeproj in scripting
    generated libcocos2d.a and libjscocos2d.a and link to my Xcode project, everything compile just fine and app can be run, but unable to use cc.EditBox issue as stated above.

  3. End up i have to link cocos2d_libs.xcodeproj and cocos2d_js_bindings.xcodeproj to my Xcode project, everything works just fine but with longer compile time.

I used to generate prebuilt with cocos console but that function was removed after v3.17.1, i still using v3.17 with prebuilt guide below

So is there any guide to generate prebuilt with v3.17.2 for iOS?

Thanks!

Posts: 1

Participants: 1

Read full topic

Clang++ error on armeabi-v7a/libPluginIAP.a

$
0
0

@stephenhurry wrote:

I got this compile error, my building environment is cocos2dx v3.17.1, SDKBox Plugin version 2.5.0.5. The weird thing is such error arises on release mode only.

jni/../../../Modules/SDKBox_Module/prebuilt/android/armeabi-v7a/libPluginIAP.a(IAPWrapper-android.o):function std::__ndk1::basic_stringstream<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >::~basic_stringstream(): warning: relocation refers to discarded section
/Users/ichinfungi/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: treating warnings as errors
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [obj/local/armeabi-v7a/libcocos2dcpp.so] Error 1
make: *** Waiting for unfinished jobs....

@yinjimmy Please kindly take a look, many thanks.

Posts: 1

Participants: 1

Read full topic

The Community Editon of x-studio is coming soon!


Get FPS value shown on stats

$
0
0

@lmartinignacio wrote:

Is there a way to get the FPS value that director is counting?

(btw i know how to count them by my own, but i dont want to do it twice if there is a way to get it).

thanks in advance! :heart_eyes:

Posts: 1

Participants: 1

Read full topic

How to set orientation of Bone3d* in world space instead of local space?

$
0
0

@chumbyfuzz wrote:

I have a 3d model of a human skeleton.

Currently I do the following:

Bone3D* node; //The bone I want to set the orientation of.
Mat4 mat = node->getLocalMat(); //I modified Skeleton3d to let me access the local matrix
Vec3 pos, scale;
// store original translation & scale
mat.getTranslation(&pos);
mat.getScale(&scale);
// reset matrix
mat.setIdentity();

// create float array for translation
float trans[3];
trans[0] = pos.x;
trans[1] = pos.y;
trans[2] = pos.z;

// create float array for scale
float s[3];
s[0] = scale.x;
s[1] = scale.y;
s[2] = scale.z;

// create quaternion float array for rotation
Quaternion q = ToQuaternion(yaw,pitch,roll);

float rot[4];
rot[0] = q.x;
rot[1] = q.y;
rot[2] = q.z;
rot[3] = q.w;

// send transform values to bone
node->setAnimationValue(trans, rot, s);

By doing this, I am able to set the angle of the bone relative to its parent bone (similar to how localspace works with 2d sprites), but I am not able to set the orientation of the bone in 3d space. How can I do that ? I still want the location of the bone to be where it should be (it should be attached to its parent at the correct place), but I want to be able to set its yaw, pitch and roll, relative to the world.

Posts: 1

Participants: 1

Read full topic

What's fb_login_protocal_scheme for?

Creator 2.2.0 can't keep screen on with cc.Device.setKeepScreenOn(true);

Facebook Invitation is not working

Viewing all 17115 articles
Browse latest View live


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