JGame - a Java/Flash game engine for 2D games

What is JGame?

JGame is an open source 2D game engine that makes multiplatform development easier. It runs on the Java JRE 1.3+ platform with optional OpenGL (JOGL) enhancements, the J2ME (MIDP2.0/CLDC1.1) mobile platform, and the Android (2.1+) platform. There is also a Flash (Actionscript 3) version. JGame features sprites with automatic animation and collision detection, a tile-based background with easy sprite-tile interaction facilities, sound, game state, persistent storage, and game options. Games are programmed at a fixed "virtual" resolution, but can be scaled to any screen resolution. The engine provides an enhanced graphics API, with a fallback to simpler and more efficient graphics on J2ME and plain JRE. A patched version of the JBox2D physics engine that runs on all platforms has now been included.

Fundraiser: I am trying to collect 100 euros for covering the cost of the hardware for the Android version. Currently received: 94.56 euros. You can help with a donation of as little as 1 euro.

Pay using Paypal or creditcard (no paypal account needed!).
Pay using phone or SMS (some countries only, not available in USA).
Download / Run


View the docs online:


For problems or bugs, mail me at schooten@cs.utwente.nl
or check out the forums hosted at SourceForge.net Logo

How to get Java

Macos X comes with Java 1.4+ onboard. For Unix or Windows, we advise you to download the newest Oracle Java (either Java 6.29 or Java 7), or OpenJDK. If you want to compile stuff, make sure you get the JDK (development kit). If you only want to run games, get the JRE (runtime environment). See the Readme for info on other Java platforms (Android, J2ME).

Example code

So, what does the code of a JGame game look like?

News / Blog

14 apr 2013     From now on I'll also be releasing minor versions of JGame as source-only. These should be considered beta versions. Check out JGame 3.6.2 beta in the download section.
10 aug 2012     Here is the 3.6 "very stable" release at last. Highlights: optimized J2ME compatible JBox2D engine was added; various bugfixes and minor features; cleaned up the source tree and Antified Make scripts; added 2 new games.
10 aug 2012     ----- Release 3.6 -----
28 jun 2012     Sorry guys, the website has been down for a week, due to a name server problem after relocation of the server. Meanwhile, I've been working on the 3.6 release, mostly cleaning up the make scripts and example games. I want this release to be stable, so I'm taking some time to test every part of it thoroughly. I also added a physics example game that works on all platforms.
2 dec 2011     The old site is back online now! (though Google still seems to stick to the temporary address). I hope to release JGame 3.6 soon, which works towards more seamless java-flash integration. Various minor improvements were made too, and it will include my hacked J2ME compatible JBox2D physics engine. I am now in the process of Antifying the make scripts (it's about time!).
22 jul 2011     For all users who tested my Facebook app: thanks for helping out! I wrote some Facebook integration code for use with JGame Flash, which I will release with the next version. See it at: http://apps.facebook.com/tmtg_webwars/.
30 apr 2011    
Here is JGame Flash Release 1.0: an Actionscript 3 port of JGame. It is released as a separate package because it is not well integrated with the JGame package yet. It comes with two example games.
25 apr 2011     ----- Release 3.5 -----
12 feb 2011     I am working on an Android version of JGame. See my first game release here: Ogrotron Android. As you might have noticed, I started publishing some semi commercial games written with JGame on my new website tmtg.net.
4 oct 2010     Things usually go slower than expected, but here is a new release at long last! I am currently developing mobile games, including a physics game. Integrating a physics engine with JGame did not prove difficult, I may post some info on that later. Meanwhile, the Flash version is more than finished, so I can release it soon.
3 oct 2010     ----- Release 3.4 -----
6 jan 2010     You might wonder want I'm up to. I've been busy with other software projects, but I'm also working on a Flash version of JGame. The API is the same, and I'm also working on automatic translation from Java to AS3. My first test of the JGame-AS3 engine can be found here. I hope I will have enough time for a new release in about two months' time. I've also been getting increased amounts of JGame-related mail, so I guess it's time to install a proper forum too.
11 mar 2009     After a long break I'm working again towards a new release. In the meantime I've created a couple of new games, and have a couple of bugfixes/minor features.
17 mar 2008     Release 3.3 patch a: Several people pointed out that there were a couple of missing files. I've also disabled use of NPOT because it causes software fallback on some machines.
10 mar 2008     ----- Release 3.3 -----
3 mar 2008    
I'm nearly finished with the new version, which sports multilayer parallax scrolling and view zoom/rotate, and works fully without NPOT extension. In order to make the release look a little more exciting, I'm working on a new game that makes good use of the OpenGL extensions.
26 feb 2008     The biggest problem of the new JOGL version seems to be the dependence on non power of two textures for scrolling, which a lot of machines still do not support. I just modified the code so it no longer requires the NPOT extension. I have also devised an efficient way to do parallax scrolling, which I want to implement before the next release.
16 feb 2008     ----- Release 3.2 -----
13 feb 2008    
Coming soon: OpenGL

The JOGL platform is as good as finished. I am currently wrapping up the new JGame release. Watch a demo of the new OpenGL features here!

29 jan 2008     After a quiet period, I'm back at the project trying to add a third platform: opengl (jogl). I've got a prototype running, but I've still got significant straightening out to do. You will be able to link a JGame app to both the regular JRE verion or the JOGL version. The JOGL version will include: double buffered screen synced animation, colour and alpha blending, arbitrary sprite scaling/rotation, and hopefully parallax scrolling.
9 aug 2007     Here is the 3.0 release at last! It has full support for mobiles, and four of the games were specifically adapted to run nicely on mobiles. There have been major structural changes to the project (and the zip is more than twice as large now).
30 jul 2007    
Coming soon: JGame mobile

Wonder what kept me? I've been busy redesigning JGame so that JGame games can be run on (MIDP) mobiles directly without requiring any changes in the code. Tonight (at 3am, couldn't help myself!) I've finally got a preliminary version running, and it runs pretty smoothly!

