Quantcast
Viewing all 17103 articles
Browse latest View live

Low frame rate issue

@mhmtemnacr wrote:

Hi. Im making a game using cocos2dx 3.17.2 (on android)

The game is not running smoothly, fps is low. Especially on some devices.

There is too much code inside schedule( … ) functions but i doubt its the reason of low fps.Im running game in debug mode and all sprites have separate texture files, if it matters. Please help me to find a solution

Posts: 3

Participants: 2

Read full topic


"evalString" function is missing (JS function call from Objective C)

@keyurdoshi wrote:

Hello @slackmoehrle @Big_Bear ,

I want to call JS function of cocos creator (version 1.8.2) from objective C (xcode).
Also tried this [https://stackoverflow.com/questions/27224765/how-to-call-cocos2d-js-method-from-objective-c]

But as mentioned in that link "#include “cocos/scripting/js-bindings/manual/ScriptingCore.h” i include this in my header file but it didn’t recognise “evalString” function in that path.
This function is missing in that class.

Please help me to figure it out how to manage JS function call from Objective C.

Thanks

Posts: 1

Participants: 1

Read full topic

Problem with bitmap font

@baontg93 wrote:

I packed all my font into 1 atlas.
With version 2.1.1 and earlier, it work correctly.
However today, I updated cocos up to 2.1.2, the label only render 1 font, I tried with 2.1.3 beta still same issue.
Please help me!!!

The correct font must be like this:

This is my issue:

The altas:

Posts: 1

Participants: 1

Read full topic

Physics behave different in iphone and ipad air simulator

@chiragkevadiya wrote:

cocos2dx 3.17.1 version
(chipmunk physics and Box2d physics )
i just create 1 ball body and apply velocity Vec2(0,100);
in iphone simulator when i apply velocity ball is jump up to middle of the screen but in the ipad air simulator it behave not like this

in ipad air simulator it jump up to 1/4 part of screen.
i try lost of diff diff things but not working i am stuck in this please someone help me

i also try box2d but the problem is same in box2d also.
@slackmoehrle @smitpatel88

Posts: 3

Participants: 2

Read full topic

How to create a simple spin wheel using cocos2d-js?

@mehedi wrote:

Hi there! I am just learning cocos2d js. I know how to move/rotate/jump a sprite. Now I want to create a spin wheel by using cocos2d js but I am confused about logic. How can I create this? Is here anyone who can help me please? I will be really grateful. Thanks in advance.

Posts: 1

Participants: 1

Read full topic

Cocos2dx linux cannot find libglew

@gustxw wrote:

Hello,
I am using cocos2dx on linux
When I run command
cocos run -p linux
I get

/home/gust/Desktop/myproject/bin/debug/linux/myproject: error while loading shared libraries: libGLEW.so.2.1: cannot open shared object file: No such file or directory
Error running command, return code: 127.

i tried installing libglew with sudo apt
and putting libglew2.so path with set in cmakelists and the beginning for include and lib and tried putting the path in my .profile also and tried copying a downloaded glew folder into the executable folder but it gets overwritten when i run the cocos run -p linux command anyway i dont know how to fix this anymore

Posts: 4

Participants: 2

Read full topic

Can we remove TIFF in v4?

@zhangxm wrote:

It seems TIFF is not used in games, and i can not find any TIFF related issues. Can we remove it in v4? I create this ticket because i found some test cases in cpp-tests use TIFF. But i am not sure if it is really needed.

Posts: 4

Participants: 3

Read full topic

[Game] - Lets Toast - Facebook Instant Game

@atr_toru wrote:

Hi everyone!

I have released Lets Toast for Facebook Instant Game using Cocos Creator.

Cocos Creator is an amazing tool and I want to thank everyone at the Cocos Team!!

Posts: 1

Participants: 1

Read full topic


EditBox,android problem

@ndmh wrote:

Hi everyone! I have a problem with editbox on cc1.10.2.On some androdi device,when I using default keyboard, i just type one character,when I type next character,the first one is delete.
Do some one have same problem!!

Posts: 1

Participants: 1

Read full topic

MacOS - (Possible Fix) linker command failed with exit code 1

@OrganFarmer wrote:

Hello, I’ve seen this error appear on the forums more than a handful of times, so I thought I’d share my own method of fixing it. Warning: The reason for this error is many sided, and my reason was due to a rookie mistake. This post is simply meant to inform someone who might be making the same mistake.

While running through the tutorial pages, I was able to successfully install and build the HelloWorld program. However, the 2nd tutorial (Decepticon sprite) seems to resolve to the following error when I build the application:

Undefined symbols for architecture x86_64:
  "BlahBLahblAh", referenced from:
      AppDelegate::applicationDidFinishLaunching() in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

This is a highly ambiguous error. For me, after about 2 hours of despair, I discovered that the problem was that XCode doesn’t update the source files and folders within its file navigator… You’re supposed to bring files into the project manually. I’ve never used XCode before, so I was writing my code in a separate IDE and and just using XCode as my builder; therefore it was not detecting any of the changes I had been making to the project directory from my separate IDE.

Thankfully this is the only error I’ve encountered thus far and I feel like I got it easy up until now. Let’s hope that trend continues!

Posts: 1

Participants: 1

Read full topic

EditBox Android question/problem

SDKBOX facebook listeners not working

@TheKeeper wrote:

I dont know what I am doing wrong, but my facebook listeners ONlogin, onAPI , onPermission etc are not triggering after login. Even straight logic as below is not working… I tried also in app.js.

Facebook logic is working, but the listeners are not…

sdkbox.PluginFacebook.init();
sdkbox.PluginFacebook.setListener({
  onLogin: function () {
    console.log("Login listener called");
  },
  onPermission: function () {
    console.log("onPermission listener called");
});


sdkbox.PluginFacebook.login();

//I tried this also
sdkbox.PluginFacebook.requestReadPermissions(['user_friends']);

Posts: 1

Participants: 1

Read full topic

How to handle runtime resolution change on Android

@mariano_ps wrote:

Hey, I’m trying to handle switching resolutions from Settings on Android while the game is running and after some experimenting I haven’t found out how to do that.

So you can see what I’m trying to do, I built the CppEmptyTest from the Cocos repo. When I run the game, it looks as expected (the black stripe on the left is just because of the screen cutout, don’t worry about that):

Then, while the game is running, I go to settings and change the screen resolution from 1520x720 to 3040x1440:

When I go back to the game, the result is this:

If I kill the app and start it again, it works fine, so it’s not a problem of handling multiple screen sizes, that works as expected. But how can I handle the resolution changing while the game is running?

There are some callbacks where I can detect the change but I don’t know how to handle it. Probably the GL surface needs to be recreated or at least the scale factor needs to be updated, but I’m not sure how to do that and several things I’ve tried either end up crashing the app or have no impact at all.

Is anyone handling this properly in their games? Any help is appreciated. Thanks!

Posts: 1

Participants: 1

Read full topic

[Game][Android] SlideBlock - Line Remove Puzzle

Jump Script Error


How to access Atlas property of Sprite listed in Editor

@georgeneversleep wrote:

Hello. I can not find out how to access Atlas property which is listed in Editor for Sprite component.
Image may be NSFW.
Clik here to view.
fire*%202019-09-01%2014-42-13

I know how to load atlas using cc.loader.loadRes, but it looks i should not load is twice if it already was loaded.

Thank you in advance.

Posts: 1

Participants: 1

Read full topic

How to debug using intelliJ?

iOS: TMS-90809: Deprecated API Usage - UIWebView

@kds wrote:

Hi there,

After I uploaded new test build to AppStore I got a message:

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

I disabled UIWebView usage in cocos WebView classes, but message is still there.

Any hint?

Thanks,
kds

Posts: 1

Participants: 1

Read full topic

How to publish android app 64 bit cocos creator

@pacear10 wrote:

Hello everyone I use Cocos Creator V2.1.1, I try to upload an app to the Google store, but it says it must be 64 bit, which I must configure

Image may be NSFW.
Clik here to view.

Configure In gradle.properties:
PROP_APP_ABI = armeabi-v7a: arm64-v8a

Aditional
Image may be NSFW.
Clik here to view.

Compile correctly, but does not allow upload to store

Posts: 1

Participants: 1

Read full topic

BUG: texture.readPixels() returns 0 on android(Cocos Creator 2.0.10)

@ivarsbergs wrote:

Hi, starting from version 2.0.10 there is a problem with this script on android. This script cuts out ar rounded rectangle form from texture(confusing circle cut naming is because before that it did cut circle). In 2.0.10 version it still works in simulator and on web, but when I tested on 2.1.2 it also didn’t work in simulator. Could you please tell me should I use different approach? It works in 2.0.9, but I don’t want to be stuck with this version of Cocos Creator.

        if (cc.circleCutRTex == undefined) {
            cc.circleCutRTex = new cc.RenderTexture();
        }
        let rtex = cc.circleCutRTex;
        //if ((rtex.width != tex.width) || (rtex.height != tex.height))
        rtex.initWithSize(tex.width, tex.height, 0);
        rtex.drawTextureAt(tex, 0, 0);
        //!!!read pixels returns zeros on Android and in later versions(2.1.2) in simulator
        let data = rtex.readPixels();
        let rSquared = Math.pow(tex.width / 2, 2);
        for (let y = 0; y < tex.height; y++) {
            for (let x = 0; x < tex.width; x++) {
                let offset = (y * tex.width + x) * 4;
                if (Math.pow(x - tex.width / 2, 2) + Math.pow(y - tex.height / 2, 2) > rSquared) {
                    data[offset + 3] = 0;
                }
            }
        }
        tex.initWithData(data, cc.Texture2D.PIXEL_FORMAT_RGBA8888, tex.width, tex.height, new cc.Size(tex.width, tex.height));
        return tex;

Posts: 1

Participants: 1

Read full topic

Viewing all 17103 articles
Browse latest View live


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