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

CC2.3.2 can't compile

$
0
0

@FocusCreative wrote:

Hi!
I’m trying to add SDKBox to my Cocos Creator 2.3.2 project but it fails to compile.
I’ve used “SDKBox Staging Server” option during import in SDKBox Extension.
It still gives error during compile:

Execution failed for task ‘:game:transformClassesAndResourcesWithProguardForRelease’.

I’ve tried on empty project and same result.
Steps:
1- Create empty 2.3.2 project using Cocos Dasboard
2- Build
3- Import SDKBox Ads, Admob, Share using staging server option
4- Compile (gives error)

Help please.

Here is more details:

Starting process ‘command ‘C:\Android\ndk-bundle\ndk-build.cmd’’. Working directory: C:\Cocos_Projects\sdkbox_test\build\jsb-link\frameworks\runtime-src\proj.android-studio\app Command: C:\Android\ndk-bundle\ndk-build.cmd NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Cocos_Projects\sdkbox_test\build\jsb-link\frameworks\runtime-src\proj.android-studio\app\jni\Android.mk NDK_APPLICATION_MK=C:\Cocos_Projects\sdkbox_test\build\jsb-link\frameworks\runtime-src\proj.android-studio\app\jni\Application.mk APP_ABI=arm64-v8a NDK_ALL_ABIS=arm64-v8a NDK_DEBUG=0 APP_PLATFORM=android-16 NDK_OUT=C:/Cocos_Projects/sdkbox_test/build/jsb-link/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj NDK_LIBS_OUT=C:\Cocos_Projects\sdkbox_test\build\jsb-link\frameworks\runtime-src\proj.android-studio\app\build\intermediates\ndkBuild\release\lib NDK_TOOLCHAIN_VERSION=clang NDK_MODULE_PATH=C:\CocosDashboard_1.0.3\resources.editors\Creator\2.3.2\resources\cocos2d-x;C:\CocosDashboard_1.0.3\resources.editors\Creator\2.3.2\resources\cocos2d-x\cocos;C:\CocosDashboard_1.0.3\resources.editors\Creator\2.3.2\resources\cocos2d-x\external -j4 NDK_DEBUG=0 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n
Successfully started process ‘command ‘C:\Android\ndk-bundle\ndk-build.cmd’’
process_begin: CreateProcess(NULL, “”, …) failed.
External native JSON generation. Variant=releaseABI=arm64-v8a : done executing ndkBuild
External native JSON generation. Variant=releaseABI=arm64-v8a : write build output C:\Cocos_Projects\sdkbox_test\build\jsb-link\frameworks\runtime-src\proj.android-studio\app.externalNativeBuild\ndkBuild\release\arm64-v8a\ndkBuild_build_output.txt
External native JSON generation. Variant=releaseABI=arm64-v8a : parse and convert ndk-build output to build configuration JSON
External native JSON generation. Variant=releaseABI=arm64-v8a : found application make file C:\Cocos_Projects\sdkbox_test\build\jsb-link\frameworks\runtime-src\proj.android-studio\app\jni\Application.mk
External native JSON generation. Variant=releaseABI=arm64-v8a : write command file C:\Cocos_Projects\sdkbox_test\build\jsb-link\frameworks\runtime-src\proj.android-studio\app.externalNativeBuild\ndkBuild\release\arm64-v8a\ndkBuild_build_command.txt
External native JSON generation. Variant=releaseABI=arm64-v8a : JSON generation for ABI: %s completed without problems
:sdkbox_test:generateJsonModelRelease (Thread[Task worker for ‘:’ Thread 3,5,main]) completed. Took 1.78 secs.
:sdkbox_test:externalNativeBuildRelease (Thread[Task worker for ‘:’ Thread 3,5,main]) started.
Note: the configuration keeps the entry point ‘org.cocos2dx.okhttp3.Dispatcher { void enqueue(org.cocos2dx.okhttp3.RealCall$AsyncCall); }’, but not the descriptor class ‘org.cocos2dx.okhttp3.RealCall$AsyncCall’
Note: the configuration keeps the entry point ‘org.cocos2dx.okhttp3.Dispatcher { int runningCallsForHost(org.cocos2dx.okhttp3.RealCall$AsyncCall); }’, but not the descriptor class ‘org.cocos2dx.okhttp3.RealCall$AsyncCall’
Note: the configuration keeps the entry point ‘org.cocos2dx.okhttp3.Dispatcher { void executed(org.cocos2dx.okhttp3.RealCall); }’, but not the descriptor class ‘org.cocos2dx.okhttp3.RealCall’
Note: the configuration keeps the entry point ‘org.cocos2dx.okhttp3.Dispatcher { void finished(org.cocos2dx.okhttp3.RealCall$AsyncCall); }’, but not the descriptor class ‘org.cocos2dx.okhttp3.RealCall$AsyncCall’
Note: the configuration keeps the entry point ‘org.cocos2dx.okhttp3.Dispatcher { void finished(org.cocos2dx.okhttp3.RealCall); }’, but not the descriptor class ‘org.cocos2dx.okhttp3.RealCall’
Note: the configuration keeps the entry point ‘org.cocos2dx.okhttp3.internal.cache.DiskLruCache { boolean removeEntry(org.cocos2dx.okhttp3.internal.cache.DiskLruCache$Entry); }’, but not the descriptor class ‘org.cocos2dx.okhttp3.internal.cache.DiskLruCache$Entry’
Note: the configuration keeps the entry point ‘org.cocos2dx.okhttp3.internal.cache.DiskLruCache$Editor { DiskLruCache$Editor(org.cocos2dx.okhttp3.internal.cache.DiskLruCache,org.cocos2dx.okhttp3.internal.cache.DiskLruCache$Entry); }’, but not the descriptor class ‘org.cocos2dx.okhttp3.internal.cache.DiskLruCache$Entry’
Note: the configuration keeps the entry point ‘org.cocos2dx.okhttp3.internal.http2.Http2Stream { void setHeadersListener(org.cocos2dx.okhttp3.internal.http2.Header$Listener); }’, but not the descriptor class ‘org.cocos2dx.okhttp3.internal.http2.Header$Listener’
Note: the configuration keeps the entry point ‘org.cocos2dx.okio.Buffer { boolean rangeEquals(org.cocos2dx.okio.Segment,int,org.cocos2dx.okio.ByteString,int,int); }’, but not the descriptor class ‘org.cocos2dx.okio.Segment’
Note: there were 1 references to unknown classes.
You should check your configuration for typos.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unknownclass)
Note: there were 9 unkept descriptor classes in kept class members.
You should consider explicitly keeping the mentioned classes
(using ‘-keep’).
(http://proguard.sourceforge.net/manual/troubleshooting.html#descriptorclass)
Note: there were 6 unresolved dynamic references to classes or interfaces.
You should check if you need to specify additional program jars.
(http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclass)
Warning: Exception while processing task java.io.IOException: Please correct the above warnings first.
Thread(Tasks limiter_7): destruction
Warning: there were 203 unresolved references to classes or interfaces.
You may need to add missing library jars or update their versions.
If your code works fine without the missing classes, you can suppress
the warnings with ‘-dontwarn’ options.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)
Task :game:transformClassesAndResourcesWithProguardForRelease FAILED

