<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Julio Fraga</title>
    <description>The latest articles on DEV Community by Julio Fraga (@julio_fraga).</description>
    <link>https://dev.to/julio_fraga</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4046129%2F17082c7d-a2ca-480b-815d-6bdfa2319f7c.png</url>
      <title>DEV Community: Julio Fraga</title>
      <link>https://dev.to/julio_fraga</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/julio_fraga"/>
    <language>en</language>
    <item>
      <title>Going back to Gamemaker - my first functionalities on my point and click game</title>
      <dc:creator>Julio Fraga</dc:creator>
      <pubDate>Sat, 25 Jul 2026 01:33:22 +0000</pubDate>
      <link>https://dev.to/julio_fraga/going-back-to-gamemaker-my-first-functionalities-on-my-point-and-click-game-4g</link>
      <guid>https://dev.to/julio_fraga/going-back-to-gamemaker-my-first-functionalities-on-my-point-and-click-game-4g</guid>
      <description>&lt;p&gt;Hello everyone! This is the first post I'm doing about the &lt;strong&gt;game&lt;/strong&gt; I'm making with my wife.&lt;/p&gt;

&lt;p&gt;If you don't know what I'm talking about but you're interested in &lt;strong&gt;game development&lt;/strong&gt; and/or &lt;strong&gt;Gamemaker&lt;/strong&gt;, please, read this &lt;a href="https://dev.to/julio_fraga/creating-a-2d-game-with-my-wife-the-beginning-28k"&gt;other post&lt;/a&gt; I made where I explain this project.&lt;/p&gt;

&lt;h2&gt;
  
  
  So what are the things I've programmed so far, and how did I program them?
&lt;/h2&gt;

&lt;p&gt;Here goes a quick summary:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Menu with interactive buttons &lt;/li&gt;
&lt;li&gt;Clickable (collectable) items&lt;/li&gt;
&lt;li&gt;Inventory system&lt;/li&gt;
&lt;li&gt;Tips system&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here I go in details about each of them. Keep in mind this isn't a &lt;strong&gt;tutorial&lt;/strong&gt;, just an overview on the &lt;strong&gt;logic/structure&lt;/strong&gt; of the project. I think it can keep things short and sweet, enough to inspire and explain, not too much to be boring.&lt;/p&gt;

&lt;h2&gt;
  
  
  Menu
&lt;/h2&gt;

&lt;p&gt;A menu with interactive buttons generated from a data list. Like this:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Create &lt;code&gt;obj_menu_controller&lt;/code&gt;&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;menu_items&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Start&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;callback&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nf"&gt;room_goto&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;TestRoom&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Quit&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;callback&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nf"&gt;game_end&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that, we simply spawn the buttons, objects which each own has it's code to render a simple sprite with the text on top of it, and also changes sprites when mouse hovers it.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Draw GUI &lt;code&gt;obj_button&lt;/code&gt;&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;hover&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;draw_sprite&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;spr_button_hover&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;draw_sprite&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;spr_button&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="n"&gt;Text&lt;/span&gt;
&lt;span class="nf"&gt;draw_set_halign&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fa_center&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nf"&gt;draw_set_valign&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fa_middle&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nf"&gt;draw_set_color&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c_black&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nf"&gt;draw_set_font&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fnt_menu_buttons&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nf"&gt;draw_text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;width&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;height&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;label&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nf"&gt;draw_set_halign&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fa_left&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nf"&gt;draw_set_valign&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fa_top&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fc5v46anlp78c1qr4i63d.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fc5v46anlp78c1qr4i63d.gif" alt=" " width="400" height="225"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Please don't judge my art style. I only made it to fill the gap. It's a temporary background (obviously) until my wife actually creates the final version&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Clickable (collectable) items
&lt;/h2&gt;

