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

Global Font Selection for i18n in Cocos Creator

$
0
0

@RonnieBits wrote:

When player switches to another language(even if local) accordingly all the labels should use the global font to support local language font

This feature would be greatly helpful while using i18n. Is this feature available in latest Cocos Creator Version(v2.1.2) ?

Posts: 1

Participants: 1

Read full topic


App Downloaded from Play Store Crash

$
0
0

@zx12a1 wrote:

I have published a simple game to learn the process, Popprz, on both Apple and Google.
The app runs happily on some devices, Huawei P10 & Samsung Galaxy 10 for example, but crashes on a Samsung S6 & Honor 8 Pro.

When I try to debug the issue I find I can happily decode the same app on, for example, the Samsung S6 - no problems.

Can anyone suggest how I should try and identify the problem(s)?

Thanks

Posts: 1

Participants: 1

Read full topic

cc.Label - Kerning / Letter spacing

Crashes on Samsung

$
0
0

@CrazyHappyGame wrote:

Hi,

Mostly Samsung devices S10+, Note9, A7.
Crashes started ~12 Sep.
Does any one have idea why my app has lots of crashes in Google Play with below backtrace?

backtrace:
  #00  pc 00000000004b2524  /system/lib64/libhwui.so (SkTStack<SkRasterClipStack::Rec>::~SkTStack()+52)
  #01  pc 00000000004b2488  /system/lib64/libhwui.so (SkBitmapDevice::~SkBitmapDevice()+36)
  #02  pc 000000000047429c  /system/lib64/libhwui.so (SkCanvas::internalRestore()+732)
  #03  pc 0000000000477370  /system/lib64/libhwui.so (SkCanvas::~SkCanvas()+52)
  #04  pc 0000000000155c18  /system/lib64/libhwui.so (SkCanvas::~SkCanvas()+16)
  #05  pc 00000000004aeef0  /system/lib64/libhwui.so (android::SkiaCanvas::~SkiaCanvas()+208)
  #06  pc 00000000001505e0  /system/lib64/libhwui.so (android::SkiaCanvas::~SkiaCanvas()+16)
  #07  pc 000000000007dc20  /system/framework/arm64/boot-core-libart.oat (java.math.NativeBN.BN_copy [DEDUPED]+160)
  #08  pc 000000000013826c  /system/framework/arm64/boot-core-libart.oat (libcore.util.NativeAllocationRegistry$CleanerThunk.run+76)
  #09  pc 000000000037fb74  /system/framework/arm64/boot.oat (sun.misc.Cleaner.clean+132)
  #10  pc 000000000018e2cc  /system/framework/arm64/boot.oat (java.lang.ref.ReferenceQueue.enqueueLocked+236)
  #11  pc 000000000018e3ec  /system/framework/arm64/boot.oat (java.lang.ref.ReferenceQueue.enqueuePending+172)
  #12  pc 0000000000185704  /system/framework/arm64/boot-core-libart.oat (java.lang.Daemons$ReferenceQueueDaemon.runInternal+244)
  #13  pc 0000000000112e7c  /system/framework/arm64/boot-core-libart.oat (java.lang.Daemons$Daemon.run+76)
  #14  pc 000000000025e1c8  /system/framework/arm64/boot.oat (java.lang.Thread.run+72)
  #15  pc 0000000000557588  /system/lib64/libart.so (art_quick_invoke_stub+584)
  #16  pc 00000000000cfcc8  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
  #17  pc 000000000045e1e8  /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
  #18  pc 000000000045f2a4  /system/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue*)+424)
  #19  pc 000000000048a6c4  /system/lib64/libart.so (art::Thread::CreateCallback(void*)+1120)
  #20  pc 0000000000083840  /system/lib64/libc.so (__pthread_start(void*)+36)
  #21  pc 0000000000023d80  /system/lib64/libc.so (__start_thread+68)

Regards,
Chp

Posts: 1

Participants: 1

Read full topic

What about the CC prefix?

$
0
0

@digimikeh wrote:

Hi.

I´m currently checking some examples, a lot of people uses CC prefix… for instance

cocos2d::CCSprite * _mySprite{};

rather than…

