JGame Changelog

3.3 -> 3.4

* Tall splash images now align with the top of the screen.
* There is now a gen-skeleton script that generates a minimal application with
  the proper makefiles
* StdGame: added new method startGame with level as parameter
* added store... API for accessing persistent store
* added Loader and SelectLevel to supported midp game states.
* Fixed setPFWrap bug.  It resetted viewoffset because it called setViewOffset
  with the wrong parameters
* added length parameter to drawPolygon so array does not have to reinited
  every time
* added mouse support to midp
* Ogrotron now has mouse support
* fixed frame skip bug where repaint was called instead of drawAll
* added defineImageRotated (and rotateAny to JGImage)
* fixed bug in drawPolygon where canvas_ofs was not added
* fixed bug in MIDPImage.scale which didn't work for bg colors other than black
* bugfix: bgimage could not be null
* added tileStrToID and tileIDToStr to public interface
* attempt to fix sound bug where music keeps playing after applet exits (needs
  to be tested)
* new method initEngineComponent enables embedding the game canvas into 
  a frame or panel
* bugfix: changing bgimage did not take effect unless tiles were changed
* defineImage now also loads files and urls.
* redefining an image with the same name and filename no longer causes the old
  image to be undefined and reloaded, but rather, reuses the old image.
  (this is an optimisation useful for jyturtle)

3.2 -> 3.3

* moved adGLListener upwards in initialisation because it seemed the listener
  did not always catch init events
* fixed race condition where Animator was not always started
* load screen now works properly in OpenGL
* fixed bug where rotated sprites went wrong for non-square aspect ratio
* scrolling now works without needing the NPOT extension.  Seams are still
  visible if the graphics are enlarged, no NPOT is available, and the texture
  is not a power of two in size.  
* parallax scrolling is now available for the OpenGL platform.
* View rotate/zoom is now supported in OpenGL
* fixed old bug involving scaling a partially wrapped rectangle.
* Debug facilities are now available in JOGL
* Guardian and tutorial Example9 now use parallax scrolling.
* new OpenGL game "Dingbat Attack"

3.1 -> 3.2

* Added new platform: jogl.  A game compiled for jgame-jre can be linked to
  jgame-jogl without any changes.  Some common code shared between jre-awt
  and jre-jogl has been moved to a separate class, JREEngine.  
* added new methods get/setVideoSyncedUpdate for vertical sync based updates
* added extended drawImage and drawRect for JOGL, and new method drawPolygon.
* added pfwidth/pfheight variables to EngineLogic
* added alpha value to JGColor
* added startApp, pauseApp, destroyApp methods to standard interface to ensure
  these can be called/overridden without becoming platform-dependent
* renamed JGObject finalize to destroy, to prevent name clash
* fixed bug in StdGame checkTime, which did not work for gamespeeds < 1.0
* fixed bug in appconfig stop/restart code because it only seemed to work for
  applets
* added new JME game ogrotron, and OpenGL-specific example tutorial.Example9
* some of the games are now video-synchronous when running under JOGL.

3.0 -> 3.1

* optimised checkCollision (25%), checkBGCollision, repaintBG, moduloFloor,
  scaleXYPos, getCenterTiles(4x), calls to moduloXYPos.
* replaced central Hashtable "objects" by SortedArray.  Objects are now
  always sorted, and enumeration is about 10 times faster, while the other
  operations, which are very rare, are only about 2-5 times slower.
* game keys are detected only when no other keys were detected first.  This is
  because some phones map both numeric keypad and cursors to game keys, so you
  couldn't separate them properly.
* removed the getGraphics from drawTile.  getGraphics is very slow and calls
  10 or so other methods. drawTile is much faster now.
* new variable gamespeed (get/setGameSpeed()) influences:
(1) animation speed (passed every time to JGObject.updateAnimation and
    anim.animate)
(2) object x/yspeed multiplier (in moveObjects)
(3) object expiry speed multiplier
(4) JGTimer tick multiplier (passed to JGTimer.tick)
(5) StdGame timers multiplier
(6) default grid margins
* fixed old bug in calculation of tile bounding boxes for negative coordinates
* moved is_suspended to public because it is accessed very often
* removed tilechangedmap; mapping to bg_defined is now done in setTile.  This
  increases speed of repaintBG a lot and saves some memory.
* used x/y_scale_fac for scalex/y pos
* all operations which use a string prefix to select a subset of objects are
  now implemented by taking advantage of the sorted object list, saving a lot
  of calls to String.startsWith and making them several times faster
* removed the getLast*BBox/getLastCenterTile* because they were never used and
  took significant CPU cycles in frameFinished.
* added new method tileIntToCid to avoid double conversion in setTile
* copied some JGEngine game/playfield settings into JGObject local variables
  for fast access, making some of the methods 3-4 times faster.
* fixed inclusive bug in intersects
* fixed assumption problem for transparent pixels.  It turns out some phones
  do not remember the colour you assign to transparent pixels!
* is_opaque setting is now used to create MIDP images.  The setting is
  also inherited now when one image is created from another.
