Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1075930 Posts in 44152 Topics- by 36119 Members - Latest Member: Royalhandstudios

December 29, 2014, 04:06:54 PM
TIGSource ForumsCommunityTownhallJumpcore 2: An open source PC+smartphone framework
Pages: [1]
Print
Author Topic: Jumpcore 2: An open source PC+smartphone framework  (Read 1878 times)
mcc
Level 10
*****


glitch


View Profile WWW Email
« on: April 03, 2011, 02:39:39 AM »

Short version: Here's an open source C++ game framework that lets you write your game once and immediately have it run on Mac, Windows, Linux, iPhone and Android 2.3. It packages together all the basic libraries you need to get started with writing a game, and makes mobile porting easy by abstracting away the incompatibilities between OpenGL, OpenGL ES 1.0, and OpenGL ES 2.0.

The project is hosted on Bitbucket, so you can download the source yourself by doing one of the following:

* hg clone https://bitbucket.org/runhello/jumpcore
* svn co https://bitbucket.org/runhello/jumpcore/trunk
* Visit the Bitbucket page and click "get source" in the upper right corner.

Here's a little physics demo that comes with Jumpcore, shown running on PC, iPhone, and Android:




Long version: When I first started writing C++ games a few years ago, I quickly discovered that there was a lot of stuff that you really need in order to write a game but which SDL+OpenGL don't provide out of the box-- things like text display, or build scripts for a crossplatform binary. So once I'd actually finished my game, I decided to package up the basic skeleton of my game into the thing I wished had existed when I started coding games-- a package to serve as a bridge between "there exist cross-platform game libraries in the world" and "I can actually sit down and create a game in C++". Once I'd put this package together, I found it useful myself for rapidly prototyping new game ideas. I released this a year or so ago as "Jumpcore", with support for Mac, Windows and Linux; what I can announce today is a new version that adds support for mobile platforms (iPhone and Android). I've also set up a project on BitBucket; what I would like is if this could grow into something like a free and open-source version of Airplay SDK, or a stripped-down Unity.

Jumpcore is minimal; it tries to set things up for you and then get out of the way, allowing you to develop your own "engine" as you see fit. Most of the functionality is provided by a selection of open source libraries I've bundled in. Jumpcore comes with:

- SDL and GLee for event and window handling (on desktop platforms)
- Chipmunk version 5.3.4 (2D physics engine)
- A modified FTGL ES (freetype text display library) with OpenGL ES 2.0 support
- TinyXML
- LodePNG, and a simple texture loader based on LodePNG
- A generator and loader for texture atlases based on a script by Retro Affect
- Pthreads for win32

Included code unique to Jumpcore includes:

- A simple GUI interface library (based on Chipmunk spatial hashes)
- Event wrappers unifying SDL mouse events with iPhone and Android touch events
- Wrappers for getting the paths of "internal" files
- A set of OpenGL wrappers that abstract away the differences between OpenGL, OpenGL ES 1.0, and OpenGL ES 2.0, meaning you can write your OpenGL code on mobile platforms the same way you write it on desktop platforms.

Getting started

Developing with Jumpcore basically just means implementing a few simple callbacks. You can find quick instructions and links documenting all the functions in the included libraries at the Getting Started page on the BitBucket wiki.

Compiling

Jumpcore uses GCC on all platforms, however you will need a different version of GCC (XCode, mingw, etc) to compile each of the different targets. You can compile all five targets on one machine as long as that one machine is a Macintosh (Linux and Windows users may need to find a mac before they can compile for Mac and iPhone). You can find detailed build instructions at the How to Build page on the BitBucket wiki.

Caveats and future development

Jumpcore is a work in progress; as I mentioned this is the base I use for starting new projects, so I should be improving it as my main projects continue. For a list of known gotchas and things yet to be done, please see the TODO page, again on my BitBucket wiki. Note: Some of the limitations in this initial release of Jumpcore 2 are quite serious, at least on the Android version, so you should probably read this page.

If you have problems compiling this or getting it to work, please do let me know. Thanks!

Should I have put this in "TIGProjects"? I'm never sure where to put stuff around here.
Logged

My projects:<br />Games: Jumpman Retro-futuristic platforming iJumpman iPhone version Drumcircle PC+smartphone music toy<br />More: RUN HELLO
rivon
Level 10
*****



View Profile
« Reply #1 on: April 10, 2011, 10:18:24 AM »

So I need to know how to program in OpenGL to use this?
Logged
PicklesIIDX
Level 0
**


Follow your heart!


View Profile WWW
« Reply #2 on: April 10, 2011, 11:41:24 AM »

This is really awesome. Thanks for your hard work and providing it to the community!
Logged

