I have a few games in App Store for iPhone/iPad and am still pondering some things about cocos2d-x and how certain things might work.
I am interested in starting to develop for Android as well (have never done any android stuff yet) and am wondering is if there are some best practice for platform specific things.
For example, in iOS I use UIAlertView’s all the time. What would the equivalents be on Android and Windows for example, and is there something more generic that could be used in cocos2d-x (a single call) that would automatically call the appropriate popup on the proper platform, or do I need to do platform specific calls for each one.
My impression (which I hope is wrong) is that although you are creating one code base, you pretty much have to write separate versions of the code for each platform… so I am imagining something like this everywhere:
if (iOS) {
//do ios specific code
} else if (android) {
//do android specifc code
} else if (windows) {
//do windows specific code
} else {
/do mac specific code
}
So it almost seems that you are rewriting all your code for each platform anyways, so is there really much advantage to this?
Thanks