&lt;p&gt;Using a cookie as an example for now, I created clickable items that are added to your inventory via function call.&lt;br&gt;
This one is a bit more elaborate. I started by making a parent object called &lt;code&gt;obj_interactable&lt;/code&gt;. This one is intended to be one of the &lt;strong&gt;bases&lt;/strong&gt; of the game. This will give the properties to children objects to be clickable, but each with custom behavior.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Create &lt;code&gt;obj_interactable&lt;/code&gt;&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;action&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;show_debug_message&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;You need to define the variable &lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;action_type&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt; in the variable definition tab under your object so you can choose the behavior for this interactable. Please check the enum in obj_interactable. &lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt; If you want a custom behavior, do like so: &lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt; action = function()\{your_custom_behavior_here()\}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="n"&gt;enum&lt;/span&gt; &lt;span class="n"&gt;action_types&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;collect_action&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nf"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;instance_exists&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;obj_inventory&lt;/span&gt;&lt;span class="p"&gt;)){&lt;/span&gt;
    &lt;span class="nf"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;obj_id&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;default_interactable_id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
        &lt;span class="n"&gt;obj_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;default_interactable_id{length(obj_inventory.inventory_items) + 1}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nf"&gt;switch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;action_type&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
    &lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="n"&gt;collect_action&lt;/span&gt;
    &lt;span class="n"&gt;case&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;action&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nf"&gt;collect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;obj_id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="n"&gt;default&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;action&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nf"&gt;show_debug_message&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;You need to define the variable &lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;action_type&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt; in the variable definition tab under your object so you can choose the behavior for this interactable. Please check the enum in obj_interactable. &lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt; If you want a custom behavior, do like so: &lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt; action = function()\{your_custom_behavior_here()\}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see, the behavior of the click changes based on the definition of the &lt;strong&gt;action_type&lt;/strong&gt; variable. &lt;/p&gt;

&lt;p&gt;That way, clickable things inherit all the properties that make something clickable (which aren't many currently, but can quickly escalate), while also being able to use different behaviors.&lt;br&gt;
&lt;em&gt;Left Pressed &lt;code&gt;obj_interactable&lt;/code&gt;&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;action&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I also defined these variables via the UI, in the &lt;strong&gt;&lt;em&gt;variable definitions&lt;/em&gt;&lt;/strong&gt; tab. &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu785oogmfjs449rfx0gd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu785oogmfjs449rfx0gd.png" alt=" " width="800" height="383"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I made it because I think it would be more obvious and easier to just create a lot of children objects and just tweak some values in the UI instead of changing the code directly. I think it also makes clear the responsibility of the parent object to deal with base properties and behaviors, and the clickable, as it's children, to choose what behavior it will have. That way, we can have unique objects but each with base behavior already ready to use.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftib3z1qepng35aghwv4p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftib3z1qepng35aghwv4p.png" alt=" " width="799" height="449"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Inventory system (which only adds items for now)
&lt;/h2&gt;

&lt;p&gt;A simple &lt;strong&gt;UI&lt;/strong&gt; that displays the items (each with it's own custom inventory sprite - different from the "in game" sprite) in a &lt;strong&gt;horizontal list&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here, we have &lt;strong&gt;2 objects&lt;/strong&gt;. The &lt;strong&gt;first&lt;/strong&gt; will be used as the "source of truth" for what the players are carrying in their inventory. We'll call it &lt;code&gt;obj_inventory&lt;/code&gt;. For now, it only has the &lt;strong&gt;Create&lt;/strong&gt; event, with this inside:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Create&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;global&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;inventory_items&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The items show in the top corner, they slide down every time you pick something up and then they slide back up (outside of the screen).&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F84jcez3fkszz11dmio30.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F84jcez3fkszz11dmio30.gif" alt=" " width="400" height="205"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For some weird reason my screen recorder doesn't show my mouse, but you can see when I click the cookies that they go to the top of the screen, as if they were in my inventory.&lt;/p&gt;

&lt;p&gt;If you hover your mouse near to the top of the screen, it slides down again. If your mouse leaves that region it slides back up.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;second&lt;/strong&gt; object is the &lt;code&gt;obj_inventory_ui&lt;/code&gt;. That's what we use to draw the inventory.&lt;br&gt;
&lt;em&gt;Draw GUI &lt;code&gt;obj_inventory_ui&lt;/code&gt;&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;instance_exists&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;obj_inventory&lt;/span&gt;&lt;span class="p"&gt;)){&lt;/span&gt;
    &lt;span class="nf"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;var&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nf"&gt;array_length&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;global&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;inventory_items&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nf"&gt;draw_sprite&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;global&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;inventory_items&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;sprite&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;xPos&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;yPos&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Basically what we are doing here is, we are using &lt;code&gt;draw_sprite()&lt;/code&gt; always in the same Y position and just varying the X position , always &lt;strong&gt;adding to the right&lt;/strong&gt; of the previous item. This will probably need some improvement given that this will need to be a &lt;strong&gt;grid&lt;/strong&gt; that breaks the line every time the width limit is reached, but since we are just testing functionalities for now, I think it's okay like that.&lt;/p&gt;

&lt;h3&gt;
  
  
  Adding items to the inventory
&lt;/h3&gt;

&lt;p&gt;This one is pretty simple. I decided to go with a simple function inside a script, so you can call it from any object without the need to reference the &lt;code&gt;obj_inventory&lt;/code&gt; object. I think it keeps it more clean that way, allowing the &lt;code&gt;obj_inventory&lt;/code&gt; to manage it's own responsibilities. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;src_inventory&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;add_to_inventory&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;obj_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;""&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
    &lt;span class="nf"&gt;show_debug_message&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Added ${obj_id} to inventory&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nf"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;instance_exists&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;obj_inventory&lt;/span&gt;&lt;span class="p"&gt;)){&lt;/span&gt;
        &lt;span class="nf"&gt;array_push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;global&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;inventory_items&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;to_inventory_item&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;obj_id&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
        &lt;span class="nf"&gt;on_inventoy_added&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;on_inventoy_added&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
    &lt;span class="nf"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;instance_exists&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;obj_inventory&lt;/span&gt;&lt;span class="p"&gt;)){&lt;/span&gt;
        &lt;span class="nf"&gt;show_debug_message&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Inventory: {string_join(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;, global.inventory_items)}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="n"&gt;obj_inventory_ui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;show_inventory_for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see I added a function called &lt;code&gt;on_inventory_added()&lt;/code&gt;. It doesn't do much for now except show the inventory for a few seconds, but I want to improve it in the future and add a parameters that will take a list of "actions" that can be completely customized, so we can have a custom behavior for each item that gets added to the inventory.&lt;/p&gt;

&lt;p&gt;At last, we have the &lt;code&gt;obj_collectable&lt;/code&gt;. This one, is a child of the &lt;code&gt;obj_interactable&lt;/code&gt; object. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fplieg2kalb29c5kwget5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fplieg2kalb29c5kwget5.png" alt=" " width="799" height="652"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It uses the &lt;code&gt;collectable&lt;/code&gt; action_type, which is basically this:&lt;br&gt;
&lt;em&gt;src_collectable&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;collect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;instance&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;obj_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;""&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
    &lt;span class="nf"&gt;show_debug_message&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Collected {obj_id}. Adding to inventory&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nf"&gt;add_to_inventory&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;obj_id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nf"&gt;show_debug_message&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Destroying ${obj_id}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nf"&gt;with &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;instance&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nf"&gt;instance_destroy&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Very simple stuff. We just call the &lt;code&gt;add_to_inventory()&lt;/code&gt; function and then destroy the instance, removing it from the screen (as you can see in the gif above).&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;add_to_inventory()&lt;/code&gt; will then call the &lt;code&gt;to_inventory_item()&lt;/code&gt; function, which will transform that &lt;code&gt;obj_cookie&lt;/code&gt;, whose parent is &lt;code&gt;obj_collectable&lt;/code&gt;, whose parent is &lt;code&gt;obj_interactable&lt;/code&gt;, and will transfrom it in this format:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;src_object_conversor&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;to_inventory_item&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;obj_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;switch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;obj_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;case&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cookie&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;obj_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cookie&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Cookie&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="n"&gt;sprite&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;spr_cookie_inventory&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="p"&gt;};&lt;/span&gt;

        &lt;span class="n"&gt;default&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;undefined&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Maybe I should rethink the name.&lt;/em&gt;&lt;br&gt;
With this we can make sure that the objects inside the inventory list have an expected structure, avoiding errors with missing values and properties. &lt;/p&gt;

&lt;p&gt;For now, we can only add to the inventory, so things can still change until I come up with removing/editing functionalities.&lt;/p&gt;
&lt;h2&gt;
  
  
  Tips system
