cocos / cocos-engine

Cocos simplifies game creation and distribution with Cocos Creator, a free, open-source, cross-platform game engine. Empowering millions of developers to create high-performance, engaging 2D/3D games and instant web entertainment.
https://www.cocos.com/en/creator
Other
6.95k stars 1.8k forks source link

Linux Compatible Build For Cocos-Creator #11455

Open MossFrog opened 2 years ago

MossFrog commented 2 years ago

Use Case

We work on multiple web based games as a company both playable-ads and HTML5 games.

Problem Description

Some members of the company use linux as their primary operating system within the company and would like to request a Linux build for the engine or at least a compatibility layer/wrapper that allows the engine to run within an Arch or Debian based environment.

Proposed Solution

Release a third downloadable option on the Cocos-Creator website for Linux users, compilation and porting of the engine should not be that hard since the Macintosh build is also running on a Unix based backend.

How it works

Simply download a separate version from the website that will work on Linux machines.

Alternatives Considered

An alternative would be a Winetricks/Lutris based wrapper for the Windows Version (This might be unstable)

Additional Information

Thank you!

xiaoxiangmoe commented 1 year ago

@VisualSJ @xyz5511 Can you provide a cocos linux docker image for ci build? Our ci system is using docker now.

jareguo commented 1 year ago

Sorry, due to manpower considerations, there is still no relevant schedule

cupen commented 1 year ago

@xiaoxiangmoe Maybe it's doable to build it in a windows container. Just use Docker Desktop on Windows. https://devblogs.microsoft.com/cppblog/using-msvc-in-a-docker-container-for-your-c-projects/

Overloot commented 10 months ago

We really need a version that works natively for Linux because developing for Windows is unbearably unpleasant. We don’t want to use Apple systems for religious reasons.

Please make Cocos Creator Linux build

jareguo commented 10 months ago

Can you tell me what projects do you use Creator for? Is it a commercial project?

joeky888 commented 10 months ago

I've seen a lot of unity3d refugees choosing Godot over Cocos recently, one of the reasons is that Cocos creator doesn't support Linux, a lot of indie developers use Linux and some companies may need it for CICD in docker (I meant a non-gui headless mode for automation).

Overloot commented 10 months ago

Can you tell me what projects do you use Creator for? Is it a commercial project?

Most recently we have been working with unity and have released several commercially successful projects for last three years. Recent events are pushing us to change the engine. Since our main course is web games, we chose between Defold and Cocos. We liked cocos more. However, it has now become clear that we cannot continue development on our favorite operating system because cocos does not support it. This is very depressing.

jareguo commented 10 months ago

Thanks. So you guys were using the Linux version of Unity before? Our current CICD does rely on Mac ......

joeky888 commented 10 months ago

Yes, I had used native unity3d on Linux about 3 years ago, where we developed a KCP socket turn-based Android game. The Nvidia dGPU and CICD were tricky but we overcame the hurdles eventually. Now we focus on web games so we adopted Cocos at the moment, but we are evaluating other engines.

xiaoxiangmoe commented 10 months ago

For example, take WeChat mini program and Alipay mini program into account, only mac and windows development is supported by default. They only provide windows and mac IDE.

But they all support building on linux machines in cli mode.

see


Most companies' most mature cicd infrastructure is based on Linux. If cocos does not provide Linux-based npm cli construction, it will lead to high costs for cicd, integration testing, etc.

netplayer commented 10 months ago

We really need a version that works natively for Linux because developing for Windows is unbearably unpleasant. We don’t want to use Apple systems for religious reasons.

Please make Cocos Creator Linux build

Religious reasons are hardcoded, indeed impossible to switch.

dzqdzq commented 4 months ago

这个问题现在怎么样了,我也非常需要一个creator linux版本, 有两个原因:

  1. 开发容器gitpod里需要 (可能未来趋势)
  2. cicd构建发布游戏应用 我想知道官方是否未来3年以内会考虑出Linux版本吗? 据我所知,creator是基于electron的, electron是跨平台的,出Linux版本理论上应该不会很难,也不会耗费很长人力
Ronsku commented 3 months ago

Since the early days of Cocos Creator 1, we've all faced this one significant challenge: the inability to build proper CD/CI systems with Cocos Creator. This limitation forces the creation of complex and costly Windows server hosting solutions to support effective CD/CI.

It's surprising that, despite the numerous improvements made to Cocos Creator, this issue still persists in 2024.

The demand for Headless Linux builds for Cocos Creator has been strong for years. While it seems technically feasible with Electron, there appears to be an underlying difficulty preventing its implementation?

Could you provide any insights or feedback on this @jareguo? 😊

joeky888 commented 3 months ago

According to this thread, two (and maybe more) core members have left the engine development, so I guess this won't be prioritised. But I'm quite optimistic, hope they can find new maintainers soon.

forza91 commented 3 months ago

Here is a workflow to rebuild native linux version by electron-builder, but it can only support the linux distro and Cocos 2.4 about 2 years old. Hope someone will improve it.

CLI build is usable, but still need an X server:

./Cocos-Creator --project 'PROJECT_PATH' --path 'PROJECT_PATH' --build 'platform=web-mobile;buildPath=BUILD_PATH'

CocosCreatorLinux screenshot resized

forza91 commented 3 months ago

Since the early days of Cocos Creator 1, we've all faced this one significant challenge: the inability to build proper CD/CI systems with Cocos Creator. This limitation forces the creation of complex and costly Windows server hosting solutions to support effective CD/CI.

As far as i know, Jareguo has leave cocos months ago. We are hosting a linux build in XFCE environment, it's anyway a lower cost solution than Windows. I hope someone can finally make it works in Ubuntu24/Arch, and better, running without X.