GameMaker Studio

Today I started to familiarise myself to GameMaker: Studio. GameMaker was used to created games such as the popular Hotline Miami and Spelunky.

I started by creating a simple sprite, rotating and saving it 4 times facing up, down, left and right.  I designed a quick background to look like grass and made a room to contain it.  Finally, I created an object using my sprites as the base, adding events to allow the player to move in the four directions using the directional key pads.

GameMakerTest1To build upon this, I wanted to add diagonal movement, allowing the player to move in 8 directions.  To achieve this I had to write some GML code as a “step” event in the object.

GameMakerCodeimage_speed: Effects the speed the object, in this case the player, moves.

keyboard_check(): Selects which key you wish to assign the command to.

direction: Using 0 – 360 degrees to select which direction you wish to move.

speed: The higher the number, the faster the movement in the given direction.

sprite_index: Selects the sprite you wish to use once the key is pressed.

As a result, the games now runs like this.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s