I have the basic ideas that libGDX uses RobotVM to compile Java into llvm-like bytecodes and then platform-specified codes.
I was wondering if I could use AndroidJSCore in libGDX applications. It's for android, I suppose this should compile. The problem is it relies on JavaScriptCore, which was built in C/C++. Does RobotVM compile C/C++ codes?
It sound like you have a wrong idea of what RoboVM is (was)
RoboVM was used by LibGDX to run on iOS. RoboVM was discontinued as of april 15 2016. LibGDX now uses Intel Multi-OS Engine to run on iOS.
LibGDX on Android uses Dalvik just like normal android apps. So if AndroidJSCore works with normal Android apps it should work with LibGDX too. But, you might be the first person to try it.
Related
I am new to libgdx, i want to develop an application with libgdx, and supports for all libgdx target platforms(Windows, Linux, Android, iOS...), what classes in Java SE can i use?
I tested with javax.swing.JFrame, and ClassNotFoundException is thrown in Android platform! so, how do I make sure which classes in Java SE is supported for all libgdx target platforms?
Java SE is mainly for desktop applications (Windows + Linux) and there you can use everything from SE and it will work if the version of Java is correct.
With other platforms it is a little bit more complicated and specific because android for example can not provide all functionality which Windows can (JFrame, ...). For android there is an API reference and there you can find all packages you can use on android (again, be aware of different API verions).
Libgdx on web browsers uses GWT. Again, you can find available packages for GWT here.
I have no experience with iOS but I am sure you will find somewhere which packages are available on this platform.
If you are creating just a small game, I do not think you will need everything from SE and commonly used classes are often available on every platform. Do not care much about this unless you need something specific which is not available on every platform. (JFrame can be replaced with e.g. Activity on android, but if you want your game to be truly platform independent, then use only classes from libgdx)
When testing using Flash CC 2014, I get an error Functions called in incorrect sequence, or earlier call was unsuccessful.
Does this feature require the actual iOS or Android device to test, or can it be tested without it?
No, you can also test it using the iOS Simulator as well and possibly the Android Simulator, if you can get that working (I never bother with the Android simulator, though, even when working with native development). You cannot test it using the AIR Simulator, though. The camera functionality requires native APIs to function.
Also, keep in mind that the CameraRoll (and camera functionality in general) varies by platform. Do not assume that because you tested it on an Android device, it will work properly on an iOS device or vice versa. You must test it on all supported platforms.
I want to develop an cocos2d-x game for android & iphone. I don't know from were to start my development. I know there is an template available for iphone, but after creating it on iphone how build it for android platform?
And what if i want to develop game form the eclipse itself rather then developing on iPhone and then migrating to android
I had already tried various tutorials of ray wenderlich, tutorial on cocos2d-x.org, http://paralaxer.com/cocos2d-x-project-setup/, http://www.multigesture.net/articles/how-to-setup-cocos2d-x-windows-and-android/, http://www.jesusbosch.com/2012/06/how-to-set-up-android-and-win32-cocos2d.html, http://gameit.ro/2012/01/creating-an-iphone-and-android-cocos2d-x-hybrid-project-updated/
From all of the above tutorials i am not able to get any proper solution.
Also tell me should i have to develop(code) on iPhone and then build for android?
Thank You in advance
simple :
-> Framework : cocos2d-X
-> Editor : Xcode
-> Language : C++
once you complete your Game for iphone then You can port your this game to any platform like Android or Windows. you already have all useful links . still follow this :
Setting_up_Android_Development_Environment_on_Mac_OSX :
http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Setting_up_Android_Development_Environment_on_Mac_OSX
How to port your project to win32,iPhone and Android
http://www.cocos2d-x.org/boards/6/topics/3001
Integrate Cocos2d-x (C++) into an Android application (Java)
http://jpsarda.tumblr.com/post/26000816688/integrate-cocos2d-x-c-into-an-android-application
-> You just have to convert this native code using some JNI or say NDK .
-> using Cocos2d-x u can Develop games on Windows, Mac OS and Linux .
Personally if you are deploying to multiple platforms your best bet is to use a gaming engine. Currently Unity3D, UDK, and newly released Havok's Anarchy Engine supports deployment to these platforms and more. This way you can develop once and deploy to multiple locations. Cost is free for Havok, UDK if you are a small company, and I believe Unity3D now has free licensing to iOS and Android for their non-Pro versions.
I think going this route is far more promising than using cocos2d
The method I use is to use the templates for both iOS and Android that create projects for Xcode and Eclipse respectively. When you have this, you remove the Classes and Resources folders in for example the Eclipse project and replace those folders with links to the Xcode folders Classes and Resources.
What you now have is two projects, one for iOS and one for Android, that both use the same C++ code and resources. You can now choose which of Xcode and Eclipse that you prefer to use when developing and just switch to the other to compile for that platform and do testing and releasing there.
Hope that helps. :)
Look in cocos2d-x folder under /tools/project-creator/create-project.py , you should run that and it will create project for many platforms already set-up and from there you can just code in XCode, and platforms will share same source code.
This month I started to play with Flash Builder because I don't have a mac to create native iPhone apps.
I have made a Flex Mobile Project and an AS3 Mobile project. Both do mostly exact the same and I see great differences in operation speed (AS3 version is much faster). Also the size of the AS3 version is less than the size of the Flex version when I deploy the project.
But one thing disappoints me, the size of a deployed AS3 app (Android) is still about 8MB. I think that is quite huge for a simple app, or is it normal? I did not test the iOS version because I am not an Apple Developer member (is there a trick to deploy an iOS app with fake certificates)?
Resources I have used in the apps:
Two images approx. 35kb in size
A StageWebView
I want to know:
What is the average size of a simple app when it is a native app (apk file)?
What is the difference between an AS3 app and a Flex app except the libraries that re used?
Is the AS3 app converted to C or another language?
Why is the apk so huge (IMO)?
Is there a trick to deploy an iOS app with fake certificates? (just for testing)
Thanks for the answer(s).
What is the average size of a simple app when it is native app (apk file)?
I have no idea. When you were comparing sizes; did you export a release build or a debug version? The full version of my app; using Captive Runtime is 12MB. That includes all the embedded images. I thought that roughly 8MB is the size of the embedded runtime. Of course, if you don't use Captive Runtime then the app will be smaller; but it will have a depency on the user having the runtime installed.
What is the difference between an AS3 app and a Flex app except the libraries that are used?
For all intents and purposes nothing. The Flex Framework will need to execute code to setup the framework and such. In theory this 'impact' is offset by the value that the framework brings.
- Is the AS3 app converted to C or other language?
Not for Android or Playbook. It relies on the Mobile AIR Runtime--which I assume is written as a native app somehow. For iOS there is a more in depth conversion taking place; but no on knows the exact magic sauce; but it the process is much more intensive than Android or Playbook and people believe that your code and the AIR Runtime is converted to Objective C somehow in a way that is not in violation of the Apple licensing agreement.
Why is the apk so huge (IMO)?
Huge is open to interpretation. Without seeing your full app code; it's tough to judge.
Is there a trick to deploy an iOS app with fake certificates? (just for testing)
I don't think so; although there may be possibilities on unlocked devices.
You would like to use Mobile AS3 Project if you want you apps to be smaller and your GUI mainly contains vector graphics and Mobile Flex Project if you prefer to use standart GUI Controls that comes together with Flex framework but adds overhead in size because of controls that come with it.
As of the other questions:
the size of the apps is different on mobile platforms. Typical iOS app is about 2MB - 20MB. It really depends on resources you store with your app. What might be important to you is not to overcome 20MB if not needed because 20MB+ apps require Wi-Fi connection to be downloaded.
(However you should export release build version only as mentioned by www.Flextras.com)
there is no fundamental difference between AS3 and Flex apps - they both compile to the same instructions that executes on targeted mobile platform.
as far as I know (being iOS developer myself) there is no workaround to deploy an iOS apps. You need to use Mac and become Apple Developer to deploy with valid certificate.
to make your app smaller try to pai special attention to the resources you add to the project. Although I believe the size is so big because of framework itself, you would like to use more vector graphics vs. bitmaps when compiling apps with Flash/Flex.
When you export for Android you have an option of embedding the air framework in the application, that way your users don't have to download air. you can export your application without air embed which will result in a much lighter application, however your users will need to download air runtime. http://cookbooks.adobe.com/post_How_do_I_create_an_AIR_application_for_Android_tha-19299.html
Is it possible that an adobe air application that runs fine with an older installed AIR runtime stops working or works buggy if it is installed on a system that has a newer version of the runtime installed?
I know by concept this should not be the case - but how is it really?
Yes, this is the case in some applications.
For example, the updater classes broke in my application LinkFinderPro when they released AIR 2.7.
I haven't seen it anywhere else, really, but I had to mention this case.
I don't know if there is some official statement from Adobe about this but I can talk to you from my own experience:
As far as I know, Adobe runtimes, both the Flash Player and Air, have always been retrocompatible and have not had issues like the ones you describe.