December 15, 2019, 11:42 pm
@pganesh wrote:
Hello,
I’m currently working on a game which has to be integrated with react native. Thus, I will be using the cocos-2D-v3.13.js file as the engine.
I would have to support varied number of mobile devices and tablets. But won’t be targeting desktops.
I really need a pointer or two about multi resolution support.
I went through quite a number of posts about the same, but some of the links were dead. I have been working on corona-sdk for a while and I have clear idea about safe areas and multi-resolution support.
But my question is how do I do it in cocos-2D-js.
Are safe areas not a concern if I’m using canvas. How do I go about calling for prefixed assets such as 1x - normal sized assets. 2x - high resolution assets. 4x- retina resolution assets.
Please guide me in this regard
Thank you
Posts: 1
Participants: 1
Read full topic
↧
December 15, 2019, 11:43 pm
@syaifulnizamyahya wrote:
I want to create multiple menu scenes. Example, Im in main menu. i want to navigate to option menu. then i want to go back to main menu. whats the best practice here?
Maybe I create main menu scene from appdelegate. then i can create option menu and call
Director::getInstance()->replaceScene(OptionsMenuScene) from MainMenuScene class. if i want to go back, i can Director::getInstance()->replaceScene(MainMenuScene). provided that optionsmenuscene and mainmenuscene is global and already created/initialized. if for example, you would have multiple levels and each levels is a scene, it would not be nice if i have to create and initialize every levels when starting the application. it would be nice if the level scene is only created when you want to use it.
also, what happens to the scene objects that is being replaced? is it gone?
Posts: 1
Participants: 1
Read full topic
↧
↧
December 16, 2019, 11:14 am
@yunke wrote:
After solving the issues to make AdMob reward videos work (thanks @yinjimmy
see topic here: SDKBOX AdMob + Google Play Service) and after rolling the update to the Play Store, I am getting the following crash in some devices:
Fatal Exception: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/zzbq;
at com.google.android.gms.internal.zzcka.<init>(:3)
at com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver.onReceive(:6)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3636)
at android.app.ActivityThread.access$1400(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1878)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:7070)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:536)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:928)
I have read that it could be due to a versions mismatch issue, but on my devices is working fine (Xiaomi Android9 and BQ Android6), so I have no idea on how to debug this…
Cocos2dx version 3.16
SDKBOX v1.0.3.1
plugins: 2.5.0.5 (IAP, AdColony, AdMob, Firebase, OneSignal)
buildTools and compileVersion 28
minSdkVersion 23
dependencies:
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation project(':libcocos2dx')
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.9'
implementation 'com.crashlytics.sdk.android:crashlytics-ndk:2.0.2'
implementation 'com.android.billingclient:billing:2.0.1'
implementation 'com.google.android.gms:play-services-basement:16.0.1'
implementation 'com.google.android.gms:play-services-ads-base:17.2.0'
implementation 'com.google.android.gms:play-services-ads:17.2.0'
}
Any help will be appreciated, thanks!
Posts: 1
Participants: 1
Read full topic
↧
December 16, 2019, 1:33 pm
@MikeFromMars wrote:
Hi…,
cc.director.getVisibleSize() is depreciated in CC 2.2.1.
How to get the visible screen size?
Thanks
Mike
Posts: 1
Participants: 1
Read full topic
↧
December 16, 2019, 4:32 pm
@joelam500 wrote:
I have an issue related to scroll view. I put some menu items into scroll view. When I touch the menu item then I cannot move the scroll view. Do anyone know how to make it move while I am touching the menu item? Many thanks for the help, everyone.
Posts: 2
Participants: 2
Read full topic
↧
↧
December 16, 2019, 5:44 pm
@tdf0495 wrote:
Hello, I am a Korean developer.
I am making card games through TypeScript of Cocos Creator.
The problem is, I currently have to calculate the odds with my card, which takes approximately 600 ms to go through.
In the meantime, the rendering of the game is stopped.
I’m using Promise, but it’s the same.
What should I do?
Posts: 1
Participants: 1
Read full topic
↧
December 16, 2019, 9:07 pm
@syaifulnizamyahya wrote:
I read some people said that layer is irrelevant now. Some tutorial uses layer. Some not. Im starting a cocos2dx project with cocos2dx 4. Should I use layer or not?
Posts: 2
Participants: 2
Read full topic
↧
December 16, 2019, 11:57 pm
@ousaf wrote:
On first time loading the game nodes with body component shows correct position, see the following image, box is at cc.v2(100,100) at 500x500 screen size, small red box is at cc.v2(0,0) for reference
But when I update screen size to 700x500 then box auto update it’s position to cc.v2(-28, 100)
If I reload the page again the box will start showing correct position again
seems like rigid bodies listening for screen resize event and adjust their position accordingly
Without rigidbody component this behaviour not occurs.
Anyone knows how to fix it?
Posts: 1
Participants: 1
Read full topic
↧
December 17, 2019, 3:40 am
@syaifulnizamyahya wrote:
Are there any tutorial on physics for recent cocos2d-x?
I find the information here incomplete : https://docs.cocos2d-x.org/cocos2d-x/v4/en/physics/collisions.html
For example, what does this line do? Where can I find the function? I assume the first parameter is position but what is the second parameter?
auto sprite = addSpriteAtPosition(s_centre, 1);
This is my custom made function for addSpriteAtPosition.
Sprite addSpriteAtPosition(Vec2 loc)
{
auto sprite = Sprite::create("CloseNormal.png");
sprite->setPosition(loc);
auto spriteBody = PhysicsBody::createCircle(sprite->getContentSize().width / 2, PhysicsMaterial(0, 1, 0));
sprite->setPhysicsBody(spriteBody);
}
How to show physics debug mode?
Posts: 1
Participants: 1
Read full topic
↧
↧
December 17, 2019, 3:40 am
@kanelr wrote:
I am using Cocos Creator 2.2. I try to renderer a lot of objects in Dialog(like setting dialog, there are alot of thing there) and then every time i open this dialog then it is DEPLAY and LAG, CPU is so high. Therefore i use profile tool to check this problem then found a problem to be RENDER component. Every active node they will rescue all child note and drawing… How to resole this problem, this is effecting BAD for user friendly and experience, thanks for everyone!
Posts: 1
Participants: 1
Read full topic
↧
December 17, 2019, 4:32 am
@Chino9 wrote:
Someone who has compiled the fbx-conv for linux? or have a guide to compile, i try compile with premake4 but i have some problems:
I following this guide:
Guide complile fbx-conv for linux
If someone have a binary or new guide for compilation.
Thanks
Posts: 1
Participants: 1
Read full topic
↧
December 17, 2019, 6:40 am
@M4713 wrote:
I’ve tried building and running a cocos2d-x 4.0 project on Linux today and encountered the ages-old error (at runtime):
cocos2d/external/linux-specific/fmod/prebuilt/64-bit/libfmod.so.6: file too short
But that’s not the point of this thread.
It seems that cocos2d-x still uses FMOD audio engine on Linux platform even in 4.0. This is not okay for the kind of license cocos2d-x uses.
FMOD is no longer a free product. It has a free (indie) license type, but even that has several serious constraints. Here’s some excerpts from FMOD’s licensing page:
“Note: Free Indie License may only be used 1 time each 12 months. Additional use in that period incurs a fee of $2,000 per game.”
“To be licensed, you must register your project and display the FMOD logo on a splash screen in your game.”
Definitely not something you want to have in a default cocos2d-x build setup on any platform.
How come this pull request was not finished and merged yet?
Posts: 1
Participants: 1
Read full topic
↧
December 17, 2019, 1:44 pm
@joelam500 wrote:
This is the code of my server side:
![Capture]()
And I programmed the client side as below:
cocos2d::network::SIOClient* _sioClient = SocketIO::connect(“xxx.xxx.xx.xx:3000”, *this);
_sioClient->emit(“KKK”, “Test”);
But the server side cannot show the console log. Please help. Thanks.
Posts: 1
Participants: 1
Read full topic
↧
↧
December 17, 2019, 3:39 pm
@pacear10 wrote:
Hello everyone, I use sdkbox facebook, to log in to the app, the process seems to be successful, but I need to know how I can capture the user’s email once the loguin is complete?
When you ask for permission it indicates that my app can access the email, name and photo
Posts: 2
Participants: 2
Read full topic
↧
December 18, 2019, 2:17 am
@pganesh wrote:
Hello,
I have developed a sample game in cocos-js deployed as a web version.
I have been testing the game on multiple devices and it seems to be working fine.
But when it comes to iPhoneX and few devices with notch at the top, the touch seems to be off a little to the top.
Has anyone encountered this issue.
Please reply ASAP.
Posts: 1
Participants: 1
Read full topic
↧
December 18, 2019, 2:17 am
@digimikeh wrote:
Hi there!
if I understand well, i save into an int type an instance of an audio when i play it:
int bgm_main = cocos2d::AudioEngine::play2d("./bgm.ogg", true);
so i can set some properties like:
cocos2d::AudioEngine::setVolume(bgm_main, 0.7f);
but what is the way to play the same audio again?.. do i need to redo this?:
int bgm_main = cocos2d::AudioEngine::play2d("./bgm.ogg", true);
or can i usue bgm_main in other way?
Thanks
Posts: 1
Participants: 1
Read full topic
↧
December 18, 2019, 5:18 am
@gamingfrick wrote:
Samsung Galaxy J2 Prime (grandpplte), Android 6.0
Report 1
java.lang.RuntimeException:
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3319)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3415)
at android.app.ActivityThread.access$1100 (ActivityThread.java:229)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1821)
at android.os.Handler.dispatchMessage (Handler.java:102)
at android.os.Looper.loop (Looper.java:148)
at android.app.ActivityThread.main (ActivityThread.java:7406)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1120)
Caused by: java.lang.NullPointerException:
at org.cocos2dx.cpp.AppActivity.onCreate (AppActivity.java)
at android.app.Activity.performCreate (Activity.java:6904)
at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1136)
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3266)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3415)
at android.app.ActivityThread.access$1100 (ActivityThread.java:229)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1821)
at android.os.Handler.dispatchMessage (Handler.java:102)
at android.os.Looper.loop (Looper.java:148)
at android.app.ActivityThread.main (ActivityThread.java:7406)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1120)
Posts: 1
Participants: 1
Read full topic
↧
↧
December 18, 2019, 2:18 am
↧
December 18, 2019, 7:05 am
@Rolling_Panda wrote:
The game I have in iOS runs with 60FPS and runs smoothly. But in Android it is not working. How can it be fixed.
Ipad Video:
Android (One+)
Issue in Android:
Check the element after collision. The box jumps too high back in Android. But with same code it works well in iOS.
Posts: 1
Participants: 1
Read full topic
↧
December 18, 2019, 9:23 am
@Donmizzi wrote:
The question is as topic. I know Labels::CreateWithTTF supports reading .ttc fonts, but how do I access the other font strength that is in the collection?
thank you
Posts: 2
Participants: 2
Read full topic
↧