We need a friendly ENGINE, not a dysfunction EDITOR

@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.

Yes. so there’re already some web developers that started to use Cocos Creator to enter game industry. This follows our principle #3.

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.

Godspeed.

7 Likes

@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.

1 Like

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.

2 Likes

Fine, then you can use C++ and Lua support for Creator here.

will take this latest post a final nail in the coffin for quality c++ game development with Cocos2d going forward.

totally agree :pensive:

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

3 Likes

@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.

1 Like

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…

2 Likes

@walzer like i said there is a big difference in what the Developers in China want and what rest of the world wants.

2 Likes

wait wat? [citation needed] :worried:

@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.

Good Luck to all of us :slight_smile:

Farewell to our friends: Chukong U.S office is closing March 31, 2017.

1 Like

how big is the performance gap between cocos2d-x and cocos2d-js?

U need to make benchmarks

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.

2 Likes

I can see your point. For us critters, chipping con c++ wood is good. :yum: C++ wood is healthy, fast, and makes us powerful. Js is so snowflakhishly…:sleepy:
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…

5+ years ago when we started, C++ was the only way to develop cross platform games and apps, JavaScript is now another option.

You can choose cocos2dx or some other framework, but I would strongly recommend giving a second thought to JavaScript.

(Or TypeScript, which I find to be a better JS as it gives better auto-complete while coding and better compile time error checking. For JavaScript I will recommend using WebStorm, and for TypeScript you should use Visual Studio Code).

Languages are just tools. I have moved between C++, Java, ObjC, Swift, JavaScript, Python, PHP, C# over the years and differences aren’t much. Javascript is only becoming special because there are now JS frameworks that can do everything from server (NodeJS) to mobile apps (Cordova) to desktop apps (Electron) to games (WebGL) to WebVR and IOT etc… Making it possible to not work with multiple languages for a single project. Or in case of companies, not hire people with different language skills.

If you are happy with current C++ cocos2dx why not just stay with the current cocos2dx releases? Why migrate to another similar framework? I think the Cocos2dx team is doing a good job of giving more options for developers who want to use an Editor for development, or for developers who prefer JS. They haven’t stopped development of the core C++ engine that we all love.

We are doing the extra work of moving to JS because it gives some advantages in development/maintenance time/cost. And makes it possible to target more platforms that need html/css/js apps. Where this is not the case, we are continuing with cocos2dx C++. Moving to another framework is just too much work with no benefits.

I love C++ and Cocos2dx, but I am not biased against other languages or frameworks. Some of our projects are using ThreeJS while others are going to stay Cocos2dx C++. Most of them are now Cocos2d-JS, and we are ‘trying’ Cocos Creator for one. It really depends on the project and its needs.

exactly that. on your last sentence is the truth. I’m currently evaluating a use case where I probably have to use libnoise, voro++, ozz-animation, and some. so no cocos, because i cannot change the (now lower) c++ chain.
Cannot modify update cycle; it’s trapped into unreadable bindings, let alone possible performance problems.
Cannot use components; they only work up the chain(creator), not down (cocos2dx).
Clearly using cocos for such an use case is an error… moreover, I don’t even know if it’s going to be done, just evaluating…
I will use cocos chain when i see fit. I like sdkbox idea. I’m probably use it even outside of cocos, if it’s possible.
I’m evaluating other engines because they have what i need without me having to “rebuild the wheel” about componentization, factories, and so on. just that. saving time.
About js: because everyone is doing a thing, doesn’t mean is to be taken without the right consideration.
At the moment, if I take a c++ code base, I can port to emscripten. Unity and Unreal do this, if i’m not mistaken. It’s the inverse path. Not that I like it particularly; it’s just saved time. As I said in many other places, doubling your code base because there’s a new kid on the block it’s not a sound business behaviour. The same reasons who moved cocos to the choice of html-first (which I approve, considering the challenges of chinese market) applies for me…
Until someone convinces me that emscripten is not a viable solution for whatever the reason, i will not port. That doesn’t mean i won’t uses cocos; i will probably use on something new, which needs fast execution, 2d only kind of games, widespread diffusion. Facebook channel? Hope so, If we find a way to monetize/gain audience. Apple just launched its message channel, and already appears to be dead…:confused: So…

1 Like