A B C D E F G H I J K L M O P R S T W X Y

A

addGameState(String) - Method in class jgame.JGEngine
Add the given state to the game's existing state on the next frame.
alarm() - Method in class jgame.JGTimer
define your alarm action here.
and(int, int) - Method in class jgame.JGEngine
A Boolean AND shorthand to use for collision; returns (value&mask) != 0.
and(int, int) - Static method in class jgame.JGObject
A Boolean AND shorthand to use for collision; returns (value&mask) != 0.
andBGTileCid(int, int, int) - Method in class jgame.JGEngine
Modify the cid of a single tile by ORing a bit mask, leaving the actual tile.
avoid - Variable in class examples.StdDungeonMonster
true = avoid home_in position
avoid - Variable in class examples.StdMazeMonster
true = avoid home_in position

B

block_mask - Variable in class examples.StdDungeonMonster
cid mask of tiles that block
block_mask - Variable in class examples.StdDungeonPlayer
cid mask of tiles that block
block_mask - Variable in class examples.StdMazeMonster
cid mask of tiles that block
block_mask - Variable in class examples.StdMazePlayer
cid mask of tiles that block

C

checkBGCollision(Rectangle) - Method in class jgame.JGEngine
Check collision of tiles within given rectangle, return the OR of all cids found.
checkBGCollision(int, int) - Method in class jgame.JGEngine
Calls all bg colliders of objects that match objid that collide with tiles that match tileid.
checkCollision(int, int) - Method in class jgame.JGEngine
Calls all colliders of objects that match dstid that collide with objects that match srcid.
checkIfBlocked(JGObject, int, int, int) - Static method in class examples.StdDungeonMonster
Check if we aren't blocked in the xdir,ydir direction we're currently going, and change direction if we're partially blocked.
checkTime(int, int, int) - Method in class examples.StdGame
Returns true every increment ticks, but only when gametime is between min_time and max_time.
checkTime(int) - Method in class examples.StdGame
Returns true every increment ticks.
clearAnim() - Method in class jgame.JGObject
Clear the animation, the object's current image will remain.
clearBBox() - Method in class jgame.JGObject
Clear bbox definition so that we use the image bbox again.
clearGameState() - Method in class jgame.JGEngine
Set the game's main state to none, on the next frame.
clearKey(int) - Method in class jgame.JGEngine
Set the key status of a key to released.
clearMouseButton(int) - Method in class jgame.JGEngine
Set state of button to released.
clearTileBBox() - Method in class jgame.JGObject
Clear tile bbox definition so that we use the regular bbox again.
colid - Variable in class jgame.JGObject
Collision ID
continuous_anim - Variable in class examples.StdDungeonMonster
don't stop animating when monster stops moving
continuous_anim - Variable in class examples.StdDungeonPlayer
don't stop animating when player stops moving
continuous_anim - Variable in class examples.StdMazePlayer
don't stop animating when player stops moving
countObjects(String, int) - Method in class jgame.JGEngine
Count how many objects there are with both the given name prefix and have colid&cidmask != 0.
countTiles(int) - Method in class jgame.JGEngine
Count number of tiles with given mask.
crop(Image, int, int, int, int) - Method in class jgame.ImageUtil
 

D

decrementLives() - Method in class examples.StdGame
Code for losing a life before transition from LifeLost to InGame is made.
defineAnimation(String, String[], double) - Method in class jgame.JGEngine
Define new animation sequence.
defineAnimation(String, String[], double, boolean) - Method in class jgame.JGEngine
Define new animation sequence.
defineGraphics(String) - Method in class jgame.JGEngine
Load a set of imagemap, image, and animation definitions from a file.
defineImage(String, String, int, String, String, int, int, int, int) - Method in class jgame.JGEngine
Define new sprite/tile image.
defineImage(String, String, int, String, String) - Method in class jgame.JGEngine
Define new sprite/tile image with collision bounding box equal to the image's dimensions.
defineImage(String, String, int, String, int, String, int, int, int, int) - Method in class jgame.JGEngine
Define new sprite/tile image from map.
defineImage(String, String, int, String, int, String) - Method in class jgame.JGEngine
Define new sprite/tile image from map, with collision bounding box equal to the image's dimensions.
defineImageMap(String, String, int, int, int, int, int, int) - Method in class jgame.JGEngine
Define image map, a large image containing a number of smaller images to use for sprites or fonts.
defineLevel() - Method in class examples.StdGame
Initialise a level.
destroy() - Method in class jgame.JGEngine
Destroy function for deinitialising the engine properly.
doFrame() - Method in class examples.StdGame
The main doFrame takes care of all the standard game actions.
doFrame() - Method in class jgame.JGEngine
Is called every frame.
drawCount(int, String, int, int, int) - Method in class examples.StdGame
Draw a row of objects to indicate the value count.
drawImage(int, int, String) - Method in class jgame.JGEngine
Draw image with given ID.
drawImageString(String, int, int, int, String, int, int) - Method in class jgame.JGEngine
Draws a single line of text using an image map as font; text alignment is same as drawString.
drawLine(int, int, int, int, double, Color) - Method in class jgame.JGEngine
 
