Zohaib Zaidi Port iphone game to android in C++
Posts 61
Added by Zohaib Zaidi almost 2 years ago

I have a game written using objective C and cocos2d.
I want to port it to android without using java.

I initially tried with airplay sdk but it has too many issues.

Is it possible to port my game using this cocos2dx and ndk in C++? and what resources will be required.

A quick reply will be appreciated. Thanks

Mots G RE: Port iphone game to android in C++
Posts 1
Added by Mots G almost 2 years ago

Hi All
I came across this post when I found the that CCSAXParser take a lot of time to load .plist files. Glad to know a solution exists! Thanks everyone for it (I'm yet to integrate it).

However, I have a suggestion to make. I've read that TinyXML is sometimes quite buggy and has memory leaks in it as pointed out here: http://stackoverflow.com/questions/170686/best-open-xml-parser-for-c

Also, they state that PugiXML/RapidXML are much faster than TinyXML.
So why not port the new CCSAXParser using some other parser, maybe PugiXML or RapidXML?

Please note that I've not used TinyXML on my own but had just come across the post and hence felt like making the suggestion.

Regards,
Mots

Isaac Ashdown RE: Port iphone game to android in C++
Posts 61
Added by Isaac Ashdown almost 2 years ago

I ran the bog-standard windows CRT leak detector over my app after finishing it, in the win32 port, and there were no leaks detected in tinyxml (or elsewhere, I'm pleased to report). The main reason i chose tinyxml was that I had familiarity with it, and it compiled and worked on the android without needing adjusting at all. But of course, there may well be better solutions :)

Steven J RE: Port iphone game to android in C++
Posts 11
Added by Steven J about 1 year ago

RapidXML is no good since Android C++ doesn't allow hpp file and try/catch blocks, both of which are RapidXML. But yes, it is very fast.

Edit: We fixed the android issue, just call ParseDeep instead of Parse, and use the CCFileData type to grab a buffer to the file's contents instead from the file. Then, you don't have to deal with compression, send the buffer into Parse Deep, and pass in 0 as the next parameter

Steven J RE: Port iphone game to android in C++
Posts 11
Added by Steven J about 1 year ago

Ignore this... hit post instead of edit earlier


« Previous 1 2 (26-29/29)