Application Development using Cocos2d-X

Hi,

I want to develop an app on all cocos2d-x supported platforms(Mobile) that requires the following Features, So can someone in the community help whether Cocos2d-X can support these features.

  1. Flexible Api for drawing on to the screen and Access to the screen Image for custom scrolling.( Getting the current screen shot[screen content] should not require redrawn or similar kind of stuff).
  2. Http and Https support.
  3. Phone Camera and Gallery.
  4. Unicode Text Rendering like Arabic and Devanagari etc.
  5. Image Encoding(jpeg and png).
  6. JSON & XML Parser.
  7. Device Virtual/Software Keyboard Invoke/Show and Dismiss API.

I appreciate any input or support to my query.

Thanks & Regards
RamaKrishna

RamaKrishna Mallireddy wrote:

  1. Flexible Api for drawing on to the screen and Access to the screen Image for custom scrolling.( Getting the previous screen shot[screen content] should not require redrawn or similar kind of stuff).
    Not sure.
  1. Http and Https support.
    Yes.
  1. Phone Camera and Gallery.
    Must be done natively with a C++ wrapper.
  1. Unicode Text Rendering like Arabic and Devanagari etc.
    Most likely possible.
  1. Image Encoding(jpeg and png).
    Yes.
  1. JSON & XML Parser.
    Yes.
  1. Device Virtual/Software Keyboard Invoke/Show and Dismiss API.
    Yes.

Thanks Lance.

I am looking at cocos2d-x and Marmalade for my app development.
This is my personal project and have very little budget but by opting for Marmalade if my effort are less to complete the project then I am willing to pay for it.

From you answer, The only thing that I might need to put extra effort is camera and gallery if I want to develop in Cocos2d-x.
I want to use cocos2d-x as it free and give me option for screen transition and other effect which I like to have in my project but Camera, Gallery and Unicode support is very important to my project.

I can write wrappers for camera and gallery for Android and I don’t have experience in Obj-C but there r so many tutorials for iPhone so I won’t think it would be too difficult to write a wrapper for iPhone.

About Unicode, is there any example how to display an arbitrary Unicode string in cocos2d-x.

Thanks
Rama

  1. You have access to OpenGL directly. I tried it and had trouble using anti-aliasing on iOS, so I decided to use CCRenderTexture to draw/cut sprites instead. It works like a charm. Not sure what you mean about custom scrolling / getting the current screen content : you can implement custom scrolling by intercepting touch events and manually moving your assets without any problem.

  2. Yes, CCNetwork in the extension seems to be exactly for that. I didn’t try it myself

  3. Requires a wrapper indeed, I did it on Android and iOS without much problem, although there are a few gotchas in both versions.

  4. I think CCLabelTTF will get you covered, since it uses a native Label under the hood. Otherwise, you can use CCLabelBMFont, but they take a very long time to load if there are too many characters in it (I’m talking several seconds on an iPhone 3GS for 3000 characters). It depends on your context.

  5. I know you can do that with native wrapper, after getting the result of a camera/image gallery. I guess that’s what you need, since you decide what is in your package.

  6. I use pugixml for XML, there should be plenty of C++ JSON parsers as well.

  7. CCEditBox in the extensions is exactly what you need.

To try the Unicode string display, I suggest you fiddle with LabelTest in TestCpp to be sure what you need works.

François Dupayrat wrote:

  1. You have access to OpenGL directly. I tried it and had trouble using anti-aliasing on iOS, so I decided to use CCRenderTexture to draw/cut sprites instead. It works like a charm. Not sure what you mean about custom scrolling / getting the current screen content : you can implement custom scrolling by intercepting touch events and manually moving your assets without any problem.
    >
    I mean exactly what you have mentioned, I have a menu list with a slightly complex menu-item structure and I have to implement manual scrolling using the last drawn screen and render only the content/asset that shows on the screen due to the user touch movement distance i.e the current screen content will be moved up/down based on the user touch movement and render the remaining part.

Thanks François for your inputs that really helped me.

I will start my project in couple of months, In the mean time I can play around with cocos2d-x to familiarize the environment.

Thanks
Rama