drawLine(int, int, int, int) - Method in class jgame.JGEngine
 
drawOval(int, int, int, int, boolean, boolean, double, Color) - Method in class jgame.JGEngine
 
drawOval(int, int, int, int, boolean, boolean) - Method in class jgame.JGEngine
 
drawRect(int, int, int, int, boolean, boolean, double, Color) - Method in class jgame.JGEngine
 
drawRect(int, int, int, int, boolean, boolean) - Method in class jgame.JGEngine
 
drawString(String, int, int, int) - Method in class jgame.JGEngine
Draws string so that (x,y) is the topleft coordinate (align=-1), the top middle coordinate (align=0), or the top right coordinate (align=1).
drawString(String, int, int, int, Font, Color) - Method in class jgame.JGEngine
Draws string so that (x,y) is the topleft coordinate (align=-1), the top middle coordinate (align=0), or the top right coordinate (align=1).
drawWavyString(String, int, int, int, int, int, double, double, double, Font, Color) - Method in class examples.StdGame
Draw a string with letters that move up and down individually.

E

eng - Variable in class jgame.JGObject
You can use this to call methods in the object's engine.
ensureLoaded(Image) - Method in class jgame.ImageUtil
 
existsObject(String) - Method in class jgame.JGEngine
Check if object exists.
expiry - Variable in class jgame.JGObject
Number of move() steps before object removes itself, -1 (default) is never; -2 means expire when off-screen.

F

fillBG(String) - Method in class jgame.JGEngine
Fill the background with the given tile.
flip(Image, boolean, boolean) - Method in class jgame.ImageUtil
 

G

gameOver() - Method in class examples.StdGame
Call to make straight transition to GameOver; is called automatically by lifeLost when appropriate.
gameover_ingame - Variable in class examples.StdGame
Indicates whether the InGame state should be retained when in the corresponding sequence state.
gameover_ticks - Variable in class examples.StdGame
Number of ticks to stay in GameOver state, 0 = skip
gametime - Variable in class examples.StdGame
Game timer.
getAnimId() - Method in class jgame.JGObject
Get the ID of the currently running animation.
getBBox() - Method in class jgame.JGObject
Get collision bounding box in pixels.
getBGTileCid(int, int) - Method in class jgame.JGEngine
Get collision id of tile at given tile index position.
getBGTileCid(Point, int, int) - Method in class jgame.JGEngine
Get the tile cid of the point that is (xofs,yofs) from the tile index coordinate center.
getBGTileCid(Rectangle) - Method in class jgame.JGEngine
Get the OR of the cids at the tile indexes given by tiler
getBGTileCidAtCoord(double, double) - Method in class jgame.JGEngine
Get collision id of the tile at given pixel coordinates.
getBGTileStr(int, int) - Method in class jgame.JGEngine
get string id of tile at given index position
getBGTileStr(Point, int, int) - Method in class jgame.JGEngine
Get the tile string of the point that is (xofs,yofs) from the tile index coordinate center.
getBGTileStrAtCoord(double, double) - Method in class jgame.JGEngine
Get collision Id of the tile at given pixel coordinates.
getBufferGraphics() - Method in class jgame.JGEngine
Get the graphics context for drawing on the buffer during a paintFrame().
getCenterTile() - Method in class jgame.JGObject
Get the top left center tile of the object (that is, the x and y of getCenterTiles()).
getCenterTiles() - Method in class jgame.JGObject
Get the tile indices spanning the tiles that the object has the most overlap with.
getFullPath(String) - Method in class jgame.JGEngine
Add base URL of the current environment to the given file path; this will result in a URL that both applications and applets can load from.
getImage(String) - Method in class jgame.JGEngine
Gets (scaled) image directly.
getImage(String) - Method in class jgame.JGObject
Get object's current image ID
getImageBBox(String) - Method in class jgame.JGEngine
Gets the collision bounding box of an image.
getImageBBox() - Method in class jgame.JGObject
Get collision bounding box of object's image (same as object's default bbox, note that the offset is (0,0) here).
getImageSize(String) - Method in class jgame.JGEngine
Gets (non-scaled) image's physical size directly.
getKey(int) - Method in class jgame.JGEngine
Get the key status of the given key.
getKeyDesc(int) - Method in class jgame.JGEngine
Get a printable string describing the key.
getLastBBox() - Method in class jgame.JGObject
Get collision bounding box in pixels of previous frame.
getLastCenterTiles() - Method in class jgame.JGObject
 
getLastTileBBox() - Method in class jgame.JGObject
Get tile collision bounding box of previous frame.
getLastTiles() - Method in class jgame.JGObject
Get the tile index coordinates of the object's previous tile bbox.
getLastX() - Method in class jgame.JGObject
Get x position of previous frame.
getLastY() - Method in class jgame.JGObject
Get y position of previous frame.
getMinScaleFactor() - Method in class jgame.JGEngine
Get minimum of the x and y scale factors
getMouseButton(int) - Method in class jgame.JGEngine
Get state of button.
getMouseInside() - Method in class jgame.JGEngine
Check if mouse is inside game window
getMousePos() - Method in class jgame.JGEngine
Get current mouse position
getMouseX() - Method in class jgame.JGEngine
Get current mouse X position
getMouseY() - Method in class jgame.JGEngine
Get current mouse Y position
getName() - Method in class jgame.JGObject
Get object's ID
getObject(String) - Method in class jgame.JGEngine
Get object if it exists, null if not.
getPixels(Image) - Method in class jgame.ImageUtil
 
getPixels(Image, int, int, int, int) - Method in class jgame.ImageUtil
 
getSize(Image) - Method in class jgame.ImageUtil
 
getTileBBox() - Method in class jgame.JGObject
Get collision bounding box in pixels for the purpose of colliding with tiles.
getTileCoord(int, int) - Method in class jgame.JGEngine
Get pixel coordinate corresponding to the top left of the tile at the given index
getTileCoord(Point) - Method in class jgame.JGEngine
Get pixel coordinate corresponding to the top left of the tile at the given index
getTileIndex(double, double) - Method in class jgame.JGEngine
Get tile index of the tile the coordinate is on.
getTiles(Rectangle) - Method in class jgame.JGEngine
Get tile index range of all tiles overlapping given rectangle of pixel coordinates.
getTiles() - Method in class jgame.JGObject
Get the tile index coordinates of all the tiles that the object's tile bbox overlaps with.
getTopLeftTile() - Method in class jgame.JGObject
Get the topleftmost tile of the object.
getXAlignOfs(double) - Method in class jgame.JGEngine
Returns the difference between position and the closest tile-aligned position.
getXScaleFactor() - Method in class jgame.JGEngine
Get scale factor of real screen width wrt virtual screen width
getYAlignOfs(double) - Method in class jgame.JGEngine
Returns the difference between position and the closest tile-aligned position.
getYScaleFactor() - Method in class jgame.JGEngine
Get scale factor of real screen height wrt virtual screen height
getZoomingFont(Font, int, double, double) - Method in class examples.StdGame
Get font for zooming text in and out.
gfx_prefix - Variable in class examples.StdDungeonMonster
Prefix to use for directional animation; null indicates non-directional graphic
gfx_prefix - Variable in class examples.StdDungeonPlayer
null indicates non-directional graphic
gfx_prefix - Variable in class examples.StdMazeMonster
null indicates non-directional graphic
gfx_prefix - Variable in class examples.StdMazePlayer
null indicates non-directional graphic

H

hit(JGObject) - Method in class jgame.JGObject
Override to handle collision; default is do nothing.
hit_bg(int) - Method in class jgame.JGObject
Override to handle tile collision; default is do nothing.
hit_bg(int, int, int, int, int) - Method in class jgame.JGObject
Override to handle tile collision; default is do nothing.
hit_bg(int, int, int) - Method in class jgame.JGObject
Override to handle tile collision; default is do nothing.
home_in - Variable in class examples.StdDungeonMonster
object to home in on, null=none (random movement)
home_in - Variable in class examples.StdMazeMonster
object to home in on, null=none (random movement)

I

ImageUtil - class jgame.ImageUtil.
Some handy utilities for loading an manipulating images; used internally by jgame.
ImageUtil(Component) - Constructor for class jgame.ImageUtil
 
