How I Do It: Smart Clickable GUI

Поділитися
Вставка
  • Опубліковано 3 сер 2024
  • Hey GameMakers! Today I ramble on incoherently about how I create UI and HUD elements that are both clickable and respect changes to your game's resolution and aspect ratio! It's all a bunch of nonsense, but hey-at least my audio sounds better this time!
    LINKS
    ----EXAMPLE PROJECT FILE----
    www.dropbox.com/s/m3nu737bfgn...
    ------------------------------------------------
    Got Questions? Hit me up on Discord: / discord
    Follow me on Twitter: / pixelated_pope
    Support me on Patreon: / pixelatedpope
  • Ігри

КОМЕНТАРІ • 53

  • @Rohbert
    @Rohbert 5 років тому +30

    Nice vid Pope. I had to re watch it a few times to totally understand, but GUI's are no trivial matter so its understandable. Tackling a GUI and button placement tutorial is no easy feat and I am so glad you took it on.
    And yes, please can you shut your door next time, I was freaking out the entire video thinking the boogie monster would poke his head in and steal your awesome space ships.

  • @mythology100
    @mythology100 5 років тому +2

    My PixelatedPope UA-cam Vid senses are tingling!
    A very informative vid. Thanks pope!

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

    this is like one of those tiktok videos that tease you for 20 minutes without ever getting to the actual substance.

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

    Great tutorial. Helped me a lot, even though my extreme ADHD crossed with your love of saving keystrokes gave me a headache. Those abbreviated variable names were brutal for me. :'D

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

    Oh man, I think I finally got it! Thank you so much for this tutorial!

  • @Romrom2020
    @Romrom2020 Рік тому

    Honestly Thank you so much, I didn't even need the code you showed, but the thought of just putting the ui in the top left corner vy default was the push i needed

  • @nuclearbeeberman
    @nuclearbeeberman 5 років тому +5

    oh man i would wish that game maker had something like that build in like in unity... but your system is pretty awesome

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

    Thanks! Great video

  • @Stefan-bn4wh
    @Stefan-bn4wh 5 років тому +1

    Great content, like always! thx! ... How do you handle different resolutions/window sizes with regards to font sizes and spacing between text blocks? Thanks!

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

    Thank you for this!

  • @comik5459
    @comik5459 4 роки тому

    Thanks dude. U are my hero….

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

    I seen this video so many times now and I’m still trying to get it but that’s okay. This is my life, I’m a game developer now.

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

    Nice!

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

    those fingerless gloves are insane

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

      I've got a much better keyboard/mouse wrist rest / pad thing now. But those gloves were a quick solution

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

      @@PixelatedPope haha they looked crazy - thx for the vids, been sifting for the good stuff

  • @santiagocalvo
    @santiagocalvo 4 роки тому

    dude you are a god

  • @undeadnightorc
    @undeadnightorc 3 роки тому +4

    I kind of wish Yoyo would implement some kind of GUI editor into the engine like in Godot. Or even just make it so that you can place an object into the GUI layer that you can interact with.

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

      That is probably one major reason why people stopped using Game maker over Godot, especially with the price tag and self help opportunities and what not... It's a bit sad but I highly suspect at the end of 2021 you have about 100 active GMS2 users out there.

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

      @@hiiambarney4489 your prediction was a bit off

  • @cm8291
    @cm8291 4 роки тому +2

    Thanks for the video . How would you do a scrolling texture in a button, like what you see in Kirby games? The animation is quite smooth.

    • @PixelatedPope
      @PixelatedPope  4 роки тому +2

      So you can "mask" things in a number of different ways. You can use surfaces, but if your button is not rectangular, you can use dynamic rendering masks. There's a yoyo tech blog on the topic: www.yoyogames.com/blog/430/dynamic-rendering-masks

  • @alopar181
    @alopar181 5 років тому +1

    Genius, the best video on the subject. Thank you!

  • @CharlieEarthRoast
    @CharlieEarthRoast 5 років тому +1

    I'm trying to learn so I can make a game that it seems people have started, but haven't finished. Like Mobile Carrier Tycoon. I want to have a tycoon game with a map of the US and have it where you build out your own cellular network and compete with competitors like Verizon and AT&T. So I'm just trying to figure out how to make a map in which you can build towers and place stores, and then the map will show the coverage. I was thinking of doing a tile map so demographics can be loaded into each one so it can calculate the percentage of the population covered. Of course, the higher density areas would produce more subscribers.

    • @PixelatedPope
      @PixelatedPope  5 років тому +2

      My advice would be to break that down into its most simple components, sort them by what builds ontop of what, and start at the bottom and solve one problem at a time.
      For instance, sounds like you need a map. What is that map? Is it an image? Is it built from tiles? Can the player pan around or zoom in and out?
      Once you've got a map, then you can start interacting with it. What does it mean to "place" a tower? How would the player do that? How would you visualize it to the player?
      Take things one step at a time so you don't get overwhelmed by the grand vision.

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

    I WISH I CAME ACROSS THIS TUTORIAL BEFORE SPENDING TWO FUCKING DAYS FINDING OUT HOW

  • @justiceforsethrichwwg1wga160
    @justiceforsethrichwwg1wga160 5 років тому +3

    We need more content! 🙏🏻Hope you are doing well.

  • @cm8291
    @cm8291 4 роки тому

    What video would you recommend from your collection to learn Gmaker code basics like functions and loops arrays...?

    • @PixelatedPope
      @PixelatedPope  4 роки тому +2

      I consider my videos to be for more "advanced" GM users, so I don't really cover the basics in any videos. You should check out Shaun Spalding's channel for a lot of that other stuff.

    • @cm8291
      @cm8291 4 роки тому

      @@PixelatedPope thanks for the quick reply!

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

    :popebless:

  • @JardsonJean
    @JardsonJean 5 років тому +1

    I shouldn't be taken as gospel... but you're a Pope, though.

    • @ZachX888
      @ZachX888 5 років тому +1

      That was the joke lol.

  • @Ver2ion
    @Ver2ion Рік тому

    i feel with static menus this is always my approach but i have been working on a little rpg with maany dynamic gui boxes and elements and its getting tough ;-;

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

    Hello Pope thank you for this video, is there any chance that sequences make our life simpler instead doing the stuff in this video?
    Thank you!!!

    • @PixelatedPope
      @PixelatedPope  6 місяців тому +1

      Maybe? I don't use sequences for their intended purpose, but they do work as an interesting visual editor. And working with GUI elements in sequences is reportedly a bit of a pain

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

      Ohh i see.
      Yesterday i tryed to set my gui at 3840x2160, i'm using 2 monitors, one Full HD and the other in 4K, how can you explain that if i run the game in the Full HD using that proportion of my gui works still great?
      The gui will scale lower resolution and will stretch bigger resolution for fit correctly everytime?
      Thank you for your answer i really appreciate that.@@PixelatedPope

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

    Wasn´t draw_self() forbbinden in the 10 (15) commandments?... btw thanks a lot!, very insightful stuff as always :P

    • @GrogDev
      @GrogDev 5 років тому +1

      Using the "self" keyword was, but not draw_self, which is for something else entirely (and useful!).

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

      lol yeah dude it's not the same. "draw self" is an important part of the draw event, like if you assign a sprite to the object, then give it a draw event, it NEEDS draw_self or it won't show up at all.
      "self" just refers to the object's ID, and his thing is just to use the ID instead of "self".
      BTW there are a LOT of instances in programming where different things seem exactly the same, so watch out for that. (See = vs ==)

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

    Hello pope, can you make a video like this one but for beginners please 🙏 there isnt a good video related to this theme except yours, but for me as a beginner is to difficult, and the example project has a lot of things that you dont talk about in the video, thanks in advance 😁

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

      Sorry, dude. That's sort of a tall order. 1. I don't really make videos anymore and 2. This is a pretty advanced topic. Beginners probably shouldn't be worrying about making their game work for any resolution, which is really why this is so complicated. If you plan for your game to be one size and one aspect ratio, this all becomes really, really easy. If you need help with the "really really easy" way (which, honestly is still kinda complicated) I'd recommend joining the GM Discord server and getting help there. discord.gg/By6u9pC

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

    What a coincidence, I just so happen to be nearing exploring this part of game development. xD
    Added to watch later. ^_^

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

    Is there a way to make this work in GM 1.4?

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

      It's actually way more simple in GMS1.4
      view_wview = 1920/6
      view_hview = 1080 / 6
      The same variables to enable views in the room start are there.
      And then to move the camera, you just use view_xview and view_yview instead of camera_set_view_pos.

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

    volume up, please~

  • @31NF4CHZ4H73N
    @31NF4CHZ4H73N 2 роки тому

    where is "script" defined? it is undefined and suddenly it is defines as "set_aspect" where does this happen in your code?!

    • @31NF4CHZ4H73N
      @31NF4CHZ4H73N 2 роки тому

      it is getting defined in the room editor -> Variable definitions

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

      @@31NF4CHZ4H73N Yeah, upon reflection, I really, really don't like room editor variables. I recommend setting all this sort of stuff in the create event of your objects