Despite claims that the Ubuntu phones are slow and cumbersome, they are actually powerful enough for casual games. We have already seen ports of Neverball and Tuxracer, which display decent performance on the most modest of the Ubuntu phones.
These games have been made possible by the hard work Brandon Schaefer has devoted to adding Mir support to SDL2. SDL2 is a tool used by many game developers to “iron out” the differences between platforms. A game can be made to run on Windows, Linux and Android with minimal tweaking. Support for SDL2 on Ubuntu phones is currently a little patchy, due to bugs in Mir and Unity8, but it is improving all the time. Hopefully this work will eventually bring many more games to Ubuntu phone.
However, SDL2 is not an actual game engine. A game engine helps developers create games by looking after all the boring, and difficult, work. There are several game engines available for Ubuntu on the desktop, such as Unity3d, LÖVE and Godot. Unfortunately, none of these are currently capable of targeting Ubuntu phones, and none of them use SDL2. Porting a game which had been created with one of those engines would be a difficult task.
With that in mind, I have decided to set myself a challenge. I am going to try to port the Godot engine to Ubuntu touch devices. The Godot engine has several attractive features:
- It is Open Source
- It is well designed
- It is easy to use
- It is capable of producing 2D and 3D games
- It has mobile support for other platforms
- It is simple to deploy in a confined environment such as a .click package
- It is being actively developed and maintained
- It has an active community of game designers creating content
- It integrates well with other Open Source tools such as Blender
- It is free
I don’t expect this project to be easy, nor do I expect it to be fast. It does, however, seem to be possible. On the way, I expect I will have to learn a bit of C++ and learn to wrangle with the scons build system. I’m not a developer, and will be relying on my knowledge of C and Autotools to help me bluff my way through.
There isn’t any documentation available on porting the engine. From looking at the source, the roadmap would appear to involve:
- Creating a new platform under “platform/platformname”
- Create a subclass of OS_Unix
- Add methods for creating and maintaining an EGL window under Mir, possibly borrowing from bschaefer’s work on SDL2
- Add support for input methods/sensors (possibly stealing from OS_X11)
- Add support for sound drivers etc (possibly done already)
- Tweak paths to fit with Ubuntu app confinement
You can follow my progress on here, and fork/contribute at GitHub. Wish me luck!