&lt;/h2&gt;

&lt;p&gt;You can add a tip via function call!&lt;/p&gt;

&lt;p&gt;You can choose how many seconds it stays on the screen OR you can make it persistent and not disappear from screen.&lt;/p&gt;

&lt;p&gt;When added, a tip will come from the left side of the screen, sliding, and stay there until the timer is over, so it slides back to the left disappearing.&lt;/p&gt;

&lt;p&gt;If it's persistent, it only slides in and doesn't go back.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbdledn6te8ozusvoncp8.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbdledn6te8ozusvoncp8.gif" alt=" " width="400" height="224"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It works in a very simple way. We call and &lt;code&gt;add_tip()&lt;/code&gt; function, that spawns an &lt;code&gt;obj_tip&lt;/code&gt; with the time, and content desired&lt;/p&gt;

&lt;p&gt;&lt;em&gt;src_tip&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;add_tip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;is_permanent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;time_active_seconds&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
    &lt;span class="nf"&gt;clear_tip&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="n"&gt;tip&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;instance_create_layer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;UI&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;obj_tip&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;tip&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;is_permanent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;time_active_seconds&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the &lt;code&gt;obj_tip&lt;/code&gt; takes care of the rest, using a &lt;strong&gt;timer&lt;/strong&gt; and the &lt;code&gt;lerp()&lt;/code&gt; function to slide in and out of the screen&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Step &lt;code&gt;obj_tip&lt;/code&gt;&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;!&lt;/span&gt;&lt;span class="n"&gt;is_permanent&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
    &lt;span class="n"&gt;time_active_seconds&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="nf"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;time_active_seconds&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
        &lt;span class="n"&gt;target_x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;target_x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nf"&gt;abs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rectangle_width&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;start_x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;lerp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;start_x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;target_x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.15&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And here is how we draw things&lt;br&gt;
&lt;em&gt;Draw GUI &lt;code&gt;obj_tip&lt;/code&gt;&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;draw_set_alpha&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nf"&gt;draw_set_color&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c_black&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nf"&gt;draw_rectangle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;start_x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;start_y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;start_x&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;rectangle_width&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;start_y&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;rectangle_height&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;false&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nf"&gt;draw_set_alpha&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nf"&gt;draw_set_color&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c_black&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nf"&gt;draw_set_halign&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fa_left&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nf"&gt;draw_set_valign&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fa_top&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nf"&gt;draw_text_ext&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;start_x&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;start_y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;line_sep&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="n"&gt;spacing&lt;/span&gt;
    &lt;span class="n"&gt;rectangle_width&lt;/span&gt; &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="n"&gt;wrap&lt;/span&gt; &lt;span class="n"&gt;width&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="n"&gt;Reset&lt;/span&gt;
&lt;span class="nf"&gt;draw_set_halign&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fa_left&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nf"&gt;draw_set_valign&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fa_top&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Final considerations
&lt;/h3&gt;

&lt;p&gt;Apart from the menu functionality, all the rest is pretty dependent on one another. You can't make the collectables without thinking of the inventory system, and you can't just not add an UI for it, since it's a game after all. I think this is a pretty good start, setting the base of how this (very important) system will work. I should probably work in improving it soon.&lt;/p&gt;

&lt;p&gt;Anyways, I hope that was fun to read and hope someone can take some knowledge from it. Leave your suggestions on how I could improve any of this. See you next time!&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>gamemaker</category>
      <category>gml</category>
    </item>
    <item>
      <title>Creating a 2D game with my wife - The beginning</title>
      <dc:creator>Julio Fraga</dc:creator>
      <pubDate>Fri, 24 Jul 2026 22:29:20 +0000</pubDate>
      <link>https://dev.to/julio_fraga/creating-a-2d-game-with-my-wife-the-beginning-28k</link>
      <guid>https://dev.to/julio_fraga/creating-a-2d-game-with-my-wife-the-beginning-28k</guid>
      <description>&lt;p&gt;Hello everyone! This is the first post of many to come (hopefully) about the creation of the &lt;strong&gt;game&lt;/strong&gt; me and my wife are doing. She's an &lt;strong&gt;artist&lt;/strong&gt;, so she's drawing all of the game, and I'm a &lt;strong&gt;dev&lt;/strong&gt; now for about 5-6 years as a fullstack on web development, but I always messed around with game engines, and even created a (terrible) game for a &lt;strong&gt;gamejam&lt;/strong&gt; ,and published it, with the help of my wife, back when we were starting to date back in high school and I wasn't even ever employed in the IT industry. So, given our &lt;strong&gt;background&lt;/strong&gt;, we decided to try and make another game again, this time, as a &lt;strong&gt;better&lt;/strong&gt; developer and a &lt;strong&gt;better&lt;/strong&gt; artist.&lt;/p&gt;

&lt;h2&gt;
  
  
  What will the game be?
&lt;/h2&gt;

&lt;p&gt;We are thinking o a &lt;strong&gt;point-and-clicker&lt;/strong&gt;, all &lt;strong&gt;hand drawn&lt;/strong&gt;. The thematic will be the &lt;strong&gt;folklore&lt;/strong&gt; around &lt;strong&gt;witches&lt;/strong&gt; in the &lt;strong&gt;united states&lt;/strong&gt; in the &lt;strong&gt;1600's&lt;/strong&gt;. Since &lt;strong&gt;time and effort&lt;/strong&gt; are very limited &lt;strong&gt;resources&lt;/strong&gt;, we decided to make something relatively &lt;strong&gt;small&lt;/strong&gt;, just &lt;strong&gt;minutes&lt;/strong&gt; of gameplay (around 15 - 20). The game will have &lt;strong&gt;multiple endings&lt;/strong&gt;, which you can get information on how to achieve as you discover more of the &lt;strong&gt;mystery&lt;/strong&gt; around the subtle story of a which called &lt;strong&gt;Anne&lt;/strong&gt;. The objective is to take the player through the &lt;strong&gt;story&lt;/strong&gt; as he plays the different endings and find different clues on the game lore.&lt;/p&gt;

&lt;h3&gt;
  
  
  What will I be posting?
&lt;/h3&gt;

&lt;p&gt;Basically everything that involves the &lt;strong&gt;creation&lt;/strong&gt; of the game. I intend to make posts about our &lt;strong&gt;brainstorms&lt;/strong&gt;, the &lt;strong&gt;sketches&lt;/strong&gt; we draw when we are planning what how the game will look like, the &lt;strong&gt;arts&lt;/strong&gt; my wife produces, &lt;strong&gt;videos and screenshots&lt;/strong&gt; of the game, and maybe even &lt;strong&gt;surveys&lt;/strong&gt; to let people participate in the &lt;strong&gt;decisions&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Well how about &lt;strong&gt;code&lt;/strong&gt;?"&lt;/em&gt;&lt;br&gt;
You may rightfully say.&lt;br&gt;
&lt;em&gt;"Isn't this a &lt;strong&gt;DEV&lt;/strong&gt; community?"&lt;/em&gt;&lt;br&gt;
Which you're totally right to think.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here is my answer:&lt;/strong&gt;&lt;br&gt;
I will be posting about code too. I really want to document my findings while &lt;strong&gt;learning and remembering&lt;/strong&gt; on how to code on &lt;strong&gt;Gamemaker Studio&lt;/strong&gt;, and my &lt;strong&gt;frustrations&lt;/strong&gt; with it too. I think it can help or &lt;strong&gt;inspire&lt;/strong&gt; other people to make some games, which is always pretty &lt;strong&gt;awesome&lt;/strong&gt; ;)&lt;/p&gt;

&lt;p&gt;I just wanted to put out of the way of the fact that I'm not only posting about &lt;strong&gt;code&lt;/strong&gt;. I'm not sure if this is the right &lt;strong&gt;platform&lt;/strong&gt; to do so, because I'm very &lt;strong&gt;new&lt;/strong&gt; here and I really haven't explored much of the content, so I'm bringing that up so nobody gets &lt;strong&gt;upset&lt;/strong&gt; about it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the purpose of my posts?
&lt;/h2&gt;

