{"id":9578,"date":"2020-07-14T02:50:22","date_gmt":"2020-07-14T09:50:22","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=9578"},"modified":"2020-07-16T06:53:05","modified_gmt":"2020-07-16T13:53:05","slug":"gamemaker-studio-2-tutorial","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/gamemaker-studio-2-tutorial\/","title":{"rendered":"GameMaker Studio 2 Tutorial: A Simple 5 Step Guide to GMS 2"},"content":{"rendered":"\n<p>Some of the best advice I\u2019ve ever received as an indie developer is to start your project right away. <\/p>\n\n\n\n<p>Large triple-A studios start with a long design, concept, and prototyping process. While that process is effective for large studios, it can bog down indie or solo developers.&nbsp;<\/p>\n\n\n\n<p>Often, the best first step after coming up with an idea for a game is to put the most base or core mechanic into code. The goal of this step is to make a simple game to test if it will even work. <\/p>\n\n\n\n<p>This provides you with something you can actually see: real results. It then creates a starting point from which you can grow your project.<\/p>\n\n\n\n<p>In this tutorial, we will walk through the start of that process together in a game <a href=\"https:\/\/careerkarma.com\/blog\/2d-game-engines\/\">engine made for 2D games<\/a> and rapid development: <strong>GameMaker Studio 2<\/strong> from Yoyo Games. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"487\" height=\"200\" src=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gamemaker-studio-2.png\" alt=\"GameMaker Studio 2 logo\" class=\"wp-image-9581\" srcset=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gamemaker-studio-2.png 487w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gamemaker-studio-2-20x8.png 20w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gamemaker-studio-2-385x158.png 385w\" sizes=\"auto, (max-width: 487px) 100vw, 487px\" \/><\/figure><\/div>\n\n\n\n<p>The GameMaker name has been around for a bit, and many amazing and successful games have been made using this game development tool. For example, Undertale, Hyperlight Drifter, and Hotline Miami were all made using GameMaker Studio.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p style=\"border-left:10px solid #FF9F32; background-color: #e6e6e6; padding: 1em;\"><strong>A Note About Game Engines<\/strong><br><br>\nWhile I really enjoy using GameMaker Studio 2, there are a plethora of paid and <a href=\"https:\/\/careerkarma.com\/blog\/best-free-game-engines\/\">free game engines<\/a> available. When it comes down to it, the best game engine is the one that you\u2019re most comfortable with and that allows you to create what you\u2019d like to create.<br><br>\nEvery engine is different or powerful in it\u2019s own way, and if you\u2019re still searching for the best engine for you, my advice is to keep trying different ones until you land on one you enjoy using. Although your preferred engine might be something quite different from the one we will use today, the principles used here are still useful to any fledgling developer.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>In this GameMaker Studio 2 tutorial, we will learn how to make a game by <strong>starting with an idea<\/strong> and then <strong>creating a prototype around that idea<\/strong>. <\/p>\n\n\n\n<p>You will learn a bit of code and a bit of game design as we go.&nbsp;<\/p>\n\n\n\n<p><em><strong>Note:<\/strong> It is expected that you know some coding basics (like what a variable is), as this tutorial won\u2019t go too in-depth into how the code works. However, if you have zero coding experience, you should still be able to follow along.&nbsp;<\/em><\/p>\n\n\n\n<p><\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<label for=\"ez-toc-cssicon-toggle-item-69e35a7cd81ee\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #000000;color:#000000\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #000000;color:#000000\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69e35a7cd81ee\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/careerkarma.com\/blog\/gamemaker-studio-2-tutorial\/#before-we-begin-the-gamemaker-studio-2-tutorial%e2%80%a6\" >Before We Begin the GameMaker Studio 2 Tutorial&#8230;<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/careerkarma.com\/blog\/gamemaker-studio-2-tutorial\/#gamemaker-studio-2-tutorial-step-by-step\" >GameMaker Studio 2 Tutorial: Step by Step<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/careerkarma.com\/blog\/gamemaker-studio-2-tutorial\/#step-1-project-setup-and-learning-the-interface\" >Step 1: Project Setup and Learning the Interface<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/careerkarma.com\/blog\/gamemaker-studio-2-tutorial\/#step-2-making-our-character\" >Step 2: Making Our Character<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/careerkarma.com\/blog\/gamemaker-studio-2-tutorial\/#step-3-getting-our-character-to-move\" >Step 3: Getting Our Character to Move<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/careerkarma.com\/blog\/gamemaker-studio-2-tutorial\/#step-4-creating-a-challenge\" >Step 4: Creating a Challenge<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/careerkarma.com\/blog\/gamemaker-studio-2-tutorial\/#step-5-creating-the-main-mechanic\" >Step 5: Creating the Main Mechanic<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"before-we-begin-the-gamemaker-studio-2-tutorial%e2%80%a6\"><\/span>Before We Begin the GameMaker Studio 2 Tutorial&#8230;<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>We need an idea before we start prototyping, so let\u2019s come up with one now:<\/p>\n\n\n\n<blockquote style=\"text-align:left\" class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><em><strong>I\u2019d like to make a top-down adventure game where you can slow down time to solve puzzles. <\/strong><\/em><\/p><\/blockquote>\n\n\n\n<p>That\u2019s about all you need before entering the prototype phase&#8211;no design document, no multi-step plans (yet). <\/p>\n\n\n\n<p>With a simple idea in mind, it&#8217;s time to <em>make your own game!<\/em>&nbsp;<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"gamemaker-studio-2-tutorial-step-by-step\"><\/span>GameMaker Studio 2 Tutorial: Step by Step<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Now that we have our idea, it&#8217;s time to move on to the actual GameMaker Studio 2 Tutorial. Be sure to follow the steps carefully. Soon, you&#8217;ll have your very own 2D game! <\/p>\n\n\n\n<p>So, let&#8217;s make a game!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"step-1-project-setup-and-learning-the-interface\"><\/span><strong>Step 1: Project Setup and Learning the Interface<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The first step is to download Game Maker Studio 2 if you don\u2019t already have it. You can start your free trial and <a href=\"https:\/\/www.yoyogames.com\/get\" target=\"_blank\" rel=\"noopener\" rel=\"nofollow\">download it here<\/a>. <\/p>\n\n\n\n<p>GMS 2 isn\u2019t free, unfortunately, but it\u2019s still an excellent tool that\u2019s relatively cheap for a high-quality game engine. It\u2019s a flat purchase price, meaning that GMS 2 doesn&#8217;t try to take your game\u2019s profits or make you pay monthly.&nbsp;<\/p>\n\n\n\n<p>After you\u2019ve downloaded the game development program, you should be ready to make a game. <\/p>\n\n\n\n<p>One of the benefits of GMS 2 is that it doesn\u2019t require a bunch of scattered dependencies to make it work.&nbsp;<\/p>\n\n\n\n<p><strong>First<\/strong>, click <em>New<\/em> under <em>Getting Started<\/em> to begin making your first game. <\/p>\n\n\n\n<p><strong>Next<\/strong>, select <em>GameMaker Language<\/em> instead of <em>Drag and Drop<\/em>. Name your project as you please and save it somewhere safe.&nbsp;<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p style=\"border-left:10px solid #FF9F32; background-color:#e6e6e6; padding: 1em;\"><strong>GameMaker Language vs Drag and Drop<\/strong><br><br>\nGML, or GameMaker Language, is GameMaker\u2019s proprietary programming language. While normally proprietary languages are a bad thing, GML is really close to JavaScript as it\u2019s dynamically typed and high level. It\u2019s easy to read and type in, and it functions very similar to other languages. Therefore, it\u2019s not hard to transition to another language, like Lua, after learning GML.<br><br>\n\nDrag and Drop is GMS 2\u2019s no code solution to making games. It\u2019s fairly easy to use, and it emulates code pretty well. However, I\u2019ve found that visual coding languages like Drag and Drop tend to hold back developers that would be better off just buckling down and learning code. Drag and Drop is simply more work for less functionality, so we\u2019ll be sticking with GML for this tutorial.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Since we\u2019ve just gotten the program, let\u2019s look over the interface.&nbsp;<\/p>\n\n\n\n<p>The page you start on is the <em>Workspace<\/em>. This is where we will be working on the art and code for our project, among other things. <\/p>\n\n\n\n<p>On the right are your resources in the <em>Resource Tree<\/em>. This will contain every element of your game, whether it\u2019s a sound file, a sprite, or a block of code.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"559\" src=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gamemaker-studio-2-interface-1024x559.png\" alt=\"GameMaker Studio 2 Interface\" class=\"wp-image-9596\" srcset=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gamemaker-studio-2-interface-1024x559.png 1024w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gamemaker-studio-2-interface-768x420.png 768w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gamemaker-studio-2-interface-770x421.png 770w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gamemaker-studio-2-interface-20x11.jpg 20w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gamemaker-studio-2-interface-385x210.png 385w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gamemaker-studio-2-interface-1540x841.png 1540w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gamemaker-studio-2-interface.jpg 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption><em>My GameMaker Studio 2 Workspace has an interesting background. Yours will be gray if you\u2019ve just installed it.<\/em><\/figcaption><\/figure><\/div>\n\n\n\n<p>If you click on the <em>Rooms<\/em> dropdown in the <em>Resource Tree<\/em>, you\u2019ll see we have a default starting room for our game. Double-clicking it will open the room tab for that room, which is just a black background for now.&nbsp;<\/p>\n\n\n\n<p><em>Rooms<\/em> are what they sound like: places for you to put your sprites and game objects. <\/p>\n\n\n\n<p>They can be any size you like, and GMS 2 has a camera\/viewport system, so our room doesn\u2019t have to be the same size as our screen. <\/p>\n\n\n\n<p>For now, we will just leave it set at default with the room taking up the whole game window. <\/p>\n\n\n\n<p>If you\u2019d like to see your game (again just a black screen), press <em>F5<\/em> to run the game. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"512\" height=\"280\" src=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/GMS-2-empty-room.png\" alt=\"GameMaker Studio 2 Tutorial: GMS 2 Empty Room\" class=\"wp-image-9601\" srcset=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/GMS-2-empty-room.png 512w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/GMS-2-empty-room-20x11.png 20w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/GMS-2-empty-room-385x211.png 385w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><figcaption><em>A blank canvas for our game.<\/em><\/figcaption><\/figure><\/div>\n\n\n\n<p>Right now everything is looking very empty, so let\u2019s get started making our game.&nbsp;<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"step-2-making-our-character\"><\/span><strong>Step 2: Making Our Character<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The next step we want to take in our GameMaker Studio 2 tutorial is to make a character that the player can control. <\/p>\n\n\n\n<p>GMS 2 uses <em>Objects<\/em> as general containers for anything that has code attached to it. <em>Objects<\/em> have a number of built-in properties that will help us as we make our game, so it makes sense to make a new object for our character. <\/p>\n\n\n\n<p>Right-click the <em>Objects <\/em>drop-down in the resources panel and click <em>Create Object.<\/em>&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"735\" height=\"554\" src=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gamemaker-studio-2-objects.jpg\" alt=\"GMS 2 Tutorial: Objects dropdown\" class=\"wp-image-9606\" srcset=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gamemaker-studio-2-objects.jpg 735w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gamemaker-studio-2-objects-20x15.jpg 20w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gamemaker-studio-2-objects-385x290.png 385w\" sizes=\"auto, (max-width: 735px) 100vw, 735px\" \/><figcaption><em>Our GMS 2 workspace is filling up already.<\/em><\/figcaption><\/figure><\/div>\n\n\n\n<p>We now get to see an <em>Object Panel<\/em>. <\/p>\n\n\n\n<p>On the left is the space where we can assign the object a name and a sprite, along with some other options. <\/p>\n\n\n\n<p>On the right is the <em>Events Space<\/em>, which will be where we put all of our code (more on this later). <\/p>\n\n\n\n<p>Let\u2019s rename our new object to <code>obj_player<\/code> in the name box.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p style=\"border-left:10px solid #FF9F32; background-color:#e6e6e6; padding: 1em;\"><strong>Naming Practices<\/strong><br><br>\nIt\u2019s a really good idea to name things in a way that will tell you what they are. For example, many people will name their objects <code>obj_somthing<\/code> or <code>Osomething<\/code>. That way, they know if what they are using is an object or something else.<br><br>\nWe do this because we will often have to mention the names of things in our code. It can become tricky to remember what\u2019s what, so this helps with organization. It\u2019s also useful if you want to name two different things the same name, like <code>obj_player<\/code> (for the object) and <code>spr_player<\/code> (for the sprite).\n<\/p>\n\n\n\n<p>Right now, unfortunately, our player object looks like nothing. That\u2019s because it doesn\u2019t have a <em>Sprite<\/em> yet. Let\u2019s make a new <em>Sprite<\/em> and then add it to the player object.&nbsp;<\/p>\n\n\n\n<p>Right-click the <em>Sprites<\/em> section of the <em>Resource Tree<\/em>, then click <em>Create Sprite<\/em>.<\/p>\n\n\n\n<p> Per the box I\u2019ll name this <code>spr_player<\/code>. Sprites are the game dev word for images. Sprites don\u2019t do anything, they are just pictures that are sometimes animated that we attach to things that have code, i.e. objects, or that we just put in our scene to look pretty.&nbsp;<\/p>\n\n\n\n<p>Our workspace now has two boxes. To navigate the workspace, use the scroll wheel to scroll or the middle mouse button to move around.<\/p>\n\n\n\n<p>Right now, it\u2019s a little small. Let&#8217;s make it a bit bigger. Click the small box with four arrows under <em>Image Size<\/em> and set the width and height to 64&#215;64 pixels under <em>Scale Image<\/em>.&nbsp;<\/p>\n\n\n\n<p>Now that it\u2019s the right size, let\u2019s draw on it. Click <em>Edit Image<\/em> near the size button. This will open up the sprite in a new sprite editor tab.&nbsp;<\/p>\n\n\n\n<p>Now, let\u2019s draw something simple to represent our character. Later, we can come back and draw some animated sprites that resemble more than a box. <\/p>\n\n\n\n<p>But to get into making our prototype, we just need something that tells us where our player is and how big they are. Just remember that for now, it will be appearing on a black background, <strong>so don\u2019t make it black<\/strong>. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"512\" height=\"299\" src=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/GMS-2-sprite.png\" alt=\"GMS 2 Sprite\" class=\"wp-image-9623\" srcset=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/GMS-2-sprite.png 512w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/GMS-2-sprite-385x225.png 385w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/GMS-2-sprite-20x12.png 20w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><figcaption><em>I used this opportunity to really flex my creative muscles, but you can make whatever you\u2019d like. <\/em><\/figcaption><\/figure><\/div>\n\n\n\n<p>Once you\u2019ve finished, return to the main workspace. <\/p>\n\n\n\n<p>Before attaching the sprite to our player, we will want to change a couple more options: the first is the sprite\u2019s <em>Origin<\/em>. The <em>Origin<\/em> is the exact point that the game considers your player to be. And if you rotate your player, they will rotate around this point. <\/p>\n\n\n\n<p>For now, let\u2019s put the <em>Origin<\/em> at the player&#8217;s feet. I\u2019ve found that to be the best place when making a top-down game.&nbsp;<\/p>\n\n\n\n<p>Change the dropdown menu right above the preview of the sprite from <em>top left<\/em> to <em>bottom center<\/em>. You\u2019ll also see the small crosshairs move on the sprite. You can change this manually by clicking on the preview. But, for now, let\u2019s keep it at the <em>bottom center<\/em>.&nbsp;<\/p>\n\n\n\n<p>The only other thing to change is the <em>Bounding Box<\/em>, or <em>Collision Mask<\/em>. <\/p>\n\n\n\n<p>The <em>Bounding Box<\/em> is what lets the game engine know what your sprite is touching, known as <em>Collision Detection<\/em>. Above your sprite\u2019s preview, click <em>Preview Mask<\/em>. The origin cursor will disappear and a grey box will show up on your sprite.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"512\" height=\"190\" src=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/GMS-2-Bounding-Box.png\" alt=\"Bounding Box\/Collision Mask on Sprite\" class=\"wp-image-9626\" srcset=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/GMS-2-Bounding-Box.png 512w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/GMS-2-Bounding-Box-385x143.png 385w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/GMS-2-Bounding-Box-20x7.png 20w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><figcaption><strong><em>&nbsp;<\/em><\/strong><em>It\u2019s best to have the box completely covering your character, with no overlap or extra space.&nbsp;<\/em><\/figcaption><\/figure><\/div>\n\n\n\n<p>The options for this box are on the left side of the panel under <em>Collision Mask<\/em>. By default, it\u2019s set to <em>automatic<\/em>. The <em>automatic<\/em> setting is pretty smart, and it does a good job, so I won\u2019t change it for my sprite. But you can change it to <em>manual<\/em> if you want to move around the box. If something is touching that box, it will be touching your player, so keep that in mind if you decide to change it.<\/p>\n\n\n\n<p>Now, we can attach the sprite to our character object, and put that object into our room. Return to our player object by double-clicking its name in the resource tree. Click where it currently says \u2018No Sprite\u2019 and select <code>spr_player<\/code>.&nbsp;<\/p>\n\n\n\n<p>Now that our object has a gorgeous new stand in graphic to display, go to the room tab, then drag and drop <code>obj_player<\/code> from the resource tree into the room. Anywhere is fine.&nbsp;<\/p>\n\n\n\n<p>Now your player object is in your room, and therefore part of the game. Let\u2019s make sure it all worked and press <em>F5<\/em>. This will compile and run your game. After a few moments, a window will pop up.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"574\" src=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/alone-1024x574.png\" alt=\"GMS2 Sprite alone in a Room\" class=\"wp-image-9631\" srcset=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/alone-1024x574.png 1024w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/alone-768x431.png 768w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/alone-770x432.png 770w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/alone-20x11.png 20w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/alone-385x216.png 385w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/alone-1540x864.png 1540w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/alone.png 1551w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption><em>It&#8217;s a game now!<\/em><\/figcaption><\/figure>\n\n\n\n<p>Hopefully, your player object shows up like the above screenshot. Now, you may notice that they don\u2019t do anything. That\u2019s because we haven\u2019t given them anything to do, so they just stand where we\u2019ve placed them. Let\u2019s change that.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"step-3-getting-our-character-to-move\"><\/span><strong>Step 3: Getting Our Character to Move<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The next step is to finally get into some code to make our character move around on the screen. This is going to be pretty simple code, so don\u2019t worry. We will be using an <em>event<\/em> to make our player move around the screen. <\/p>\n\n\n\n<p><em>Events<\/em> are blocks of code attached to objects that run when that event happens. For example, a <code>Create<\/code> event will run only once, right when the object is created. If the object is in the room when the game starts, this code will run once when the game starts.&nbsp;<\/p>\n\n\n\n<p>A <code>Step<\/code> event, on the other hand, will run every step of the game, which for us should be 60 times every second. Just in case, in the <em>Resource Panel<\/em>, go to <em>Options &gt; Main<\/em>, and make sure the \u2018Game frames per second\u2019 is set to 60.<\/p>\n\n\n\n<p>Return to the workspace and click <em>Add Event<\/em> in the events box attached to your player object. Then, click <code>Step &gt; Step<\/code>.&nbsp;<\/p>\n\n\n\n<p>You should now have a <code>Step<\/code> event and a new window containing a text editor to type your code into.<\/p>\n\n\n\n<p>Now, it&#8217;s time to code. We&#8217;ll start with an <code>if<\/code> statement. Type the following:<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>if (keyboard_check(vk_left)) {\n  x=x-5;\n}<\/pre><\/div>\n\n\n\n<p style=\"border-left:10px solid #FF9F32; background-color:#e6e6e6; padding: 1em;\"><strong>Type Carefully!<\/strong><br><br>\n\nIt\u2019s really important to type everything exactly when you\u2019re writing code. Don\u2019t capitalize anything that shouldn\u2019t be capitalized or forget to put any parentheses or brackets where they belong. If you don\u2019t, you\u2019ll get an angry red circle on the left side of the code window, and an error when you try to run your game. Debugging is no fun, so try to copy the code exactly.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>The code we just wrote will constantly check if you\u2019re pressing the left arrow key on your keyboard. If the game detects that you\u2019re pressing left on the keyboard, it will run the code in the curly braces.<\/p>\n\n\n\n<p>In this case, the code between the two braces is <code>x=x-5<\/code>. What we are doing is taking <code>x<\/code>, which is a special variable that all objects have, and making it equal itself minus 5. The <code>x<\/code> variable controls the object\u2019s horizontal position on the screen, and it\u2019s measured in pixels.&nbsp;<\/p>\n\n\n\n<p>If <code>x<\/code> were to equal zero, our object would be at the far left of the screen, and if <code>x<\/code> was equal to the number of pixels on the screen, our object would be at the far left. When this code runs, we are setting the x position of the object to be 5 pixels less, or 5 pixels closer to the left side of the screen.&nbsp;<\/p>\n\n\n\n<p>Similarly, there is a matching variable called <code>y<\/code>. This controls the vertical position of our object, with the top being zero.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"560\" src=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gms-2-x-y-variables-1024x560.png\" alt=\"x and y variable coordinates on GMS 2 room grid\" class=\"wp-image-9662\" srcset=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gms-2-x-y-variables-1024x560.png 1024w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gms-2-x-y-variables-768x420.png 768w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gms-2-x-y-variables-770x421.png 770w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gms-2-x-y-variables-20x11.png 20w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gms-2-x-y-variables-385x211.png 385w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gms-2-x-y-variables-1540x842.png 1540w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gms-2-x-y-variables.png 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption><em>The X and Y control the object\u2019s position on the screen in pixels.<\/em><\/figcaption><\/figure><\/div>\n\n\n\n<p>Go ahead and press <em>F5<\/em> to run the game. Your character should be able to move left now.&nbsp;<\/p>\n\n\n\n<p>Using what we\u2019ve learned, let\u2019s make the character move right, up, and down as well:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>if (keyboard_check(vk_left)) {\n  x=x-5;\n}\n\nif (keyboard_check(vk_right)) {\n  x=x+5;\n}\n\nif (keyboard_check(vk_up)) {\n  y=y-5;\n}\n\nif (keyboard_check(vk_down)) {\n  y=y+5;\n}<\/pre><\/div>\n\n\n\n<p>Now, we are checking for the other arrow keys, with the up and down arrows affecting the Y-axis. <\/p>\n\n\n\n<p>Go ahead and run your game again. You should be able to move freely around the screen.&nbsp;<\/p>\n\n\n\n<p><strong><em>Well done!<\/em><\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"step-4-creating-a-challenge\"><\/span><strong>Step 4: Creating a Challenge<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The next step in our GameMaker Studio 2 tutorial is where things start getting really fun.<\/p>\n\n\n\n<p>Now that we can move, let\u2019s make something that can hurt us, to provide a bit of a challenge for our players.&nbsp;<\/p>\n\n\n\n<p>Make a new sprite, and fill it with red to make a 32&#215;32 red box. I named mine <code>spr_damage<\/code>. Don\u2019t worry too much about the origin, and the bounding box should be all of the image now (which we want).&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"941\" height=\"572\" src=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gamemaker-studio-2-tutorial-challenge.png\" alt=\"Red Box in the GameMaker Studio 2 Interface, to create a challenge\" class=\"wp-image-9666\" srcset=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gamemaker-studio-2-tutorial-challenge.png 941w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gamemaker-studio-2-tutorial-challenge-768x467.png 768w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gamemaker-studio-2-tutorial-challenge-770x468.png 770w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gamemaker-studio-2-tutorial-challenge-385x234.png 385w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gamemaker-studio-2-tutorial-challenge-20x12.png 20w\" sizes=\"auto, (max-width: 941px) 100vw, 941px\" \/><figcaption><em>A red box appears!<\/em><\/figcaption><\/figure><\/div>\n\n\n\n<p>Now, create a new object (I\u2019ve named mine <code>obj_damage<\/code>), add the red box sprite to the object, and put the object into the middle of the room.&nbsp;<\/p>\n\n\n\n<p><strong>First<\/strong>, we&#8217;ll make it so the game restarts if you touch the box. <\/p>\n\n\n\n<p>Return to our player object and add a new event; but this time, go to <code>event &gt; collision &gt; obj_damage<\/code>, or whatever you named the new object you\u2019ve just made.&nbsp;<\/p>\n\n\n\n<p>As you may expect, the collision event runs its code when the two objects collide&#8211;or, more precisely, when their bounding boxes touch each other.<\/p>\n\n\n\n<p>In this event, the code is pretty easy, just put in the following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>game_restart();<\/pre><\/div>\n\n\n\n<p>I\u2019ll let you guess what this code does. Go ahead and play the game and see what happens if you touch the red box.&nbsp;<\/p>\n\n\n\n<p>Now, this isn\u2019t much of a challenge: the red box isn\u2019t very big, and it\u2019s easy to avoid. <\/p>\n\n\n\n<p>Let\u2019s change this by making it move.&nbsp;<\/p>\n\n\n\n<p>Go to <code>obj_damage<\/code>, and add a new step event. In the step event, add the following code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>y=y+50\n\nif (y&gt;room_height){\n   y = 0;\n}<\/pre><\/div>\n\n\n\n<p>The first thing you\u2019ll notice is that the red box is moving much faster than your character. It moves 50 pixels every frame, compared to your character that moves 5 pixels every frame.<\/p>\n\n\n\n<p>The second part of the code checks to see if the Y position of the object is at the bottom of the screen. If it is, it sets the Y to zero, which is the top of the screen. <\/p>\n\n\n\n<p>This way, the object doesn\u2019t just keep going into the infinite void offscreen. Instead, it teleports back up to the top of the screen when it reaches the bottom.&nbsp;<\/p>\n\n\n\n<p>If you try it out, it\u2019s almost impossible to get past the red box without dying.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1023\" height=\"745\" src=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gif1.gif\" alt=\"GameMaker Studio 2 Tutorial Fast Animation\" class=\"wp-image-9668\"\/><figcaption><em>Our little friend does try so hard.<\/em><\/figcaption><\/figure>\n\n\n\n<p>I think it would be a lot easier for our character if they could slow down time, don\u2019t you? Let\u2019s give our character that power.&nbsp;<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"step-5-creating-the-main-mechanic\"><\/span><strong>Step 5: Creating the Main Mechanic<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Our GameMaker Studio 2 tutorial is almost done! Let&#8217;s add some finishing touches. <\/p>\n\n\n\n<p>We are going to make a new object and call it <code>obj_world<\/code>. We won\u2019t make a sprite for this one; we don\u2019t want to see it. It just controls some things for us, namely time.&nbsp;<\/p>\n\n\n\n<p>Create a new <code>Create<\/code> event in our world object. This will only run once, and we\u2019ll use it to establish a global variable. A <em>variable<\/em> stores something for us, like a number, so we can use it somewhere else.&nbsp;<\/p>\n\n\n\n<p>Putting <code>global.<\/code> before it makes it so we can access that variable from anywhere, not just from inside that object\u2019s code.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>global.time = 1;<\/pre><\/div>\n\n\n\n<p><em>Congrats! You just created time!<\/em><\/p>\n\n\n\n<p>Now, proceed to make a <code>Step<\/code> event for the world object. We need to let the player control time, so let\u2019s have them slow it down or speed it up, but only if it\u2019s below or above a certain amount. <\/p>\n\n\n\n<p>We can do this with a second <code>if<\/code> statement:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>if (global.time&lt;1) {\n   if (keyboard_check(ord(&quot;D&quot;))){\n       global.time=global.time+0.05;\n   }\n}\nif (global.time&gt;0.1) {\n   if (keyboard_check(ord(&quot;A&quot;))){\n      global.time=global.time-0.05;\n   }\n}<\/pre><\/div>\n\n\n\n<p>To break down the code a little, first we check if time is below 1. If it isn\u2019t, we check if the player is pressing A on the keyboard. If both of those are true, then we increase time by 0.05. <\/p>\n\n\n\n<p>I know that\u2019s a very small number, but remember that this will happen 60 times a second. So, if you hold down A for one second time will increase by 0.6.&nbsp;<\/p>\n\n\n\n<p>We do the same thing again but this time to check for the key D and to lower the amount. This code makes sure time stays between 0.1 and 1.<\/p>\n\n\n\n<p>Now we have to make the time variable do something. Right now, it doesn\u2019t actually affect time&#8211;it\u2019s just a number. <\/p>\n\n\n\n<p>Go back to your damage object and change the code so it looks like this:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>y=y+(50*global.time);\n\nif (y&gt;room_height){\n   y = 0;\n}<\/pre><\/div>\n\n\n\n<p>I know we said we would be controlling time, but controlling the speed at which the box moves is much like controlling time, and it\u2019s a lot easier. <\/p>\n\n\n\n<p>Here, you are multiplying the box&#8217;s speed by the time variable.&nbsp;<\/p>\n\n\n\n<p>Before you try it out, don\u2019t forget to drag your world object into the room with your box and player. Even though we can\u2019t see it, we still need it in the room to perform its magic.&nbsp;<\/p>\n\n\n\n<p>Now, go ahead and press <em>F5<\/em>. Now you should be able to \u2018slow time\u2019 by pressing A and speed it up by pressing D.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1023\" height=\"745\" src=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/control-time-gms-2.gif\" alt=\"Control time in this GameMaker Studio 2 Tutorial\" class=\"wp-image-9672\"\/><figcaption><em>Control time itself in your new game.<\/em><\/figcaption><\/figure><\/div>\n\n\n\n<p>Congrats! You\u2019ve made a (hopefully) functioning prototype for a new game. In case you\u2019re stuck you can get a zip of the entire completed project from our GameMaker Studio 2 tutorial here: <strong><a href=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/tutorial_game_files.zip\">tutorial_game_files.zip<\/a><\/strong>.<\/p>\n\n\n\n<p>From here, you can move on in the development process to more game logic, doing some pixel art (although, how could you improve on my masterpiece here?), or making a more complete plan with a game design document. <\/p>\n\n\n\n<p>It\u2019s up to you how you want to progress, and hopefully, this tutorial has equipped you with enough to get started and has given you the desire to learn more in the game industry. <\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n","protected":false},"excerpt":{"rendered":"Some of the best advice I\u2019ve ever received as an indie developer is to start your project right away. Large triple-A studios start with a long design, concept, and prototyping process. While that process is effective for large studios, it can bog down indie or solo developers.&nbsp; Often, the best first step after coming up&hellip;","protected":false},"author":45,"featured_media":9582,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[18070],"tags":[],"class_list":{"0":"post-9578","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-software-engineering-skills"},"acf":{"post_sub_title":"","sprint_id":"","query_class":"Software Engineering","school_sft":"","parent_sft":"","school_privacy_policy":"","has_review":null,"is_sponser_post":[],"is_guest_post":[]},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>GameMaker Studio 2 Tutorial: A Simple Guide to GMS 2 | Career Karma<\/title>\n<meta name=\"description\" content=\"Learn to build your own video game with our Gamemaker Studio 2 tutorial and pick up some useful coding skills along the way.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/careerkarma.com\/blog\/gamemaker-studio-2-tutorial\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"GameMaker Studio 2 Tutorial: A Simple 5 Step Guide to GMS 2\" \/>\n<meta property=\"og:description\" content=\"Learn to build your own video game with our Gamemaker Studio 2 tutorial and pick up some useful coding skills along the way.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/gamemaker-studio-2-tutorial\/\" \/>\n<meta property=\"og:site_name\" content=\"Career Karma\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/careerkarmaapp\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-14T09:50:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-07-16T13:53:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gamemaker-studio-2-tutorial.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"675\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ethan Scully\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@career_karma\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ethan Scully\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"18 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/gamemaker-studio-2-tutorial\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/gamemaker-studio-2-tutorial\\\/\"},\"author\":{\"name\":\"Ethan Scully\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/ef903a75c71f406d67080c5947efdf69\"},\"headline\":\"GameMaker Studio 2 Tutorial: A Simple 5 Step Guide to GMS 2\",\"datePublished\":\"2020-07-14T09:50:22+00:00\",\"dateModified\":\"2020-07-16T13:53:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/gamemaker-studio-2-tutorial\\\/\"},\"wordCount\":3508,\"commentCount\":1,\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/gamemaker-studio-2-tutorial\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/12\\\/gamemaker-studio-2-tutorial.png\",\"articleSection\":[\"Software Engineering\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/gamemaker-studio-2-tutorial\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/gamemaker-studio-2-tutorial\\\/\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/gamemaker-studio-2-tutorial\\\/\",\"name\":\"GameMaker Studio 2 Tutorial: A Simple Guide to GMS 2 | Career Karma\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/gamemaker-studio-2-tutorial\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/gamemaker-studio-2-tutorial\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/12\\\/gamemaker-studio-2-tutorial.png\",\"datePublished\":\"2020-07-14T09:50:22+00:00\",\"dateModified\":\"2020-07-16T13:53:05+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/ef903a75c71f406d67080c5947efdf69\"},\"description\":\"Learn to build your own video game with our Gamemaker Studio 2 tutorial and pick up some useful coding skills along the way.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/gamemaker-studio-2-tutorial\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/gamemaker-studio-2-tutorial\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/gamemaker-studio-2-tutorial\\\/#primaryimage\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/12\\\/gamemaker-studio-2-tutorial.png\",\"contentUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/12\\\/gamemaker-studio-2-tutorial.png\",\"width\":1200,\"height\":675,\"caption\":\"GameMaker Studio 2 Tutorial - How to Create a Game in GMS 2\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/gamemaker-studio-2-tutorial\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Software Engineering\",\"item\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/software-engineering-skills\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"GameMaker Studio 2 Tutorial: A Simple 5 Step Guide to GMS 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/\",\"name\":\"Career Karma\",\"description\":\"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/ef903a75c71f406d67080c5947efdf69\",\"name\":\"Ethan Scully\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/ethan-scully-150x150.jpg\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/ethan-scully-150x150.jpg\",\"contentUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/ethan-scully-150x150.jpg\",\"caption\":\"Ethan Scully\"},\"description\":\"Ethan Scully is a writer, editor, and game developer who manages Career Karma's content partnership initiatives and is currently based in Istanbul. His relationships with coding bootcamps give him particular insight into these new job training programs. Before joining the Career Karma team, Scully worked in IT support, graphic design, and as an editor for Cambodia's Khmer Times.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/ethanscully\\\/\"],\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/author\\\/ethan-scully\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"GameMaker Studio 2 Tutorial: A Simple Guide to GMS 2 | Career Karma","description":"Learn to build your own video game with our Gamemaker Studio 2 tutorial and pick up some useful coding skills along the way.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/careerkarma.com\/blog\/gamemaker-studio-2-tutorial\/","og_locale":"en_US","og_type":"article","og_title":"GameMaker Studio 2 Tutorial: A Simple 5 Step Guide to GMS 2","og_description":"Learn to build your own video game with our Gamemaker Studio 2 tutorial and pick up some useful coding skills along the way.","og_url":"https:\/\/careerkarma.com\/blog\/gamemaker-studio-2-tutorial\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-07-14T09:50:22+00:00","article_modified_time":"2020-07-16T13:53:05+00:00","og_image":[{"width":1200,"height":675,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gamemaker-studio-2-tutorial.png","type":"image\/png"}],"author":"Ethan Scully","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"Ethan Scully","Est. reading time":"18 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/gamemaker-studio-2-tutorial\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/gamemaker-studio-2-tutorial\/"},"author":{"name":"Ethan Scully","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/ef903a75c71f406d67080c5947efdf69"},"headline":"GameMaker Studio 2 Tutorial: A Simple 5 Step Guide to GMS 2","datePublished":"2020-07-14T09:50:22+00:00","dateModified":"2020-07-16T13:53:05+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/gamemaker-studio-2-tutorial\/"},"wordCount":3508,"commentCount":1,"image":{"@id":"https:\/\/careerkarma.com\/blog\/gamemaker-studio-2-tutorial\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gamemaker-studio-2-tutorial.png","articleSection":["Software Engineering"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/gamemaker-studio-2-tutorial\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/gamemaker-studio-2-tutorial\/","url":"https:\/\/careerkarma.com\/blog\/gamemaker-studio-2-tutorial\/","name":"GameMaker Studio 2 Tutorial: A Simple Guide to GMS 2 | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/gamemaker-studio-2-tutorial\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/gamemaker-studio-2-tutorial\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gamemaker-studio-2-tutorial.png","datePublished":"2020-07-14T09:50:22+00:00","dateModified":"2020-07-16T13:53:05+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/ef903a75c71f406d67080c5947efdf69"},"description":"Learn to build your own video game with our Gamemaker Studio 2 tutorial and pick up some useful coding skills along the way.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/gamemaker-studio-2-tutorial\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/gamemaker-studio-2-tutorial\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/gamemaker-studio-2-tutorial\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gamemaker-studio-2-tutorial.png","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/12\/gamemaker-studio-2-tutorial.png","width":1200,"height":675,"caption":"GameMaker Studio 2 Tutorial - How to Create a Game in GMS 2"},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/gamemaker-studio-2-tutorial\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/careerkarma.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Software Engineering","item":"https:\/\/careerkarma.com\/blog\/software-engineering-skills\/"},{"@type":"ListItem","position":3,"name":"GameMaker Studio 2 Tutorial: A Simple 5 Step Guide to GMS 2"}]},{"@type":"WebSite","@id":"https:\/\/careerkarma.com\/blog\/#website","url":"https:\/\/careerkarma.com\/blog\/","name":"Career Karma","description":"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/careerkarma.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/ef903a75c71f406d67080c5947efdf69","name":"Ethan Scully","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/11\/ethan-scully-150x150.jpg","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/11\/ethan-scully-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/11\/ethan-scully-150x150.jpg","caption":"Ethan Scully"},"description":"Ethan Scully is a writer, editor, and game developer who manages Career Karma's content partnership initiatives and is currently based in Istanbul. His relationships with coding bootcamps give him particular insight into these new job training programs. Before joining the Career Karma team, Scully worked in IT support, graphic design, and as an editor for Cambodia's Khmer Times.","sameAs":["https:\/\/www.linkedin.com\/in\/ethanscully\/"],"url":"https:\/\/careerkarma.com\/blog\/author\/ethan-scully\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/9578","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/users\/45"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=9578"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/9578\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/9582"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=9578"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=9578"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=9578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}