How to Make a Menu System (with Submenus) in GameMaker Studio 2!

  Рет қаралды 141,694

Peyton Burnham

Peyton Burnham

Күн бұрын

Support me and these videos on Patreon! / peytonburnham
Title screens, pause menus, shop systems, whatever! This system can very easily be added to any game (including the "How to Make an RPG" series game), and is good prep for my next video on Textboxes and Branching Dialogue!
If you want to support me, subscribe and follow this stuff!
My tweets: / peydinburnham
My Game: peytonburnham.itch.io/rose-of...
Discord: / discord
My twitch: / peydinburnham
If you have any questions, leave a comment or send me a dm on twitter/Discord!

Пікірлер: 472
@peytonburnham4316
@peytonburnham4316 2 жыл бұрын
Check out my Patreon! www.patreon.com/peytonburnham Go there if you want to help me out a little more so I can make more videos like this (full turn-based RPGs, platformers, zelda-likes, beat 'em ups, etc)! There's a bunch of cool perks like getting videos before KZbin does, voting on future series, and getting the project files and assets from future videos! Thanks!
@masahiruQwQ
@masahiruQwQ 2 жыл бұрын
i have a question
@masahiruQwQ
@masahiruQwQ 2 жыл бұрын
can u explain how to make a sub menu if its option[0, 0] thx
@SebastianJose_Fatherlessaxo
@SebastianJose_Fatherlessaxo 4 ай бұрын
i cant seem to see the text in my menu
@RandomGameBenchmark
@RandomGameBenchmark Жыл бұрын
to play a sound when you change the menu lines create a line called last_selected = 0; in create event and go to step event now in step event, put this code there if (pos != last_selected) audio_play_sound(YOUR SOUND NAME, 1, false); last_selected = pos; thats all
@toddq.
@toddq. Жыл бұрын
where to write the code?
@RandomGameBenchmark
@RandomGameBenchmark Жыл бұрын
​@@toddq. Read carefully!! last_selected = 0 goes into CREATE EVENT the second code if (pos != last_selected) audio_play_sound(YOUR SOUND NAME, 1, false); last_selected = pos; GOES INTO STEP EVENT
@toddq.
@toddq. Жыл бұрын
@@RandomGameBenchmark Alright sorry and thanks!
@skymed3095
@skymed3095 11 ай бұрын
I appreciate your help man, I'm pretty new so I can't figure out how to make small things like this, but this definitely helps But what about a playing a sound when you press "accept"? How would you do that?
@RandomGameBenchmark
@RandomGameBenchmark 11 ай бұрын
@@skymed3095 you can do something like if keyboard_check_pressed(vk_enter) && !audio_is_playing(ACCEPTSOUND) { audio_play_sound(ACCEPTSOUND, 1, false) } This i think, i hope it works good luck
@SGTIvan921
@SGTIvan921 8 ай бұрын
Timestamps for reference: 3:50 Declaration of variables in obj_side_menu 4:23 Array of options 5:21 Draw the menu 7:20 Brief demo 7:40 Draw the options, set up font (skip to10:07 if I already have a font) 9:27 Clean up event: font_delete the custom font. 10:07 Draw font 11:00 Use of for loop: draw the options if i < length of the option array 11:46 Add padding to the text 12:33 op_space * i will ensure that the options are not drawn on top of each other, they are drawn like a normal menu 13:04 Demo 13:20 pos variable in Create event - we're gonna start being able to select the options 14:25 up and down key 14:42 We want to prevent the pos from going above 2 or below 0. 15:44 Changing text colour to show which one selected 16:25 if pos == i, _c = c_yellow 17:12 Step event: add a switch statement (for the purpose of entering the option) 19:31 Demo 19:45 Submenu making 20:01 Make the option array 2-dimensional, add a variable menu_level (note to self: I could use regions as a way to open and close to see what are the options under the, say, settings menu. Here, he does it by separating the menus.) 21:09 Create event: set op_length to 0, since we will set the option lengths dynamically in the step event. 22:04 Change that bit of code to draw from a 2d array instead of the previous 1d array (option[menu_level, i]) 22:20 Changing up the organisation of the switch statement, and there will be another switch which checks for menu_level. 24:20 Set menu_level back to 0 if pressing back in settings menu, and set menu_level to 1 if pressing settings menu 25:00 Fixing the bug (the for loop) [Done by setting a local var _sml, whereby, in the switch statement of the menu_level, if it does not equal to menu_level, then set the pos = 0. This is to prevent the unexpected bug of the for loop looking for an option 3 in the main menu when there isn't one.] 26:45 Demo 27:24 Dynamically get width and height of menu 27:59 An important note related to string_height 29:34 The local variable _new_w: setting new menu width based on which option the longest 30:31 Centralise the menu
@Onlyfaff
@Onlyfaff 2 жыл бұрын
if you want to use the WASD keys for the menu, put an OR state in the middle for example: up_key = keyboard_check_pressed(vk_up) || keyboard_check_pressed(ord("W"));
@mem3b0i_
@mem3b0i_ 2 жыл бұрын
It might be good to know that you can also literally type "or" (no quotes btw) and it would do the same thing. But it's better (imo) to get used to typing these | | :)
@electrosaber0429
@electrosaber0429 3 жыл бұрын
This is one of the best tutorials I have seen, please continue this. Doing a great job.
@peytonburnham4316
@peytonburnham4316 3 жыл бұрын
Thank you so much!
@SebastianJose_Fatherlessaxo
@SebastianJose_Fatherlessaxo 6 ай бұрын
@peytonburnham4316 how did you crate a folder
@EyeCantDraw_
@EyeCantDraw_ 2 ай бұрын
⁠@@SebastianJose_Fatherlessaxoyou click the plus button at the top of the asset menu and make a group :)
@downthispath6538
@downthispath6538 2 жыл бұрын
Oh wow you explained everything so easily and clearly that even as a non dev like me can understand. I'm trying to understand this cause I plan to give my sister a gift for her bday next year using your dialogue tutorial. I made her a simple platformer this year following random tutorials here on youtube and she absolutely loved it. So I'll try my hand at something more ambitious next year. Thanks a lot for these! I really appreciate it.
@Dextrolord
@Dextrolord Жыл бұрын
How did it go? Did you manage to make something cool?
@absin8078
@absin8078 6 ай бұрын
Coolest brother(?) ever
@BritBox777
@BritBox777 2 жыл бұрын
Anyone having pixel issue with their 9 slice by the end- I recommend putting the code for centering the x and y in a " x = round( [code] ) " to round it. That solved the issue for me.
@Mackievellian
@Mackievellian Жыл бұрын
Legend.
@nicholaswilshusen3387
@nicholaswilshusen3387 3 ай бұрын
this has been driving me crazy for the past hour, thank you
@myers4924
@myers4924 Жыл бұрын
Around 27:57 If you're using a Font that isn't set as by sprite. You could use the below code, with "fnt_menu..." being the custom font. Take this with a grain of salt, it worked for me, but I do not know much about coding. height = op_border * 2 + font_get_size(fnt_menu_dungeonfont) + (op_length - 1) * op_space;
@Shot666
@Shot666 Жыл бұрын
ffs tysm
@ripihy
@ripihy Жыл бұрын
fnt menu doesnt exist apparently??
@myers4924
@myers4924 Жыл бұрын
@@ripihy fnt menu is part of the font name. My font was named "fnt_menu_dungeonfont", yours could be something else like "Comic_Sans"
@RealCrackey
@RealCrackey Жыл бұрын
@@myers4924 I know this was a month ago but i need an answer desperately, how do you add a normal font into it without it being a sprite font???? i need to know! thank you :)
@Pika782
@Pika782 Жыл бұрын
tysm!
@ksenyajustkidding1484
@ksenyajustkidding1484 2 жыл бұрын
i’ve bingewatched all your programming videos and made something… this guide is sooo coool! man i never thought it could be so interesting!!! pleeasaeee continue these tutorials it’s super cool!!!! also im quite surprised that your channel is so small so keep it up !!!!!!
@Nightfallz23
@Nightfallz23 2 жыл бұрын
Amazing Tutorial - I actually supported your Kickstarter and somehow never realized you did tutorials like this. Keep up the incredible work on your tutorials, this was very clear and helpful to expand upon.
@Mvolkovin
@Mvolkovin 2 жыл бұрын
Holy crap man. Excited for Starcross to come out, it looks like an absolute blast. Thank you for doing these tutorials for us in the meantime. You've earned a loyal fan.
@martinsnape8104
@martinsnape8104 2 жыл бұрын
Having almost bit the edge of my desk in frustration at not getting a menu system working properly, I found this. Such a clear and easy tutorial.
@schlatta-dirtydeeds9351
@schlatta-dirtydeeds9351 2 жыл бұрын
When I say this is an upgrade to my previous menu system it is NOT an understatement, thank you! Looking forward to checking out more of your stuff!
@xwxlx
@xwxlx Жыл бұрын
!understatement
@cleverdragon2744
@cleverdragon2744 Жыл бұрын
I honestly find these more straightforward and clear than the official gamemaker tutorials. Thanks!
@kingparat1258
@kingparat1258 2 жыл бұрын
Hell yeah! Thanks for the stellar tutorial man, hope your game is a success it looks phenomenal!
@ashliiiiii
@ashliiiiii 2 жыл бұрын
Thank you!! This is the best menu tutorial that I've found online, and helped me develop my menu system. I'm just getting into GameMaker2 so this tutorial was very helpful for me. Infinitely grateful!
@kkeough5759
@kkeough5759 2 жыл бұрын
You, sir, are the real MVP. This series has been a tremendous kick-start.
@SecretEccentric
@SecretEccentric Ай бұрын
one of the things I love about your videos is that the comments garner such a wide range of experience from folks, every comment I see is either thanking you for the tutorials, talking about the things they made from the tutorials, or someone asking for help with something that wasn't exactly made apparent in the video and getting helpful replies from multiple people. I love it here :)
@Cyranek
@Cyranek Жыл бұрын
well spoken perfectly paced informative tutorial
@polacious69
@polacious69 Жыл бұрын
cyranek rpg confirmed?
@vela7358
@vela7358 Жыл бұрын
best tutorial i've done and i've been hopeless with everyone elses tutorials, thanks.
@explodedkidboi3004
@explodedkidboi3004 11 ай бұрын
I started using GameMaker recently. These tutorials really helped me understand how GameMaker works. Although, i used GameMaker Visual to code, i was able to make sure I was matching the code by useing the Live Preview function, which shows your code if typed out, but doesnt permanently convert it. Thanks for this 😊
@commanderuseless1685
@commanderuseless1685 Жыл бұрын
Thank you very much for your videos, Peyton - I just recently got started with GameMaker Studio 2 and your videos have been entertaining, educational and extremely helpful!
@shaneduquette
@shaneduquette 7 ай бұрын
If you're building this menu into the RPG game from the previous tutorials, and if you want to access the menu from your game, I added this to the beginning of the step event for the player object (obj_player): if (keyboard_check_pressed(vk_escape)) { room_goto(rm_title_screen); instance_deactivate_object(obj_player); } It makes it so that pressing the escape key (vk_escape) loads the menu (rm_title_screen). It also deactivates the player so they don't show up on top of the menu.
@NingyoHimeDoll
@NingyoHimeDoll 2 жыл бұрын
Great tutorial! I suggest putting this video in a playlist, because i couldn't find it while going through your playlists. After the RPG basics tutorial series i wanted to watch more tutorials, so clicked on the first dialogue tutorial video because it was in a playlist, and only at the beginning of that video i realized there was a previous video (this one) i had missed, and only because that video mentions it.
@oldbomb
@oldbomb 2 жыл бұрын
Great video, thank you so much, this was just the right thing to get me to finally program some menu systems for my games! I will definitly check you dialogue system too, looking forward to that!
@NoLongerTwee
@NoLongerTwee 2 жыл бұрын
I love this guy and his tutorials
@carlospintor-fernandez8105
@carlospintor-fernandez8105 3 жыл бұрын
Gotta say very well explained for beginners such as myself.
@peytonburnham4316
@peytonburnham4316 3 жыл бұрын
That’s great to hear!
@joandersonoliveira6802
@joandersonoliveira6802 3 жыл бұрын
thank u so much for creating this kind of content. u're really helping me a lot :)
@CGJournalist
@CGJournalist 2 жыл бұрын
If anyone else is trying to use this on a 1920 x 1080 room, the easiest thing to do is to scale his values by 10. For example, where he put "width = 64" in the create page, I put "width = 640". Change this, the height (860), op_border(80), op_space(160) and also the last number of obj_settings --> Create --> line "global.font_main"... from 1 to 5. Then the rest of the math will all make sense. I also changed my font sprite to 70x90 and my textbox sprite to 200x200. Double check all these listed values for a 1920x1080 room and it will all work as demonstrated in the video!
@JackHuntYou
@JackHuntYou 2 жыл бұрын
Thank you for your help!
@CGJournalist
@CGJournalist 2 жыл бұрын
@@JackHuntYou you’re welcome, it’s this god on the video that we really owe our thanks to xD
@mr.ranno5432
@mr.ranno5432 7 ай бұрын
What about the center menu?
@snoopcena4594
@snoopcena4594 Жыл бұрын
greatest people on earth
@reneilabayon2260
@reneilabayon2260 Жыл бұрын
hey sir, i know its already been a year since you created this tutorial. I just wanted to say thankyou so much, I learn a lot from your videos.
@LF21Hungry
@LF21Hungry Жыл бұрын
i know its been quite a while but i really got into gamemaker thanks to you, and i am finally able to make my own games instead of just modding thank you, you just got my sub =]
@fixed_my_glasses
@fixed_my_glasses 2 жыл бұрын
This is so great and simple to implement! Thank you!
@guterversuch6337
@guterversuch6337 2 ай бұрын
Bro i love you. thats so many videos of you that helped me. every time i find my answers with you
@AngryhammerGames
@AngryhammerGames 2 жыл бұрын
That was an awesome video! I loved the tempo\speed of the video too. My UI always gets messy when I add sub menus and features. I like what you did as its quick/simple and dynamic. I dont know if it matters much, but I am not sure about having for loops in the draw event. Can be a cpu/gpu killer if your not careful. Lately I like to use a menu_controller object which keeps track of what menu your at and what buttons to show. Then I have button objects that can change as needed in size, text or image. Also more advanced animations and such using delays or loading. They are easy to control too as each menu button is an object and all that entails. It can help when mixing input from mouse, keyboard or joystick as I like to have all of them available. But anyways, I really liked this video and your code is pretty awesome!
@lannygilbertson3585
@lannygilbertson3585 2 жыл бұрын
you are a treasure trove good sir. Thank you for these.
@LunaRiddle77
@LunaRiddle77 2 жыл бұрын
literally a life saver for this one WOOO i had been looking for something like this all WEEK THANK YOU
@user-kg7in4ce8g
@user-kg7in4ce8g 2 жыл бұрын
It was very helpful for learning GMS2. much obliged!
@indiepunch3443
@indiepunch3443 3 жыл бұрын
Amazing, thanks for sharing! I hope you continue to make more! :]
@peytonburnham4316
@peytonburnham4316 3 жыл бұрын
Thank you!
@perra8824
@perra8824 2 жыл бұрын
thank u than u this was a tutorial i watched for the first time which gave me no errors right away
@NorthWarden54
@NorthWarden54 3 күн бұрын
Your an actual life saver man with you videos
@DavideScarioni
@DavideScarioni 3 ай бұрын
Easily understandable and complete, thank you!
@disusdev
@disusdev 2 жыл бұрын
Quick tip: Way to go through menu options without branches: just after `pos += down_key - up_key;` you can add `pos = (pos + op_length) % op_length;` instead of "if" statements
@simonl.3461
@simonl.3461 2 жыл бұрын
Nice tip! for some reason my code didn't work with the if statements, but with your code it did.
@steevelapointe1152
@steevelapointe1152 Жыл бұрын
your tutorial , are insane, im not even an english speaker, and i have a lot of diffuculty while listening video in english, but not on your video, you are talking clearly, we hear every word you spell, thanks for these tutorial.
@arti5769
@arti5769 2 жыл бұрын
Great tutorial. Just watched it and gotta have a go on my own now. I also looked up your game. It sounds interesting and I'll have a eye on it. Especially since you also go for a Switch version :) I'll need your other tutorials too, so, keep going. It'll help to get to know your game to a bigger public.
@lieutenantashe6673
@lieutenantashe6673 2 жыл бұрын
This very helpful, thank you a lot!
@rinkun6689
@rinkun6689 3 жыл бұрын
I had to subscribe man seriously you’re a big help c: will you be covering an rpg battle system as well? I’ve been trying to figure out how to do an earthbound type of battle perspective, like how it’s first person but I dunno how to approach it..
@peytonburnham4316
@peytonburnham4316 3 жыл бұрын
Thank you! And I'm not sure yet what types of gameplay-oriented systems I'll be covering. As far as turn-based combat goes, an Earthbound style system would be one of the easier ones to cover but they're still pretty involved! But never say never, I suppose!
@Othtober
@Othtober 2 жыл бұрын
Subbed, loving this
@scootie_scoot
@scootie_scoot 2 жыл бұрын
i can't believe you made that font!! it looks just like old rpgmaker games or ds rpgs...i wish i could download it
@LithtinaVtuber69
@LithtinaVtuber69 3 жыл бұрын
Thank you so much for posting this, can't wait for the textboxes, small nitpick though, could you zoom in on your code, sometimes I can't read it but other than that great job
@peytonburnham4316
@peytonburnham4316 3 жыл бұрын
Oh great idea! I’ll see if I can increase the font size in gamemaker or something before i record the next video!
@connerjacobs
@connerjacobs Жыл бұрын
@@peytonburnham4316 how do I create a new folder
@mixdevelops3866
@mixdevelops3866 Жыл бұрын
@@ok-mb1bn even if you do that, its still hard to read it
@super_bits
@super_bits 2 жыл бұрын
Amazing Tutorial Menu!!!!
@night_fall2561
@night_fall2561 2 жыл бұрын
Oh my god, I love your tutorials confused why doesn't have more likes
@danyk1n2
@danyk1n2 10 ай бұрын
Have a good day too!
@etclee6630
@etclee6630 2 жыл бұрын
really helpful! much appreciated!
@LocalLialec
@LocalLialec 6 ай бұрын
that last part when you were trying to say itchio was hilarious lmao
@esaphia9766
@esaphia9766 3 жыл бұрын
Great Tutorial :) subbed
@peytonburnham4316
@peytonburnham4316 3 жыл бұрын
Thank you!!
@C.OSengoku
@C.OSengoku 7 ай бұрын
i fixed the switching menu bit by accident and when the fixing for loop bit played i realized i hadnt fixed anything lol it was torture to get back to the error bit BUT THIS TUTORIAL IS TOOO GOATED
@shabanotti
@shabanotti 2 жыл бұрын
Really love your tutorials. Thanks for doing this! Premium content for sure. Subbed!
@RedSW
@RedSW 2 жыл бұрын
tysm! Great tutorial
@RicardoADev
@RicardoADev 2 жыл бұрын
I'll be trying this out! Thank you! However, I feel it's easier to use the Draw GUI event.
@superstarichiban
@superstarichiban 2 ай бұрын
I would love to see this system used for a turn-based rpg combat system!!
@TornadoTwisterYT
@TornadoTwisterYT 2 жыл бұрын
Could you make a tutorial for how to make the buttons in the sub menu (Window size, Brightness, and Controls) actually work?
@georgedouros4522
@georgedouros4522 2 жыл бұрын
Great video it helped me a lot to construct some cool menus in my projects. However I found a small problem, if your submenu has less options than your initial menu level you get an Index error. Example: options[0, 0] = "New Game"; options[0, 1] = "Load Game"; options[0, 2] = "Settings"; options[0, 3] = "Exit Game"; options[2, 0] = "Sound"; options[2, 1] = "Back"; If you choose Settings you will trigger an index error because pos will be 2 but pos in options[2] takes values 0 and 1, even if you change the pos and menu_level in the Step Event inside the switch statement. One way to solve this (bad) is to add an alarm trigger that deactivates the Draw Event for miliseconds OR in my case, I just made a 1d array of menus and I spawn additional objects for each submenus. Again, I'm just mentioning this for educational purposes. This example of menu system you propose is solid and follows good practices. Great job and good luck on your works!
@kingofspades9720
@kingofspades9720 2 жыл бұрын
I had the same issue, your comment helped me a lot, but, I found a super super simple way to fix it. instead of just putting //Settings case 3: menuLevel = 1; break; instead, change the op_Length before changing menu level, like this. case 3: opLength = array_length(option[1]); menuLevel = 1; break;
@ChufoildQQ
@ChufoildQQ 10 ай бұрын
just number in order from 0,1,2 and so on, of course there will be an error if you jump from 0 to 2
@botijooj
@botijooj 8 ай бұрын
​@@kingofspades9720omg thanks so much man, was having a headache with this error
@kingofspades9720
@kingofspades9720 8 ай бұрын
@@botijooj Glad it could help!
@BossAleks123
@BossAleks123 2 жыл бұрын
Thanks so much : )
@fa_speedysnack
@fa_speedysnack 2 жыл бұрын
Thanks man, this video really helped, though. I do a have a question, Can you make a part 2 where it covers actually setting up stuff like the volume, reso. etc?
@gabrielpiche5024
@gabrielpiche5024 Жыл бұрын
i got a problem. The game is running perfectly, i did everything you said, but when the menu opens, the Menu background sprite isn't there anymore. There's just the big black void behind the text and it looks to me like it's not well-centered like it's supposed to. Can you and the others help me, please? UPDATE: I found where the problem is coming from. It's the part where you have to position the menu. This part, to be more precise: width = _new_w + op_border*2; height = op_border*2 = string_height(option[0, 0]) + (op_length-1)*op_space; I deleted it and the background menu sprite reappeared, but it looks ugly and it doesn't fit the options nicely. Any ideas on how i can fix it?
@sewagecaidan
@sewagecaidan 2 жыл бұрын
Hey Peyton this series is helping me develop my own game right now, and I'm very happy that this series exist but I need help with a problem with the menu. My menu select is very fast, if i press up or down i just freaks out and lands on a random option. Nevermind, I got it lmao!
@bloxanimates2518
@bloxanimates2518 2 жыл бұрын
Wait how'd you fix that?
@bloxanimates2518
@bloxanimates2518 2 жыл бұрын
Im really confused on that too
@eidy9352
@eidy9352 2 жыл бұрын
@@bloxanimates2518 you do keyboard_check_pressed instead of keyboard_check
@sewagecaidan
@sewagecaidan 2 жыл бұрын
@@eidy9352 Thats how ya do it
@bloxanimates2518
@bloxanimates2518 2 жыл бұрын
Thanks so much! @eidy and @Hattless Foe
@Statitude1
@Statitude1 11 ай бұрын
Thanks dad
@jasther2582
@jasther2582 6 ай бұрын
bro u are the best
@gargoyled_drake
@gargoyled_drake 2 жыл бұрын
a lot of cutting, would be nice to be able to just see how you do things from scratch, adding in, importing, creating new folders and so on, other than that it's great. don't listen to those that complain about too much information, there is no such thing, but there is a setting on youtube to speed up a video in case people are in a hurry 😜
@fierorecensione5828
@fierorecensione5828 Жыл бұрын
thank you
@saryhassan2005
@saryhassan2005 2 жыл бұрын
Can you pls make a option list for the main menu, Also i love your tutorials
@_bytebeak
@_bytebeak 2 жыл бұрын
I love your tutorial series so much. In my opinion, the most helpful one's out there. I really take my time watching them quite thoroughly (I'm a very beginner and need the time to understand it all). I have one open question, maybe someone who reads this find the time to explain it to me. So we define the position variable in the create-event. (pos = 0). Then, in the step event, we define the current position depending on which buttons we press, and highlight the selected string. My question is: how does GM know from the start, that the pos we defined overlaps with the same position as the first string in our array ? (In this example: "Start Game"). I'm pretty sure I'm overthinking it. But I really want to understand how it works, so I'd be super thankful for any help I'd get here!
@ChufoildQQ
@ChufoildQQ 10 ай бұрын
I don't speak your language, but if I understood correctly from the translator what your question is, then the gmc initializes what is in create first, and then step, so when it comes to step, the gmc checks pos with option
@ChufoildQQ
@ChufoildQQ 10 ай бұрын
in the option, the zero cell is equal to "start game" and since the position is 0, then the zero cell will be output, and the zero cell is the start game)
@ChufoildQQ
@ChufoildQQ 10 ай бұрын
I'm sorry it's so late, but I couldn't help but answer when I saw that the question was unanswered
@realitygamer3524
@realitygamer3524 2 жыл бұрын
Could you do a video on sprint/dash mechanics using the movement script from the rpg series? It'd be really helpful
@nathanreyc
@nathanreyc Жыл бұрын
if keyboard_check(shift_key) { move_spd = 2; } if keyboard_check_released(shift_key) { move_spd = 1; } the values of the move speed can be whatever fits your game
@sKryly1
@sKryly1 2 жыл бұрын
Lifesaver
@scootie_scoot
@scootie_scoot Жыл бұрын
hey professor peyton! my font isn't drawing correctly, the lines on certain letters get shifted depending on where they are being drawn. Do you know if this is an issue with my sprites or an issue with my code? thanks!
@digitalswordplay
@digitalswordplay 2 жыл бұрын
Great tutorial! - How would I go about adding a little triangle indicator beside the text when cycling through the options?
@scootie_scoot
@scootie_scoot 2 жыл бұрын
i second this!! i've been struggling to find an updated gamemaker tutorial about this
@PinesOfChaos
@PinesOfChaos 2 жыл бұрын
In the draw event, you'd do something like: draw_sprite(spr_triangle, 0, x, y+op_border+(op_space*pos)) may need to offset the values depending on your sprite, but this should work
@wanderslight9625
@wanderslight9625 2 жыл бұрын
Quick question regarding the initial length and width values. In the beginning of the tutorial you set width and height values for the menu border and later on you made the menu border size dependent on the text and fonts. Would the initial length and width values still matter? Or could you just set them to 0 and let the step event change them dynamically according to what’s being displayed?
@shabanotti
@shabanotti 2 жыл бұрын
I chaged them to 0 and it seems to work fine so I think it's ok to initialize them all at 0.
@fierzy_new
@fierzy_new Жыл бұрын
Can you make a level select menu tutorial next, anyways great tutorial helped me a lot with my game.
@gameromp3018
@gameromp3018 2 жыл бұрын
Worked through this tutorial and the system worked fine, until I tried to get my localization script to work with it. Was wondering if you'd be able to maybe one day do a menu tutorial but with using structs instead? Seems the ds_maps are a bit outdated now. Looking forward to following your saving & loading tutorial soon.
@timsmusicstuff
@timsmusicstuff 2 жыл бұрын
Thanks for the great tutorial. It was very helpful. Quick question for my comprehension: I don't understand why the menuLength variable needs to be updated again within the accept_key if statement. Shouldn't the variable already be updating every frame of the step event even when it changes? Or is it because the whole step event is read through in a linear order each frame?
@totallytoffy
@totallytoffy Жыл бұрын
Hippity Hoppity, Your code is my property!
@zentanith
@zentanith Ай бұрын
I had to divide the equations for centering by 6 in order to make it work as should, but I don't know why!
@nickgennady
@nickgennady 2 жыл бұрын
Damn. Thanks for Tutorial. Your demo is windows only sadly which I only have m1 Mac which does not allow for bootcamp :( Congrats though on the kickstarter for 15K.
@0x44_
@0x44_ 2 жыл бұрын
Not sure if you addressed this in another video, but when I press down/up, the menu cycles WAY too fast. I had to create a variable for allowing access with another variable for giving it a cooldown timer, but I'm worried this might be an issue on faster/slower machines. I was wondering how you addressed this. Edit - My mistake, I was new to the engine and didn't know the difference between check vs check_pressed.
@user-hj7rb8vt4c
@user-hj7rb8vt4c 8 ай бұрын
These guides need text docs, scrubbing through when things don't run is a pain
@spacecase7331
@spacecase7331 2 жыл бұрын
Great tutorial overall, loved it! Just one question, how would I add a sound effect every time I switch to a new option?
@fixed_my_glasses
@fixed_my_glasses 2 жыл бұрын
I’m not the video poster, but in the step event within the input checks, where there are two if loops under “//move through the menus”, you could put an audio play in each of those loops.
@mproxima4791
@mproxima4791 2 жыл бұрын
probably you already solved but I went this route work pretty well right now. if up_key { audio_play_sound(sound,1,0) } and same for the down key
@ty88
@ty88 21 күн бұрын
this repeating whistling song is driving me crazy
@lightd2471
@lightd2471 3 жыл бұрын
Man, I begg you, make a text box tutorial, you explain things so well and I couldn't find any updated tutorials
@peytonburnham4316
@peytonburnham4316 3 жыл бұрын
I plan on it soon! Just been busy lately but I’m getting it done!
@D4stro
@D4stro 2 жыл бұрын
is there a way to make this menu pop up over the screen and make the game pause with it? If so please make a part 2 to this showing how to code it :)
@SunnieMunch
@SunnieMunch 2 жыл бұрын
my code isn't perfect but I have something like this working well enough in my game describing what you're asking. For set up I have 2 instances layers for my game, one with all of the main elements and visuals like the player, obstacles, interactables, etc and one just for holding meta objects. In the step event of an overall controller object, I set up a if key pressed input that would be pausing the game, and use this line that toggles the state of being paused and not: global.gamePause = -global.gamePause + 1; then I have an if then statement that says if the game is paused, everything on the main game layer's image speed will be 0 to stop all animations with the instance of the menu being created on a separate layer above (additionally in the player's code if the game is paused, all movement code is stopped). else, the image speed of the main game layer is set back to it's original and the menu instance is destroyed. There may be a better way to do this or explain this but it's the best I have for now!
@wispbee337
@wispbee337 10 ай бұрын
Super helpfull and easy to follow tutorial! Eveything worked great except that I noticed once i start the game from the menu my player sprite suddenly became distorted, with pixels getting bigger and smaller and wider and thinner when moved. I havent been able to figure out why but I only noticed it after testing out the start game option in the menu.
@SangHendrix
@SangHendrix 3 жыл бұрын
I'm new to coding, I have zero knowledge of it and even tho your videos are basic, I'm still worried if I can understand all of this. Like what's the logic behind those codes? Do I need to understand it first or I just need to follow the tutorial and other tutorials and wait for the day I eventually get it?
@peytonburnham4316
@peytonburnham4316 3 жыл бұрын
If you haven’t watched my “How to make an RPG” series, watch that first, it goes by everything very slowly and i explain how everything works! It’s a bit simpler than this video. At first you’re going to be learning a lot at once so it might feel like you don’t understand, but thats how learning ANY new thing works! Keep following beginner tutorials, pay attention to them very closely, and REWATCH many of them after you’ve finished them. That will help a lot. Soon lots of this stuff will just stick with you and you’ll find your footing! Just keep going!
@p0pst1cle4
@p0pst1cle4 2 жыл бұрын
This man is reason why ww3 never started!
@kinyacat5919
@kinyacat5919 Жыл бұрын
Hello. I have a slight problem, you see my menu sprite bg is 6 frames. I copied the script, but for some reason the bg blinks (there's no empty frame on my sprite). It used to have 3 frames, but I extended it cause it looked weird, then it suddenly made the blinking error. How can I fix this?
@atsuodragneel
@atsuodragneel Жыл бұрын
i had an issue that sounds the same as that make sure you dont have duplicate frames after each other or that the beggining and end frames arent the same i hope this helps :)
@metalsonic4.1therobothedge24
@metalsonic4.1therobothedge24 9 ай бұрын
I did that, but since i have the room for the character spawn first, what do i do ?
@Wulfnstein
@Wulfnstein 4 ай бұрын
Came for a menu tutorial, but learned you can have a custom font instead. scuse me as I go figure out how to do that first. xD
@ahsaayumu
@ahsaayumu 2 жыл бұрын
I excuse in advance for bad English If your viewport has a number but the window resolution has an higher one (something like the viewport being 288x216 and the window being 864x648) and you're trying to make a pixel art game then you might have a problem, the pixels will have a bad scale due to the width being a odd number, to resolve that problem, add this line: if _new_w%2 == 1 {_new_w += 1}; It will check if it's an odd number, then add 1 to the variable to make it an even one
@matt.137
@matt.137 2 жыл бұрын
hey im having an issue with the menu sprite where it doesn’t scale properly, i checked the nine slicing and it seems fine, but when i load the game the sprite shows up as this weird grid of black and white squares rather than a black square with white edges
@cheerbeqr760
@cheerbeqr760 2 жыл бұрын
cool tutorial but my text is a little bit small, can I make him bigger in some way ?
@ericlafrance8508
@ericlafrance8508 2 жыл бұрын
do you need to have spr font for this or you can use any default font included?
Full Item and Item Inventory System in GMS2!
1:10:38
Peyton Burnham
Рет қаралды 43 М.
ChatGPT Just Learned To Fix Itself!
5:47
Two Minute Papers
Рет қаралды 26 М.
1 or 2?🐄
00:12
Kan Andrey
Рет қаралды 32 МЛН
OMG😳 #tiktok #shorts #potapova_blog
00:58
Potapova_blog
Рет қаралды 4,2 МЛН
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 3,9 МЛН
Optimizing my Game so it Runs on a Potato
19:02
Blargis
Рет қаралды 453 М.
GameMaker Is Now FREE!  ...ish.
8:30
Gamefromscratch
Рет қаралды 43 М.
How To Move And Collide In Top-Down Games | GameMaker
9:14
GameMaker
Рет қаралды 40 М.
GameMaker Studio 2 - Inventory Tutorial
8:06
Shaun Spalding
Рет қаралды 55 М.
Could I win a game jam days after installing GameMaker?
40:01
AdamCYounis
Рет қаралды 18 М.
СБЕЖАЛ ОТ РОДАКОВ и ЭТО ЗАКОНЧИЛОСЬ ПЛОХО!! (SchoolBoy Runaway)
13:56
ShadowPriestok - Евгений Чернявский
Рет қаралды 415 М.