# JGame Tutorial

This tutorial presents a number of simple example programs that illustrate the different features of JGame.

## Example 1: A minimal program.

- See the Example1.java code | (plain text version)

- Run the applet (opens in new window).

## Example 2: Game objects.

- See the Example2.java code | (plain text version)

- Run the applet (opens in new window).

## Example 3: Graphical effects and sounds; the media table.

- See the Example3.java code | (plain text version).
  See the example3 media table.

- Run the applet (opens in new window).

## Example 4: Tiles and collision.

- See the Example4.java code | (plain text version).

- Run the applet (opens in new window).

## Example 5: User input.

- See the Example5.java code | (plain text version).

- Run the applet (opens in new window).

## Example 6: Scrolling and wrapping.

- See the Example6.java code | (plain text version).

- Run the applet (opens in new window).

## Example 7: Game states and timers.

- See the Example7.java code | (plain text version).

- Run the applet (opens in new window).

## Example 8: Using StdGame.

- See the Example8.java code | (plain text version).

- Run the applet (opens in new window).

## Example 9: OpenGL-specific features.

- See the Example9.java code | (plain text version).

- Run the applet with OpenGL (opens in new window).
- Run the applet without OpenGL (opens in new window).

## Example games

After you're finished with these examples and you want to look at more code, try the example games. In particular:

- Nebula Alpha - a minimal but complete game using the JGame base classes

  NebulaAlpha.java

- Chain Reaction - a small but complete game using the JGame base classes

  ChainReaction.java

- Space Run I, II, III - Space Run I and II demonstrate how StdGame can be used, with resp. defaults and with custom settings. Space Run III illustrates scrolling and wraparound.

  SpaceRun.java | SpaceRunII.java | SpaceRunIII.java

- Matrix Miner - a more complex game with tiles and using StdGame and Std objects.

  MatrixMiner.java