Cocos2d-x v3.12 released!

@zhangxm I had started another thread on this issue:

@schngrg creator uses another version of cocos2d-js engine, and it uses its own format comment that can be parsed in runtime. And i use the parsed result to generate a typescript declaration which makes intellisense work.

@netunlimited about c++ support for cocos creator and Apple TV support, let’s ask @ShunLin.

1 Like

@zhangxm OK, thanks for this information. It is really a vscode limitation because webstorm is able to do autocomplete and cmd+click directly from .js files for cocos2d-js, without needing any configuration or TS definitions.

Does the team plan to add similar comments and TS definitions support for the standalone cocos2d-js engine?

I tried to look at the cocos2d-js engine in cocos creator and there are some interesting changes and improvements in the engine, like in the way classes are defined. For a new cocos2d-js project, should we use standalone cocos2d-js engine or the engine in cocos creator (as a standalone engine without creator)?

We are not using Creator due to how we have implemented our project in C++ and we plan to follow similar structure with JS. For example, we need device orientation change support and defining sprite position and sizes based on physical screen size. We dynamically calculate the sprite size/position values using device DPI and screen size, and we change the design resolution to match screen size on orientation change or browser resize. It looks like with cocos creator we will need to choose a fixed design resolution and specify sprite size/position in pixels. In code we can specify things like “sprite.y = winSize.y-10;” or more complicated calculations based on device DPI.

As in our case all size/positions are to be set in code, then I am not sure if using creator will help because we won’t be able to use it for designing etc. I am slightly confused by all the ‘good’ options that cocos2d family gives. Our current project is in cocos2dx c++ and we are reimplementing it in cocos2dx-js for web support using the standalone js engine. Should we instead use the 1) creator or 2) the creator’s js engine (as a standalone engine without using the creator IDE)?

Anothor: You can use utils::captureNode to capture Scene or any other(Node, Sprite, Button, etc) and store to disk with any scale.

@schngrg if you are developing for web games, then i suggest you using creator, things will be easy.

On Android 5+ device, now cocos 3.12 will auto hide the navigation bar, if you use TextField to show a virtual keyboard, then press virtual button to hide the keyboard, the navigation bar will not hide automatically.
the other thread

How to use android-studio project with precompiled libs? I’ve generated them using “cocos gen-libs”, then I modified “settings.gradle” and placed absolute path to libcocos2dx project. Next, I modified “build-cfg.json” like this:

{
    "ndk_module_path" :[
        "/Users/piotr/Documents/pierdoly/cocos2d-x-3.11.1",
        "/Users/piotr/Documents/pierdoly/cocos2d-x-3.11.1/cocos",
        "/Users/piotr/Documents/pierdoly/cocos2d-x-3.11.1/external",
        "/Users/piotr/Documents/pierdoly/cocos2d-x-3.11.1/cocos/prebuilt-mk"
    ],
    "copy_resources": [
        {
            "from": "../Resources",
            "to": ""
        }
    ]
}

And ofc I’ve removed cocos2d directory from the project.

And I’m getting an error:

make: *** No rule to make target `/Users/piotr/Downloads/GradleTest/proj.android-studio/../cocos2d/cocos/editor-support/cocostudio/CCActionFrame.cpp', needed by `obj/local/armeabi/objs-debug/cocostudio_static/CCActionFrame.o'.  Stop.
make: *** Waiting for unfinished jobs....
[armeabi] StaticLibrary  : libcocos2d.a
make: Leaving directory `/Users/piotr/Downloads/GradleTest/proj.android-studio/app'
Error running command, return code: 2.

What’s missing?

1 Like

Ok, I forgot to modify Android.mk and add $(call import-module,./prebuilt-mk) (and remove old ones)

Is this a Label / Text bug?
Just testing SDKBOX Google Play on ASUS Nexus 7 (2013).

_labelPlayId->setString(getGameCenterAccountId());

W/Adreno-ES20: <__load_uniform_float:849>: GL_INVALID_OPERATION
D/cocos2d-x debug info: OpenGL error 0x0502 in /Development/cocos2d-x-3.12/tools/simulator/frameworks/runtime-src/proj.android/../../../../../cocos//./renderer/CCTextureAtlas.cpp drawNumberOfQuads 689

@zhangxm when will cocos2d-js support tizen bros???

@Pantoo there is no plan to support cocos2d-js on Tizen.

@zhangxm Sad to hear that. And …willlcocos creator support windows phone in the future?
Additionally, we are facing this isssue when trying to build android version. Please help us, the isssue is here: https://github.com/cocos2d/cocos2d-x/issues/16169
thanks so much

@Pantoo i don’t know the plan of creator. Let’s ask @ShunLin about it.

I just upgraded my JS project from v3.11 to v3.12 and had bug with loading remote textures :

Say my game is on http://www.mydomain.com/ and I do :

sprite.loadTexture("http://www.remotedomain.com/image.png");

The URL that is trying to be loaded is : http://www.mydomain.com/http://www.remotedomain.com/image.png

I found this commit to be resposible, in file TexturesWebGL.js line 918.
Please fix this.

Instructions?

I think we can handle that. Let me find where they are.

I am still using v3.10 . I am scared to update it because i have done modification to the render texture and sprite source files. I had some issues in Windows universal apps running on Microsoft phone devices (windows 10) . We are heavily using Render Texture and for some reason the new polygon instead of quads for sprites were causing huge performances issues when used with Rendered Texture. Is the issue been fixed . here is the link if anyone wants to replicate the problem. I had to change the code so that it had to use old quad code instead of the triangles to solve the problem. Still not sure exactly what was the problem. (Solved) RenderTexture is very slow on 3.7+ versions

This is what the engineering team referred me to: https://developer.android.com/google/play/expansion-files.html and also mentioned that it can only be used with Google Play.

Hello, can you tell me what “** fixed Android performance issues*” covers? Is this directed at devices with version 6.0+? I’m having touch related issues exclusively with my S7 with 6.0.1. I have a game loop on a separate thread, when touch input is happening I get much faster game loop cycles, when touch input is not happening more cpu is used and I get slower cycles (4-5ms per frame when there is touch input, and 10-14 when there’s no touch input). On other devices (S3, and an older samsung tablet this is not happening at all).

when i try to test the app in real android device it says “unfortunately app has stopped”
please help me .