🔴Game Maker Studio 2 | Basics - How keyboards and gamepads work in GMS

Поділитися
Вставка
  • Опубліковано 22 січ 2025

КОМЕНТАРІ • 29

  • @mrtea2553
    @mrtea2553 2 роки тому +2

    three years later and that still helped me a ton! thanks man

    • @1upIndie
      @1upIndie  2 роки тому +1

      Glad to hear that helps.

  • @thetruerevo8951
    @thetruerevo8951 3 роки тому +1

    wish I could like this 1000x over. You made this unbelievably simple and actually explained what you were doing clearly where other people had no explanations and too many steps and code. Thank you!

    • @1upIndie
      @1upIndie  3 роки тому

      Cool, thanks for the trust!

  • @sireoh
    @sireoh 4 роки тому +5

    This tutorial is so clean and well made omg, keep up the good work. It was satisfying to watch

  • @snomangaming
    @snomangaming Рік тому +1

    I've been trying to find how to use both the dpad and the joystick to move the player at the same time, that way players can use whichever they prefer. I already have keyboard controls as well, I'd love to have all 3 working together but haven't been able to find how to do that yet.

    • @1upIndie
      @1upIndie  Рік тому

      Well that is a bit more complicated because first you need to check if the gamepad is connected, if yes you add additonal checks to the "left/right/up/down" input. That works pretty fine for the gamepad axis analog and the keyboard input since it is all binear (0 or 1). When you want to use additionally the gamepad thumb you need to check for thresholds horizontally and vertically, so you kind of reduce the thumb to 1,0,-1 horizontally/vertically.
      But hey, that could be a good idea for a video.

    • @snomangaming
      @snomangaming Рік тому +1

      @@1upIndie I did end up figuring it out, yes under the "if gamepad is connected" section i check for gamepad axis value (joystick) OR gamepad button check OR revert back to keyboard controls by listing the variables (left right, etc). works great!

  • @khatdragon7694
    @khatdragon7694 3 роки тому +2

    Wow. Can't believe I missed this one. Late to the party but there's still plenty cake left! Cheers.

    • @1upIndie
      @1upIndie  3 роки тому

      Yeah, I am like the Simpsons, already did it all...

  • @iam2ku4u
    @iam2ku4u 5 років тому

    Great job! Keep up the amazing work.

  • @TheRealKaiProton
    @TheRealKaiProton 2 роки тому +1

    that was great, Ive just come back to GMS after trying out Unity, and Godot, and it was the controller functions that lured me away, anyways, something I always had trouble with and same now, is my PS4 pad, only ever shows as slot 4, never anything else, and IVe now got a Generic PC pad, that shows as slot 5 regardless, funny thing with that pad is its an old Saturn pad mould, so Dpad and buttons only, the Dpad registers as an Axis in windows, and both up and down, and left and right register as left axis horizontal in GMS, totally strange --As it turns out, it was running as Direct input, and the Pad had internal Macros that changed it to XInput, it was fine after the swap.
    IVe seen a few tutors (and not understood them) about an async-event when plugging in the controllers, why is that not in this ? is that not really needed?

    • @1upIndie
      @1upIndie  2 роки тому +1

      Uff, as much as I would like to help you out in this regard, I couldn't really be of any help here. Because I simply don't know, maybe JuJu Adams can do the trick for you. He release an input (controller) extension for GameMaker. Hope that helps. Asynchronos events are as far as I understand them meant for parallel instructions (music or buffers), not sure though if that applies to the controller input also. All should work with plug and pray.

    • @TheRealKaiProton
      @TheRealKaiProton 2 роки тому

      @@1upIndie Thanks Im looking over the Input ext. to try to figure out how to use it, looks like just what I need

  • @bryanlee4953
    @bryanlee4953 3 роки тому

    hey when i press the right arrow i go right but when i press a i go left how do i fix this O-o

    • @bryanlee4953
      @bryanlee4953 3 роки тому +1

      i just wanna use a and d not arrow and a lol

    • @1upIndie
      @1upIndie  3 роки тому

      Well, you can use "ord("A") instead of vk_left/vk_right.

  • @scotthuffman3462
    @scotthuffman3462 11 місяців тому +1

    This is neat but it doesn't really explain how to connect the axis variable to an object. Most games don't use the d-pad to move around.

    • @1upIndie
      @1upIndie  11 місяців тому

      Correct, for that I have a more up to date video:
      ua-cam.com/video/9C5VrVVsjuM/v-deo.html
      Was that what you were looking for?

  • @smart-com7817
    @smart-com7817 4 роки тому +1

    bist du deutsch

    • @1upIndie
      @1upIndie  4 роки тому +1

      Irgendwie schon. Kann man vielleicht sogar aus dem Esparanto-Englisch was ich spreche raushören.

    • @smart-com7817
      @smart-com7817 4 роки тому

      @@1upIndie ja du sprichst schon bisschen mit akzent

    • @smart-com7817
      @smart-com7817 4 роки тому

      @@1upIndie und kannst du vllt mal ein vid auf deutsch machen oder ein Kanal auf dem deutsche Videos kommen, weil ich glaube schon dass du auch sehr viele deutsch Zuschauer hast.

    • @1upIndie
      @1upIndie  4 роки тому

      @@smart-com7817Da muss ich dich leider enttäuschen. 4% meiner Zuschaner sind aus Deutschland (Danke dafür!!), nur ist deutsch als Sprache absolut nicht relevant. Sie ist weder international verbreitet noch ist Programmierung in deutsch faktisch in jeder höheren Programmiersprache überhaupt nicht vertreten (C++, C#, Java, perl, typoscript, php, htlm, python, javascript etc.).
      Ehrlich gesagt, wäre es für mich viel einfacher deutsche Videos rauszuhauen, ich sehe aber hier keinen Markt/Zuschauerpool (der Groß genug ist) plus meine Videos sind keine Katzenvideos/Entertainment. Das wollen die meisten Leute nicht sehen (was voll okay ist).
      Ich hatte schon Anfragen Videos auf chinesisch und spanisch zu machen, da sieht die Sache schon anders aus... sprechen kann ich aber keins von beiden :D
      Es gibt aber ein paar deutsche Gms UA-camr, die das Angebot anbieten. Schau mal da vorbei.