inGameState(String) - Method in class jgame.JGEngine
Check if game is in given state.
inGameStateNextFrame(String) - Method in class jgame.JGEngine
Check if game will be in given state the next frame.
incrementLevel() - Method in class examples.StdGame
Code for incrementing a level before transition from LevelDone to InGame is made.
init() - Method in class jgame.JGEngine
Initialise engine; don't call directly.
initEngine(int, int, int, int, Color, Color, Font, int, int) - Method in class jgame.JGEngine
Init engine as application.
initEngineApplet(int, int, int, int, Color, Color, Font) - Method in class jgame.JGEngine
Init engine as applet; call this in your engine constructor.
initGame() - Method in class jgame.JGEngine
Override to define your own initialisations.
initNewGame() - Method in class examples.StdGame
Initialise the game when a new game is started.
initNewLife() - Method in class examples.StdGame
Initialise play specifically after a new life is introduced (that is, at game start and after the player has died.
initial_lives - Variable in class examples.StdGame
Initial value for lives; default=4
isAlive() - Method in class jgame.JGObject
Check if object is still active, or has already been removed.
isBottomAligned(double) - Method in class jgame.JGObject
Returns true if the bottom of the object's tile bbox is within margin of being tile grid aligned.
isLeftAligned(double) - Method in class jgame.JGObject
Returns true if the left of the object's tile bbox is within margin of being tile grid aligned.
isOnScreen(int, int) - Method in class jgame.JGObject
Margin is the margin beyond which the object is considered offscreen.
isOpaque(Image) - Method in class jgame.ImageUtil
true means the image has some transparent pixels, false means image is completely opaque.
isRightAligned(double) - Method in class jgame.JGObject
Returns true if the right of the object's tile bbox is within margin of being tile grid aligned.
isTopAligned(double) - Method in class jgame.JGObject
Returns true if the top of the object's tile bbox is within margin of being tile grid aligned.
isXAligned(double, double) - Method in class jgame.JGEngine
Returns true if x falls within margin of the tile snap grid.
isXAligned() - Method in class jgame.JGObject
Returns true if x is distance xspeed-epsilon away from being grid aligned.
isXAligned(double) - Method in class jgame.JGObject
Returns true if x is within margin of being tile grid aligned.
isYAligned(double, double) - Method in class jgame.JGEngine
Returns true if y falls within margin of the tile snap grid.
isYAligned() - Method in class jgame.JGObject
Returns true if y is distance yspeed-epsilon away from being grid aligned.
isYAligned(double) - Method in class jgame.JGObject
Returns true if y is within margin of being tile grid aligned.

J

JGEngine - class jgame.JGEngine.
Contains the main functionality of the game engine.
JGEngine() - Constructor for class jgame.JGEngine
Construct engine, but do not initialise it yet.
JGObject - class jgame.JGObject.
Superclass for game objects, override to define animated game objects.
JGObject(String, boolean, double, double, int, String) - Constructor for class jgame.JGObject
Create object.
JGObject(String, boolean, double, double, int, String, int) - Constructor for class jgame.JGObject
Create object with given expiry.
JGObject(String, boolean, double, double, int, String, int, int, int, int) - Constructor for class jgame.JGObject
Create object with given tile bbox.
JGObject(String, boolean, double, double, int, String, int, int, int, int, int) - Constructor for class jgame.JGObject
Create object with given tile bbox and expiry.
JGObject(String, boolean, double, double, int, String, double, double) - Constructor for class jgame.JGObject
Create object with given absolute speed.
JGObject(String, boolean, double, double, int, String, double, double, int) - Constructor for class jgame.JGObject
Create object with given absolute speed and expiry.
JGObject(String, boolean, double, double, int, String, int, int, int, int, double, double) - Constructor for class jgame.JGObject
Create object with given tile bbox and absolute speed.
JGObject(String, boolean, double, double, int, String, int, int, int, int, double, double, int) - Constructor for class jgame.JGObject
Create object with given tile bbox, absolute speed, expiry.
JGObject(String, boolean, double, double, int, String, int, int, double, double, int) - Constructor for class jgame.JGObject
Create object with given direction/speed, expiry.
JGObject(String, boolean, double, double, int, String, int, int, int, int, int, int, double, double, int) - Constructor for class jgame.JGObject
Create object with given tile bbox, direction/speed, expiry.
JGTimer - class jgame.JGTimer.
A timer that generates a callback after a certain number of frames.
JGTimer(int, boolean) - Constructor for class jgame.JGTimer
Create timer; the timer may be one-shot (it runs only once, then triggers the alarm and removes itself), or continuous (it continues running and triggering the alarm)
JGTimer(int, boolean, JGObject) - Constructor for class jgame.JGTimer
Create timer which has an object as parent.
JGTimer(int, boolean, String) - Constructor for class jgame.JGTimer
Create timer which has a specific gamestate as parent.
jgame - package jgame
Contains the essential classes of JGame, a 2D game engine.

K

KeyAlt - Static variable in class jgame.JGEngine
 
KeyCtrl - Static variable in class jgame.JGEngine
 
KeyDown - Static variable in class jgame.JGEngine
Keycode of cursor key.
KeyLeft - Static variable in class jgame.JGEngine
Keycode of cursor key.
KeyMouse1 - Static variable in class jgame.JGEngine
Keymap equivalent of mouse button.
KeyMouse2 - Static variable in class jgame.JGEngine
Keymap equivalent of mouse button.
KeyMouse3 - Static variable in class jgame.JGEngine
Keymap equivalent of mouse button.
KeyRight - Static variable in class jgame.JGEngine
Keycode of cursor key.
KeyShift - Static variable in class jgame.JGEngine
 
KeyUp - Static variable in class jgame.JGEngine
Keycode of cursor key.
key_action - Variable in class examples.StdGame
Keys for special actions.
key_contgame - Variable in class examples.StdGame
Key for continuing the game when in a sequence, default = space.
key_down - Variable in class examples.StdDungeonPlayer
Movement keys.
key_down - Variable in class examples.StdGame
Key for moving, default = cursors.
key_down - Variable in class examples.StdMazePlayer
movement key
key_downleft - Variable in class examples.StdGame
Key for moving diagonally, default = none.
key_downright - Variable in class examples.StdGame
Key for moving diagonally, default = none.
key_fire - Variable in class examples.StdGame
Key for firing (in case there are no separate directional fire keys), default=Shift.
key_firedown - Variable in class examples.StdGame
Key for directional firing, default = WSAD keys
key_firedownleft - Variable in class examples.StdGame
Key for diagonal firing, default = none
key_firedownright - Variable in class examples.StdGame
Key for diagonal firing, default = none
key_fireleft - Variable in class examples.StdGame
Key for directional firing, default = WSAD keys
key_fireright - Variable in class examples.StdGame
Key for directional firing, default = WSAD keys
key_fireup - Variable in class examples.StdGame
Key for directional firing, default = WSAD keys
key_fireupleft - Variable in class examples.StdGame
Key for diagonal firing, default = none
key_fireupright - Variable in class examples.StdGame
Key for diagonal firing, default = none
key_left - Variable in class examples.StdDungeonPlayer
Movement keys.
key_left - Variable in class examples.StdGame
Key for moving, default = cursors.
key_left - Variable in class examples.StdMazePlayer
movement key
key_pausegame - Variable in class examples.StdGame
Key for pausing the game, default = P.
key_quitgame - Variable in class examples.StdGame
Key for quitting the game, default = escape.
key_right - Variable in class examples.StdDungeonPlayer
Movement keys.
key_right - Variable in class examples.StdGame
Key for moving, default = cursors.
key_right - Variable in class examples.StdMazePlayer
movement key
key_startgame - Variable in class examples.StdGame
Key for starting the game, default = space.
key_up - Variable in class examples.StdDungeonPlayer
Movement keys.
key_up - Variable in class examples.StdGame
Key for moving, default = cursors.
key_up - Variable in class examples.StdMazePlayer
movement key
key_upleft - Variable in class examples.StdGame
Key for moving diagonally, default = none.
key_upright - Variable in class examples.StdGame
Key for moving diagonally, default = none.

L

level - Variable in class examples.StdGame
Difficulty level; starts at 0 at beginning of game.
levelDone() - Method in class examples.StdGame
Call to make state transition to LevelDone.
leveldone_ingame - Variable in class examples.StdGame
Indicates whether the InGame state should be retained when in the corresponding sequence state.
leveldone_ticks - Variable in class examples.StdGame
Number of ticks to stay in LevelDone state, 0 = skip
lifeLost() - Method in class examples.StdGame
Call to make state transition to LifeLost.
lifelost_ingame - Variable in class examples.StdGame
Indicates whether the InGame state should be retained when in the corresponding sequence state.
lifelost_ticks - Variable in class examples.StdGame
Number of ticks to stay in LifeLost state, 0 = skip
lives - Variable in class examples.StdGame
Lives count, 0 means game over.
lives_img - Variable in class examples.StdGame
Image to use to display lives
loadImage(String) - Method in class jgame.ImageUtil
Load image from resource path (using getResource).
loadImage(URL) - Method in class jgame.ImageUtil
Returns null if there was an error.

M

mediatracker - Variable in class jgame.ImageUtil
 
move() - Method in class examples.StdDungeonMonster
Moves the object around, and ensures it occupies space.
move() - Method in class examples.StdDungeonPlayer
Moves the object around, and ensures it occupies space.
move() - Method in class examples.StdMazeMonster
Moves the object around.
move() - Method in class examples.StdMazePlayer
Moves the object around.
move() - Method in class jgame.JGObject
Override to implement automatic move; default is do nothing.
moveObjects(String, int) - Method in class jgame.JGEngine
Call the move() methods of those objects matching the given name prefix and collision id mask.
moveObjects() - Method in class jgame.JGEngine
Call the move() methods of all registered objects.

O

observer - Variable in class jgame.ImageUtil
 
occupy_mask - Variable in class examples.StdDungeonMonster
cid mask that object should use to indicate occupation
occupy_mask - Variable in class examples.StdDungeonPlayer
cid mask that object should use to indicate occupation
one_shot - Variable in class jgame.JGTimer
 
orBGTileCid(int, int, int) - Method in class jgame.JGEngine
Modify the cid of a single tile by ORing a bit mask, leaving the actual tile.

P

paint() - Method in class examples.StdScoring
Paints the message.
paint() - Method in class jgame.JGObject
Override to define custom paint actions.
paintFrame() - Method in class examples.StdGame
Default paintFrame displays score at top left, lives at top right.
paintFrame() - Method in class jgame.JGEngine
Is called when the engine's default screen painting is finished, and custom painting actions may be carried out.
paintFrameGameOver() - Method in class examples.StdGame
Default displays "Game Over!".
paintFrameLevelDone() - Method in class examples.StdGame
Default displays "Level Done !".
paintFrameLifeLost() - Method in class examples.StdGame
Default displays "Life Lost !".
paintFramePaused() - Method in class examples.StdGame
The game is halted in pause mode, but the paintFrame is still done to refresh the screen.
paintFrameStartGame() - Method in class examples.StdGame
Default displays "Start !".
paintFrameStartLevel() - Method in class examples.StdGame
Default displays "Level "+(stage+1).
paintFrameTitle() - Method in class examples.StdGame
Default displays class name as title, and "press [key_startgame] to start" below it.
parent_obj - Variable in class jgame.JGTimer
 
parent_state - Variable in class jgame.JGTimer
 
parseSizeArgs(String[]) - Static method in class examples.StdGame
Parse the first two arguments assuming they are width and height.
pfHeight() - Method in class jgame.JGEngine
Get the virtual height in pixels (not the scaled screen height)
pfTileHeight() - Method in class jgame.JGEngine
Get the tile height in (virtual) pixels.
pfTileWidth() - Method in class jgame.JGEngine
Get the tile width in (virtual) pixels.
pfTilesX() - Method in class jgame.JGEngine
Get the number of tiles in X direction
pfTilesY() - Method in class jgame.JGEngine
Get the number of tiles in Y direction
pfWidth() - Method in class jgame.JGEngine
Get the virtual width in pixels (not the scaled screen width)
posWalkForwards(int, int, int, int, int, int, int) - Method in class examples.StdGame
Walk across the screen, standing still momentarily at a specific position.

R

random(double, double) - Method in class jgame.JGEngine
A floating-point random number between min and max
random(double, double, double) - Method in class jgame.JGEngine
Generates discrete random number between min and max inclusive, with steps of interval.
random(int, int, int) - Method in class jgame.JGEngine
Generates discrete random number between min and max inclusive, with steps of interval, integer version.
random_proportion - Variable in class examples.StdDungeonMonster
chance that object moves randomly
random_proportion - Variable in class examples.StdMazeMonster
chance that object moves randomly
remove() - Method in class examples.StdDungeonMonster
Removes object and object's occupation.
remove() - Method in class examples.StdDungeonPlayer
Removes object and object's occupation.
remove() - Method in class jgame.JGObject
Mark object for removal.
removeAllTimers() - Method in class jgame.JGEngine
Remove all JGTimers still ticking in the system.
removeGameState(String) - Method in class jgame.JGEngine
Remove the given state from the game's existing state on the next frame.
removeObjects(String, int) - Method in class jgame.JGEngine
Remove all objects which have the given name prefix and/or match the given cidmask.
resetAnim(String) - Method in class jgame.JGObject
Always set the animation to the given default animation definition, resetting any changes or updates made to the animation.
resetAnim() - Method in class jgame.JGObject
Reset the animation's state to the start state.
rotate(Image, int) - Method in class jgame.ImageUtil
for angle, only increments of 90 are allowed
running - Variable in class jgame.JGTimer
 

S

StdDungeonMonster - class examples.StdDungeonMonster.
A standard monster object that can move in 8 directions around a tile-based dungeon, which may be maze-like or contain open spaces.
StdDungeonMonster(String, boolean, double, double, int, String, boolean, boolean, int, int, double, JGObject, boolean, double) - Constructor for class examples.StdDungeonMonster
When initialised, the object will snap to grid to the nearest free position, then it will start moving in the direction specified by home_in, random_x, random_y.
StdDungeonMonster(String, boolean, double, double, int, String, int) - Constructor for class examples.StdDungeonMonster
Create static monster that just occupies space.
StdDungeonPlayer - class examples.StdDungeonPlayer.
A standard object that allows the player to move in 8 directions around a tile-based dungeon, which may be maze-like or contain open spaces.
StdDungeonPlayer(String, double, double, int, String, boolean, boolean, int, int, double, int, int, int, int) - Constructor for class examples.StdDungeonPlayer
When initialised, the object will snap to grid to the nearest free position.
StdGame - class examples.StdGame.
A basic framework for a game.
StdGame() - Constructor for class examples.StdGame
 
StdMazeMonster - class examples.StdMazeMonster.
A standard object that moves around a maze.
StdMazeMonster(String, boolean, double, double, int, String, boolean, int, int, int, double, JGObject, boolean, double) - Constructor for class examples.StdMazeMonster
When initialised, the object will snap to grid to the nearest free position, then it will start moving in the direction specified by xdir, ydir.
StdMazePlayer - class examples.StdMazePlayer.
A standard object that allows the player to move in 4 directions around a maze.
StdMazePlayer(String, double, double, int, String, boolean, boolean, int, double, int, int, int, int) - Constructor for class examples.StdMazePlayer
When initialised, the object will snap to grid to the nearest free position.
StdScoring - class examples.StdScoring.
A class for displaying an animated piece of text.
StdScoring(String, double, double, double, double, int, String, Font, Color[], int) - Constructor for class examples.StdScoring
Create animated piece of text.
scale(Image, int, int) - Method in class jgame.ImageUtil
 
score - Variable in class examples.StdGame
Player score; starts at 0 at beginning of game.
seqtimer - Variable in class examples.StdGame
Sequence timer.
set(int, boolean) - Method in class jgame.JGTimer
 
setAnim(String) - Method in class jgame.JGObject
Set the animation to the given default animation definition, or leave it as it was if the anim_id is unchanged.
setAnimPingpong(boolean) - Method in class jgame.JGObject
 
setAnimSpeed(double) - Method in class jgame.JGObject
 
setBBox(int, int, int, int) - Method in class jgame.JGObject
Set bbox definition to override the image bbox.
setBGColor(Color) - Method in class jgame.JGEngine
Set global background colour, which is displayed behind transparent tiles if no BGImage is defined.
setBGImage(String) - Method in class jgame.JGEngine
Set image to display behind transparent tiles.
setBGTile(int, int, String) - Method in class jgame.JGEngine
Set a single tile.
setBGTile(Point, String) - Method in class jgame.JGEngine
Set a single tile.
setBGTileCid(int, int, int) - Method in class jgame.JGEngine
Set the cid of a single tile to the given value, leaving the actual tile.
setBGTileSettings(String, int, int) - Method in class jgame.JGEngine
Define background tile settings.
setBGTiles(int, int, String[]) - Method in class jgame.JGEngine
Set a block of tiles according to the single-letter tile names in the nxm character array tilemap.
setBGTilesMulti(int, int, String[]) - Method in class jgame.JGEngine
Set a block of tiles according to the tile names in the nxm element array tilemap.
setBoundingBoxDebug(boolean) - Static method in class jgame.JGEngine
Show bounding boxes around the objects: the image bounding box, the tile span, and the center tiles (getCenterTiles).
setColor(Color) - Method in class jgame.JGEngine
Set global foreground colour, used for printing text and status messages.
setColorsFont(Color, Color, Font) - Method in class jgame.JGEngine
Set foreground and background colour and font in one go; passing null means ignore.
setCursor(Cursor) - Method in class jgame.JGEngine
Set mouse cursor, null means hide cursor
setDir(int, int) - Method in class jgame.JGObject
Set direction.
setDirSpeed(int, int, double, double) - Method in class jgame.JGObject
Set speed and direction in one go.
setDirSpeed(int, int, double) - Method in class jgame.JGObject
Set speed and direction in one go.
setFont(Font) - Method in class jgame.JGEngine
Set font for printing text and status messages.
setFrameRate(double, double) - Method in class jgame.JGEngine
Set frame rate in frames per second, and maximum number of frames that may be skipped before displaying a frame again.
setGameState(String) - Method in class jgame.JGEngine
Set the game's main state on the next frame.
setGraphic(String) - Method in class jgame.JGObject
Set ID of animation or image to display.
setImage(String) - Method in class jgame.JGObject
Set ID of image to display; clear animation.
setKey(int) - Method in class jgame.JGEngine
Set the key status of a key to pressed.
setMouseButton(int) - Method in class jgame.JGEngine
Set state of button to pressed.
setPos(double, double) - Method in class jgame.JGObject
 
setSequences(boolean, int, boolean, int, boolean, int, boolean, int) - Method in class examples.StdGame
Set all sequence variables in one go.
setSpeed(double, double) - Method in class jgame.JGObject
Set relative speed; the values are copied into xspeed,yspeed.
setSpeed(double) - Method in class jgame.JGObject
Set relative speed; the value is copied into xspeed,yspeed.
setSpeedAbs(double, double) - Method in class jgame.JGObject
Set absolute speed.
setStatusDisplay(Font, Color, String) - Method in class examples.StdGame
Set the status display variables in one go.
setStroke(double) - Method in class jgame.JGEngine
Set the line thickness
setTileBBox(int, int, int, int) - Method in class jgame.JGObject
 
snapBBoxToGrid(double, double, boolean, boolean) - Method in class jgame.JGObject
Snap an object's tile bbox corner to grid; floats are rounded down.
snapToGrid(Point, int, int) - Method in class jgame.JGEngine
Snap p to grid in case p is close enough to the grid lines.
snapToGrid() - Method in class jgame.JGObject
Snap object to grid using the default gridsnap margin of (xspeed-epsilon, yspeed-epsilon), corresponding to the default is...Aligned margin.
snapToGrid(double, double) - Method in class jgame.JGObject
Snap object to grid.
snapToGridX(double, double) - Method in class jgame.JGEngine
Snap to grid, double version.
snapToGridY(double, double) - Method in class jgame.JGEngine
Snap to grid, double version.
speed - Variable in class examples.StdMazeMonster
object's speed, overrides xspeed, yspeed.
speed - Variable in class examples.StdMazePlayer
object's speed, overrides xspeed, yspeed.
stage - Variable in class examples.StdGame
Game stage, which is usually the same as level, but typically goes on counting, while level may stop increasing at a certain value.
start() - Method in class jgame.JGEngine
Signal that the engine should start running.
startAllAnim() - Method in class jgame.JGEngine
Start automatic animation in case it was stopped.
startAnim() - Method in class jgame.JGObject
 
startGameOver() - Method in class examples.StdGame
Initialise game over sequence.
startInGame() - Method in class examples.StdGame
Initialisation at the start of the in-game action.
startLevelDone() - Method in class examples.StdGame
Initialise next-level sequence.
startLifeLost() - Method in class examples.StdGame
Initialise death sequence.
startStartGame() - Method in class examples.StdGame
Initialise start-game sequence.
startStartLevel() - Method in class examples.StdGame
Initialise start-level sequence.
startTitle() - Method in class examples.StdGame
Initialise the title screen.
startgame_ingame - Variable in class examples.StdGame
Indicates whether the InGame state should be retained when in the corresponding sequence state.
startgame_ticks - Variable in class examples.StdGame
Number of ticks to stay in StartLevel/StartGame state, 0 = skip
status_color - Variable in class examples.StdGame
Color to use to display score
status_font - Variable in class examples.StdGame
Font to use to display score
stop() - Method in class jgame.JGEngine
signal that the engine should stop running and wait.
stopAllAnim() - Method in class jgame.JGEngine
Stop automatic animation of all objects.
stopAnim() - Method in class jgame.JGObject
 
stop_moving - Variable in class examples.StdDungeonPlayer
Set to true to disable movement (for example, for firing).
stop_moving - Variable in class examples.StdMazePlayer
set to true to disable movement (for example, for firing)

T

timer - Variable in class examples.StdGame
Animation timer.
title_bg_color - Variable in class examples.StdGame
Color to use to display background effects behind title and messages
title_color - Variable in class examples.StdGame
Color to use to display title and messages
title_font - Variable in class examples.StdGame
Font to use to display title and messages
toBuffered(Image) - Method in class jgame.ImageUtil
Create BufferedImage version of image for faster drawing; returns the identical object if it was already a BufferedImage.

W

wakeUpOnKey(int) - Method in class jgame.JGEngine
Make engine call start() when a key is pressed.

X

x - Variable in class jgame.JGObject
Object position
xdir - Variable in class jgame.JGObject
Object direction, is multiplied with speed; default=1
xspeed - Variable in class jgame.JGObject
Object speed; default=0

Y

y - Variable in class jgame.JGObject
Object position
ydir - Variable in class jgame.JGObject
Object direction, is multiplied with speed; default=1
yspeed - Variable in class jgame.JGObject
Object speed; default=0

A B C D E F G H I J K L M O P R S T W X Y