Posts: 1

Participants: 1

Read full topic


Debugging in Android Studio 3 using cocos2dx

$
0
0

@SimonArchNox wrote:

Hi
I’m using cocos2dx v3.17.2 and Android Studio 3.
I’ve managed to compile, build and sign apk’s and bundles.
Now I wish to have the option to debug the application using usb + device (I’m using Huawei P10).
I’ve managed to run the debugger but phone states it: “Wait for debugger process to attach”. Naturally, I then tried the “Attach Debugger to Android Process” action (while debug is running) but it seems to fail - the application doesn’t start and I get a black screen.

Did anyone manage to make it work? what am I missing here?

Posts: 1

Participants: 1

Read full topic

Knowledge contribution/Adding to Wiki

$
0
0

@SimonArchNox wrote:

Hi
I’ve been using Cocos2dx for quite some time now and I really like it. I’ve learned a lot and still learning and developing my skills.
During development, I’ve encountered issues and problems but I also found solutions. I had the chance to document them and compile a document, 5 pages long for the moment, with issues and their solutions.
It is something I enjoy doing and thought to share it.
Link to the doc: https://drive.google.com/open?id=1QzBQGzgsR8n-I2zTZEm2CmdYUZdFc4fy

I would love to get a feedback if it is relevant in any way, and if so who can add that to the knowledge base.

Thanks!

Posts: 1

Participants: 1

Read full topic

Best way to Google Login using SDKBOX in cocos2dx

