I’ve been checking on the progress on the Xamarin front. As you may remember, we are phasing out the Xamarin backend. 我一直在坚持Xamarin前面的进展。您可能还记得,我们正在逐步淘汰掉Xamarin后台。 It


I’ve been sick the last few days, and figured i’d learn Gradle. I created a Gradle based libgdx template, which you can start using now. It will eventually replace our current Setup-UI to make my life more enjoyable. IT will also allow you to build and run your libgdx projects on the CLI, Eclipse, IntelliJ and even Netbeans. And on top of that, you’ll not have to juggle any JARs or native libraries anymore, everthing is taken care off for you. You can update to different version of gdx, and easily include extensions or other 3rd party libraries. So, what is this magical Gradle?


Gradle is a build and dependency management system, using Groovy and some domain specific language sugar. A build system is responsible for compiling your application and packaging it up. A dependency management system allows you to define which 3rd party libraries you want to use, and the system will automatically pull those libraries in for you. Provided the libraries are available in some sort of repository. The most established type of repository in Java land are Maven repositories, with Maven Central being the global central hub to which almost all things get published to.


Here’s what defining such dependencies looks like in Gradle for a libgdx project that also uses the FreeType and Bullet extensions (no GWT and iOS yet):



For about 2-3 weeks now i’ve been actively switching our libgdx game dev framwork’s iOS efforts over from Xamarin/IKVM to RoboVM. For those of you who missed the last few weeks of libgdx updates, here’s a breakdown what RoboVM is and why we use it.


##What’s RoboVM?


The promise of RoboVM is a fully workable ahead-of-time compiler for JVM bytecode for iOS (and 32-bit Linux/Mac if you fancy that). RoboVM uses Soot and LLVM to transform the bytecode to native x86 or thumbv7 ARM code. RoboVM employs Android’s latest runtime class library iteration, making it compatible with pretty much any JVM library/language out there. RoboVM also comes with a set of bindings to the ObjC APIs of iOS. These bindings are realized via a custom Java-to-native bridge called Bro, and generated automatically from header files, with minor manual intervention. JNI is of course also supported, pending some more esoteric features.

RoboVM许诺它是一个完全可运行的ahead-of-time编译为JVM字节码iOS(和32位的Linux/Mac,如你看中的那个)。RoboVM使用Soot和LLVM转换字节码为本地X86货thumbv7 ARM代码。RoboVM采用Android的最新运行类库迭代,使其兼容几乎任何JVM库/语言。RoboVM还带有一组绑定iOS的ObjC API.这些绑定实现通过一个自定义JAVA到本地的桥叫弟兄,并自动生成头文件,有轻微的人工干预。当然也支持JNI,处理一些更深奥的功能。

##Libgdx, Xamarin & RoboVM Previously we leveraged [Xamarin iOS] plus a port of IKVM by Michael Bayne of PlayN fame to get our Java based game dev framework to work on iOS. This combination worked, but had its flaws. For one, not all of the Java runtime classes were supported, most prominently the java.net package. Also, some parts we heavily rely on in libgdx, like JNI, were extremely slow with the Xamarin/IKVM hack. Note that this is not an issue with Xamarin iOS itself, but due to the nature of the IKVM port. Xamarin have been extremely helpful and gave us a few licenses at a very low discount for development. All this limitations also meant that running anything complex was always a gamble, and using other JVM languages was pretty much out of the question.

之前我们利用Xamarin iOS附加PlayN的Michael Bayne开发的IKVM的部分整合我们的基于Java游戏开发框架工作在iOS上。这种组合工作,但是有它的缺陷。例如,不能支持所有的Java运行时类,特别显著的是java.net包。此外,一些地方我们严重依赖于libgdx,像JNI,Xamarin/IKVM极其缓慢。注意这个不是Xamarin iOS自身的问题,而是归咎于IKVM端口的性质。Xamarin一直有非常有帮助,给了我们几个很低折扣的开发许可证。所有这个限制也意味着运行任何复杂的都是一场赌博,并使用其他JVM语言几乎都出问题。

