Is Cocos2d-x Still Relevant in the Age of Unity3D and Unreal Engine?

I would be interested to know more, how did you find out?

Go on Steve, I would be interested.

this is comforting to hear!

weā€™re all ears. please share. encourage our weary hearts haha :smiley:

I am totally new to cocos2d, just want to say from my experience.
The biggest problem is community. I started with javascript examples. However I soon got into problems when code got compiled in different environments. Then I just got stuck as I donā€™t really know where to get information on how to solve the cross platform issue.
So for me I will try other engines that with a more active community that I can get more help.

Just realized Fire Emblem Heroes is using cocos2d-x

@nite Indeed it is and Nintendo Japan has some job openings for Cocos2d-x developers.

in all fairness, you have only been a member for 3 days and you have posted 1 topic (2 days ago, which nobody has answered yet) and replied to this thread only. Iā€™m not sure you are giving enough of a chance.

If you have encountered a but we should try and fix it. Create a GitHub issue, tag me in it and I will ask someone from the engineering team to look into it.

Could you provide exactly numbers?

Regards
Chp

Iā€™m new to cocos2d-x too, but the reasons Iā€™ve tried it, itā€™s because of the build size with unity. An android or iOS 2D game has a huge size with unity, because it doesnā€™t use pngā€¦ With cocos I can divide my build size by 3 or 4ā€¦
Second, itā€™s because of performance, my 2D games have more lag than my 3d games in unityā€¦ With cocos I think (and I hope) that I can more optimize 2D games to work better in old phone.

1 Like

fyi, this post maybe useful for you :slight_smile:

1 Like

This post is pretty extensive.

Minor bump.

Can anybody with experience in one of the other two engines (unity/unreal) tell me if cocos2d-x contains more concepts to learn in comparison to the others. if so how much more (itā€™s this increase in syntax that makes me happy to be able to use cocos)

There are too many other engines to talk about. The major ones, Unreal, Unity and GoDot all require you to know about the areas games useā€¦likeā€¦physics, sprites, nodes, scenes, shaders, programming, etc. They may call them something different, but they arenā€™t going to just hand you stuff for free and you have a game just by clicking buttons and dragging objects to a canvas. They all have layout tools and many other tools.

My opinion here is that we do require a higher learning curve initially, but once you have the hang of the basic concepts you can really work your way through any issues. Iā€™ve written games in Unreal and Unity also and I did have a harder time with them. Unreal I was able to get over the curve quickly but their API and tools is huge. Unity felt just plain awkard to me. Itā€™s a good engine/tool, it just isnā€™t for me. GoDot seems to have a very clean API, but it is still not time tested enough for me. I like engines to be around a good long while and I see hard games made in them.

One thing to throw out is that you technically donā€™t need to use some other engine. You have the tools you need to make your own engine using OpenGL, DirectX, Metal, Vulkan, etc. There are platform considerations, yes, but you can surely write your own code to handle your needs. Having written a cross-platform GUI toolkit back around 2008, I can attest to the fact it is a lot of work. It is really fun though.

@stevetranby I believe has written games in other engines, as has the fantastic @rusty. @R101, @dimon4eg, @dogwalker all have experience with targetting other engines (IIRC :slight_smile: )

@stevetranby - thanks :slight_smile:

I think @slackmoehrle summed it up pretty well. They all have similar concepts, Unity/Unreal have more out-of-box stuff both in their base engine as well as due to their marketplaces for add-ons and content. They also both have visual editors (though Cocos/Javascript is trying to compete here).

Iā€™m no expert, but hereā€™s my thoughts.

Unity is probably the easiest to get started compared to Unreal and Cocos2d-x, but ultimately is restrictive at times and low-level capabilities are harder to use, and is currently changing at a rapid pace. However, if you like or donā€™t mind how the editor and APIs work after testing then it is an amazing ecosystem to work on your first game(s).

