With the change in how depth is handled in GMS2, drawing sprites that have dynamic depth in a 2D world has gotten slightly more complicated. Here’s a basic system and set of scripts that allow each object to be drawn at the proper depth.
Adding a little fade transition when you enter or exit a room can add a lot to the visual polish of your game. Here are two simple objects that will fade the screen in or out to whichever color you choose. Just drop the FadeIn object in a room and upon entering the screen will...
One of my biggest challenges in coding a game’s architecture is handling player input properly. The ability to control several different types of objects, such as the player, a menu, a vehicle, or the GUI, and switching back and forth between them can result in a cluster of if statements across a dozen objects. Here’s...
For the reverse of Explode, we can implode a DS List back into a delimited string with this script.
This script takes a filepath to a CSV and imports it into a DS List of DS Map values. Useful for managing large amounts of data such as calendar events, items, or dialogue. The file makes use of another script posted previously, Explode.
Very small script to pad a string with zeroes. Example: 1/1/2018 -> 01/01/2018.
Quick script to explode a string (such as a CSV line) into a DS List by whatever delimiter you want (usually a comma).
One of the first things that should be done on any project is setting up the camera and GUI viewports. This will define the player’s view throughout the game and having a solid base to start from is always helpful.
A lot of games make use of a time and date system. Here’s a quick GML tutorial for a variable speed time and date system for Game Maker Studio 2.
This block of code will programmatically draw a circle, and given current and max values for the meter, will animate based on that value. I based this off of the Breath of the Wild style stamina meter. Pretty straightforward and can look great with some simple styling.