I'm Coding a Game

Through history there has been many great game makers. To name a few:
 
There was this guy…

Shigeru Miyamoto – Creator of Donky Kong

And this guy…

Sid Meier – Creator of the Civilization series

…and now there is ME!!!

I’m the one on your left, in case there was any confusion. RIP Captain Whiskers!.

After the 30 day CBC ended I had no idea what I was going to blog about, and then it came to me. I’ve been wanting to code a game for awhile now, and I thought it would be fun to document the process.
 
I bought Game Maker Studio version 1.4 almost 3 years ago, and totally forgot that I had it. When I got this idea to see if I could code a game, I scoured the internet to see what was a easy/cheap programming language to make games and my search lead me to Yo-yo games which are the makers of Game Maker Studio. Seeing as I had already purchased the software, I just downloaded the program, and I’ve been toying around all morning. I found a great tutorial series on the internet by
Shaun Spalding. If you’re new to GameMaker Studio and want to dive right in, watch this guys videos.
 
What Did I Program Today?
 
Today I just wanted to get familiar with the program and see if I could make anything work. Blogging about what I learned helps me remember it. I created two sprites, and created their object counterparts. A sprite is an entity in the game, and the object is the action of that entity. Try to think of the sprite as the noun, and the object as the verb. The two sprites I created were the action figure:

Here’s a close up of the main character:

and the Wall/Floor:

You’re thinking, “Man he can play music, write, and DRAW TOO?”

Next I wrote code to assign to these sprites, in their objects. I created two objects and assigned them to the Splayer sprite. The two objects created were create, and step. Create code is applied on startup of the game, and step is created each and every frame in the game.
 
Did you get all that?
This was the create object window. Here I assigned 4 variables to the splayer sprite. This means when the game starts the character has these attributes assigned to it.
 
The variables I assigned to it were:
 
hspeed = horizontal speed
vsp = vertical speed
grv = gravity
walksp = walk speed
 
That wasn’t too bad… then came the step object window. That’s where the main code for the game takes place:
This was the create object window. Here I assigned 4 variables to the splayer sprite. This means when the game starts the character has these attributes assigned to it.
 
The variables I assigned to it were:
 
hspeed = horizontal speed
vsp = vertical speed
grv = gravity
walksp = walk speed
 
That wasn’t too bad… then came the step object window. That’s where the main code for the game takes place: