Load, Compile, Complete — Quickly Realizing I Will Need An Artist

Nathan Coffin
5 min readJul 16, 2021

Welcom to Load, Compile, Complete. This is the series where I, a man with no job, or experience making a video game (which is needed to get a job) take you through my learning process, to show that anyone can get started at any time in making a video game. I’m making this sound a lot easier than it actually has been. Trust me, I am overcome with excitement and dread every time I must commit to learning more.

In case you weren’t aware, I am not artistically inclined. I prefer to paint my landscapes with words, like I would with the broad strokes of a brush; Or I guess these days, the slender strokes of a Wacom pen. No matter the tool, visual art isn’t exactly my cup of tea, and I’m pretty bad at it. Not like you really needed me to convince you otherwise — you saw the hideous creature I left stuck in a completely featureless prison. That was the extent of my ability. But now if I really want to give this little wretch some life, I’m going to need to animate it.

That was the basis of my lessons this week. Peyton Burnham’s How to Make an RPG in GameMaker Studio 2! (Part 2: Player Animation) was my reference, as well as Shaun Spalding’s GameMaker Studio 2: Complete Platformer Tutorial (Part 2: Animated Player). Let’s begin.

Player animation is a small but necessary part of making a video game. Animation in general, actually. If it is a visual component to convey information to the player about the player avatar or their general area, or God forbid, any enemies on the screen, it’s safe to say that a player would want it to be as clear as possible. Ignoring the fact that I’m not a sprite-work artist, it is STILL important to know how to properly implement your sprites and animate them so that the player knows what’s going on.

The track below the sprite is moving at 4 Frames per second, allowing me to see what ‘motion’ looks like for our hero.

For the sake of clarity and for conveyance, I gave the Hero shoes. This will help show the actual animation loop for when our hero is moving in whatever direction.

Now there are four directions my hero can move, and keeping that in mind I had to make three more versions of them, facing the other three directions. Right, Up and Left. Tilting their face in either direction and then just showing the back of their ‘head’ for moving upwards was an easy enough fix. But you’ll notice that there are only two frames here in this animation! How does this work?

I had to make four of them. Four sprite files, that is.

Each of these sprites would have to apply to the base Object of our Hero. And if we wanted to do that, I had to learn how to implement separate Scripts, and also learn what an Array is.

A Script in this instance was going to be used to set up some Macros. I was setting up a Script of Macros so I could give the game shorthand references within its internal logic so that I can refer to a value without having to repeatedly express that value across several different Objects. I feel like I’m just repeating myself. Over and over and over again. I’m basically saying “let FAJITAS refer to 1,” or whatever. So then when I put in FAJITAS elsewhere in the game, I don’t have to keep saying “let FAJITAS refer to 1”, the Objects will just know that FAJITAS = 1.

Burnham is instructing me to set RIGHT, UP, LEFT, and DOWN to refer to 0, 1, 2, and 3. He said to imagine a counter-clockwise movement, starting right, and moving to the down direction. Visualizing your decisions is key to making sure you don’t trip over your own code. Now I can properly implement an Array in my Hero’s coding.

An Array is a function that lets me refer to a single variable (in this case, it’ll be ‘sprite’) while also letting it equal several different values. Since our hero, oPlayer, has four different directions they can face, and there are four different macros I’ve already set up for each direction,I can set which sprite would be in use for which direction within oPlayer’s code. And I don’t have to use numerical values since I set up that macro earlier, so I can just set the four distinct values in my Array to be RIGHT, UP, LEFT, and DOWN. Which just makes it easier for me to refer to later!

The ‘if’ statement is extremely popular. Burnham promises it’s not supposed to look this duct-taped but we’re just here to show we know how video games work, not how to make the code look good.

The next step was cleaning up everything that there is to clean up with my sprite animations. I set a variable in the Create tab to indicate that when my hero spawns in, they would be forced to face me. Because I don’t get enough nightmares already. Afterwards, because of my sprite array, I could indicate when my Hero was in motion, and:
1. I could show that when my speed along the x axis was positive or negative, the Object would set to my RIGHT or LEFT assigned sprites,
2. I could show that when my speed along the y axis was positive or negative, the Object would set to my DOWN or UP assigned sprites, and,
3. I could arrange these sets of statements so that when I move diagonally, it would prioritize facing my original direction over another.

For the time being, looking around at my lack of sprites, or discernible features on my player avatar, there isn’t much else I can explore with Burnham’s guidance. To be honest I didn’t even realize what exactly I needed sprite-wise until now, so I felt a bit underprepared for this lesson. All the same? Game’s not looking bad. I ran it to make sure that I could make our Hero turn away from the screen, and with the sense of safety this accomplished, I saved my file for next week. I needed to destroy this awful sprite and replace it with something tolerable to look at.

Luckily, I know a guy. And if I gotta fork over some dosh, then by God, I will accept donations. We’ll see.

--

--

Nathan Coffin

A writer, editor, voice talent, video game enthusiast. Honestly just love talking about video games.