How to add SocketCluster in cocos creator

Create Texture2D from SpriteFrame

$
0
0

@perfecto wrote:

Hi all,
well, my problem is i need to create Texture2D object from SpriteFrame which i get from SpriteAtlas.
Is it possible if yes, could anyone helps me?

Thanks.

Posts: 1

Participants: 1

Read full topic

Collision of a certain layer of the map editor, tiled map .tmx

$
0
0

@avalox wrote:

I created two layers in the map editor. “Ground” and “Decoration”. I added the TMX file to the “tiledmap” in Cocos Creator. It is a Mario-style platform game. I add the “physics polygon collider”, I click on “generate points”, it doesn’t work. The player is falling down.

How to make the player collide with the “ground” layer?

I’ve looked at all the topics on the subject, but to no avail.

I use javascript. Images:


I already called “getPhysicsManager”.

onLoad () {
cc.director.getPhysicsManager().enabled = true;
var manager = cc.director.getCollisionManager();
manager.enabled = true;
manager.enabledDebugDraw = true;
manager.enabledDrawBoundingBox = true;
}

Thanks.

Posts: 1

Participants: 1

Read full topic

Executing tasks: [:App:assembleDebug] so long and forever

$
0
0

@hoanlevan wrote:

Hi everyone,
I trying to complie my project with cocos2dx 3.17.2 and have issue below:

When execute task externalNativeBuildDebug and build cocos2djs armeabi-v7a

[4/11] Linking CXX static library lib\libjscocos2d.a
Seem like progress excuting forever this task. I waited more than 1 hour without seeing anything happen.

Please help me resolve this issue. Thanks so much!
–Sorry my English not good–

Posts: 1

Participants: 1

Read full topic


Box2d debug draw in coco2d-x v4.0

$
0
0

@speny wrote:

Hi friends,
I’m using coco2d-x v4.0 and box2d in c++ and developing for android via android studio. Anyone know how I can view exactly the box that box2d is drawing?.
The following files have deprecated functions and classes that do not work with cocos2d-x v4.0
#include “GLES-Render.h”
#include “GLES-Render.h”

Posts: 4

Participants: 2

Read full topic

Create or delete objects? Cocos Creator is thread safe?

$
0
0

@DieGam wrote:

Hi guys, I have some noob questions.

I create the new objects within an event. I don’t know if the events happen in a different thread or it is a call inside the game loop. For example, if I’ve to create a shot/blast I do:

    onKeyDown (event: cc.Event.EventKeyboard) {    
        switch (event.keyCode) {
            ...
            case cc.macro.KEY.space:
                this.onShot();
                break;         
        }
    }
    onShot() : void {
        let shotNode: cc.Node = cc.instantiate (this.shotPrefab);  
        cc.Canvas.instance.node.getChildByName ('Shots').addChild (shotNode); // Agrega al prefab dentro del Node 
        shotNode.x = this.node.x;
        shotNode.y = this.node.getBoundingBox().yMax;
        this.shoots.push (shotNode);
    }

My questions:

  1. Allocation in game loop?
  2. Is there a special thread to create or delete objects?
  3. Events happen in a different thread or it’s called from the game loop?
  4. if events are in different thread, is it thread safe?

Thanks :slight_smile:

Posts: 1

Participants: 1

Read full topic

Batching materials

$
0
0

@MercuryBD wrote:

Is there a way to batch objects with the same material but different params? I have jigsaw 81 puzzle peace elements with the same material applied to each one, the difference is the vec2 offset parameter in material effect.

Without applying offset it has 1 draw call, but when I start changing it on each one, draw call is 81 or each peace 1 draw call :(.

Is there any solution for this?

Posts: 1

Participants: 1

Read full topic

replaceScene creates but does not replace the scene

$
0
0

@uid4o wrote:

I’m having an object that communicates with a server. I’m trying to make it replace scene with Error scene if an error occurs, but it is not working.

if(json.Parse<0>(resp.c_str()).HasParseError())
    {
        CCLOG("PARSE ERROR HANDLE THIS!!!");
        auto scene = crashScene::createScene();
        Director::getInstance()->replaceScene(scene);
    }

I can confirm scene is created but it wont replace?

Posts: 2

Participants: 2

Read full topic

app rejected because of uiwebview

$
0
0

@fabrice wrote:

Hello I use cocos2d-x 3.17.2 my app is rejected because of UIWebView. I do not use it but the file are used in coco, what I have to do to solve that ?

Thanks,

ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of new apps that use UIWebView APIs starting from April 2020. See https://developer.apple.com/documentation/uikit/uiwebview for more information.

Posts: 1

Participants: 1

Read full topic

Sound Designer|Composer|Dialog Producer - Matt Dear Game Audio

$
0
0

@MattDearGameAudio wrote:

Hi all

My name is Matt Dear, a Sound Designer, Composer, Dialog Producer and Audio Implementor based in London, UK. I’ve been working in the games industry for 5 years, both as a freelancer and in-house at OMUK, a world-class game dialog studio. During this time I’ve worked on many, many projects, from the smallest indie to the heftiest of AAA titles, performing a variety of audio roles. Using my industry expertise and wide network, I am a one-stop shop for all things audio.

I am currently looking for new projects, so if you like what you hear, please get in touch.
You can find my portfolio and more information about me on my website:

Posts: 1

Participants: 1

Read full topic

Error while deploying project

$
0
0

@rahul_d_v wrote:

Hey all, hope you all are well.
For deploying my project, I used the command
cocos deploy -s -p win32 -m release
but I got four errors.


Currently, I am using cocos2d-x-4.0, python 2.7.10, cmake 3.15.6 and VS2019
Before this, I was using visual studio to run in release mode and it worked.

Posts: 4

Participants: 2

Read full topic


View prefab instances on Node Tree

$
0
0

@DieGam wrote:

Hi guys!
Is there any way to view prefab instances created from scripts in the Node Tree while the game is running?

Thanks!

Posts: 1

Participants: 1

Read full topic

Tutorial Request: Big World Movement / Camera

$
0
0

@luke2125 wrote:

Hi there:

@slackmoehrle

Could you please create a tutorial regarding in .js concerning camera / big world movement for player with Tiled. Maybe, you can convert the below which is ts:

I have the following code:

   cc.Class({
    extends: cc.Component,

    properties: {
      target: {
        default:null,
        type:cc.Node
      },
    map: {
        default:null,
        type: cc.Node
      },
    //  boundingBox: {
      //  default:null,
      //  type: cc.Rect
      //  },
    //    screenMiddle: {
      //    default:null,
    //    type: cc.Vec2
    //    }
  //  boundingBox: cc.Rect = null,
  //  screenMiddle: cc.Vec2 = null,
  //  minX: number = 0,
  //  maxX: number = 0,
  //  minY: number = 0,
  //  maxY: number = 0,
  //  minX:0,
  //  maxX:0,
  //  minY:0,
  //  maxY:0
boundingBox:cc.Rect,
screenMiddle:cc.Vec2,
//  boundingBox: {
    //  default:null,
    //  type: new cc.Rect()
  //  },
  //  screenMiddle: {
    //    default:null,
    //    type: new cc.Vec2()
    //  },
      minX: 0,
      maxX: 0,
      minY: 0,
      maxY: 0,
},
            // LIFE-CYCLE CALLBACKS:

    // onLoad () {},

onLoad:function(){
//  this.minX=0;
//  this.maxX=0;
////  this.minY=0;
//  this.maxY=0;
//  this.camera = this.getComponent(cc.Camera);
this.boundingBox = new cc.Rect(0, 0, this.map.width, this.map.height);
  let winsize = cc.winSize;
  this.screenMiddle = new cc.Vec2(winsize.width / 2, winsize.height / 2);
  this.minX = -(this.boundingBox.xMax - winsize.width);
  this.maxX = this.boundingBox.xMin;
  this.minY = -(this.boundingBox.yMax - winsize.height);
  this.maxY = this.boundingBox.yMin;
},
update:function(dt){
    let targertPos = this.target.convertToWorldSpaceAR(cc.Vec2.ZERO);
   let dis = pos.sub(targertPos);
   let dest = this.screenMiddle.add(dis);
   dest.x = cc.misc.clampf(dest.x, this.minX, this.maxX)
  dest.y = this.minY;
   this.node.position = this.map.node.convertToNodeSpaceAR(dest);
}, 

But still when my player reaches the viewpoer, it doesn’t go beyond. Would really appreciate any help regarding this, my game is 50 % done, this has me stump. Thanks and God Bless…

Sincerely,

Sunday

Posts: 1

Participants: 1

Read full topic

Make CC game update when tab is not active

$
0
0

@gowoo2k wrote:

i’m using cocos creator 2.2.2, my game seems to pause entirely when I switch to a other tab or minmize (on chrome).Is there a way to keep it running even when the tab is not active?
because i 'm on make network game by using websocket.

Posts: 1

Participants: 1

Read full topic

Basic for a platform game (mobile)

$
0
0

@avalox wrote:

I would like to ask the community for help in this topic to create a code base for a platform game. I know that there is a Mario tutorial and case examples, but they seem very complicated for beginners.

  1. First. Create two sprites called base and add a simple (non-physical) collider.

  1. Create 3 simple buttons.

  1. Create a player sprite and insert a simple (non-physical) collider.

  1. Create a script called “move” in javascript. Add the following code.

cc.Class({
extends: cc.Component,
properties: {
buttonleft: cc.Button,
buttonright: cc.Button,
buttonjump: cc.Button,
player: cc.Node,
speed: 0,
speedj: 0,
movejumpv: false,
moveleftv: false,
moverightv: false,
gravidade: true,
estanoar: true
},
onLoad: function () {
this.buttonleft.node.on(cc.Node.EventType.TOUCH_START, this.moveleft, this);
this.buttonleft.node.on(cc.Node.EventType.TOUCH_END, this.moveleftend, this);
this.buttonright.node.on(cc.Node.EventType.TOUCH_START, this.moveright, this);
this.buttonright.node.on(cc.Node.EventType.TOUCH_END, this.moverightend, this);
this.buttonjump.node.on(cc.Node.EventType.TOUCH_START, this.movejump, this);
this.buttonjump.node.on(cc.Node.EventType.TOUCH_END, this.movejumpend, this);
cc.director.getCollisionManager().enabled = true;
cc.director.getCollisionManager().enabledDebugDraw = true;
cc.director.getCollisionManager().enabledDrawBoundingBox = true;
cc.director.getPhysicsManager().enabled = true;
},
onCollisionEnter: function (other) {
this.node.color = cc.Color.RED;
this.gravidade = false;
this.estanoar = false;
},
onCollisionStay: function (other) {
},
onCollisionExit: function (other) {
this.node.color = cc.Color.WHITE;
this.gravidade = true;
this.estanoar = true;
},
moveleft: function (buttonleft) {
this.moveleftv = true;
},
moveleftend: function (buttonleftend) {
this.moveleftv = false;
},
moveright: function (buttonright) {
this.moverightv = true;
},
moverightend: function (buttonrightend) {
this.moverightv = false;
},
movejump: function (buttonjump) {
if (!this.estanoar){
this.movejumpv = true;
}
},
movejumpend: function (buttonjumpend) {
this.movejumpv = false;
},
update (dt) {
if(this.gravidade){
this.node.y += -200 * dt;
}
if(this.moveleftv){
this.node.x += -200 * dt;
}
if(this.moverightv){
this.node.x += 200 * dt;
}
if(this.movejumpv){
var jumpUp = cc.moveBy(0.6, cc.v2(0, 40)).easing(cc.easeCubicActionOut());
var jumpDown = cc.moveBy(0.6, cc.v2(0, -38)).easing(cc.easeCubicActionIn());
var seq = cc.sequence(jumpUp, jumpDown);
this.node.runAction(jumpUp);
}
},
});

  1. Add the move script to the player. Drag the three buttons to the script window. Drag the player’s node as well.

  1. Play simulator.

Can someone help me with the code, so that it doesn’t cross obstacles.

Posts: 1

Participants: 1

Read full topic

WebP images are not compiled

$
0
0

@Lestrigon wrote:

Hello, everybody, we have a lot of pictures in our project, and since we need both webp and png format depending on the browser, we have set the settings for the images on the build of these two formats at once.

The problem is next - Dynamic Atlas connects everything into huge images, without webp, and the images are used on different scenes and I do not need him to load everything at once, as it is happening now.

Are there any ways to turn it off? The Dynamic Atlas module has already been disabled in the project settings. All pictures have been unchecked packable, the checkbox in the build on Merge all spriteframe inline has been removed.
Nothing helps, it collects huge png carts and does not create webp.

The problem would not be significant, but it doesn’t create webp files for its files, which is a huge problem.

The build for the web-desktop platform, version CocosCreator 2.3.2

Posts: 1

Participants: 1

Read full topic

Viewing all 17112 articles
Browse latest View live


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