Posts

Showing posts from July, 2017

GMWolf - Defining States with Objects

Image
Game Maker State Machines often end up being very large objects, with a seemingly endless number of lines in each Event. I wanted to approach the creation of State machines using the powerful dynamic functions GameMaker provides, in order to make better use of the Object Resource.

GMStruct - extending GML with code generators

GML, or the GameMaker language has regularly been a little awkward for me to use due the lack of a core feature. That would of course be structures, a programming language staple allowing you to group together values under a single variable.


In the past, I would have recommended using arrays to act as structures, as described in my youtube video, and this is probably still good advice today (Or at least until YYG implement lightweight objects). However tired of messing around with arrays in my projects, I have decided to let robots take over, and generate all that code for me.

This is how I started creating GMStruct. A tool and language to bring structs to Game Maker.
Introducing code generation allows for numerous upgrades over 'array structs', allowing for inheritance, and even some polymorphism, all handled behind the scenes.

View the GMC Thread


The GMS Language "So how does it work?" I hear you ask. Well it's pretty simple:
The first step is to define the stru…