A simple game code demo in Java
Java
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src/com/larsbutler/gamedemo
tests/com/larsbutler/gamedemo
.classpath
.gitignore
.project
LICENSE
README.md
build.xml

README.md

Want the OpenGL version?

There's OpenGL adaptation of this demo in the branch opengl.

It uses LWJGL (http://lwjgl.org) for rendering, instead of Java's built-in Swing/AWT components.

Building and running

The following steps are required to build and run the jar. (An Eclipse project has been included for convenience, but the project config may need to be adjusted to suit your environment.)

  1. Build the jar: $ ant

    (ant is of course required)

  2. Run the jar:

    $ java -jar GameDemo.jar

PLEASE NOTE:

I hacked this all together really fast and so things may not work smoothly, depending on your environment and platform. I would love to have your feedback so I can improve this.

Game controls

Spacebar: Jump

Left arrow: Move left

Right arrow: Move right

P: Pause/unpause