Clean Game Library
Changes since August 1999 (September 2000)
CHAPTER 4 - CREATING A GAME LIBRARY FOR CLEAN
The DOS based programs GRED, EDLEV and CONV have now been replaced by a more advanced (Windows based) program named Tile Studio. Tile Studio can be downloaded from http://tilestudio.sourceforge.net/. The web page also contains a tutorial.
CHAPTER 5 - SPECIFYING A GAME
The parameter order has changed in several
places to make the definition more compact. The complete definition can
be found in the file StdGameDef.dcl. This changes the definition
of Game gs given in 5.1. For example, the nextlevel type (GSt gs) à
(Int, GSt gs) was changed into (GSt gs) à
(GSt gs, Int), which we can also write as
(GSt gs) à
GSt gs à
Int and even shorter: St (GSt gs) Int.
The name for text items has been changed from statistic to
textitem throughout the library.
The point type (for 2-dimensional points) is now called point2.
The type Object
gs is now called GameObject gs. This type has been
changed in the same way as the Game gs type above. The parameters
state,
ObjectRec and gs have been combined to a function: ObjectFun. These parameters are now combined in a record GameObjectState state gs. The object functions accept and return such a record.
The code used to identify objects in the bound map is no longer
called objecttype but objectcode. The same
for subtype, which is now subcode.
The Options type is now called
ObjectOptions and also contains the field removemapcode (missing in
5.6.4.18). If this field is set to True at the time the object is destroyed, the map code that created the object is not put back into the bound map (this can also be achieved by setting the objectcode to 0, as described in 5.6.5.2).
CHAPTER 6 - GAME FUNCTIONS
The game functions no longer start with a
capital letter (in functional languages, capitals are normally only used
for names of types). So for example, CreateNewGameObject is now called createNewGameObject.
Starting a game can now be done with the function startGame, defined in StdGame.
The function createUserGameEvent, which is used
to create user-defined events (see 6.4), now has an extra
SubCode parameter (after EventTarget). This allows us to send events to individual objects instead of classes of objects. By setting this parameter to ANY_SUBTYPE (-1), the SubCode is ignored.
CHAPTER 8 - USING THE TOOLS
Again, Tile Studio is used for graphics and maps now.
CHAPTER 9 - SPECIFYING A PLATFORM GAME
The directory structure (9.1.1) is not relevant
anymore, as long as Tile Studio's output directory is set to the game source code directory. Tile Studio will create a subdirectory named bitmaps for the .BMP files.
Bug-fixes and improvements
The function createUserGameEvent often failed when used within an event function (cGameLib.obj).
The function getBoundMap didn't work properly (cGameLib.obj).
When changing an object's bounds from within a collide function, other collide functions could be lost (cGameLib.obj).
If the requested 16/24/32-bit color video mode is not available, the game library now tries to use a 256-color mode with a standard palette instead of aborting.
The Clean Game Library is available at:
http://cleangl.sourceforge.net/.