Try the pre-release mobile game PubMan. JAR, JAD.

Left: Chain Reaction on my mobile. Click to enlarge.

23 jun 2007     I did a little redesign of the homepage, so it uses space more efficiently and should be easier to use. I hope you like it!
31 may 2007     It appears someone has made a variant of my Chain Reaction game called Invasion!
31 may 2007     I'm trying to run JGame using Webstart, and it almost works, except that the engine reports an exception on the game window when trying to read the user.home property! I'll fix the problem soon. You also get a title bar saying "Java application window". For now, the webstart is signed to obtain the required permissions and get rid of the title bar.
29 may 2007     I've been extending the software with new games, improved games, a highscore table, etc. for release soon. I also found that JGame doesn't perform as optimally under Windows as it does under Unix. I found that using volatile images for the background and buffer makes all the difference. I'm now adapting the code to work with volatile images.
18 may 2007     I found that version 2.1 had a couple of serious bugs. One was that the Jars didn't work in Windows! So, here's a fixed version.
30 apr 2007     Version 2.0 features scrolling, and a number of changes and extensions that naturally come with it. It is very efficient and should be easy to use.
30 mar 2007     Here's the 1.3 release at last! Besides sound, it also includes a web-based game creator.
7 mar 2007     After some busy months I'm almost ready to release the next version. I'm working on sound, but am running into various platform-specific behaviour. There will also be a new game.
7 dec 2006     The columnist Jeff Friesen has written a JGame tutorial on JavaWorld! This also includes a new game which you can download on the link below the article. He also found a bug which I'll fix asap. I've been abroad so I've had no time to work on JGame but I just got back this week and am ready to continue development.
6 oct 2006     JGame has finally been tested on MacOS X and was found to work very smoothly (at least on a Ghz machine it did :-) )
28 sep 2006     The 1.0 release is here. In 1.0, I cleaned up most of the remaining loose ends in the software package. Some bugs were fixed, error reporting is much improved, and there are some interesting new debugging features.
Left: debugging fun. Caverns of Fire under development showing dbgPrint messages, exceptions, bounding boxes, and game state.

Click to enlarge.

26 sep 2006     JGame was featured as "applet of the week" on the Java Posse newscast! (you can find the feature 16 minutes into the podcast)
24 sep 2006     After a productive two-week vacation, the JGame package nearly doubled in size! I spent this sunday wrapping up the package for the 0.9 release. It includes 5 new games, a standard game state machine, standard game objects, and a host of minor changes to the base classes.
8 sep 2006     JGame 0.8 was featured as "applet of the day" on JavaDesktop community!
7 sep 2006     I started on this project about a year ago, and at last, here is the first release! It is fully documented now, and comes with 3 finished games.

Archive and links

A list of Java games is now maintained on a separate page

Some interesting Java game sites:

Where to get graphics and sounds for your games: Other 2D game engines: