Title: GMLib
Dev Tool: c#
Language: English
Requirements: .net 2.0
Version: 1.1 beta
Downloads:GMLib 1.1 Beta Sourcehttp://www.pyxosoft.com/downloads/gmlib_src.zipGMLib 1.1 Beta Examplehttp://www.pyxosoft.com/downloads/gmlib_example.zipHistory:06/17/09: First GMLib release. 1.0 beta
07/07/09: Fixed some missed null object checking on the writer. new version 1.1 beta
Information:GMLib is a .net library (.dll) that has functions to read and write Game Maker projects from 5.0 to 7.0. There is also a small example app, that shows this functionality. Credits go out to IsmAvatar for the detailed information on Game Maker project file formats, and obfuscation.
www.ismavatar.comGMLibThe classes and a short description:
GMAction - The action class defines actions that happen on an object or time line moment event. These are either the drag and drop actions, or custom scripts.
GMBackground - The background class is a main resource class. This class holds the actual image data in a .zipped compressed byte array. As well as any other features offered by Game Maker.
GMDataFile - The data file class is a main resource class. This resource is only available in Game
Maker project versions 5.3 on down. It acts like the include file option that newer versions of Game Maker
offer.
GMEnums - Is a class that contains enumerations for various Game Maker variables. Mainly to make it more human readable.
GMEvent - The event class describes different trigger events for object resources. There are 11 main types. They can also have sub type information. For example: The key down event will have the key code in the sub type.
GMFileReader - This class handles reading data into a GMProject. The GMReadProject() method accomplishes this task.
GMFileWriter - This class handles writing GMProject data. The GMWriteProject() method accomplishes this task. It accepts a GMProject argument, as well as the target version you want to write.
GMFont - The font class is a main resource class. It handles all the font options that Game Maker supports. This resource is not available for Game Maker version earlier than 6.0.
GMInformation - The game information class, contains the game information data that the user can set through the Game Maker project tree. This is the information that is shown when pressing the F1 key by default.
GMLibrary - A class that holds a string representing a library for Game Maker.
GMList - A custom list type, used for Game Maker resources specifically. Has an internal id increment, used for unique ids for any main resource type.
GMNode - Represents a tree node that is shown within a Game Maker project. This data holds the type of node, resource, and representing resource id.
GMObject - The object class is a main resource class. It holds all the data for object options. It also holds event and action data.
GMPackage - A class that holds a string representing an extension packages for Game Maker. It is only available for version 7.0.
GMPath - The path class is a main resource class. This class holds path options, and a point array.
GMProject - This class holds lists of all resources contained in a project. It also holds the last tile, and instance ids used. Which is used by the GMRoom class. These ids are global through out all rooms, so it is important to increment these with every tile and instance creation. These variables do not auto increment, it must be done manually for now.
GMResource - A base class in which all other main resource classes inherit from. It holds a id and name variables.
GMRoom - The room class is a main resource class. Easily the biggest class. It holds data on backgrounds, tiles, views, instances, and base settings. The tile and instance id data is global. Ids start at 100000 for instances, and 10000000 for tiles. I really don't know why it is done this way. It just is. Keep this in mind when creating new tiles or instances within a room.
GMScript - The script class is a main resource class. A class that holds a code string, to be interprated by the game engine.
GMSettings - A class that holds all the global game options for a project. They're are settings variables that are similar between Game Maker versions, however, they're default settings and the way they behave are quite different. Thus why you may see the same variable name, but with a one or two appended to it. If it is one, it is for older versions of Game Maker. If it has a two, it is for newer versions. Typically older versions are anything below 6.0. Note: the icon image data is not compressed.
GMSound - The sound class is a main resource class. This class differs greatly between older and newer versions of Game Maker. Thus if a project is converted from newer to older versions, the actual sound data will be lost. Unless the SoundKind enumeration is set to something other than "None". This should be done before the project is written. Sound data is compressed unless it is a .mp3 format.
GMSprite - The sprite class is a main resource class. It holds an array of compressed image data. It also holds any sprite option data.
GMTimeline - The timeline class is a main resource class. It holds an array of moment objects. These in turn have their own actions.
Example Project:LibManager - Holds some higher level methods. There are methods to create bitmaps and icons from an image byte array. It also has a method to convert the GMProject ProjectTree node into a .net tree node.
Future Changes:GMProject - Figure out a method to auto increment the tile and instance ids. This is just out of convience for GMLib users.
GMFileReader - I have to offer better error handling for this class.
GMFileWriter - I think I also need to change the way this writes. It should return a byte array of the data, instead of writing straight to disk. This probably would save on errors.
GMList - Create a refactor method for any Game Maker resources contained in them.
LibManager - Create a read sound data method. Create some easy to use write methods for image and sound data.