In preparation for this I’ve put together a simple template for getting started with QML and Box2D development for both desktop Ubuntu and Ubuntu Touch. It’s available in two flavours:
Precompiled version – Includes QML Box2D already compiled for amd64 and armhf (when I have more time I’ll add i386 to this as well).
Source version – Makes it easy to compile everything yourself on whatever architecture you’re interested in.
This means that if your game is going to be purely QML based you can just grab the precompiled version, and run “make click-packages” and have packages built for both desktop and mobile use at the same time.
The template comes populated with an example application (one of the standard QML Box2D demos), which is found in the “src/” directory; so you’ll be able to see something running straight out of the box, then when you’re ready you can just replace this with your own game.
In the future I also plan to extend these templates to provide example packaging for multiple different QML + Box2D compatible mobile platforms (Sailfish, MeeGo, Blackberry, Android, etc.)
If you’re interested in seeing an example of the sort of thing you can achieve fairly easily with QML and Box2D I’ve also uploaded a video of one of my current work in progress projects:
Recently I’ve spent a little time getting the Ogre3D engine into a state where it’ll work on the Nokia N9 and N950 MeeGo phones.
To test the port out a bit more extensively I decided it’d be a good idea to try porting an existing game, at which point rzr suggested Those Funny Funguloids. So after a fair amount of hacking to make it compatible with my version of Ogre and to make the controls work reasonably on a touch screen device I have a playable version.
The aim of the game is to collect mushrooms (…IN SPACE), and bring them back to your base without running into any asteroids. Only mushrooms of the same colour as your base are added to your score and your base changes colour each level (but you can hang on to mushrooms between levels and score them later). The controls are fairly simple, touch the left side of the screen to turn left, the right side to turn right and the middle to start moving.
When I have a bit more time I’ll see about writing a little tutorial on making use of my modified version of Ogre3D to create 3D applications and games in a way that’s easy to distribute.
A while back a wrote a little game for the Nokia N9 and N950, mostly as a way to explore the QML Box2D bindings. However, whilst packaging up my StatusNet client I thought I might as well release this as well since it can be a fairly enjoyable distraction. Below is a short video demonstrating how it works, and at the end of the post you can find details on where to get hold of it.
I’ve just built some Box2D and Box2D-QML packages for Harmattan. The Box2D-QML package is especially interesting, this wraps the Box2D API as QObjects allowing them to be made use of directly from within QML. So you don’t need any extra C++ to handle physics simulation for simple games or similar. Here’s a short video of one of the demos running on an N950:
The source code for the above demo can be seen in the Box2D-QML repository here: Monera Example and thanks to these wrappers is very simple.
Packages for the N9/N950 can be found in my OBS repository, simply download elleo.list into /etc/apt/sources.list.d/ and run apt-get update to make the repository available on your device, or just download the packages you’re interested in directly from http://repo.pub.meego.com/home:/elleo/Harmattan/armel/.
Many thanks to the Box2D and Box2D-QML teams for creating such nice tools, I’d certainly recommend them to anyone interested in 2D game development on the N9/N950 phones.