Metal support beta0 released

Metal support beta0 released
0

@bilalmirza I’m attaching the Cocos2d-x Spine C++ runtime that I’m using at the moment, and I’ve made it work for both V3 and V4 of Cocos2d-x (due to some magic in the /spine-cocos2dx/CMakeLists.txt).

Check the readme.txt file that’s in the zip file for how to integrate it with your game. Extract the contents so that they are at the same level as your Classes folder.

So it’ll be like this:
[your game path]/Classes/
[your game path]/external/spine etc.

SpineCPP_Cocos2dx_V3_V4.zip (341.1 KB)

I hope that helps.

2 Likes

@bilalmirza i think we can just keep the PR, and will not merge it into cocos2d-x because of the license. As using cmake, it will be easy to integrate it. And we will write a docs about it. About the working issue, i asked @PatriceJiang to take a look.

@R101 great work.

// add this after the line “target_link_libraries(${APP_NAME} cocos2d)”
this line doesn’t exist in metal support beta

I don’t understand what you mean? I checked the /templates/cpp-template-default/CMakeLists.txt, and I can clearly see that it does exist, at line 126:

target_link_libraries(${APP_NAME} cocos2d)
target_include_directories(${APP_NAME}
        PRIVATE Classes
        PRIVATE ${COCOS2DX_ROOT_PATH}/cocos/audio/include/
)

This is the template that is used to generate the game project folder using the cocos new ... command.

As I stated in my previous post, the files I attached need to be extracted into your game folder, where the CMakeLists.txt exists, the one you need to edit.

oh sorry I don’t know how i missed that :sweat_smile::sweat_smile::sweat_smile:

Please dont Remove the JSB please keep it for v4 also .

1 Like

sorry , but is there any reasons for removing JSB, It gives developers more option and freedom to customize their game, so please rethink this, it will be a life saver for many devs like us .

1 Like

@ashishfeels it is because of resource limitation. We don’t have enough resource to maintain it. Adding JSB support means should keep all supported platforms + JSB works, and should keep the effect of JSB and html have the same effect. It is very hard.

me and my community and also lot more like uses jsb a lot for integrating many 3rd party libraries/plugin this would certainly be a set back for us. I really hope for any slight bit of chance to keep it this makes cocos a really awesome platform for devs from different languages. we are really so thankful to you guys working behind the scene. Love from india btw.

do all changes in v4.0 beta0 available in cocos2d-x git branch “metal-support”?

Yep, it is. And will rename to v4 soon.

2 Likes

My Congratulations! It was really your good idea to separate low level backend from basic engine.
One notice about removing JSB. Creator became more significant in result of this deсision!
But one thing. How about issues between V3 and V4? As I can understand issues for V3, in many cases, should be fixed for V4 also? For example #19923 can be fixed for V4.

Yep, we will synchronize the modification to v4.

1 Like

Except from metal, what other changes does v4 contain vs latest 3.17?

No more features added, but make the codes more clean, such as:

  • remove deprecated codes
  • remove JSB/h5
  • use cmake for all platforms

@zhangxm Can you support normal xcode project as well? cocoapod is not working with cmake template.

@kiranb47 did you mean provide xcode projects as v3? If so, then i think we will not provide it as make a lot effect to use cmake for all platforms to easily maintain multiple platforms.

What’s the error of it? I think we can just fix the issue.

@zhangxm Ok. Yes i meant like v3 format. Issue is not linked with any cocos code. but any way not successfully building.

How to test it? I am not familiar with cocospod.

Install Cocoapod
Put this following Podfile into ios-build directory
Set correct “target” name inside Podfile
cd ios-build
pod install
You may see 3 warnings: to include ‘$inherited’ flag in 3 build settings.
Add those flags
Run pod install again.Podfile.zip (791 Bytes)
proj.xcworkspace will now be created
Open that file and try build it.