&lt;p&gt;The main &lt;strong&gt;objective&lt;/strong&gt; is to document my &lt;strong&gt;process of creation&lt;/strong&gt;, not only code-wise, but also &lt;strong&gt;creative-wise&lt;/strong&gt;. I intend to use that as my &lt;strong&gt;personal notes&lt;/strong&gt; on how we are in the game and what it is looking like. The other objective is to see if there are people &lt;strong&gt;interested&lt;/strong&gt; in the game we are making, and maybe trade some knowledge with other devs about &lt;strong&gt;Gamemaker&lt;/strong&gt; or just common &lt;strong&gt;game dev&lt;/strong&gt; practices.&lt;/p&gt;

&lt;h3&gt;
  
  
  Usage of AI in our process
&lt;/h3&gt;

&lt;p&gt;I know a lot of people likes to know this sort of thing beforehand, and I totally get why. We know how &lt;strong&gt;annoying&lt;/strong&gt; it is to be wondering if you're just consuming some &lt;strong&gt;AI slop&lt;/strong&gt; rather than an actual &lt;strong&gt;artist's creation&lt;/strong&gt; (or even &lt;strong&gt;software engineer's&lt;/strong&gt; creation). &lt;br&gt;
Being completely honest with you, I haven't &lt;strong&gt;set in stone&lt;/strong&gt; what is &lt;strong&gt;acceptable&lt;/strong&gt;. So the general &lt;strong&gt;line of thought&lt;/strong&gt; for me is:&lt;br&gt;
&lt;em&gt;"I am using this as a &lt;strong&gt;learning experience&lt;/strong&gt;, so I can improve my skills in &lt;strong&gt;game development&lt;/strong&gt;, and I wouldn't be doing much of that if I just &lt;strong&gt;delegate&lt;/strong&gt; everything to the AI. Still I will use it when it seems more &lt;strong&gt;practical&lt;/strong&gt; and not so &lt;strong&gt;worth the time&lt;/strong&gt; spent doing it &lt;strong&gt;manually&lt;/strong&gt;."&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  What about the art?
&lt;/h4&gt;

&lt;p&gt;So, for our &lt;strong&gt;art&lt;/strong&gt;: We have decided that &lt;strong&gt;NOTHING&lt;/strong&gt; will be made by AI. We'll keep &lt;strong&gt;100%&lt;/strong&gt; of the sprites and other art-related materials made by us, &lt;strong&gt;hand-drawn&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For our &lt;strong&gt;code&lt;/strong&gt;: I will try using a &lt;strong&gt;chatbot&lt;/strong&gt; to make straight and &lt;strong&gt;small-scoped questions&lt;/strong&gt;, so, instead of "make me an inventory system", I will be using things like "how do I create a black rectangle in the screen?", or "how do I move the black rectangle at the screen?", "how do I make a timer?". I hope you get the vision. It's more like I'm consulting the &lt;strong&gt;docs&lt;/strong&gt;, but &lt;strong&gt;faster and simplified&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If you have a problem with that vision, &lt;strong&gt;it's okay&lt;/strong&gt;. I'm not the the wisest person, and maybe I'm wrong about the way I view this question, and I understand why one could feel very &lt;strong&gt;passionate&lt;/strong&gt; about it. If you want to express your &lt;strong&gt;disagreement&lt;/strong&gt; with me, &lt;strong&gt;please keep it gentle&lt;/strong&gt;. We are all humans and I'm sure we can keep it &lt;strong&gt;civilized&lt;/strong&gt; while we talk about our &lt;strong&gt;world views&lt;/strong&gt;, right? Let's make a good and &lt;strong&gt;friendly&lt;/strong&gt; community out of this, not a &lt;strong&gt;toxic&lt;/strong&gt; one :)&lt;/p&gt;

&lt;h2&gt;
  
  
  Final considerations
&lt;/h2&gt;

&lt;p&gt;If you read this far and you're interested in &lt;strong&gt;following&lt;/strong&gt; this, please, give me some &lt;strong&gt;feedback&lt;/strong&gt;. It's more than welcome to &lt;strong&gt;give new ideas&lt;/strong&gt;, tips and what not. I'm looking forward to meet you all and I hope you enjoy my journey.&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>gamemakerstudio</category>
    </item>
  </channel>
</rss>