cocos2d::Sprite * _mySprite{};

What is the difference?
Thanks!

Posts: 1

Participants: 1

Read full topic

MSVCR120.dll missing on cocos creator windows built

$
0
0

@chololunaria wrote:

Hi Guys,

I created a windows installer from cocos creator then VS2017 to create an installer.

After installation, Some windows version does not have the missing dll issue some pops up a message saying MSVCR120.dll missing.

Anyone encountered the same issue and fixed it?

Thanks

Posts: 1

Participants: 1

Read full topic

Game is not smooth

$
0
0

@mhmtemnacr wrote:

Im making a game using cocos2dx 3.17.2. The problem is that game doesnt run smoothly and i couldnt find a solution (tried many things). Screen is flickering on both android and win32.

Visual studio profiler tells schedule function is taking time. i have this code in scheduled function:

    void HelloWorld::scrollScene(float dt) {
        .......

        pos1 = sprSceneback1->getPosition();
     	pos2 = sprSceneback2->getPosition();

	    pos1.x -= scrollSpeed*dt;
	    pos2.x -= scrollSpeed*dt;

        sprSceneback1->setPosition(pos1);
        sprSceneback2->setPosition(pos2);
     }

I have 2 background sprites and they are constantly scrolling.

How can i fix this problem, sorry for my bad english

Posts: 3

Participants: 3

Read full topic

Have anyone integrated Photon SDK in Xcode/iOS?

$
0
0

@jeevs wrote:

Hello All,

I tried to integrate Photon SDK in Xcode with this tutorial:


(it’s in japanese please check the link with translation)

I followed all the steps mentioned but while building this error occurs:
fatal error: ‘Common-cpp/inc/Common.h’ file not found

Though I have put path/links in the build settings as suggested but it can’t find the files related to the Photon SDK while building.

Please help!!!

Posts: 1

Participants: 1

Read full topic


Cocos creator multi touch problem

$
0
0

@Eliteman wrote:

I encountered this problem the second time. The problem is that “touchstart” event doesn’t get the touch count.
Only “touchmove” gets the touches.
Did anyone encountered and solve this problem?
I hope I could get the multi-touch(touch count) from touch start event.

Posts: 1

Participants: 1

Read full topic

Engine library doesn't load on the browser

$
0
0

@nonocut wrote:

Hi,

Non-Latin characters are not truncated properly so I changed the fragmentText() function to truncate on white space. file is in:

“C:\CocosCreator\resources\engine\cocos2d\core\label\CCTextUtils.js”

The problem is that I see the changes in Cocos Creator editor and the text is truncated as I want, but I see no effect on the browser as the function is never called.

Why possibly is wrong? Thanks.

(I use Cocos Creator 1.10 but also have 2.1.1 installed in C:\CocosCreator_2.1.1)

Posts: 1

Participants: 1

Read full topic

[Game] Magic Words

GPU bottleneck in Android version of our game

$
0
0

@floco_millo wrote:

Hi folks,

