Welcome! This tutorial is aimed at intermediate GameMaker programmers who know there is something clunky or not quite right with their code but don't know how to take it to the next level.
The main focus of this series is to look at ways write cleaner more maintainable code. So it may also be beneficial to more experienced programmers who are only familiar with the basics of GameMaker. I would recommend getting to grips with how GameMaker works first though!
It covers some concepts that hobbyist developers would not normally be exposed to unless they worked as a professional programmer (or actively sought them out). All of the information contained in the tutorials is available elsewhere but it can be overwhelming to know where to start or how to apply it. These tutorials will act as a gentle bridge into the world of programming principles and design patterns; and how they can be applied to a simple GameMaker scenario.
The code assumes a version of GameMaker 2023.1
or later. However nearly all of the code and concepts are applicable to earlier versions with only minor changes required. There are currently 6 chapters but I may add more over time.
-
An introduction to the structure of the tutorials and the initial scenario.
-
Self Imposed Restrictions and Good Practices
An overview of how GML itself can lead to coding bad habits and some good practices to follow.
-
Introduction to dependency injection and why it can be useful.
-
Introduction to the observer pattern and an implementation of a lightweight class that could change how you choose to code everything in GM!
-
Building on the previous chapters to create a rudimentary data binding system just for fun.
-
A look at how inheritance works in GameMaker and alternatives to use when it fails such as Composition and Mixins.
-
A collection of GameMaker specific design patterns
-
A reference for methods used throughout the text.
Sprite Assets - Kenny
Sound Asset - JSFXR
Font Asset - m5x7
All assets included are free to use as specified by licences on their respective websites (linked above). You are free to use any code in these tutorials in your own projects for any purpose without attribution. The tutorial text itself remains copyright of Hudwave.