* with help of the WTK memory monitor, i managed to reduce typical object
  creations to less than 1 per frame.
* adapted the games to work better with MIDP.
* repositioned the loading files display
* customisable progress and author message

2.3 -> 3.0

* New platform-independent versions of Point, Rectangle, Color, Font.
* Changes in package structure.  Base classes are now in jgame, platform
  independent implementation details in jgame.impl, platform dependent classes
  in jgame.platform.
* Major changes in JGEngine/JGCanvas.  A platform independent interface
  JGEngineInterface has been defined.  The platform-independent code has been
  moved to jgame.impl.*, and for each platform there is a platform-dependent
  version of JGEngine, delegating functionality to
  jgame.impl.EngineLogic where possible.
* ImageUtil has been split into a platform-independent interface JGImage, and
  platform implementations JREImage and MIDPImage.
* StdGame now has two versions, the original for JRE and a somewhat
  simplified version for MIDP.
* The package tree has been changed. The sources are now in src-*, classes are
  compiled into classes-*.  Compilation of the JGame classes and the examples
  and applications has been split.
* The code has been optimised: object creations in the most important tight
  loops have been reduced to near zero, repaintBG has been optimised by a
  factor 2, isOnPF/isInView were optimised.
* a small bug in background copying where the area bounds would exceed the
  size of the source image was fixed.
* A few methods were added specifically for use the Midlet platform, such as
  isMidlet(), displayWidth/Height(), setScalingPreferences().
* setCursor has been renamed to SetMouseCursor.
* there is a new engine getTiles method that copies the data into an existing
  object. Semantics of the getTiles methods in JGObject have been changed
  to return a local variable with the information copied into it, rather than
  create an object every time.  Semantics of some other methods such as
  getImage is changed so as not to create a new object every time.
* fixed bug in exitEngine which did not set the JGObject default_engine to null
* fixed access exception occurring in unsigned webstart.
* improved frame skip logic so that game runs smoothly even if the machine is
  way too slow

2.2 -> 2.3 (20070622)

* wraparound playfield support, new methods setPFWrap and getX/YDist.
* audio no longer starts the same sample twice in the same frame
* fixed bug in setTile, which did not draw the tile properly when view offset
  not 0. setTile now invalidates the tile, to be redrawn by repaintBG.
* fixed bug in highscores which did not handle empty names properly.
* SpaceRunIII is extended with wraparound levels
* changed isAlive semantics so it returns false when the object is pending to
  be removed.
* a tutorial has been added in tutorial/
* Window sizing now uses insets, so it should be the right size now.
* fixed bug in getTileBBox (reference to wrong variable)
* fixed bug in JGObject.checkBGCollision(xofs,yofs).  It did not calculate the
  bbox properly taking into account the floating point position.
* added new game Guardian.

2.1.1 -> 2.2 (20070531)

* volatileimages are now used for the draw buffers
* moved getConfigPath to JGEngine
* improved exit code, esc can now be used to exit StdGame
* added ...LastKey... functions
* added highscores to StdGame and a couple of the games
* fixed bug in JGObject.remove(): it isn't actually always called as
  advocated for disposal purposes.  A new method finalize() is now used to
  define disposal code for JGObjects.
* improved games: Ramjet, MatrixMiner, Insecticide, ChainReaction
* new game Packetstorm (still beta)

2.1 -> 2.1.1 (20070518)

* fixed rounding bug in scrolling; rounding of sprites and background was
  different.
* fixed fileseparator bug: resources didn't load properly from jars in Windows
* updated MANUAL

2.0 -> 2.1 (20070510)

* changed initialisation code; a new method initCanvas is now used to do
  pre-engine initialisations; applet parameters can now be used to determine
  the view settings
* offscreen margins are now configurable with setOffscreenMargin
* fixed concurrency bug that sometimes caused glitches when scrolling
* fixed debug bounding box draw bug in scrolling playfields
* implemented tile pre-draw so that the tile drawing work due to
  scrolling is subdivided more evenly over frames
* replaced pfTileWidth/Height by the better names tileWidth/Height
* paths used for media and table files are now relative to package (unless
  starting with "/")
* moved gfx/ and sound/ to examples
* moved Nebula Alpha to subdirectory; split game jars so that applets will
  take less time to load.
* applet html generation code can now generate the same applet with different
  settings
* added suspended option in countObjects and removeObjects
* new method setTextOutline for drawing text with outline around it.
* fixed some small bugs: coordinate swap in setPendingViewOffset; image
  unloading was not done properly when redefining image; window border
  dimensions are better in windowed mode; fixed odd getImage method in
  JGObject; small fixes in docs
* some small changes: objects suspend immediately when created and off-view; 
* Caverns of Fire now has scrolling version

1.3 -> 2.0 (20070430)

* Scrolling. This implies several changes and additions to the base API.
  There are methods for setting playfield size, pan the view, get the view
  parameters, checking if objects are off-view, and a mechanism for object
  suspension.  Also, all paint methods can be used both relative to the
  playfield and to the view.
