How To Code a Crafting and Recipe System | GameMaker Tutorial

Поділитися
Вставка
  • Опубліковано 28 вер 2024
  • In this tutorial, learn how to create a crafting and recipe system in GameMaker.
    If you skipped the tutorial on codig an inventory system and UI, download the source code for that below as it is the starting point of this video: • How to Code an Invento...
    Downloads👇:
    -----------------------------------------------------
    * Sprites: yoyo-www-cms.s...
    * Starting point code (finished inventory tutorial project): opr.as/craftin...
    * Inventory, UI, and crafting and recipe completed code: yoyo-www-cms.s...
    What is GameMaker? 👀
    -----------------------------------------------------
    GameMaker is the industry’s premier 2D game engine, used by thousands of developers every day to create indie gaming classics like Undertale, Hyper Light Drifter, and Chicory: A Colorful Tale.
    It’s completely free to download and keep forever, with dozens of written guides and video tutorials to help you bring your games to life.
    When your project is complete, you can publish your creations to all major platforms, including PlayStation 5, Xbox Series X|S, and Nintendo Switch.
    👉 Get GameMaker: opr.as/Downloa...

КОМЕНТАРІ • 38

  • @kikomefoxy5966
    @kikomefoxy5966 9 місяців тому +1

    Thank you for this! A farming/timed crops tutorial would be amazing. 💕

  • @carlocgames2696
    @carlocgames2696 9 місяців тому +3

    What's is that IDE color scheme? Is it in the Preference?

  • @Infn0ne
    @Infn0ne 9 місяців тому +8

    Hi GameMaker Team, I have a question, does GameMaker support other code editors? Like VScode, and thanks for the video, I've always wanted to create recipes for items, but I find it a bit complicated.

    • @AbeGalinsky
      @AbeGalinsky 9 місяців тому

      I looked into this recently because it's what I wanted out of Godot as well, no major editors have plugins or support for GameMaker as far as I saw (jetbrains, vscode, vim). There are editors specifically for GameMaker that are 3rd party made more like plugins, I haven't used them though.
      You can however access your GM studio project folder and go to your scripts inside your objects folders and edit them directly. They will be called things like step_0.gml create_0.gml or something like that.
      As far as I know there's no 3rd party LSP out there so there's no real advantage except possibly if you like the editing tools? Maybe vim motions? Can't think of many other reasons. It would be awesome to have a plugin for jetbrains, because the project management and code analysis stuff, plus being able to use stuff like Codeium or copilot. Maybe someday 😅

    • @Infn0ne
      @Infn0ne 9 місяців тому +2

      @@AbeGalinsky Thank you very much for the clarification!

    • @AbeGalinsky
      @AbeGalinsky 9 місяців тому +2

      ​@@Infn0neof course! I would love to have more tooling for these engines so I'm always keeping my eye out for comments about it in case someone knows more. 😅

    • @brokenumbrellagames
      @brokenumbrellagames 9 місяців тому

      @@AbeGalinsky The Stitch extension for VSCode is pretty good. Try it out

  • @fierorecensione5828
    @fierorecensione5828 9 місяців тому +5

    Is it possible to see a tutorial of the entire process for test a game in all different platforms? Love GameMaker

    • @GameMakerEngine
      @GameMakerEngine  9 місяців тому +2

      Hey, great idea! Not sure we can do this at the moment, but it's noted.

    • @fierorecensione5828
      @fierorecensione5828 9 місяців тому

      Thank you! @@GameMakerEngine 💞

  • @Darteghoster
    @Darteghoster 9 місяців тому +4

    Thank you!

  • @snpermageMC
    @snpermageMC 7 місяців тому +1

    How would you add a crafting recipe that has more than 1 requirement, for example. An axe would require 1 stick and 1 stone?

    • @Lobsterguy8
      @Lobsterguy8 3 місяці тому

      Did you ever find out?

    • @TheMaxqb
      @TheMaxqb 2 місяці тому

      @@Lobsterguy8 Looks like in the inventory.recipe_add portion (10:28) you just add a second struct.
      inventory.recipe_add("Axe", [{name: "Stick", quantity: 1}, {name: "Stone", quantity: 1}], .... the rest of the function
      Please note, I'm just watching the video and haven't tested this. Basing this entirely on what the author said around 10:28 and my general programming knowledge.

    • @Lobsterguy8
      @Lobsterguy8 2 місяці тому +1

      @@TheMaxqb thanks for the answer, even though it's a bit too late now.

  • @JasperCrow
    @JasperCrow 8 місяців тому

    *need continue that lesson*

  • @craigcashman2275
    @craigcashman2275 9 місяців тому +1

    Brilliant content.

  • @DiceDrivenGameDev
    @DiceDrivenGameDev 9 місяців тому

    Now, would you happen to have a tutorial on pixel perfect collision ?

    • @GameMakerEngine
      @GameMakerEngine  9 місяців тому +2

      We don't on the channel but there is a response on the community forum that might help: forum.gamemaker.io/index.php?threads/pixel-perfect-object-based-collision.30739/

  • @theradishearrings
    @theradishearrings 9 місяців тому +1

    Can you please make a tutorial for avatar customization?

    • @GameMakerEngine
      @GameMakerEngine  9 місяців тому +3

      I'm not sure we'll be able to do that soon but it's noted down :)

  • @gekks
    @gekks 8 місяців тому

    Thanks for making this! I finished the previous vid and am looking forward to getting through this one, but I've hit an error around 3/4 of the way through.
    It's this: Push :: Execution Error - Variable Index [2] out of range [2] - -7._recipes(100003,2)
    at gml_Object_obj_inventory_Draw_64 (line 111) - draw_sprite(_recipes[recipe_index].sprite, 0, pos_x, pos_y);
    I've checked all my code against the completed code in your files, but nothing seems amiss. Any idea why this might be?

    • @TheMaxqb
      @TheMaxqb 2 місяці тому +1

      That error usually means you didn't start at zero. For example, an array with length 2 would have an zero index and a one index.
      array = ["zero index", "one index"];
      array[0]; // "zero index"
      array[1]; // "one index"
      array[2]; // Variable Index [2] out of range [2]

    • @Goblin_Scout_7777
      @Goblin_Scout_7777 2 місяці тому

      double check spelling "recipe" no, "s" then only 1 "i",
      "recipies" if it has the "s" they made it have 2 "i"

    • @gekks
      @gekks Місяць тому +1

      Thank you both, I'll try this again 🙂

    • @TheMaxqb
      @TheMaxqb Місяць тому

      @@gekks good luck. If you can't figure it out I'd be happy to take a look at your code. Sometimes it's just a little typo that's really hard to see as the author.
      I had one where "name" v "_name" was causing problems.

  • @pixerking
    @pixerking 9 місяців тому

    Please make lootlocker guide series (smth like firebase, but better)

  • @MichelSchallenberg
    @MichelSchallenberg 6 місяців тому

    3:25 That's actually a colon, not a semicolon. Yes, I'm very smart.

  • @mcaldeao
    @mcaldeao 9 місяців тому +2

    primeiro

  • @Пользователь-х1в5у
    @Пользователь-х1в5у Місяць тому

    Ничего не понятно 😒

  • @DiceDrivenGameDev
    @DiceDrivenGameDev 9 місяців тому

    Segundo *as no one else call it

  • @wkody7
    @wkody7 9 місяців тому

    please dont do this i beg of you. there are enough games with crafting in them

    • @KingUsyk
      @KingUsyk 8 місяців тому +1

      It's a tutorial you knob

    • @TabbedOutRat
      @TabbedOutRat 4 місяці тому

      What are you even talking about...

  • @Cpc1mq
    @Cpc1mq 9 місяців тому +1

    I wonder if GameMaker comes to Android and iOS versions?

    • @GameMakerEngine
      @GameMakerEngine  9 місяців тому +1

      Currently you can't make games on your phone in GameMaker, but you can export games to be played on phones

    • @saudpy
      @saudpy 9 місяців тому +1

      It’s so difficult to make a game with your phone, but the only game engine that I know you could make games using your phone is Godot.