What should Cocos2d-x v4 be?

What should Cocos2d-x v4 be?
0
#1

@walzer if working on deciding what v4.0 will be. Let’s help him!

So far:

  1. For sure metal support
  2. Solid 3D renderer, new 3D features and a new 3D editor

What are your thoughts on these item?

  • Should we merge GitHub.com/cocos-creator/cocos2d-x-lite to cocos2d-x v4, and publish with the Cocos Creator editor support?

  • Could we focus JavaScript & TypeScript only, and abandon C++ & Lua API?

  • Should we promote the totally rewritten 3D framework in v4?

pinned globally #2
#3

This is purely my own point of view on the matter, and I will explain why I chose Cocos2d-x for the project I’ve been working on for the better part of 3 years.

Cocos2d-x was chosen specifically because of the C++ support, with the features being more of a secondary consideration. Other game engines with scripting just didn’t suit the requirements of the project, and here is why:

  • We needed something that could process certain algorithms as fast as possible

  • Implementing certain algorithms in scripting or interpreted languages would open them up to be easily decompiled by practically anyone, and given how widespread the theft of intellectual property is in mobile applications, using C++ and compiling to native code would at least eliminate the casual thief. Anyone wanting to reverse engineer the algorithms will have to go through a more lengthy process to disassemble and recreate them. Note that we are not under any illusion that it’s secure simply because it’s being compiled to native assembly; we’re just making the resources required steal our work more significant, and with any luck, more of a deterrent.

  • We wanted more control of memory management within the engine, in order to keep the memory footprint as small as possible. Cocos2d-x allowed us to do just that.

  • We needed support for multiple games within the same application, and with a custom framework built on top of Cocos2d-x to manage the loading and unloading of resources, we were able to achieve that.

So, while I have no opinion regarding the use of JS, LUA or other languages, as I’m sure they have their place, for me personally, I would have to abandon Cocos2d-x if C++ was removed from it. Also, and this is a long shot, if you would ever consider adding support for C#, since it’s an amazing language, I would actually make use of it for a considerable amount of game logic, hint hint… :slight_smile:

Now, for specific 3D support, it would be great to have a solid implementation. We use Cocos2d-x for the C++ and 2D support, and we haven’t had any use of the 3D aspect of it just yet. We did experiment with certain 3D animations, but things didn’t turn out quite right, and I can’t quite recall precisely why (it had something to do with unsupported elements in the 3D object files). We would revisit this if the 3D implementation is improved.

One thing I that I wish Cocos2d-x would get right is audio support, but it’s not a big issue considering how many alternative 3rd party audio libraries exist. It isn’t consistent across platforms, and it needs better support for streaming audio from custom sources (such as memory etc.). The audio implementation should not be handling the file I/O.

On the topic of streaming and such, virtual file system support would be amazing. This would enable developers to keep resources within a package, like a ZIP archive, and these packages would be mounted as virtual folders. There would never be a need to extract the zip files, which makes handling resources and live updates much easier. I’ve successfully used PhysFS to implement this, with some minor changes to Cocos2d-x to force all file I/O to go through FileUtils. While it ran perfectly in Windows (for all resources, even streaming audio), it didn’t work well on Android. On Android, graphic resources worked, but audio did not, since the audio implementation does it’s own file I/O, and there was no obvious way to override it to force it to route the file handling through FileUtils.

I’m not entirely sure what Cocos2d-x-lite is, but looking through the github project info, one thing stood out is “Remove deprecated classes and functions”. This is something that should be done regardless of whether Cocos2d-x-lite is merged in or not. The more pointless and out of date code there is, the higher the maintenance costs (in time, money, resources etc.).

Anyhow, that’s all I have for now. Please do not drop C++ support, because it really is one of the main aspects of Cocos2d-x that makes it such an ideal choice for developers with similar needs to what I have mentioned above.

8 Likes
#4

Absolutly not. Cocos2d-x C++ makes the difference with other engines, and C++ is one of the most powerful languages.

7 Likes
#5

@tranthor @R101 thanks for the feedback.

#6

Personally, I feel more features based on Television software (mainly Samsung Smart TV and Amazon Fire Stick) would be of use to several people. bool is a very powerful sytax, capable of activating that which is crucial, though we do have it in use where obvious, I feel its potential is underestimated, it would be alot simpler, for example, if there was a setdebugdrawenabled(true);

#7

I don’t feel tv markets are important at this point. It requires people to have these devices and how many game players would play on a tv without a console. Just my opinion

Also bool? You want to see more bools used. I’m not sure how to take that.

Director::getInstance()->getRunningScene()->getPhysics3DWorld()->setDebugDrawEnable(true);
1 Like
#8

I mean for specific objects.

BlockA->setDebugDrawEnabled(false)

Sorry if it was unclear

#9

Hmm I’m not sure if it is worth it for a developer to just have one object with debug draw on. I mean if you have to enable it for every object you want if you have more than 2 it’s easier to just issue a single command and get a complete overview of your situation.

#11

Full editor support for C++ just like javascript in cocos creator and ECS.

6 Likes
#12

