After months’ hard work, we are excited to announce that, cocos2d-x metal-support alpha0 version is released. Because we don’t determine the version name, so i just call it metal-support. You can join the ticket to discuss the new version name.
How to run
You can get the source code by clicking the url or use git to clone the codes from the github. If you choose to clone from github, then you should be care about these things:
the repo is https://github.com/cocos2d/cocos2d-x
the branch name is metal-support
the corresponding commit hash is 8d9bd925c94ad47268c8790369c750d3598978cc
Since Visual Studio projects are removed, so you should use Cmake to generate Visual Studio projects first. Can refer to the doc for detail usage.
Currently, only cpp-empty-test and cpp-tests work, and we don’t test linux platform too.
/home/jason/Cocos/metal-support-alpha0/cocos/audio/linux/AudioEngine-linux.cpp: In member function ‘bool cocos2d::experimental::AudioEngineImpl::init()’:
/home/jason/Cocos/metal-support-alpha0/cocos/audio/linux/AudioEngine-linux.cpp:100:25: error: ‘schedule_selector’ was not declared in this scope
scheduler->schedule(schedule_selector(AudioEngineImpl::update), this, 0.05f, false);
^~~~~~~~~~~~~~~~~
/home/jason/Cocos/metal-support-alpha0/cocos/audio/linux/AudioEngine-linux.cpp:100:25: note: suggested alternative: ‘scheduler’
scheduler->schedule(schedule_selector(AudioEngineImpl::update), this, 0.05f, false);
^~~~~~~~~~~~~~~~~
scheduler
[ 37%] Building CXX object engine/cocos/core/CMakeFiles/cocos2d.dir/ui/CocosGUI.cpp.o
Hey @zhangxm , I tested metal backed alpha version in one of our game “Block Kitty”.
Tested on iOS & Mac
iOS device: IPhone 6 Latest iOS
Mac: MacBook Pro Late 13 Latest OS
Issues: #1 Game is overall slow, especially when there are many nodes. #2 Particle animations & node actions are laggy. May be same #1 issue. #3 ProgressBar blinking forever after adding ProgressTo animation. Tested on Bar & Radial type.
API Changes:
Scene::initWithPhysics(); missing
Texture2D::setTexParameters(params); not working
Yep, i see. It is because CC_USE_PHYSICS is set to 0 in ccConfig.h. We haven’t tested physics very much, this macro will be turn on when releasing stable version.
@zhangxm I created a new project using “cocos new” command, then replaced Resource & Classes. I didn’t modify any codes. The following is the code that not working.
I cloned from https://github.com/minggo/cocos2d-x metal-support. Then downloaded console & libs. setTexParameters is not available. Compile error for me
As i mentioned, you should checkout corresponding commit id: 8d9bd925c94ad47268c8790369c750d3598978cc. Could you please should me your repo history by git log?