Game Maker RPG Movement – WASD/Arrow Keys

This tutorial goes over Game Maker RPG Movement, learning game maker shouldn't be hard. Try this GML basic RPG movement snippet.

Game Maker RPG Movement – WASD/Arrow Keys

rpg movement game makerDescription:

This is a simple GML snippet for an RPG style movement using either the arrow keys or WASD. This Game Maker RPG Movement snippet goes over the begin step event to detect our collision objects.


  • Game Maker 8.1 Or Game Maker: Studio

Game Objects:

  • ObjWorldCollision
    • An Empty Game Object used as barriers/walls so that the player can’t move past them.
    • I typically set this to the grid size, which tends to be a 32×32 square.

The Create Event Code:

The Begin Step Event Code:

The Step Event Code:

Please stay tuned for our next RPG movement game maker snippets!

Want to expand your knowledge? I highly recommend this book for getting more advanced with your GML code and game development experience with GameMaker: Studio. Please buy this book: GameMaker Game Programming with GML

GameMaker Game Programming with GML is one of the highest recommended books for GameMaker Studio! If you are ready to take your programming to the next level, I highly recommend picking this up!

Kyle on sabyoutubeKyle on sabwordpressKyle on sabtwitterKyle on sablinkedinKyle on sabfacebookKyle on sabemail
Hi there, I'm Kyle. I'm a web developer and an indie game developer. Currently working on an android game called: Burning Rush developed in Game Maker: Studio and is currently in Early Access Stages.

I enjoy working with code, favorite language currently: Python.
Currently working: Freelance Part-time, Real Estate Marketing & Web Development Full-time, and Indie Game Development with Unholy Squid Entertainment.


  1. My game keeps crashing whenever I try and change directions. It doesn’t give me a error message it just stops. Any ideas?

  2. I get “assignment operator expected”:

    action number 1
    of Step Event
    for object obj_player:

    COMPILATION ERROR in code action
    Error in code at line 3:
    MOVELEFT = keyboard_check(vk_left);
    at position 2: Assignment operator expected.

    Any ideas?
    *Was* using GameMaker: Studio (had same error) and am now using 8.1

Leave a Reply

Your email address will not be published. Required fields are marked *