Thanks for the video! I've been trying a few others before but, as a beginner, I ended up feeling frustrated because I found them either overwhelming or monotonous, all in all hard to follow. I found your style clear, manageable and engaging. I'll return for more, for sure.
I honestly didn't know this before looking at this tutorial but Parallax Layers work with TextureRect's too. I wanted to make a scrolling background and Parallax Layers are the only way I knew how to do that so I tried it out and it works perfectly!
Thank you so much !! I'm a complete beginner + i'm terrible at coding. I get lost very easily, but thanks to you i made my first main menu, it works perfectly well, i'm so proud ! Thank you again for your tutorial, it really helped and made me happy today :)
Great tutorial, what is the difference between your method to connect buttons and doing double click the signal and the creating the function automatically
Ofcourse! When we start polishing the menu will add some hotkey functionality so we can switch between the tabs using, WASD, ARROWS and controller buttons!
In Unity I remember making individual scripts for each button. Maybe in Unity you can put everything in one script like this but this is very interesting.
Thank you! I'm starting to learn Godot (and programming in general) and I was following a tutorial but the guy never bothered to align the main menu and it was driving me nuts! (the video was good tho)
They are definitely coming in the future! Because of how they function as their own unique scenes that will get loaded via a button onto the menu and the scripts that go into them they can take a little while to set up.
This is fantastic, very well explained, not rushed and easy to follow. Help please: Whilst i have triple checked everything i cannot get the on start button to jump to my next screen ("res://Scenes/Level 1/level-1.tscn"). The only things i can see that are different are 1) "void" has red text in your video but mine is bright green, but that cannot be the issue (i have removed void and no difference). 2) my next screen is a "texturerect" static screen with no game code, would that be the problem? Using 4.2.1 Thanking you in advance.
Updated: I found an awesome video that adds 2 little bits of code that fix everything seriously if your stuck man go to his 5 mintue video fixed my options exit and start button with no joke 6 lines of code in 4 minutes all together this is his video search him up godot 4 main menu beginner tutorial by Gwizz
It's a very useful video, but, holy moly, man, your naming conventions gave me a stroke in the first minute. How do you use Pascal_Snake_Case AND put spaces in your directory names? That's so criminally cursed, lol. 💀 Also, 14:00, for the love of god, please don't name a handler for a `button_down` signal as `*_pressed` when there is a _different_ signal on that type called `pressed`. That will make for one hell of a debugging nightmare when you refactor something and you'll be trying to understand why the `*_pressed` handler isn't being called when the `pressed` signal is firing.
Thank you! Thats a great idea, one of the best parts about the simplicity of this design is you'll be able to modify it so take some time to experiment with it and make it into your own!
Thank You!!! this video was incredibly helpful. I did have one question though. The buttons work when i enter my main menu, but when I leave and come back to it (such as when the character loses the game and has to come back to the main menu) the buttons no longer work? I think it has to do with the ready function not being called the second time, but I dont know how to fix this.
ended up finding a solution (for my game at least) and figured I would post it back here in case anyone else is having an issue. for me I just had to change all instances of preload() -> load(). Not 100% sure why it works but the person assisting me said it was solving a cyclical error from trying to preload the main menu after it had already been loaded.
love u channel bro just started my first game so. do you got a video where like for music sounds how to have menu music and then it turns off after clicking play and then another music plays. only issue rn i have it like an audio area with 3 bus things and i follow a video and i had to redo something so it stuffed it up idk if should try to redo it again
9 times out of 10 thats because of the node that it has as a parent. UI can be a bit finicky with how the nodes are set up, you may have to adjust how the parent is set up to change the position of the title.
I think I know what you mean; Don't move the label yourself. Make sure that MarginContainer is hooked on "whole screen" first with the anchor button. That should fix it.
Great question! Yes it will work with any kind of game, most ui / control elements are 2D and are rendered on a canvass layer which sits on top of whatever style of game you are making!
@@CoffeeCrowDev My buttons are clikable without the canvas layer so if i do the same with control node and a 3d background with animation and i add a node to world as control node and do this all steps will it work ?
I am confused what's wrong with my game. Is this tutorial out of date, or is there a formatting error here? class_name MainMenu extends Control @onready var start_button = $MarginContainer/HBoxContainer/VBoxContainer/Start_button as Button @onready var quit_button = $MarginContainer/HBoxContainer/VBoxContainer/Quit_button as Button @onready var kir_button = $MarginContainer/HBoxContainer/VBoxContainer/kir_button as Button @onready var start_level = preload("res://Scenes/Test menu/Foggy_Void.tscn") as PackedScene func _ready(): start_button.button_down.connect(on_start_pressed) kir_button.button.down.connect(on_kir_pressed) quit_button.button.down.connect(on_quit_pressed) func on_start_down() -> void: get_tree().change_scene_to_packed(start_level) func on_kir_pressed() -> void: pass func on_quit_pressed() -> void: get_tree().quit() kir is just "options" btw, so ignore that. I get an error about "on_start_pressed" The only thing I can tell that is different is the little arrow at the start of the line for you. (The blue up and to the right thing, Idk) Edit: Turns out that there's a thing on the Godot store you can just straight up steal for your projects so I just did that instead. I'd still like to know why it wasn't working, but at least I can pretend it is no longer a problem for now. I see the next video in the playlist is on settings, and another was about accessibility. Does that include languages? I know some people consider translation stuff to be an accessibility feature, and some people treat it like its own special setting, so I'd like to know before I spend several minutes watching a tutorial not aimed at me.
I appreciate all these little tips like holding ctrl when dropping a node, that's incredibly useful! Awesome video :D
Thank you!
Thank you for these tutorials! I am just learning Godot, and it is incredibly helpful!
Thanks for the video! I've been trying a few others before but, as a beginner, I ended up feeling frustrated because I found them either overwhelming or monotonous, all in all hard to follow. I found your style clear, manageable and engaging. I'll return for more, for sure.
I honestly didn't know this before looking at this tutorial but Parallax Layers work with TextureRect's too. I wanted to make a scrolling background and Parallax Layers are the only way I knew how to do that so I tried it out and it works perfectly!
Thank you so much !! I'm a complete beginner + i'm terrible at coding. I get lost very easily, but thanks to you i made my first main menu, it works perfectly well, i'm so proud ! Thank you again for your tutorial, it really helped and made me happy today :)
Thanks for this super useful video, just got a new loyal fan, thanks for your efforts your knowledge is appreciated!
This is awesome. Thank you, I love the Design. So Clean
Thank you! After much tweaking due to Godot 4, I was able to get my main menu working..
Great video for a newbie like me lol. Nice simple tutorial with explanations and tips along the way, gained my sub. Thank you!
YOU RE THE BEEEST all other tutorials dosen't work but yours is so well explained
Great tutorial, what is the difference between your method to connect buttons and doing double click the signal and the creating the function automatically
Thanks a lot! Was very easy to understand and follow along, you saved my gamejam!
it says I need to add a variable after the void: part?
I like big buttons and I cannot lie
thanks for showing me how to get great alignment with my fonts this is great.
This was amazing and very straight forward. Thank you so much!
Can you cover making menus input friendly with using either controller (or wads/arrows) and keyboard?
Ofcourse! When we start polishing the menu will add some hotkey functionality so we can switch between the tabs using, WASD, ARROWS and controller buttons!
In Unity I remember making individual scripts for each button. Maybe in Unity you can put everything in one script like this but this is very interesting.
thank you perfect tutorial for what i need
Glad it helped!
What if I want the button to have a custom background? :D
Great tutorial btw.
I would also like to see this
use texturebutton as a child of the actual button
i think
Thank you! I'm starting to learn Godot (and programming in general) and I was following a tutorial but the guy never bothered to align the main menu and it was driving me nuts! (the video was good tho)
what if the background i'd like to use is meant to be animated?
Is there a tutorial for sound output, resolution, multilingual support, and key mapping in the menu settings?
They are definitely coming in the future!
Because of how they function as their own unique scenes that will get loaded via a button onto the menu and the scripts that go into them they can take a little while to set up.
holding ctrl when dropping a node = boss level
if you have a texture for your main menu with the buttons already in place you can just cut out the margin container and just put the buttons in
I thought according to GDscript's naming conventions for naming nodes you should use Pascal Case, which doesn't use underscores?
This is fantastic, very well explained, not rushed and easy to follow.
Help please: Whilst i have triple checked everything i cannot get the on start button to jump to my next screen ("res://Scenes/Level 1/level-1.tscn").
The only things i can see that are different are 1) "void" has red text in your video but mine is bright green, but that cannot be the issue (i have removed void and no difference).
2) my next screen is a "texturerect" static screen with no game code, would that be the problem?
Using 4.2.1
Thanking you in advance.
Yeah im having the same issue
Updated: I found an awesome video that adds 2 little bits of code that fix everything seriously if your stuck man go to his 5 mintue video fixed my options exit and start button with no joke 6 lines of code in 4 minutes all together this is his video search him up godot 4 main menu beginner tutorial by Gwizz
It's a very useful video, but, holy moly, man, your naming conventions gave me a stroke in the first minute.
How do you use Pascal_Snake_Case AND put spaces in your directory names? That's so criminally cursed, lol. 💀
Also, 14:00, for the love of god, please don't name a handler for a `button_down` signal as `*_pressed` when there is a _different_ signal on that type called `pressed`. That will make for one hell of a debugging nightmare when you refactor something and you'll be trying to understand why the `*_pressed` handler isn't being called when the `pressed` signal is firing.
Incredible tutorial. Thank you.
Very useful. Thank you!
thanks! very nice voice to listen to!
The menu looks super great but I was just wondering if it also works for 3d games?
the exit did not work
that was great,
Id be temped to link the buttons to the Same Function, and pass an argument to a match statement to move or exit,
Thank you!
Thats a great idea, one of the best parts about the simplicity of this design is you'll be able to modify it so take some time to experiment with it and make it into your own!
hi! i have a question.. why is there code for start level preload? is it the same thing as creating a save/load file for a scene?
Thank You!!! this video was incredibly helpful. I did have one question though. The buttons work when i enter my main menu, but when I leave and come back to it (such as when the character loses the game and has to come back to the main menu) the buttons no longer work? I think it has to do with the ready function not being called the second time, but I dont know how to fix this.
ended up finding a solution (for my game at least) and figured I would post it back here in case anyone else is having an issue. for me I just had to change all instances of preload() -> load(). Not 100% sure why it works but the person assisting me said it was solving a cyclical error from trying to preload the main menu after it had already been loaded.
Infuriating that changing the font size and style is not the same way as I would did it in Microsoft PowerPoint
15:15 this doesnt work for me for some reason
Yep had the same issue mate. Did you get a fix?
idk why but my exit button works but not my start button any ideas?
Thankyou your video was very helpful :)
love u channel bro just started my first game so. do you got a video where like for music sounds how to have menu music and then it turns off after clicking play and then another music plays. only issue rn i have it like an audio area with 3 bus things and i follow a video and i had to redo something so it stuffed it up idk if should try to redo it again
can i do this using video or gif instead of jpeg for the background?
When I try to move the label for the title, no matter what I change the vertical or horizontal alignments, it just won't move.
9 times out of 10 thats because of the node that it has as a parent. UI can be a bit finicky with how the nodes are set up, you may have to adjust how the parent is set up to change the position of the title.
I think I know what you mean; Don't move the label yourself. Make sure that MarginContainer is hooked on "whole screen" first with the anchor button. That should fix it.
Thank you sir for this tutorial.
Really appreciate it!
Thank you this is so helpful
When I switch scenes I cant reuse the button. What do I do?
this was helpful ^^
I'm glad I could help!
Nice tutorial
Can you do a Multiresolution mobile menu with touch controls ?
Heyy great tutorial, thanks ! Hope your channel will grow fast ;) It sure will if you make good content. I subscibed.
if im making a 3d game and scene will it owrk in that ?
Great question! Yes it will work with any kind of game, most ui / control elements are 2D and are rendered on a canvass layer which sits on top of whatever style of game you are making!
@@CoffeeCrowDev My buttons are clikable without the canvas layer so if i do the same with control node and a 3d background with animation and i add a node to world as control node and do this all steps will it work ?
thanks you dude!
thank you
Thanks!
thank youuuu❤❤
nice thank u
Am I the only one who hit f5 when he said hit f5?
YOU HAVE OWNED MY RESPICT
I am confused what's wrong with my game.
Is this tutorial out of date, or is there a formatting error here?
class_name MainMenu
extends Control
@onready var start_button = $MarginContainer/HBoxContainer/VBoxContainer/Start_button as Button
@onready var quit_button = $MarginContainer/HBoxContainer/VBoxContainer/Quit_button as Button
@onready var kir_button = $MarginContainer/HBoxContainer/VBoxContainer/kir_button as Button
@onready var start_level = preload("res://Scenes/Test menu/Foggy_Void.tscn") as PackedScene
func _ready():
start_button.button_down.connect(on_start_pressed)
kir_button.button.down.connect(on_kir_pressed)
quit_button.button.down.connect(on_quit_pressed)
func on_start_down() -> void:
get_tree().change_scene_to_packed(start_level)
func on_kir_pressed() -> void:
pass
func on_quit_pressed() -> void:
get_tree().quit()
kir is just "options" btw, so ignore that.
I get an error about "on_start_pressed"
The only thing I can tell that is different is the little arrow at the start of the line for you. (The blue up and to the right thing, Idk)
Edit: Turns out that there's a thing on the Godot store you can just straight up steal for your projects so I just did that instead.
I'd still like to know why it wasn't working, but at least I can pretend it is no longer a problem for now.
I see the next video in the playlist is on settings, and another was about accessibility.
Does that include languages?
I know some people consider translation stuff to be an accessibility feature, and some people treat it like its own special setting, so I'd like to know before I spend several minutes watching a tutorial not aimed at me.
I think "on_start_pressed" was not declared in this script, you declared "on_start_down". Sorry for bad english
@@bezztube-gaming Ah, you're right!
Thank you so much for pointing out my stupidity