1 of 9

RoguelikeDev Does The Complete Roguelike Tutorial

Week 01 - July 4th, 2023

Gamemaker Studio 2

by /u/GrifoCaolho

2 of 9

Why Gamemaker Studio 2?

Because there are many tutorials on /r/roguelikedev about programming languages, but only a few focusing on engines. I have been wanting to tackle a roguelike and Gamemaker Studio 2 could be a great way to do it.

3 of 9

Week 01 - Objectives

Week 01 focuses on setting up and drawing the ‘@’ symbol and moving it around.

Setting up is not much of a hassle with Gamemaker Studio 2. You need a new project, a player object, less than 20 lines of code, and you are set. So, we will do some things different from the tcod tutorial.

4 of 9

A New Project

First of all, we will create a new project. Just name it whatever you want - and be sure that you will remember it afterwards. It is important to remember that we will be using Gamemaker Language, not the drag and drop version.

5 of 9

Our First Object

Since we are streamlining a lot, I wil not bother with details. We will be creating a new object called ‘obj_Player’ and code it to move. Simple as that. We are making it in such a way that every step (frame) we check if a numpad key has been pressed and move the player accordingly. The code is very simple, it is far from ideal but, for now, as it gets our feet wet, it works.

6 of 9

Our First Sprite

The way it is now, we won’t see anything: our object has no sprite. So let’s set up a sprite. Now, there a few ways to do this, but since we are trying to make it easier, we will drawn a sprite. Go wild. We will call it ‘spr_Player’. Notice that I created something very, very ugly. That is no problem. After we create it, we assign it to the object. Go back to ‘obj_Player’ and I am sure you will figure out how. No hand-holding!

7 of 9

Putting it in a Room

Now that we have a strange looking thing that moves and an ugly sprite, it is time to put it in a ‘room’. Rooms are much like screens, and there is a starting room. Simply open the room that has already been created for you and drag your ‘obj_Player’ to the middle of it. Simple as that.

Maybe someday we will add something fancy like a title, options or even the dreaded save and load features, but, for now, testing our game will instantly bring us to a room. Yeah - roots.

8 of 9

Testing the Game

We are already ready to test this game and our player can move across the screen! Damn, game developing for sure is easy! Press ‘F5’, or click the playtest button if you are feeling naughty!

Fear not - it will get worse, much, much worse, and you will abhor the day you first thought about game developing and wonder why you are here. But for now, bask in the glory of your creation.

9 of 9

That’s it?

No, it sure ain’t. There is a whole lot more to it. The real tutorial starts now, but I just wanted to put a smile on your face and get your feet wet. We will try to do something different now - something serious, you know? Let’s scrap all this we’ve done (or start a new project) and do it the right way. Real programming, more guidelines and commented screenshots and even code snippets.

I will be freehanding my sprites, since I already have a theme in mind for my project, but please, try your own hand, use fonts and do whatever your heart desires. We will try to handle it.