RoboVM fixes many of these issues. The JNI bridge is considerably faster, there are less layers of abstractions, all of the Android runtime classes are available, it will allow us to write games in Scala and JVM languages other than Java, and best of all, it’s entirely open-source under Apache 2. Libgdx development on iOS thus becomes essentially free, apart from the Apple tax (developer license, need for a Mac). Note that Trillian AB will eventually have to start looking into options to further fund RoboVM. If we get a chance as a community to help fund RoboVM, we should definitely do so. RoboVM is shaping up to be an excellent tool, and i think it’s worthwhile to support, just like Xamarin.


Forcing a crash is a great way to test out the SDK, but is actually a little more tricky than you might think. 强制crash是很好的一种测试SDK的方式,但实际上是一个比你想象的更棘手一点。 How to force a crash We’ve built


Today i continued working on some RoboVM backend todos. Multi-touch is now working properly, the fix was rather simple, once you understand that you have to enable multi-touch on a view in a single line of code on iOS. 今天我继续工作在一些RoboVM后台待办事项上。 多点触控 现在完


A couple of quick updates. First of all, you can track the progress and todos on the RoboVM backend in this file. 一对快速更新。首先,你可以在这个文件中跟踪RoboVM后台进度和待办事项。 A couple of bugs have been fixed, including Preferences and various


To all watchers of the libgdx repository: i’m terribly sorry and hope i didn’t interfer with your work in any way


This is meant as a cautionary tale about using Github’s API on a repository with quite a few watchers (460 in this case).


Earlier this year we migrated our code from Google Code to Github. We didn’t have a good migration plan for the 1200 or so issues back then, so we kept them on Google Code. We now have about 1700 issues on the tracker

今年早些时候我们从Google Code迁移我们的代码到Github。我们没有一个好的迁移计划去迁移1200个左右问题,因此我们保持他们在Google Code上。我们现在有大约1700个问题跟踪。

Today i finally wanted to tackle the issue tracker migration, using a Python script i found on Github. The script requires one to specify a Github user account that owns the repository the issues will get migrated to. I did a dry run on a fork of the main repo using my Github account, fixed up some issues in the script, and validated things to the best of my abilities. Things looked good.

今天我最终想去处理问题跟踪迁移,用一个我在Github上找到的Python 脚本。这个脚本必须指定一个我们将迁移到的自己资源库的Github 用户账号。我用我的Github账号在主资源库的一个fork上做了一个枯燥无味的运行,在这个脚本里解决了一些问题,且尽我最大的能力进行了验证。事情看起来挺好。

Then i ran it on the main repository. Luckily i was watching our IRC channel. After about 4 minutes, people started to scream. They each received 789 e-mails from Github. Every single issue i migrated, and every single comment of each issue triggered an e-mail notification to all watchers of the main repository.


This wasn’t apparent to me during the dry runs, as i used my own Github account. The script posts all issues/comments with the user account i supplied, so naturally, i did not get any notification mails.


I stopped the script after 130 issues (4 minutes), and immediately started sending out apologies and a mail to Github support, to which i haven’t received an answer yet. I send roughly 300k mails through their server in a matter of minutes. If i hadn’t watched IRC, i’d have send out about 4 million mails to 460 people within an hour.


[译]Box2D API的改变

We are cleaning up the core a little, and in the process eliminate usage of Java collections and replacing them with our own collections. 我们正在清理核心的一点,并在这个过程中用我们自己的集合去替换和消除使用的Java集合。 One of our

[译]重大的libgdx问题跟踪和Wiki Github迁移

A little less than a year ago, we moved all our code from Google Code to Github. That was a nerve racking but ultimately beneficial task. Since our move, we had almost 600 pull requests! 不到一年前, 我们迁移Google Code上所有代码到Github。它是