I’m porting a 2d game from iPhone to Android which is based on cocos2d-x. The game works perfectly in iPhone but I’m finding very bad performance issues in Android. The game in iPhone employs cocos2d-x 3.11 because the development was started some time ago. In relation to the level design, we used level helper (https://www.gamedevhelper.com/) and for sound effects and music we use Cricket Audio https://www.crickettechnology.com/. Now we are trying to port it to Android, and we updated cocos2d-x 3.11 to cocos2d-x 3.17-2. The game builds fine in the last version of Android Studio (3.5) with the last NDK. We think that we have a bottle neck regarding the GPU, because in the Android version the number of GL calls has doubled (using the same code). We observed that GL calls increase when the scenes employ Box2d, for example, in the main menu the GL calls are around 10 and during the game (when Box2d is being used) they are 70-80 while in iPhone version they only increase to 30-40. We tried to solve this by employing different Box2d versions (including compilating the source code from github and prebuilt ones) but it didn’t work. We also used several CPPFLAGS in the Application.mk but we didn’t succeed.

I think that the problem is not in the game code because the gl calls are always twice in Android than in iPhone and we are using Atlas for textures.

Please, if anyone has any idea about what is happening here, I will be glad to know your thoughts.

Also, can you please suggest me how to profile the GPU in Android studio?

If you want to see a trailer of the game for iPhone here is the link. I hope you enjoy it :smiley:

Posts: 4

Participants: 4

Read full topic

Problem with pageview in wechat game

$
0
0

@Eliteman wrote:

Hi. I have set a pageview and it works well in creator in both simulator and brower view.
The problem is when I built it as wechat game, the page view only shows first page and I can’t slide it.
Indicator also disappeared.
Anyone can help me solve this problem? I really need to make something like pageview. Do I have to make it manually?
This is the first time that I use the pageview. So I’d be very thankful for any tips and advises.

Posts: 5

Participants: 3

Read full topic

Unit tests for an Android App

$
0
0

@doom_monsta wrote:

Does anyone here have any experience creating unit tests for a project built in Android Studio? If so what’s your suggested test framework? Also what are your experiences?

Posts: 1

Participants: 1

Read full topic

Spine 3.8 support


[SDKBOX] Cannot install plugin because of app name

$
0
0

@fitzfoufou wrote:

Hi,
I am new to Sdkbox (and Cocos too). Sorry in advance. :blush:
I installed Sdkbox but when I install a plugin :

sdkbox import review

I get :

#FATAL: [Errno 2] No such file or directory: '/Users/francois/Documents/1.Dev/lnj_apps_eval/proj.android/app/AndroidManifest.xml'
 Installation failed :(

This comes from the fact I renamed my app to “app-xxxx” (in gradle.settings). So the AndroidManifest is not in app directory but in app-xxxx directory.
Anyone knows how to fix this ?
Many thanks !

Posts: 1

Participants: 1

Read full topic

8 Great Platforms For Your Hypercasual Game

Understanding nodes

$
0
0

@digimikeh wrote:

H friends…
I´m reading the official docs and i´m very happy the completeness it has, by the way, i got a regarding to node’s question:

Do nodes are a kind of that what is called on Unity empty gameobjects?

Posts: 3

Participants: 2

Read full topic

Catch The Star - Bringing custom levels to a mini game

Binding a custom type within inspector

$
0
0

@yanivtobi wrote:

Hello,

I am trying to bind (two way) a data from the inspector package into a custom component like this:

inspector.js

Vue.component ('inspector', {
  template: `
  
  <ui-input v-value="target.myNum.value"></ui-input>

  <p>Colors</p>
  <template v-for="color in nodeTarget.colors.attrs.default">
    <p>{{color.color._val}}</p>
    <ui-input v-value="color.right"></ui-input>
  </template>
  {{displayColors}}

  `,
  data: function () {
    return {
      nodeTarget: this.target
    }
  },
  computed: {
    // a computed getter
    displayColors: function () {
      // `this` points to the vm instance
      console.log('this.target',this.target);
      console.log('this',this);
      Editor.Ipc.sendToMain('test:foo-bar', 'Hello, this is simple panel');
      //return this.target.colors.attrs.default
    }
  },
  props: {
    target: {
      twoWay: true,
      type: Object
    },
  },
});

my component (inspector-test.ts):

const {ccclass, property, inspector} = cc._decorator;

@ccclass("Gradient")
class Gradient {
    @property()
    color: cc.Color = cc.Color.BLACK;

    @property({ slide: true, range: [0, 10, 1] })
    right: number = 0;

};

@ccclass
@inspector("packages://test/inspector.js")
export default class tester extends cc.Component {


    @property([Gradient])
    colors: Array<Gradient> = [{
        color:cc.Color.BLACK,
        right:10
    },{
        color:cc.Color.BLACK,
        right:15
    }]  //new Array<Gradient>();

    @property()
    _myNum: number = 0;
    @property()
    get myNum(){
        return this._myNum;
    }
    set myNum(value:number) {
        this._myNum = value;
        console.log('ok')
        this.node.y = value;
    }

    start () { 
        console.log('10',this.colors);
    }
    
}
 

What am I doing wrong here?

Posts: 1

Participants: 1

Read full topic

Viewing all 17124 articles
Browse latest View live


Latest Images