1

I have completed a project which is completed on iOS and Android with all native code like in-app purchases and leaderboard completed. I want to convert that project into HTML 5 but without changing my C++ code to javascript and using the same resources. Is there any method/way to convert my code?

I was a native obj-c programmer who joined cocos2d-x porting from cocos2d-iphone. I have little/no knowledge of html or javascript.

CodeSmile
  • 64,284
  • 20
  • 132
  • 217
Umesh Sharma
  • 388
  • 5
  • 23

1 Answers1

2

If you want the resulting app to run within the browser, then no. There's no cocos2d variant that makes this possible. You would have to port the app to a completely different (but still C++) framework. See: How to build native C++ apps with HTML/CSS UI?

You can of course build a c++ app with cocos2d-x that presents a html5 view, but it won't run within the browser.

Community
  • 1
  • 1
CodeSmile
  • 64,284
  • 20
  • 132
  • 217
  • Can you please guide me how? It's ok even if it doesn't work within a browser but a html5 view – Umesh Sharma Nov 13 '14 at 10:00
  • 2
    Well, that requires what you don't want to do: porting the code to HTML5+Javascript. Unless you use a native C++ HTML5 engine, which requires porting all of your code to the new engine. There's no silver bullet, no easy way. Plus it's not really meaningful to present the game in a web view when you could as well present it in a native view. Neither will run as standalone in a browser. – CodeSmile Nov 13 '14 at 11:01