Top Description Fields Constructors Methods
org.lwjgl.examples

public Class Game

extends Object
Class Inheritance
Imports
org.lwjgl.Sys, org.lwjgl.input.Keyboard, org.lwjgl.openal.AL, org.lwjgl.opengl.Display

This is a very basic skeleton to init a game and run it.
Author
$Author$
Version
$Revision$ $Id$

Field Summary

Modifier and TypeField and Description
private static float
angle

A rotating square!

private static boolean
finished

Exit the game

private static final int
FRAMERATE

Desired frame time

public static final String
GAME_TITLE

Game title

Constructor Summary

AccessConstructor and Description
private
Game()

No constructor needed - this class is static

Method Summary

Modifier and TypeMethod and Description
private static void
cleanup()

Do any game-specific cleanup

private static void
init()

Initialise the game

private static void
logic()

Do all calculations, handle input, etc.

public static void
main(String[]
Commandline args
args
)

Application init

private static void
render()

Render the current frame

private static void
run()

Runs the game (the "main loop")

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

angleback to summary
private static float angle

A rotating square!

finishedback to summary
private static boolean finished

Exit the game

FRAMERATEback to summary
private static final int FRAMERATE

Desired frame time

GAME_TITLEback to summary
public static final String GAME_TITLE

Game title

Constructor Detail

Gameback to summary
private Game()

No constructor needed - this class is static

Method Detail

cleanupback to summary
private static void cleanup()

Do any game-specific cleanup

initback to summary
private static void init() throws Exception

Initialise the game

Exceptions
Exception:
if init fails
logicback to summary
private static void logic()

Do all calculations, handle input, etc.

mainback to summary
public static void main(String[] args)

Application init

Parameters
args:String[]

Commandline args

renderback to summary
private static void render()

Render the current frame

runback to summary
private static void run()

Runs the game (the "main loop")