Cocos2d-x is probably still the best for small to medium 2D games and single/few developer teams. It definitely has fewer features, but the main core ones exist. Iā€™d argue for 3D games (at least in the AAA sense) to use another engine or write your own since cocos2d is not really set up for writing 3D games.

*** If you read other posts Iā€™ve written, I sort of consider cocos2d-x in maintenance mode (c++ version, not the newer Cocos/CocosCreator javascript engine) and for new developers or new games another engine is probably a smarter choice, but since itā€™s open and you have full access to the code, thereā€™s no reason you canā€™t still use it to success.***

Unreal is the most powerful and has some neat visual shader editing tools alongside the Blueprint scripting which you may or may not like. While Iā€™m no expert here, it has a steep learning curve, the code is quite specific to its engine (lots of Macros). Youā€™d likely use some or a lot of C++. Itā€™s ultimately probably not all that much harder to learn, but from my experience Unity was much easier to get prototypes off the ground.

Custom Engine - writing your own around DX/Vulkan/Metal probably using some core libraries like GFLW, BGFX, SDL, SFML, components of cocos2d-x, etc, can be a rewarding process and if your game takes more than a year is ultimately probably not much more work than using a pre-baked engine. This applies more if youā€™re either doing game dev as a hobby, or you have an idea you want to make that you determine will probably take a few years. While itā€™s fun and rewarding to do literally everything from scratch, definitely make sure you stand on the shoulders of giants using good libraries, at least to get the project off the ground.

My advice is always two fold after the past few years of arguing and discourse on the topic:

  1. Try each engine youā€™re interested in after some research (maybe limit to 3-5) and write a clone of a simple game in full: menus, menu->game->nextlevel->win/loss/exit->menu->etc. UI, audio, player sprite w/input, enemy/NPC/etc, and physics collisions. (you could decide on your own feature set).

  2. Donā€™t worry too much about which one you choose, just get started making your game. (Itā€™s much easier to re-write a game, or ideally port, than people say).

Caveat: If youā€™re looking to learn for a future game dev job then Iā€™d highly recommend learning Unity or Unreal depending on whether youā€™re interested in small/medium-sized game studios (Unity) or AAA game studios (Unreal - will better apply to the studioā€™s custom c++ engine).

3 Likes

@stevetranby and @slackmoehrle, thanks for your honest feedback. Iā€™m not the best to say anything, because Iā€™ve only used the earlier Objective-C cocos2d and now the C++ version. I do like how I can look into the engine code if need be, and I have created a lot of things on my own that other engines may support, I have no idea.

I do know that Iā€™m able to have one set of code that runs great on iOS, Mac, and Windows 10, with some small differences such as keyboard and mouse support that I wrap in macros. Iā€™m too busy working on new features to check out another engine at this time, but I imagine Iā€™ll eventually check out unreal and Unity. My code is a mix of C and C++, so I donā€™t think it would be a nightmare to convert, probably 2-3 months?

But for the time being, Iā€™m perfectly happy with cocos2d-x. My main missing features, which may be missing regardless of the engine are:

(1) Iā€™d love some way to make it easier for users to support uploading and downloading files and folders, or maybe even send them to each other directly;

(2) I really want to implement online multiplayer. My first game, Tom Landry Football, had it way back when we connected through modems! And then the objective-c version had it because Apple had good support through Game Center. I hope to eventually have time to look into Game Center again and Steamā€™s online multiplayer (canā€™t find any good guides on it!).

I donā€™t know what the future holds for cocos2d-x or for you guys, but you should definitely be very proud of what youā€™ve accomplished! People donā€™t really fully appreciate the complexity involved. You guys have done awesome work!

1 Like

Use AssetsManager

I think itā€™s too big and complex to support it by cocos team.
There are a lot of third party services.
Take a look at Nakama - open source and it supports Cocos2d.

1 Like

I am actually excited to take a look at this when I have a day to cobble a simple game together.

1 Like

Thanks, @dimon4eg, Iā€™ll look at AssetsManager and Nakama!