Making Indie Games with GameMaker Studio 2

GameMaker Studio 2 Logo

It hasn’t even been a year since I started working with GameMaker Studio 2, but my productivity has already increased twofold, maybe even up to 5x! This is how I would generalize my experience working with Yoyo Games’ GameMaker Studio 2. Before going in further speaking about Epiphany Investigations in another blog post, I’d like to put out some information about how I work on it as the main tool that I use for the job. And while it’s not perfect, I definitely want to highlight a few reasons for using GameMaker and why you may want to as well.

 

Pre GameMaker Studio 2

GameMaker wasn’t always my preferred method of making games. Prior to this, the main tool I used to make games was a game library that was C++ based. The good part of it was that it was free and open-source, which is always welcome! However, being that it was built and maintained by the community, certain features were sometimes broken, or a fix would be coming a few builds down the line, which when working on a commercial game, isn’t always fast enough.

 

My initial roadblock was that GameMaker Studio 1.x didn’t have a Mac client, and my only Windows computer is not really built to develop on. But, a lot of work went into redesigning Studio 2, and it now even has a Mac port! When I learned this in the early part of the year, I knew I had to jump on it. I purchased it as part of a humble bundle, and haven’t looked back since!

 

Interested in making your own games?

If you’re interested in making your own games and are familiar with basic programming or JavaScript, GameMaker should come really easy to you. Coming from C++, there were a few things that I had to get used to, but I followed a couple of tutorials online, and I was ready to start on my own project! Here are a few of my favorite reasons for using GameMaker.

 

Coding the game couldn’t be easier!

While it’s still object-oriented in a sense, GameMaker Studio 2 and GameMaker Language (GML) are really loose when it comes to how you access data and even with code syntax. For example, if you know that you only have one instance of an object, you can just reference the object directly and not have to worry about what you named that instance in a different code block or object. 

 

Here’s an example:

// Create an instance of a car object (objCar) at x, y, with 0 depth
// and assign it to the variable myCoolCar
var myCoolCar = instance_create_depth(x, y, 0, objCar);

// Change the car’s speed
if (fuelLevel < 0) {
    myCoolCar.speed = 0;
}

// This also works
if (badGuyIsChasing) {
    objCar.speed = 100;
}

Small things like this really go a long way when working on a large project, especially when you’re working on your own, as I am, since you don’t have to worry too much about how you’re accessing certain instances or objects and their member variables. You also don’t have to worry about writing accessors or mutators to get and set members “properly.”

 

The only double-edged sword, in my opinion, is that the language is loose with syntax, letting you do things like: 

 

if playerHasControl and moveX = 10 restartLevel = true

 

I DO NOT recommend writing code like that—it just makes everything so much more confusing. 

 

The documentation

One of the most difficult things when starting a new project is getting used to the tools. Yoyo Games makes this part a lot smoother by providing excellent documentation. This was a huge reason for me to quickly get onboarded. As I was following along with the tutorials, if a function or word wasn’t too clear, I would look it up in the reference material and become familiar with it. It quickly became my best friend as I worked on my first project.

 

First, they have the documentation available both online via their website, but also built into GameMaker. Personally, I use the built-in version, since it’s not too bad switching back and forth from the documentation and back to the game. A feature I love is selecting a function name and then pressing F1 to have the documentation open up directly to that function’s page to see how it works.

 

The experience of actually diving into the documentation is incredible. When looking up a function, the page gives you information on how to use it, what its parameters are, and what the return value will be. Besides that, it includes sample code on how you might use it, as well as any warnings or things to keep in mind when using this function or variable. 

 

All the tools are here!

If you’re pressed on funds, the first piece of good news is that you can download GameMaker Studio 2 completely for free and begin playing with it. Perhaps download it and try recreating a simple game to get used to GML, the slightly different lexicon, or even looking through all the included features. 

 

But once you decide to go for GMS, you’ll find that many of the tools that you need to build an entire game are all here. While they’re not feature-heavy as the ones you would find in professional tools, it’s excellent enough that you save some cash by using these. For example, if you don’t have an image-editing program, you can use the built-in image editor to get some sprites going. Also, you don’t have to use a map builder, as GameMaker also includes rooms where you can import your tiles, and build out your levels just how you want them.

 

Overall, GameMaker is an excellent tool to build the game you’ve always dreamed of building. Feel free to leave a comment below if you have any questions!

 

Subscribe to the Kaiju mailing list!