* The paint methods now take double coordinates instead of ints.
* A new game, Space Run III, illustrates scrolling.
* Dungeons of Hack has been adapted to include a scrolling version.

1.2 -> 1.3 (20070330)

* sound; the ...Audio... methods handle sound.  Some of the games now have
  some sound.
* added "online game generator" application in gamegen/
* committed shift-esc fix by Jeff Friesen
* new game: Ramjet
* made AppConfig a bit more robust
* minor changes: defineGraphics has been renamed to defineMedia, made
  i_am_applet public; some changes in docs.

1.1.1 -> 1.2 (20061023)

* much improved output of getKeyDesc, and added its inverse, getKeyCode
* added a new class, AppConfig, for game configuration.  StdGame now starts
  AppConfig when pressing [enter] in title.
* The games are adapted to work with AppConfig, that is, their keys are now
  properly configurable, and the proper start game key is displayed.
* Forgot to add Munchies to the launcher.
* Added HTML for "fullscreen" applets
* added "performance" section to manual
* defineImage now cleans up old images

1.1 -> 1.1.1 (20061015)
* Fixed concurrency bug where objects are concurrently accessed by game thread
  and repaint thread.  This gets rid of some of the rare null pointer
  exceptions inside Sort.
* Included a game launcher in the examples package so that the games can be
  run with -jar
* fiddled around with the JGEngineThread dynamics, without much effect though.
  I now yield every frame, and do the yield/sleep after the call to repaint().
* after trying out on a slow machine and finding that the gc causes a small
  jerk in the animation about once a second, I fiddled around with reducing
  the number of objects created, without much effect however.
* I found that javac -source 1.2 -target 1.2 works neither for the source nor
  for the target for jdk1.4.2.  I'm filing a bug report to sun, and have
  compiled this version on a "real" 1.2 compiler. 

1.0.2 -> 1.1 (20061007)
* new game: caverns of fire
* API change: ...BGTile -> ...Tile (these methods are used very often)
* bugfix: no more errors for objects with undefined bboxes in dbgSetBoundingBox
* fixed rounding bug causing the tile span not being correctly defined for
  negative coordinates.
* bugfix: setBGImage(null) never worked.
* changed protected members to package-protected.
* Change in update sequencing: moved "frame finished" actions on object out of
  paint loop to the end of the update loop; moved animation update to
  moveObjects.
* fixed broken getTopLeftTile()
* fixed sleep mode bug by clearing the wake-up key on wakeup

1.0 -> 1.0.2 (20061002)

* Full-screen mode didn't work in Jdk 1.2. This has been fixed.
* Image rendering has been improved.  There's a new method setRenderSettings.
* Changed fire key to Z in Insecticide (because of Windows trouble with
  pressing 5x shift).
* StdGame no longer requires you to start with setGameState("Title").
* Fixed pause game frame size in StdGame, and changed getFontHeight

Version 0.9 -> 1.0 (20060928):

* fixed ignore condition bug in StdGame, where gameOver was not ignored;
  fixed bug in JGEngine, which could be in the same state multiple times.
* added debugging options: an option for printing the game state, a dbgPrint
  method which enables printing on console and in the playfield
* inproved error handling/catching: neater error messages and an on-screen
  failure message for applets.
* cleaned up the setfont and setcolor code, added debug font and debug colours
* The application now opens a window without decoration in full-screen mode
* Yield updatethread when it can't sleep, so it hopefully gives more time to
  the input handler thread.
* moved StdGame to jgame package.

Version 0.8 -> 0.9 (20060924)

* made a standard game framework that simplifies global game state handling,
  and some standard game objects.
* added new games: ChainReaction, PubMan, Munchies, DungeonsOfHack, SpaceRun;
  improved MatrixMiner and Insecticide
* custom paint() method in JGObject, plus some extra paint methods in
  JGEngine
* mouse support
* Bugfixes/minor improvements: setFont, better animation timing,
  check...Aligned/snapToGrid now have a larger margin, images are now loaded
  using getResource.
* JGTimers now have parent
* defineImage and tables improved: the transparency flag is no longer needed,
  and the image size can now be used as default bounding box.  Wrote some
  docs on *.tbl files.
* miscellaneous extra methods: integer random, counttiles, alignment in
  drawImageString, getImage, getImageSize, getKeyDesc, wakeUpOnKey
* added special tile cid handling: setBGTileSettings, and set/and/orBGtileCid()
* api name changes: renamed the get...Tile... API to shorter names: getTiles,
  getCenterTiles, getTopLeftTile, getCenterTile.  Changed defineImages to
  defineGraphics.
* gamestate extensions: removeGameState, state transition method calls:
  start<state>
* images are now pre-scaled so that no in-game delay is introduced
* startup progress bar and splash screen
* used smoother image scaling algorithm
* included jar support and a "make jar"

Version 0.8 (20060907):

This project started in September 2005, but here is finally the first
"official" release.  The project is modelled after a previous project of mine:
XGame, an X11 game library.  In the JGame project, I wanted to have easier
tile handling, and also devised a more consistent and convenient parallel
model.  

