Cross Platform Considerations

Hi

Anyone know best place to read about cross platform considerations when using Cocos2d-x

I have been through the first two google page searches but doesn’t seem to be a place dedicated to it or maybe i need new keywords

Thanks

What are your concerns?

We have a critical assingment that I need finish up tomorrow

You are required to investigate four different game engines
 Development
 Engine frameworks
Four engines
 Unreal
 Unity
 Cocos-2dx
 ? Have to pick another one
When analysing each framework/engine you must consider the following Architecture features
B - Processors
B - Graphics
B - Audio
B - Controllers
B - Storage
B - Platform interfaces

As part of the report consider the Cross-Platform implications for each one. These can include
C - Issues in achieving cross platform game operation
C - Developing for different platforms
C - Language and scripting
D - Identify four mobile game genres and which framework/engine you would each and why.
E - Finally conclude with lessons that you have learned from using engines/frameworks during your time on this degree programme

A Overview/Intro

B Architecture section

C Cross Platform Implications

D Mobile genre analysis

E Lessons learned

I just need to read up and be able write about Cocos2d-x

Well, we use OpenGL, most of the code is platform agnostic, except what each platform needs to bootstrap itself and then any platform specific considerations like audio, etc. When developing you really dont need to write any platform specific code unless you want to do something in your game that is platform specific. We support c++, Javascript and Lua on all the platforms we support. In terms of what games you would write, I cant think of anything the engine couldn’t handle. If you have a large 3D game I think we aren’t the best choice.

Not sure what this means ?

How does Cocos handle audio on each platform. Can i read about that anywhere. It obviously handles it differently with Linux, windows, iOS and android. ?

Same question for storage ?

What does this mean. I did read meaning in wiki. I’m thinking it means, that cocos rests on native structure naturally. It doesn’t have a huge foothold as such, or something …

With Processors, and android, android studio handles this, right ?

With iOS, the XCode IDE handles this, right ?

I would imagine the platform interface is the app delegate class where we make choices depending on what platform macro is true. (MAC, etc)

Any more juicy information slack would be great

For android you’ll develop on Android Studio and (specificly NDK)it already takes care of all the supported android hardware
architectures, but if needed to can changed this through gradle as far as i remember.

For iOS and OSX you’ll use XCode as IDE which takes care of everything it needs to run on all the supported apple devices and its hardware. (dependent on the xcode and iOS version)

I think AppDelegate won’t be the only place where you might need to check for the platform macro.
You can check for CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID anywhere in your project.

Yup you can do this where you see fit and you may have to. I have had to do this sometimes to overcome platform bugs and do a bit of different code for each platform.

1 Like

If you mean with “cross platform” that you want to deploy to Web and Desktop/Mobile then your only option is using Javascript as your language. Please someone correct me if I’m wrong. Using C++ with cocos2d would keep you from deploying to Web.

However, there were plans by the cocos2d-x guys to use WebAssembly to compile C++ for Web. Is this still being considered?

Yes.

It’s not something we are working on currently, but there was talk of this from what I remember.

1 Like