mcc
Level 10
*****


glitch


View Profile WWW Email
« Reply #3 on: April 10, 2011, 11:48:26 PM »

So I need to know how to program in OpenGL to use this?
Unfortunately, yes. It's set up to use OpenGL for the graphics, and the mobile platforms depend on GL ES for compatibility. There's a bit of utility code in there that I use to display sprite-like things, and if you lean on that it might make things easier without having had prior OpenGL experience, but I'm not sure if you could get a lot of use out of that particular code unless you already had some familiarity with OpenGL.

There are maybe some options here. There exist some libraries that tack an easy-to-use programming interface on top of OpenGL and shield you from the low-level-ness of OpenGL, like SFML... Cocos2D, I think? Something like SFML would be easier to learn and use than raw OpenGL. In principle I think it would be possible to port one of these libraries to run on top of Jumpcore (and doing it this way might make it easier than it would otherwise be to port those libraries to mobile/ES... excluding Cocos2D which I believe is already ES). I think at some point it would be interesting to have, say, a preconfigured version of Jumpcore available on the project site that comes with SFML set up for all five platforms out of the box. However, catch 22, it unfortunately might be hard to do that porting work unless you already know OpenGL! If you are not familiar with OpenGL it may make more sense to start your project against SFML or Allegro or something to start with.

Another option: If you're willing to sacrifice mobile compatibility, it should be quick and easy to convert the Mac/Win/Linux targets to just use SDL graphics instead of OpenGL graphics. As far as I know SDL graphics would be easier to learn. At this point though "Jumpcore" would basically just be some sample Chipmunk code. And a couple of the libraries (FTGL ES, ControlBase) would break if you did this.

If you do want to go ahead and learn OpenGL graphics, I highly suggest:

http://opengles-book.com/

EDIT: Also thank you Mr. Pickles
« Last Edit: April 10, 2011, 11:54:24 PM by mcc » Logged

My projects:<br />Games: Jumpman Retro-futuristic platforming iJumpman iPhone version Drumcircle PC+smartphone music toy<br />More: RUN HELLO
mcc
Level 10
*****


glitch


View Profile WWW Email
« Reply #4 on: May 01, 2011, 04:34:28 PM »

Just an update to say, in addition to having accelerometer support for mobile platforms in place now, the version of Jumpcore available on the BitBucket page now works on WebOS (Palm Pre) thanks to a patch from Matthew Pierce.
Logged

My projects:<br />Games: Jumpman Retro-futuristic platforming iJumpman iPhone version Drumcircle PC+smartphone music toy<br />More: RUN HELLO
HD
Level 2
**


View Profile WWW Email
« Reply #5 on: May 02, 2011, 05:43:38 PM »

This looks really useful! My biggest question is did you use SDL 1.3 for this? How does this stack against SDL 1.3 for a nub who wants to develop something for pc/mobile ?

You should mention in your descriptions that it's under the MIT license, that's a feature I always keep an eye out for Wink
Logged

HDSanctum
=====================
Log:>  hdsanctum.com
mcc
Level 10
*****


glitch


View Profile WWW Email
« Reply #6 on: May 03, 2011, 10:34:35 PM »

This looks really useful! My biggest question is did you use SDL 1.3 for this? How does this stack against SDL 1.3 for a nub who wants to develop something for pc/mobile ?

You should mention in your descriptions that it's under the MIT license, that's a feature I always keep an eye out for Wink

It uses SDL 1.2 on desktop platforms. It uses custom solutions on iPhone and Android. (WebOS version uses SDL.) I did it this way because when I was writing this I was under the impression SDL 1.3 was prerelease software and not ready for production use. However maybe it is further along than I thought? It would definitely be preferable IMO if I ported all platforms to use SDL 1.3.

Overall the "difference between this and SDL" is one of scope. If you use SDL (unless things have significantly improved on the sample code front since the last I checked) just having SDL doesn't mean you can start on a game. There's a decent amount of setup work and fiddling you'll need to do to get your SDL program compiling on all platforms. The point of Jumpcore was to do that for you-- to be a bridge between "I have SDL.framework!" and something that works.

The one outright advantage of using SDL 1.3 I know is that SDL 1.3 ought to work on all versions of Android (not just 2.3).
Logged

My projects:<br />Games: Jumpman Retro-futuristic platforming iJumpman iPhone version Drumcircle PC+smartphone music toy<br />More: RUN HELLO
Droqen
Level 10
*****

aka nick fury


View Profile WWW Email
« Reply #7 on: August 03, 2011, 11:52:32 AM »

Whoa. Cool.

I will definitely have to check this out sometime, so I am letting myself know it exists.
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic