Metal support alpha1 released

@kerryk yep, good news, without supporting metal on simulator, i don’t know how to build it in CI.

Its confirmed that openGl will remain in ios13 and macos catalina. However, the presenter stated that “now is the time to move to metal” which i guess strong signals that most probably next year is possible that is removed. Relevant info can be found on “Bringing openGl apps to metal” video of wwdc 2019 as soon as it becomes available.

1 Like

While it may run poorly … I believe every Mac that can run Mojave can also run Catalina (except possibly Mac Pro 2010/2012 - though those might be able to hack it with Metal-capable gpu).

As we’re on wwdc topic… Does Mac OS Catalina support 32bit apps?

Notably, macOS Catalina does away with 32-bit app support

from Hands-On With macOS Catalina

I see that sucks. It means that I’m stuck on Mojave for a long time. I have tons of utility apps that are 32bit. Cocos studio is one of the examples.

I’d give a VM a try. If you don’t mind Mojave might as well keep using it for a few more years, but if you really want Catalina for your own sake, or because you want to use XCode 11 (not required for cocos2d unless you’re looking at SwiftUI or other new frameworks/APIs) at least see if a VM is performant enough for running your 32-bit apps.

(It would be nice if Cocos Studio source were released for those who still use it, since I can’t see any downside for whichever company currently owns it).

Edit: note that you can test this now by running Mojave VM on a Mojave host running system.

But VM demands a lot of resources, so it’s better to just stick to the current OS version. But in the future that may be an only option.

As for Cocos studio being opensourced @slackmoehrle already told me that it’s not an option.

Gotcha, yeah unless you’re needing the new frameworks/xcode11 stick with Mojave (or High Sierra even).

Note: You might be surprised at how well it runs inside a VM, granted my experience is using VMWare Fusion, so VirtualBox may not be as performant/supportive. You can always buy a cheap mini 2012/2014 if you don’t already have a 2nd machine.

I use Virtual Box almost exclusively now-a-days as Fusion usually costs me at least $79 each year. The performance is acceptable but I do allocate a large chunk of RAM to it and also using an SSD.

It’s also only $50 to upgrade, and you can easily skip a version or two. VirtualBox is great and all, but almost always behind in capability (their focus is server), but I’m not here to promote any specific VM tool(s).

I also use VBox, QEMU, and docker, and previously BootCamp (but dual-boot is a hassle).

My assumption is most dev Macs are SSD, 4+ core/thread, and 16GB+ RAM.
I’m often wrong :wink:

I felt this way too, but in actuality, if I upgraded my OS, VMWare always started having issues. If I kept my OS version back then I was fine. I’m still on 10.12 for one of my machines because VMWare Fusion is very stable and I house most of my VM’s there. I started with Virtual Box about 6 months ago and so far it is working well too. Same machine as VMWare Fusion even. I wanted to give myself 2 test beds and 2 ways to be productive if one stopped working reliably.

hmm, I have a new MBP with 32gb of RAM but I still do a lot of work on an old Air that is dual core with 8gb and a small 128gb ssd.

Weird, I’ve been running Fusion 8.5 for the last few macOS versions. There are probably minor oddities that I don’t realize I work around, but haven’t noticed any major issues. If VBox works, great. I used it exclusively when my main machine was windows.

I do actually try to avoid needing to use/run VMs as much as possible, so it was just an option. I would definitely recommend having access to a 2nd machine at some point if game dev is or becomes a part/full-time job. It’s nice to have a build/test machine. For me it’s MBP2015+Mini2012. I’m waiting to land another job or see a jump in game sales so I can finally upgrade the Mini in the fall (hoping they spec bump it).

The new minis are great! I played with one at an Apple store. My son works at Apple currently.

1 Like

While Dual-Booting has been mentioned if you’re using APFS you can apparently create a “shared” volume where free space doesn’t take up any actual storage like it does with regular partitions. This avoids one of the major pains of dual-boot if you don’t have tons of storage.

(last post on this I promise. I figure this topic has grown large enough and any new Metal Support discussion should probably move to an ‘alpha2 released’ topic.)

1 Like

Moving Cocos Studio files back and forth between two macs isn’t really a great idea.

Hi everyone,

I’m trying to test my current cocos project with the metal renderer. Here’s how I’m setting things up.

1.) Download and unzip metal branch.
2.) ./setup.py source ~/.bash_profile.
3.) cocos new MyGame -p com.your_company.mygame -l cpp -d DIRECTORY_OUTSIDE_BRANCH
4.) cd DIRECTORY_OUTSIDE_BRANCH/MyGame/proj.ios_mac
5.) cmake … -GXcode -DCMAKE_TOOLCHAIN_FILE=…/…/…/cocos2d-x-metal-support/cmake/ios.toolchain.cmake

Now I get the project to run and everything but my PROJECT_DIR and SOURCE_ROOT environment variable is one directory above the Xcode project.

You can check where yours is by running this command in the terminal:
xcodebuild -project MyGame.xcodeproj -target “MyGame” -showBuildSettings

I would then copy over my source and resource files from my current project.

How is everyone else testing their games with the metal render, and what is the correct way to setup the project so that the environment variables and everything is setup correctly?

Thanks!

@spicytomato where and how did you get the engine codes? And what’s the error? Can not build or what?

I downloaded the latest branch as a zip from GitHub. I also tried it with alpha1 zip. I was able to build and run fine.

However my Xcode PROJECT_DIR and SOURCE_ROOT variables were not set to the directory with the Xcode project, this causes errors with my dependencies since they rely on those variables to point to the folder with the Xcode project.

I’m not sure if those Xcode variables being incorrect is due to how I set up the build. that’s why I wanted to know how people are building and testing their existing games with the metal renderer. Are you following the steps I took, or is there a better directory structure or a more correct way to setup and build the Xcode project?

Thanks.

github zip file is not complete, you should download it from the link provided in the thread.