So far:

  1. For sure metal support
  • Awesome!
  1. Solid 3D renderer, new 3D features and a new 3D editor
  • Haven’t used them yet so not sure. In my opinion 2D should be focused since 3D has far far better engine options.

What are your thoughts on these item?

  • Should we merge GitHub.com/cocos-creator/cocos2d-x-lite to cocos2d-x v4, and publish with the Cocos Creator editor support?
    — could you share how many devs are currently working on the lite version? also when you say publish with cocos creator editor support do you mean c++ support?
  • Could we focus JavaScript & TypeScript only, and abandon C++ & Lua API?
    — Is it worth continuing c++ version and would it be feasible for cocos?
  • Should we promote the totally rewritten 3D framework in v4?
#13

@R101 I agree with you. Although cocos creator is being heavily worked on. Removing c++ will be the deal breaker for me. Unity and unreal are light years ahead in 3D, but it would be nice to have 3D support for casual games made in cocos2d-x.

Audio engine definitely needs improvement. It’s the weakest component in cocos2d-x.

I haven’t used cocos2d-x-lite, so I’m sure how great it is.

#14

I will try to be short, harsh and to the point.

  1. We choose cocos2d-x for C++. If there is no c++ support, we will abandon it 100%.
  2. We choose cocos2d-x because our games are 2D and cocos was great for 2D. Now you try to focus on 3D. WHY? You had a great 2d engine. 2D needs on mobiel are huge, must bigger than 3d. Why do you try to compete with giants like Unity and Unreal? If your focus will be 3D, then name your engine cocos3d so new users know that your focus is not 2D anymore. I have not seen any cool 2D feature since ages.
  3. It feels like most of cocos team efforts and resources are on Js + Creator and and c++ version is left on the side just for maintenance and no new features. If there was no metal announcement, i believe we would probably be in cocos2d-x v3.17.2 with few bug fixes. Unity is releasing great features with every version but cocos2d-x c++ has been the same for years. WHY?
  4. There is a huge difference between JS game developers and C++/C#/Objective-C game developers. Those who know what i mean, know.

These comments go towards the management of cocos. They are in no way directed to any of the developers of cocos or people who help us daily. Those are doing a great job.

6 Likes
#15

What is the point of cocos2d-x lite except less features? Also seems like it’s based on very old version of cocos2d-x and very outdated. We want new features, not less. Cocos2d-x is already lightweight and has very small size and great performance. So focus should be on new features.

#16
  1. C++ API - main reason why I choose cocos
  2. Improve build system - compile all deps from source with CMake (no apt-get install, or downloading dll, so, a libs). Prebuilds as an option.
5 Likes
#17

Cocos2d-x v4 :

  • Support for both metal and open-gl backends.
  • C++
  • Support to create individual layers/nodes of the game in Editor. This way, existing projects can start using the editor as well without having to start project from scratch and slowly migrate (if they want)
  • More 2D Features.
1 Like
#18

We have had 3D features for quite some time. But yes there has been a focus to make these features production ready while supplying proper tools. We wont be changing the name to Cocos3D, but there is a goal to unify the brand to just Cocos and Cocos Engine and Cocos Creator, etc. We have been working on this for years and it is finally coming together.

It’s a geographic reason in my opinion. 95% of the team is located in China and in China and surrounding developers use JavaScript and Lua way more than Western developers. As you can read from the other comments c++ is highly preferred in other areas. It’s incredibly hard to support all the features of our engine on all platforms. We are trying to feel out what are the best decisions so we can focus on making the engine great for everyone. This means programming language choice to complex features like 3D because indie devs need features as well as large studios. We need our features to work for everyone and it seems everyone has slightly different needs. Our JavaScript offerings have needed attention.

Thank you for providing your comments. I appreciate it and the feedback will be useful for the team.

#19

We have had 3D features for quite some time >> I am not against adding 3D features, any new feature is welcomed, but we cant abandon the 2d side completely to only bug fixes and put 99% resources on 3D if this is by design a 2d engine. Resources should be allocated maybe a bit better so 2d also receives some love. )

It’s a geographic reason in my opinion. >> Momentum in v3.17 is already low. Focusing only on js from v4 and onwards is same as abandoning your c++ community as v3 will stop receiving upgrades.

#20

I can dig this. We will not be abandoning 2D. We are re-branding to show we are more than 2D. Metal is a huge task for the team, once complete it will free up resources.

#21

I hope @walzer will see my reply.
My thoughts :

Ofcourse its required because of Apple’s decision but there should be macro to switch to opengl as discussed in another thread. This will help developers in so many levels.

Well its good to have but i think currently its only for creator, right?

Yes, you should do this but only if c++ support is there. (Not in Creator)

Well 2 yr back i knew this question will come, I am glad you are asking to community before taking any hard decisions.
My opinions :

  • You should make cocos engine common for c++ engine and Creator backend.
  • It will be easy to maintain single engine for all Cocos products.
  • It may take time in initial levels but it will be good for Cocos future and will save Cocos developers time too.

Well i doubt this, because i dont think you will be able to provide video tutorials for this.
And anyways auto-complete is not working for creator which is the most negative point of your tool.

Cocos2d-x lite is for Creator’s backend c++ source code. Its open source. They basically taken cocos2d-x source and removed unnecessary code out of it.