Pyxosoft Game Dev Community
0
September 04, 2010, 06:58:09 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Changed some things around on the server. Please report any broken links.
 
Pages: [1]
  Print  
Author Topic: GMLib  (Read 607 times)
0 Members and 1 Guest are viewing this topic.
xfixium
Spanker of Mon-key-keyz
Administrator
Sr. Member
*****

Karma: +14/-17
Gender: Male
Posts: 375



View Profile WWW Email
« on: June 17, 2009, 07:03:30 AM »

Title: GMLib
Dev Tool: c#
Language: English
Requirements: .net 2.0
Version: 1.1 beta
Downloads:

GMLib 1.1 Beta Source
http://www.pyxosoft.com/downloads/gmlib_src.zip

GMLib 1.1 Beta Example
http://www.pyxosoft.com/downloads/gmlib_example.zip

History:
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.com

GMLib
The 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.
« Last Edit: July 06, 2009, 10:02:28 PM by xfixium » Logged

Ali
Xfixium
Global Moderator
Jr. Member
*****

Karma: +1/-24
Posts: 60


Permabans for fun


View Profile
« Reply #1 on: June 24, 2009, 02:50:06 AM »

What in the sam hell is this?
Logged
xfixium
Spanker of Mon-key-keyz
Administrator
Sr. Member
*****

Karma: +14/-17
Gender: Male
Posts: 375



View Profile WWW Email
« Reply #2 on: June 24, 2009, 02:51:04 PM »

It's a .dll that .net developers can plug into their projects and use. It contains methods to read and write Game Maker project files. Like right now GMare uses it to export an edited room to a Game Maker project file.
Logged

Ali
Xfixium
Global Moderator
Jr. Member
*****

Karma: +1/-24
Posts: 60


Permabans for fun


View Profile
« Reply #3 on: June 24, 2009, 09:45:44 PM »

Oh your a cool guy, too bad nobody on the internet or ZFGC knows shit about .net
Logged
xfixium
Spanker of Mon-key-keyz
Administrator
Sr. Member
*****

Karma: +14/-17
Gender: Male
Posts: 375



View Profile WWW Email
« Reply #4 on: June 25, 2009, 03:00:59 AM »

Youz ah funny geuy.
Logged

Ali
Xfixium
Global Moderator
Jr. Member
*****

Karma: +1/-24
Posts: 60


Permabans for fun


View Profile
« Reply #5 on: June 27, 2009, 12:09:41 PM »

Your a funny gay too
Logged
xfixium
Spanker of Mon-key-keyz
Administrator
Sr. Member
*****

Karma: +14/-17
Gender: Male
Posts: 375



View Profile WWW Email
« Reply #6 on: July 06, 2009, 09:58:48 PM »

I have updated the lib. Apparently I missed some null object checks on the writer. The newest version is now 1.1.0.0.
Logged

antidote
Newbie
*

Karma: +0/-0
Posts: 1


View Profile Email
« Reply #7 on: August 03, 2009, 03:24:06 PM »

I've been "hacking" your code to add support for the actual Action Libraries with great success, right now though it's still very VERY prelim as i need to refactor somethings and take others factors into account. Right now I'm simply loading action and argument data into an array. Reading and Writing are finished however (at least the structure)
Logged
xfixium
Spanker of Mon-key-keyz
Administrator
Sr. Member
*****

Karma: +14/-17
Gender: Male
Posts: 375



View Profile WWW Email
« Reply #8 on: August 03, 2009, 03:52:32 PM »

Sounds interesting, glad some use came out of this project.
Logged

Pages: [1]
  Print  
 
Jump to:  

Theme by m3talc0re. Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC MySQL | PHP | XHTML | CSS
Back To Top