JavaWorld/AndroidWorld

Java/Android Games and Applications for Beginning (or Advanced) Programmers





Introduction:

We want to make interesting Java programs simpler to implement for beginning programmers, but also to support the implementation of complex games for more advanced programmers in both pure Java and Android platforms. To do that, we've created the JavaWorld and AndroidWorld libraries that simplify the event handling interfaces of both systems, exposing only the useful parts with an easy to use interface.

In order to duplicate the ease of programming interactive animations and games in Racket in Java, JavaWorld and AndroidWorld were modeled after Racket's 2htdp/image and 2htdp/universe libraries.

Of course since we're in Java, structures become classes and functions become methods and function-objects. The libraries provide classes and methods for registering function-objects, but most programmers can simply use World classes (World and VoidWorld) that can be extended to quickly create complex interactive games and animations. See the documentation and source for in-depth descriptions and examples, with more documentation being added as you read this (well, maybe not quite that fast).

One of the benefits of working with a library in Java is that we can easily move our games and interactive applications to Android devices. We have developed an identical library for the development of interactive graphical Android applications that we call AndroidWorld. See below for more information.


Examples:

Below are a few rather simple (yet cool) examples of images created using the library. The first is a generated spiral, the second is a version of the Koch Snowflake fractal, and the third is a version of the Dragon Fractal.


Documentation:

JavaDocs are located here. The best way to start is by viewing the source code here, looking at the documentation for the image package or the world.World and world.VoidWorld classes.

AndroidWorld JavaDocs are located here. The source can be browsed here, but I am slowly updating them and posting more information. You can start by looking at the documentation for the android.image package or the android.world.World and android.world.VoidWorld classes.


Download:

The JavaWorld and AndroidWorld projects are © 2011 Bryan Chadwick, and are released under the GNU General Public License. The software (source, library, and any executable) is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Below you should find different versions of the Java/AndroidWorld JARs. The JAR contains the library, source, and documentation. I will eventually include different dated versions for backup reasons, though all versions should be backward compatible.

FileCreation Date
JavaWorld.jar July 12th 2011
AndroidWorld.jar July 12th 2011

The JavaWorld JAR is runnable, and by default runs FallingWorld. Other examples in the world.test package include a simple mouse click handler, a simple line animation, and a key movement example.

The AndroidWorld package is not itself an Android Application, but a library. We have built several test applications, and the source for the related Activitys are included in the library, though you'll need to create an Eclipse Android Project to be able to run them yourself.

See the android.world.test package for some examples including a simple mouse press handler, a simple key input handler, a simple orientation handler, and a more complex ConnectFour implementation (courtesy of my Northeastern, Summer 2510 lecture notes).


Source:

The source is included in the JARs (see above), or you can browse the source online for JavaWorld and AndroidWorld. Again, the best place to start for JavaWorld is the examples. Android examples soon to come.


Contact:
If you have any questions or comments feel free to email me (Bryan Chadwick):
bryan (at) bryanchadwick.com