phpInDev

Game Maker Projects

While the phpInDev is mostly a php related website, I have done quite a bit work on Game Maker too. Since many of the scripts I've written have proven to be quite useful, I have decided against stopping their distribution. Hence, here's all my GM related stff I've created.

GML Libraries

Here you can find all the GML libraries I've written for GM. Note that by GML library I mean a set of GML scripts (and not an action library), which provides some spesific bigger functionality, such as the md5 library contains scripts required for the MD5 implementation for GM. Note that all these are fully written in GML and do not require external DLLs.

  • BigInt Lib - Library for handling big integers in Game Maker. Big integers are integers without a limit. The real variables in GM are limited to something like 32 bits in size, but with this library you can create much bigger numbers than what GM's real values can handle. Functions are provided for handling and calculating with big integers.

  • GMConsole - GMConsole is a console window script for GM. Similiar to those that can be found in games such as half-life and many other FPS games. GMConsole is designed to provide functionality both for debugging purposes, and also for release use. GM6 only.

  • Math-C - This is a math evaluation, execution and compilation library. Purpose of Math-C is to allow for example user to provide calculations like "1+7^2" and when given to this library, it will either calculate the result, or return a script that can be run with execute_string.

  • MD5 for GM - This is simply a GML implementation of the popular hashing algorithm MD5. The library provides scripts for hashing both strings and separate files.

  • XMenu - XMenu is GML only library for creating very windows like toolbar menus. The script has many features such as having sub menus inside the menus, disabling/enabling items, having separators between items and many many more!

GML Snippets

This page lists various simple GML scripts I've written over time. These here are all simple single scripts that do not serve any bigger purpose. I just add these here whenever I have to write them for someone, or if I write some general purpose scripts for myself. All the scripts are designed to work with latest (GM6.1) version of Game Maker.

  • base_convert ( string numstring, string frombase, string tobase )

    Converts numbers of any size from any custom base to any custom base.
  • binary_to_text ( string binary )

    Converts text from the binary form into readable text.
  • color_to_hex ( int color )

    Converts color value into RRGGBB hex string.
  • date ( string date_string, [ datetime time ] )

    GML implementation of PHP's date function.
  • explode ( string string, string separator, string arrayname, [ int limit ] )

    Split string into array according to given string.
  • get_binary ( int number )

    Returns the given number as binary (as represented by GM).
  • get_real ( string text, float default )

    Asks the user for a real number.
  • is_numeric ( string numstring )

    Tests whether given string is numeric and can be converted to real.
  • is_power ( int number, int power )

    Tests if given number is power of given number.
  • prime_test ( int number )

    Returns the lowest divisor for number, or 1 for none.
  • random_float ( float number1, [ float number2 ] )

    Returns random floating number between two given numbers.
  • random_int ( int number1, [ int number2, [ bool exclusive ] ] )

    Returns random integer between two given numbers (inclusive or exclusive).
  • script_local ( object object, script script, [ mixed arg0, [ ..., [ mixed arg13 ]]] )

    Runs a script locally on an given object.
  • text_to_binary ( string text )

    Converts text into binary form.