I like your vision - but we still love C++ more then JS
The biggest disadvantage of JS is debugging - it is some pandora box - newer know where it will fail.
Also cocos is in some strange stage there - JS is top priority - but it canāt do most simple/basic stuff by default - blurry labels on retina display. Opened cocos creator -> launched sample project -> everything blurry -> closed and never opened it again - itās not production ready for me and doesnāt match mobile version quality. Wondering how much effort WeChat developers put to make their own branch of cocos for their games - I just donāt belive that they using cocos released branches.
Regarding Facebook messenger instant games I think it is bad example as it is closed beta so u were in list where u had huge advantage to get users - also I donāt see any monetisations methods there - so it just users for now, no money.
According to Stack Overflow Developer Survey Results, the most popular role is Web Developer. This is why JavaScript is the 1st language on this survey.
@anon98020523, I said the popularity of JavaScript is not the most important. The Key is that, JavaScript can bring us to the new blue ocean.
@energyy, I have no flavor of programming languages, I only see which language is best tool to my target market.
Is Objective-C better than J2ME? Not the language itself. Objective-C can bring us to the market of iOS, while J2ME for Nokia.
Is C++ better then Objective-C? I donāt care. But C++ can cross iOS and Android easily, it fit my requirement.
Is JavaScript slower than C++? Yes, but it can easily cross HTML5 and mobile native (JSB).
Take a look at this data posted by the CEO of Kongregateās tweet:
HTML5 has dominated other technologies on Kongregate games, especially compare to Flash and Unity.
On PC, thereāre 2 big markets for games:
One is PC native game, like World of Warcraft, Overwatch.
Another is Web game, like Facebook Canvas and Kongregate.
I believe this situation will repeat again on mobile. Performance? Itās not the problem, itās the chance. Todayās mobile CPU is going faster and faster, much close to PC CPU.
A10 CPU inside my iPhone 7: 64-bit, 4 cores, 2.33GHz
Intel CPU inside my MacBook Pro (Retina, Mid 2012): 2.3GHz Intel Core i7
Intel CPU inside my MacBook (Retina, 12-inch, Early 2016): 1.2GHz Intel Core m5
If JavaScript is totally OK on PC web games, in Facebook canvas, Kongregate, QQ platform, 4399 etc, there should be no technical problem on mobile devices too. We canāt use JavaScript to code a 3A level 3D game, but for most 2D social games, card games, gambling games, even RPG games, JavaScript is enough.
Turn back to 9 years ago, in 2008, is iPhone slower than PC? Yes. Is iPhone has more performance limitation than PC? Yes. But itās a new market, a blue ocean.
Now back to 2012, is Android in China slower than iPhone? Yes. Is Android games hard to monetize comping to iPhone in China? Yes. But itās a new blue ocean.
And today 2017, is HTML5 (Facebook Instant Games, WeChat HTML5 Games) slower than native C++ games? Yes. Is HTML5 games hard to monetize comparing to iOS and Android games? Yes. But itās a new blue ocean, the history just repeat again. And I already show the power of fb instant games above.
I send my good wishes to the Cocos2d team and will take this latest post a final nail in the coffin for quality c++ game development with Cocos2d going forward.
Theyāre going to try and continue support for C++, but the -lite version is specifically tailored to CocosCreator, which Iāve found to be fairly buggy in use. This is smart for business, but I donāt believe their choice of features will be useful to those who are or would use the current feature set of cocos2d-x.
I felt the need to write something, but Iāll leave it at this.
Anyway good luck, Iāll come here once a week for a while, and then wean myself off of visiting, to help where Iām able, but Iāll be joining Ricardo and Slackmoehrle on saying goodbye.
@stevetranby wow! i donāt know what to say. @walzer I think you missed the whole point of the topic. People love using cocos2d-x over unity because its c++,open source and āwasā well maintained. By putting all your ppl for the support of creator you are following unityās footsteps. And what makes you say unity will not have full html-5 support soonā¦ If they have that, they will a far far better editor with html-5.
@stevetranby is right āTheyāre going to try and continue support for C++, but the -lite version is specifically tailored to CocosCreatore, which Iāve found to be fairly buggy in use. This is smart for business, but I donāt believe their choice of features will be useful to those who are or would use the current feature set of cocos2d-x.ā
But you have to realise that market is very different for china and the rest of the world. When i open chinese cocos forum most posts are about cocos creator. But this is not the case in this forum.
being a loyal cocos2d-x developer for 5 yearsā¦ this sounds very disappointing for me! But i hope the best for the cocos team and i hope they give more attention to cocos2d-x.
Just look at the forumā¦ most topics are about c++. Thatās because little people are using js here. Also letās compare js and c++ in terms of cocos game development:
c++:
better performance,
better documentation, more examples,
bigger community,
easier to debug, you donāt have to hit the wrong line in order to find an error,
a big plus for me: you have native projects, which you can open in Android Studio and Xcode (future proof for changes, especially from Apple). I used some other frameworks in the past and new iOS release always broken something. It is also possible in cocos2d-x, but at least you have xcode project so I shoudnāt be that hard to fix (and I can even fix it by myself, not waiting for some black-box-framework creator will fix it),
easy implementation of any native libraries and other stuff (google mobile tracking, some additional data in AndroidManifest etc.)
js:
can run on browser.
I donāt think js is easier - itās the worst language I ever used (except Prolog and assembler :D). Youāre writing code and you have to idea if itād work until you run every piece of it.
Some time ago I had to create a port of very simple game in cocos2d-js (before creator existed). I created this game fairly quick (it was very simple game), but had tons of problems on different browsers (had to change some code in order to get it working) and also struggled with blurry stuff, especially on Android.
Yes, html/js is important, but for now c++ game have a lot more quality, performance and are very stable. But we have to keep making games and itās being harder and harder with EOLād Cocos Studio.
will take this latest post a final nail in the coffin for quality c++ game development with Cocos2d going forward.
totally agree
My personal opinion is:
moving into html5 just because its popular, its like saying ālets all create football soccer games only because its the most popular sport in the worldā ā¦
Im in pro of QUALITY and PERFORMANCE, low level control, other libraries inclusions, I meanā¦ oportunities for move your game to ANY direction you want ā¦ for meā¦ that is pricelssā¦lot more than just a casual fb game.
Every game that appasionated every one of you was made with quality, not a flappy bird game coincidence (if this is cocos2d goal).
I cant wait to see the new āwaveā of websites, ooops, I mean, games.
Anywaysā¦ its not my company, im just a real GAME developer.
I love the new support from Creator to C++, its so sad to read that wont be for long
@walzer
Iām developing game in Xcode using C++ until it ready by 95% and then running it on android.
I want to bring a quality for iOS gamers and some for android. Todo so, I want to develop it in native environment and test, debug on a real devices(iOS) and achieve quality I want.
And so Iāll never make games not in itās native environment as long as supported language in it. So, no please no javascript or other scriptā¦
But maybe itās better you move that way to html and javascript, giving a chance for something new like fiber2d. With force of Apple pushing SWIFT, I think new engine for mobile 2d games should be developed in it.
@anon98020523, Big Fish Casino is using the tech stack of JavaScript + JSB to run on both iOS and Android natively. I just checked AppStore US, Big Fish Casino is on top grossing chart #19. Well, sometimes it can rank in top10.
Itās totally no problem of running a JavaScript Bindings on iOS Android natively. Big Fish Casino is a good sample. Perhaps you donāt know that in China, at least 60% of successful cocos2d-x games are using Lua script. Tencent started to port their 2D games onto HTML5 title by title.
I donāt mean HTML5 is the only thing, but to use JavaScript to cross both HTML5 and mobile native easily. After all, we have JSB technology for 4 years.
Thats not an example, itās simple game in terms of technical realization for most things.
Better to show games like Badland or Kingdom Rush developed in javascript. Anyone?
Again, Iām talking about developing, not just running. Not a question - how to developed games using javascript in Xcode?
And again, moving to javascript itās moving engine back to China for those developers, ok for them. But again, itās a chance for other engineā¦ that market really needed at this time, with normal editor, performance, get started guide, tutorials and languageā¦
@walzer I must mention here that I support this overall shift towards javascript. Please add to your plans support for Cordova and Electron as an alternate to JSB. Then we can have ānativeā javascript and use all the Cordova/Electron APIs/Plugins to keep more of our code cross platform in javascript, along with html/css support for building the UI.
Like most people here, I am a C++/Java/ObjC developer with a huge investment in existing apps and games built using C++ and Cocos2dx. Just the shift from Cocos2dx 2.x to 3.x was painful and took a lot of effort but overall it was worth it. We have been building using Cocos2dx C++ for 5+ years now, and are very happy with it.
But the world is changing, and javascript has established itself as the language of choice for full-stack development. For everything including client side apps and UI using Cordova, Electron or Ionic, Games using JSB or WebGL, server side code with Node.js, etcā¦ The entire Visual Studio Code IDE is built in JS (using Electron) and same with Cocos Creator.
The advantage of not having to work with multiple languages is huge for individual developers. And it becomes even more important when there are multiple people in team. Companies can deliver much better and bigger projects with smaller team sizes. Instead of hiring 2 developers each for Cocos2dx C++, Android Java, iOS ObjC and Server C# etcā¦ and then all of them switching between different projects for their āpartā of the project etcā¦ Now a team of 2-3 JS developers can focus on only one project and do all of it. Much more productive and economical for businesses.
It will be a slow painful shift, almost a rewrite from scratch. But it needs to be done. We have moved many of our native java/objc projects to js/cordova/ionic etc and it takes time but worth it. We havenāt run into any app performance issues until now. We started working on this almost a year ago and it will take many more months for some of our projects. You can at least start the new projects in JS while you learn, and decide upon migrating existing projects later.
We are also reconsidering how and where we use cocos2d-js. There are many other js libraries like threejs which are better for some projects. But cocos2d-js is still the best option for many projects. And we are moving a lot of UI/HUD components like settings pages etc to plain html/css instead of building them with cocos2d UI components. That is 10x less code, looks better and less bugs.
And current Cocos2dx C++ is still well maintained with new features (android c++ debugging coming next) and updates so there is no rush or crisis. If you donāt want to move or want to wait some more time before the trend with js is more clear, you can continue to use Cocos2dx C++ for another year or more before deciding if you need to move or not.
With JSB, you shouldnāt notice any speed difference as all the core engine is same as existing C++, and the JS files are precompiled to jsc for JSB. But you should test and benchmark to make sure how it will be for your game.
We are not using JSB, but loading the web build in a webview which runs using WebGL (similar to what cordova/phonegap/ionic do). We noticed some frame rate drop when there is a lot of text on the screen. But now we are using plain html/css for most of the text/settings UI so its even better. Takes the load off from main game loop.
One thing to note about cocos is that it redraws everything in every frame. Which is how it should be for games that have constantly moving animations etc. The browser usually only redraws something which has changed. So the ānon-animatingā hud/ui/text elements drawn using html/css help improve the performance.
I can see your point. For us critters, chipping con c++ wood is good. C++ wood is healthy, fast, and makes us powerful. Js is so snowflakhishlyā¦
Jokes apart, if you, like me, have a code base thatās not convenient to port to js, or cannot be ported for any reason, then we have no other choices than look elsewhere for those use casesā¦
I dig it recently for a couple of months, and after having discarded fiber2d (because of swift), oxygine (because being good but too light on features for me), godot (really tempted by no components, sorry need that), bgfx (cannot find something working as an engine on os x, a shame bgfx is really good), libgdx (i donāt trust the ios connector and ji-ji-java), i set myself on urho3d.
It sports both 2d and 3d engine. Sure, Itās not a specialized 2d engine like cocos so donāt expect Spawnthisandthat but Iām evaluting it and I think can be good for my C++ needs. Moreover, the forum guys rocks, really clever people. Soā¦