5 ms·
We've been using a similar approach for libGDX [1] with great success for the past 3 years. HotSpot on Windows/Linux/Mac OS X, Dalvik on Android, RoboVM [2] on
by badlogic 12y ago
We've been using a similar approach for libGDX [1] with great success for the past 3 years. HotSpot on Windows/Linux/Mac OS X, Dalvik on Android, RoboVM [2] on iOS and GWT on the web. We had to add quite a bit of functionality to GWT to make things work, like (very hacky) reflection. You can now share 100% of your code across all these platforms with minor restrictions due to GWT (threads, missing JRE classes/packages). Without the web, all platforms work pretty much the same. Many smaller and bigger studios have used this approach quite successfully.
I wonder if the Google folks ever looked into RoboVM as a replacement for j2objc. It's a full AOT compiler, sharing the class library with Android with access to all iOS APIs (think Xamarin for Java/JVM languages). I tested j2objc when itmwas published as a potential way to get our libGDX stuff working on iOS, but it was extremely limited in its capabilities. Kinda reminded me of Oracle's terrible ADF.
[1] http://github.com/libgdx/libgdx http://github.com/libgdx/libgdx
[2] http://www.robovm.com http://www.robovm.com
- eropple 12y agoMario's not hiding any "well, kinda" bits when he says libGDX will run everywhere he mentioned--there are no second-class citizens in their world and it really benefits from that approach. RoboVM really is killer, and libGDX is too. Those guys certainly don't need me to validate their work, it speaks for itself, but anybody who is comfortable on the JVM and wants to make a game for the platforms libGDX supports should check it out.
- edwinnathaniel 12y agoIt seems to me that RoboVM+libgdx is utilized heavily for the game industry. Correct me if I'm wrong, most games don't use UI components (most of the time it's a full-screen game) the way regular apps do so I'm wondering if RoboVM is a good fit for Rich-UI mobile apps?
- badlogic 12y agoThat's correct, most games will never touch the native APIs, except for things like IAP or Facebook/Game Center/Google Play Games Service integration. RoboVM gives you full access to all iOS native APIs in idiomatic Java. Have a look at the Javadocs [1] to get a feel for how that looks like. Currently not wired up to the Apple docs, but that's on our roadmap. We have quite a few ports of official Apple demo apps [2], a simple hello world looks like this [3]. You can even extend ObjC classes as if they were Java classes and/or implement Protocols. Binding of native APIs (C, ObjC) is accomplished via something called Bro, which is annotation-based and a lot simpler and faster than using JNI. So, yes, i think RoboVM is a good fit for Rich-UI mobile apps. Performance is great (we use LLVM), and the bindings are pretty complete. We currently lack interface builder integration, but that's on the short term road map (and for anything other than a quick prototype you don't use IB anyways). [1] http://docs.robovm.com/api/1.0.0-SNAPSHOT/ http://docs.robovm.com/api/1.0.0-SNAPSHOT/ [2] https://github.com/robovm/robovm-samples https://github.com/robovm/robovm-samples [3] https://github.com/robovm/robovm-samples/blob/master/HelloWorld/src/org/robovm/samples/helloworld/HelloWorld.java https://github.com/robovm/robovm-samples/blob/master/HelloWo... [4] https://github.com/robovm/robovm-samples/blob/master/HelloWorld/src/org/robovm/samples/helloworld/viewcontrollers/MyViewController.java https://github.com/robovm/robovm-samples/blob/master/HelloWo...
- microcolonel 12y agoYeah, I've played with it through OpenScienceMap[0], it's buttery smooth on everything, zero compromise. I especially like the web browser support, it feels good to step entirely around the browser. [0] http://opensciencemap.org/map/#&scale=16&rot=-18&tilt=46&lat=43.645&lon=-79.381 http://opensciencemap.org/map/#&scale=16&rot=-18&tilt=46&lat...
- skybrian 12y agoHow does this compare to PlayN? [1] Any relationship? [1] https://code.google.com/p/playn/ https://code.google.com/p/playn/
- badlogic 12y agoPlayN is more of a 2D engine, whereas libGDX is a framework you pick and chose functionality from. There's a lot of cross polinatiom between the two projects: we steal a lot of code from each other :)
- JonathonW 12y agoAt least one team at Google has used libGDX (on top of RoboVM): Ingress uses libGDX for their iOS and Android clients. RoboVM is a very cool project. We ended up on Xamarin for the cross-platform project we were working on here internally, but, had RoboVM been a little more mature when we were evaluating cross-platform projects (this was around April of last year), it would've most likely been our first choice instead (we have a lot more in-house Java expertise than C#).
- PSeitz 12y agoI moved from J2ObjC to libGDX because of the ui layer, which is fully integrated in libGDX. Splendid work for the engine!