Is it good idea using cocos2dx to convert website to app

I want to convert my website to all possible mobile os.
I can program to android. But i don’t know how to do that for IOS.

Can i use cocos to for this purpose?

You can. We run as a standalone app or from a URL is you are using JavaScript.

hello there,

If it’s your intention to create an app with the same functionality as your page using cocos2dx to release one app written in javascript to all platforms should work very well but then again cocos creator might be even better since you can save some time setting things up.

though I don’t know if there is something similar to cocos that focuses more on nongame apps.

cheers

The best question to ask first.

What is your application type? Regular content website, a website that runs a flash application, or a game?
Does your website already exist? (yes/no)
If yes, are you willing to share the URL?

Based on assumptions that you have a normal existing website …

I don’t think a regular website that uses HTML/CSS, buttons/links, and forms for navigation and content. You can display a webview using cocos2d, but there are better solutions.

You can check out Cordova (originally PhoneGap) to wrap your website for deployment as a native app on mobile: https://cordova.apache.org/

I’m not sure why a regular website would want a desktop wrapper, but there are multiple options for creating a desktop app essentially as a windowed browser the wraps a given website.

No, The app is only for phones.
I can’t just call the url and display the whole page as app.
I have to modify it.

Is cocos2dx good option.
Cordova is little slow in performance wise.
Cocos2dx is providing a lot of option to export the app to many platforms.

Please advice

Well the short answer is yes cocos2d-x can be used to create an app.

However, I’d still ask:

  • What language(s) do you or your team know?
  • How many platforms do you need? iOS/Android seem to be the only real markets unless you have a niche target group
  • What is your application type? a content website like a news site? social site like Facebook/Instagram? an “app” like _____? a game?
  • Does your website already exist? (yes/no) If yes, are you willing to share the URL?
  • Do you want to integrate with a lot of the specific platform’s features like iMessage new sticker packs or Android’s bot platform?

I would only advise using cocos2d-x for an app that is game-like in display and interaction since everything is custom-built and does not use any of the native platform UI controls (Apple’s Cocoa, Android’s Material). If you want it to look and behave similar to other data entry/search/navigate style apps then cocos2d-x would not be a good choice, imho.


Other options:

Cordova should use native controls where possible and should be reasonably performant on today’s phone/tablet hardware.

Xamarin is a pretty decent framework for iOS/Android/Win10 cross-platform app that is largely write-once, run everywhere that uses C# as the language of choice.
https://www.xamarin.com/

Titanium is another similar example that uses Javascript as the language of choice.

Native Script is similar and uses Javascript

There are three websites.

Shopping cart.
Social Networking (Not facebook, twitter. it is for limited people.) like website with chat feature.
Image Processing

Me and my friends are doing this. My friends know only designing.
I write the scripts.

I am good with Web programming like PHP, Mysql, …
I have average knowledge in Java.

Based on your answers my opinion is that you should look elsewhere. Maybe others will want to convince you otherwise.

Resurrecting an old thread here, but I think that cocos2d-x JS may be a good option. I am trying this out myself for a game.

Initially it is a web-based game, but I have been trying to get win32 and android versions compiling and running too because I hope to be able to one day expand into those platforms.

Having written it in javascript makes the porting to the other platforms really easy. The difficulty that I am seeing is with things like ads or other SDK integrations. On the web version of the game, I don’t see a way for integrate SDKBOX ads like Admob. There is google adsense but I don’t know how (yet) to do adsense in javascript.

So it seems like for many things a website built from cocos2d-x will port easily to mobile platforms, but there are limitations.

Anyone else have thoughts on how to make a ‘truly’ multi-platform game, with all the various integrations?

Often Javascript already has relatively simple SDKs so there’s less need for SDKBOX which is much more about improving the build process for c++ projects.

I’m not sure Admob specifically supports serving up with pure javascript? You may want to look at another service like Facebook or Adsense.

Do you really want a web version?

If not, c++ is also multi-platform (technically it can also support the web, but the emscripten port was abandoned, and it’s more complicated than using Javascript). It’s also easier to make money on non-web app stores.

If you do, and it is definitely nice to be able to share quickly and require no install, then you may want to look at Cocos Creator and write everything in Javascript. If you already know the original cocos2d api then Cocos2d-JS does still exist, but I don’t think it’s gotten a lot of love in the last year and so I’m not entirely sure of how good the documentation is if you’re not using the new Creator tool.

Obviously ad-based games do alright on the web. There’s plenty of examples on facebook, kongregate, armory games, etc.

There’s also other options out there for web-based games as I’ve mentioned before, including: Phaser.io, PixiJS 4, Impact , Unity3D, babylonjs (3d), melonJs, playcanvas, craftyjs, etc. Often any javascript engine can be deployed to native platforms with a wrapper (Cordova, native-script, etc).

Don’t spend too much time deciding, but you may want to think about your goals, honestly, and take a quick glance at a few of the options.

my 2c

1 Like

There’s some further somewhat related discussion over here: