Universal Bada 1.2-2.0 project and platform-dependent code

Hello!

Is it possible to create universal Bada 1.2-2.0 project and platform-dependent code?

There are some difficulties with Samsung market. If you give them Bada 1.2 build (WVGA device group), they check it on Bada 1.2 and Bada 2.0 devices. But sometimes build which is created on Bada 1.2.1 IDE with sdk1.0 project crashes on Bada 2.0 devices. Or works very slow (in Bada 1.2 device all is ok). And build which is created on Bada 2.0.4 IDE with sdk2.0 project can’t even start on Bada 2.0 devices.

When I build samsung OpenGL 1.1 example GlesCube11 on Bada 2.0.4 IDE, it successfully runs on Bada 2.0 devices and Bada 1.2 devices (I changed only manifest). In cocos2d project I also changed manifest, but no result. I begin to compare cocos2dx sdk1.0 and sdk2.0 projects and find:

  1. In sdk2.0 linked pthread.so which is absent in sdk1.0 project.
  2. In sdk2.0 there is CC_BADA_2_0 define and a lot of #ifdef CC_BADA_2_0 in Bada platform-dependent code.
    May be there are some other differences. So is it possible to define Bada OS version in runtime and have the same code/project for both platforms? Because now there is very low chance to upload Cocos2dx game for both Bada 1.2 and Bada 2.0 OS in Samsung market because of this differences in cococs2dx.

As for our company, we successfully uploaded cocos2dx game, created on Bada 1.2.1 IDE with sdk1.0 (WVGA group), but it works very slow on Wave 3 with Bada 2.0. We tried to upload also second game, but Bada 1.2.1 IDE sdk1.0 build was rejected because of problems on Wave 3 device with Bada 2.0

Best Regards!
Alexander

Hi,

  1. In sdk2.0 linked pthread.so which is absent in sdk1.0 project.
    Because pthread.so is not supported in platform which version is lower than 2.0. So we implement the interfaces of pthread by Osp::Base::Runtime::Thread.
  2. In sdk2.0 there is CC_BADA_2_0 define and a lot of #ifdef CC_BADA_2_0 in Bada platform-dependent code.
    We use CC_BADA_2_0 macro to avoid the difference between 1.* and 2.* api. For example, some standard C functions like sscanf are not supported in sdk 1.0. And we use eglGetProcAddress to get the opengles external functions pointer in HVGA device. If not ,application will crash on where these functions are invoked.

So is it possible to define Bada OS version in runtime and have the same code/project for both platforms?
Does bada provide this api?:slight_smile:

BTW, we had tested on wave3 device and it worked fine. So did you run our tests project on Wave 3 device? Was it slow too?

Hello!

Thanks a lot for the answer!

I have some additional comments.

Of cause, we should avoid the difference between 1.* and 2.* api. But I asked is it possible do do it in runtime.
" So is it possible to define Bada OS version in runtime and have the same code/project for both platforms?
Does bada provide this api?:slight_smile: "
Is it enough to use Osp::System::SystemInfo (http://developer.bada.com/help/index.jsp?topic=/com.osp.cppapireference.help/classOsp_1_1System_1_1SystemInfo.html)? We can get APIVersion from it.

The main problem is that Samsung QA check Bada 1.2 project on Wave 3 with Bada 2.0 and they want that it works fine on both Bada 1.2 and Bada 2.0 devices. But in our case the game made with sdk1.0 works fine on Bada 1.2 device (Wave), but slow on Bada 2.0 (Wave 3) device (or even crashs sometimes). Samsung support advised to make universal build with using Bada IDE 2.0.x and Bada 1.2 manifest. It works fine with their GlesCube1.1 example, but doesn’t work with cocos2dx app.

“BTW, we had tested on wave3 device and it worked fine. So did you run our tests project on Wave 3 device? Was it slow too?”

We have only Wave with Bada 1.2 and Wave M with Bada 2.0. We run tests project on both devices and it worked fine. But our game (zMatch on Bada store) gets more system resources then tests. And it works well on Wave with Bada 1.2, but slow on Wave M with Bada 2.0 (may be different processes - PoverVR 1000 MHz vs Adreno 832 MHz).

Hi, i did not find a way to make an application built from sdk1.0 to run on 2.0 devices. But those who use our engine have successfully upload their apps to samsungapps. Maybe you should buy a s8600 to test your games. BTW, I don’t think it’s the problem of the CC_BADA_2_0 macro. Also, I don’t find the api of get system version.:slight_smile:

Hi,

“i did not find a way to make an application built from sdk1.0 to run on 2.0 devices”
yes, officially developers can’t do it. But after Samsung conformation you can do it through the Samsung store. And samsung QA team also run sdk1.0 WVGA apps on 2.0 devices (on wave 3)

“I don’t think it’s the problem of the CC_BADA_2_0 macro”
yes, it is a complex problem of running sdk1.0 apps on 2.0 devices

“I don’t find the api of get system version.”
we can get APIVersion (and PlatformVersion) using Osp::System::SystemInfo. So we have the ability determine APIVersion in runtime. Is their any other obstacles (except a lot of work) to do universal project?

Hello, Alexander,
Could you please tell me what’s the difference between using macro and using variable to distinguish bada1.0 and bada2.0 in runtime? I think it’s unnecessary.
Maybe you can finish it to avoid this issue by judging device version in runtime. Then, don’t forget to give us a feedback. And we will consider to use your method.
Thanks very much! :slight_smile: