

- GAMEMAKER STUDIO 2 MOVEMENT HOW TO
- GAMEMAKER STUDIO 2 MOVEMENT FULL
- GAMEMAKER STUDIO 2 MOVEMENT PLUS
GAMEMAKER STUDIO 2 MOVEMENT HOW TO
If you are forgetful, we will recap most of the important things in GameMaker Studio 2 for an hour in the beginning.Īfter taking this course, you should know how to implement these features into your game. We will use many of the features that GameMaker Studio 2 has to offer!

if you already have knowledge in GameMaker Language and know how the game engine works, this course is for you. This course is for intermediate GameMaker Studio 2 users. We will also build a world that you can explore, in the course, I leave it up to you to make the world as detailed as you want, but we will go over how to use tilemaps to build the world. GameMaker Studio 2 is a great engine for building 2D RPG games since, it gives you the tools to not only produce a decent game, but also makes it easier for you to understand your own and other people's work. Later on we will buildĪ smart enemy that follows around your player that will be later on enhanced as the boss in the game. We will create a player, that will be able to run around and attack enemies.

In this course we will build an RPG consisting of commonly used features from other games. Under the heading "Object Following", click where it says "No Object" and select "obj_player".Welcome to Make An RPG With GameMaker Studio 2. Still under "Viewport 0", under the "Camera Properties" change the width and height to 1280 and 720, then under "Viewport Properties", again, change the width and height to 1280 and 720. Check the box for "Enable Viewports", expand "Viewport 0" and check the box for "Visible". Next, still in the room properties, expand the options for "Viewports and Cameras". We'll be changing these to 1280 and 720 respectively. Right under "Room Settings" you'll see options for Width and Height.

I've expanded mine to capture all the settings in one screenshot, but it's usually much smaller than this. Next, in the bottom left hand corner of the screen you'll see the Properties panel for the room. Next, click on "obj_player" in the resource tree and drag it out to the center of the room. Double click on "rm_world_map" to open the room editor. If an object is the blueprint for a house, an instance is the actual house. Next we'll need to insert an instance of our player into the room.
GAMEMAKER STUDIO 2 MOVEMENT FULL
This is the first frame of animation for our sprite, which in our case is the normal standing position. This function takes half width and half height to create a rectangular shape, and it will be bound to the origin of the sprite, where the final size will be the half width/height on either side of the origin (giving full width/height) We set the density to 0 (it is a static instance remember), and then a couple of other basic properties. Finally, if we weren't moving in any direction we set "image_index" to 0. "image_speed" is another special property of an object that determines how fast we cycle through the frames of our sprite animation. sprite_index is also a special variable in an object that allows us to assign which sprite is associated to an object. We also set "sprite_index" equal to our player_direction. x and y are special variables in an object that correlate to the object's position inside the room, so by setting this x and y values we are actually moving our object around the screen.
GAMEMAKER STUDIO 2 MOVEMENT PLUS
If so, we take "x" and set it equal to our current x value plus the value we determined for our movement speed along the x axis. That gives us the ability to reduce the values of our x and y positions without needing to have a positive and negative movement speed.įollowing that, we check to see if our x_axis or y_axis variables are anything other than 0. You'll notice that to move left or up we actually take our movement speed and multiple it by -1. The next set of "else if" statements do the same thing for the left, up and down arrow keys, setting our movement speed along the x or y axis as appropriate. "keyboard_check(vk_right)" will return true if the right arrow key is currently pressed, so we'd go ahead and set our movement along the x axis to be equal to the movement speed, and set the player direction to be equal to the macro "RIGHT", meaning right now we want to use the sprite "spr_player_right". This checks the current state of our keyboard to see if the right arrow key is being pressed. Next we used the function "keyboard_check" to check for "vk_right". The first two lines set our default movement to 0.
