Jumpcore: Port your SDL/OpenGL game to iPhone+Android easy

Jumpcore: Port your SDL/OpenGL game to iPhone+Android easy

Postby mcc » 06 Apr 2011, 10:06

Hi there. I wanted to let people know about an MIT-licensed C++ game framework I threw up on BitBucket this weekend. I call it Jumpcore:

https://bitbucket.org/runhello/jumpcore

I've been developing games for the past few years under the name Run Hello; while I've been doing this, I've been maintaining a sort of "starting point" project that consists of just the "framework" code (I hesitate to say "engine") that is shared between my games. The original intent was just to make an open source release of this code, but once I'd put the package together I found it useful for my own use for rapidly prototyping game ideas, so I started maintaining it for its own sake (this is the second major release).

So why use Jumpcore? Well, I know that there are a LOT of C++ game "engines" out there. Almost everyone seems to write one at some point. But Jumpcore has a few unique things about it, which I think I can summarize as Jumpcore makes mobile support easy:

* Jumpcore lets you write a C++ program once, and it runs on all the SDL platforms-- Mac, Linux, Windows-- but also runs on iPhone and Android 2.3 without modification. If you are on a Macintosh, you can even compile all five of these targets from a single computer.

* A big pain in mobile development is the differences between OpenGL, OpenGL ES 1.0, and OpenGL ES 2.0. Jumpcore includes an abstraction layer that lets you use a number of OpenGL features in ES that would otherwise be missing, like immediate mode, saving a potentially huge amount of time in porting; and also allows you to write one rendering path that can run in both ES 1.0 and ES 2.0 mode-- even though the two are normally totally incompatible.

* On a note related to that last one, Jumpcore includes a fully ES 2.0 compatible port of FTGL ES (official FTGL ES support of ES 2.0 is still in some sort of beta). Translation: The best text display library I know of for mobile OpenGL is currently incompatible with shaders, Jumpcore has a fix for that.

* Unlike some engines, Jumpcore includes everything you need to build and use it on all platforms. This was the original selling point before I got mobile working: Jumpcore is everything you need to get started writing a game. It comes with a selection of existing open source libraries that provide the basic things you need to get started (much of the actual functionality in Jumpcore is supplied by the Chipmunk physics library and the FTGL ES text display library), and the glue files and makefiles to make it work without fiddling. (One downside to this approach is Jumpcore assumes you will be using certain compilers on each platform; however, the project site contains step-by-step build instructions for getting the correct software set up.)

* And maybe this is a weird thing to brag about, but I think it's important: Jumpcore is minimal. It sets up the things you need and then gets out of your way. I mention this because I know C++ game people do like to write their own engines, and so Jumpcore puts very few restrictions on what your engine looks like. This is important because it means if you have an existing SDL game, you should be able to use Jumpcore to port your game to mobile platforms without much in the way of rewriting.

Jumpcore in action

Here's a simple physics demo that comes with the package:

Image

And here's the same code just recompiled for iPhone and Android:

ImageImage

What the project needs:

Honestly, at the moment I'm mostly just looking for people to try this out and see if it works for them. Since I went to the bother of packaging this together I'm hoping it winds up useful for someone :) In the meantime though if there are problems-- if my makefiles do require fiddling to work, or my instructions for using this stuff aren't as clear as I'd hoped-- I need to know about it.

Like I mentioned, Jumpcore is my working framework for my own projects, so as I continue to move those projects toward completion I'll keep migrating stuff back into Jumpcore-- I'm hoping there will be a few more significant improvements in the framework in just this next month. If anyone has additions or fixes of their own, though, I'd love to integrate them back in; if you want to see the list of things I think need improvement (and things I intend to improve) you can check out the TODO list at the project page.

The one serious thing I am looking for help with on the project is, I am looking for someone with Java Android experience to help with compatibility on the Android port. The Android port, currently, requires Android 2.3, which right now is available on very few devices. This requirement is because I leaned heavily on additions to the Android NDK only available in version 2.3 which make it possible to write an Android program in pure C++. It would be possible, however, to get this same framework working in 2.1 and 2.2-- and even maybe some versions of 1.x-- if instead of using the new 2.3 APIs Jumpcore used the older, JNI based techniques. Unfortunately I cannot justify doing this work myself, since it would require a large time investment in learning the Android Java APIs, and my own projects only require 2.3 (I am targeting tablets, where 2.3 is well represented). Several people have commented to me however that Jumpcore could be more useful if it supported earlier versions of Android as well, and I believe the port could be done relatively quickly with the assistance of someone who knows those APIs already.
User avatar
mcc
 
Posts: 4
Joined: 06 Apr 2011, 08:46

Re: Jumpcore: Port your SDL/OpenGL game to iPhone+Android easy

Postby mcc » 06 Apr 2011, 10:23

By the way, not sure if it matters, but to clarify my comment that Jumpcore is "MIT licensed": As mentioned, Jumpcore is founded on a collection of other libraries, including Chipmunk, SDL, etc. Because of this several licenses apply. However all included libraries were carefully picked to ensure that when you use this code you are bound only by MIT license (only attribution required) restrictions, and that all licenses are GPL-compatible. A file named Readme.txt is included (and packed in by the makefiles on desktop platforms); if you include this Readme.txt along with your final application, you will have satisfied all licensing requirements.

If you care about the gory details: All statically linked code is a mixture of MIT, BSD, and BSD-like licenses; LGPL libraries are used on some platforms, but they are always dynamically linked in so there are no licensing consequences besides attribution; there is an Apache License licensed font, but this is an aggregated file so again no licensing consequences besides attribution. The one exception to GPL compatibility is that on the Android port only, there is Apache License code statically linked into the executable (taken from Google's sample code), and Apache License is considered GPL2-incompatible (but GPL3 compatible).
User avatar
mcc
 
Posts: 4
Joined: 06 Apr 2011, 08:46

Re: Jumpcore: Port your SDL/OpenGL game to iPhone+Android easy

Postby StongerAJ » 12 Jun 2011, 22:26

I think, for Android purposes, it would be totally cool if you would consider contacting/cooperating with the creators of libgdx, a high-level lib with some problems of yours solved, like pausing/resuming opengl es on android, 2.0 support and java bindings (perhaps among other things). Several games in the market are based on it (like rebirth, for example), and its open-source of course.

Arne
StongerAJ
 
Posts: 1
Joined: 12 Jun 2011, 22:17

Who is online

Users browsing this forum: No registered users and 1 guest