Get Element Earth ▶
Support this channel ▶

Follow me on Facebook ▶
Follow me on Instagram ▶
Follow me on Twitter ▶
Follow me on Google+ ▶

Due to the enormous success of my other making menus tutorial, I’ve decided to make another more in-depth version featuring many concepts I’ve put on display over the past few months. Yes, this video is long. This is what it takes to make a professional grade menu system!

As you’ll see, when working on a large project, some errors and typos will come about along the way. Here’s a list of where certain errors were made and how they were fixed:
Duplication of control key object at 30:22
– This is fixed in 52:36.
obj_keyController’s STEP event missing switch statement at 33:00
– This error is fixed at 48:28.
rm_boot CREATE event, typo in reading ini file settings at 40:16
– This error is fixed at 54:53.

Chapters
8:07 – The Button Part.
9:54 – Creating Main Menu.
17:10 – Creating Options Menu.
20:55 – Creating Controls Menu.
56:05 – Creating Sound Menu.
1:19:26 – Creating The Game Room.
1:23:26 – Final Words.

▼ More ▼
General Game Maker Playlist ▶
Game Maker Networking ▶

▼ Useful Links and Resources ▼
GM: Studio Project and Resources ▶
Making Menus (basic tutorial) ▶
Inheritance ▶
The Button Bob Effect ▶
Working with ini Files ▶
Slider Bars Part 1 ▶
Slider Bars Part 2 ▶
Basic Movement ▶
Rotate Towards Cursor ▶
Macros and Constants ▶

Happy Coding 😀

Nguồn: https://shaarique.com/

Xem thêm bài viết khác: https://shaarique.com/game/

33 Comments

GravityShift Games

June 29, 2020

Be sure to subscribe for more great videos https://www.youtube.com/channel/UCAumdO1yv-di4fI6IZQIy3Q?sub_confirmation=1

Reply

Jesh Lorenz

June 29, 2020

Can you help me i got error in obj_hslider_music in draw event. Variable Get -1.percentage hope you help me in my project thank youu

Reply

Ink Phoenix

June 29, 2020

very good tutorial but just wanted to say that there is an audio error on the video (in 1:09:11)

Reply

Pea & L

June 29, 2020

This is the error i am getting
Variable obj_keyController.purpose(100094, -2147483648) not set before reading it.
at gml_Object_obj_keyController_Key_ANYKEY_1 (line 8) – case "Up": ############################################################################################

Reply

Kokoyoin did you lay this egg?

June 29, 2020

But I don't want a menu with mouse! I'm looking for one that uses the arrows! All the others I've seen use Game Maker Studios and scripts! How can I program a game if I can't even program a MENU? It'd be better off if I just scrap the whole game making progress of mine….

Reply

Mc2save

June 29, 2020

I know this proably wont get answered but my buttons don't display anything

Reply

GMProxy

June 29, 2020

I don'k know why, but in the main menu, the start, options and exit buttons flash all the time while the other buttons work fine. What could it be?

Reply

MAIORQUEREI

June 29, 2020

In my game I just want to save the slider last position when i left that particular room like the percentage is saved, in a global variable, but cant find the way how to do it, can you help me please? Very good tutorial btw!

Reply

Anguish

June 29, 2020

probably late to the party, but what is my a.purpose in life?
On all of my Key objects, "purpose" is invalid and it excepts another symbol in the equation. Since I'm utterly inept, what on earth have I managed to skip over?
EDIT: Nevermind, silly semicolons.

Reply

_Bloodberry999_ & _Swagberry999_

June 29, 2020

awe, ur in gm8 😛

(my game was in gm8 but now i am using gms)

Reply

ykyjohn

June 29, 2020

Exactly what i was looking for.
Thank You.

Reply

The Cat

June 29, 2020

help me

_________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Draw Event
for object obj_key_right:

Variable obj_key_right.hover(100021, -2147483648) not set before reading it.
at gml_Object_obj_key_right_DrawEvent_1 (line 6) – if (hover == true)
############################################################################################

Reply

Jason Evans

June 29, 2020

I got around it not recognizing the keys, BUT….the defaults are not showing up and I dont know if it is saving and loading right. Sorry for the bother

Reply

Jason Evans

June 29, 2020

+SlasherXGAMES

Yeah my global.key_xxxxxxxx variables are not recognized. I need help with this. Could it be that my movement is not based the same? Here is my movement code (top down collisions as focus):

if keyboard_check(ord('W')) {
if !place_meeting(x,y-3, ob_globalcollisionblock) {
motion_add(90,3);
}
}

if keyboard_check(ord('A')) {
if !place_meeting(x-3,y, ob_globalcollisionblock) {
motion_add(180,3);
}
}

if keyboard_check(ord('S')) {
if !place_meeting(x,y+3, ob_globalcollisionblock) {
motion_add(270,3);
}
}

if keyboard_check(ord('D')) {
if !place_meeting(x+3,y, ob_globalcollisionblock) {
motion_add(0,3);
}
}

if place_meeting(x+hspeed,y+vspeed,ob_globalcollisionblock) {
speed = 0;
move_contact_all(direction,0);
}

if speed > 3 {
speed = 3;
}

What should I change in what you made here to make this movement work without changing this movement because this is the only one that works great for me with collisions and drawing events of rotation instead of mask changing??

PLEASE HELP!

Reply

Jason Evans

June 29, 2020

Is your global.key_up based on the movement settings within the player object so it recognizes the global variable? Could I say global.move_up or will it not know what that is?

Reply

Marcus W.

June 29, 2020

any suggestions?
_________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Mouse Event for Left Pressed
for object obj_save_button:

Unable to find any instance for object index '10' name 'obj_key_up'
at gml_Object_obj_save_button_LeftButtonPressed_1 (line 6) – global.key_up = obj_key_up.key;
############################################################################################

Reply

Johan Beneke

June 29, 2020

I have done everything but the default keys are not working for me 🙁
When I start the game my character has no keys assigned to it so it does not move unless I go and set them, after I set them it works 100% though, I don't want my players to have to go setup keys the first time they launch the game, is it possible to have an ini file created at the start of the game with default values that can then be over written?

Reply

RÅTZI

June 29, 2020

I have an error D:

_________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Create Event
for object o_hbar_parent:

Variable o_SoundBar_effects.s_SoundBar(100021, -2147483648) not set before reading it.
at gml_Object_o_hbar_parent_CreateEvent_1 (line 1) – rightLimit = x + (sprite_get_width(s_SoundBar)/2)-30;
############################################################################################

Reply

James Ancira Jr

June 29, 2020

Got a question about a problem with my sound bars, sliders, and texts. The text (numbers) next to my bars appears to display multiple integers stacked on top of each other and my sliders are duplicating themselves every time I click on one, and my bars are not drawing on screen. I'm re-watching the video, when I have the time, to see if I missed anything. Any suggestions?

Reply

Whiteunitato

June 29, 2020

If anyone can help me as fast as possibly with this it would be so helpful. It is probably a really basic error message but im quite new to this coding thing, so i'm not smart enough to fix it myself 🙁

############################################################################################
FATAL ERROR in
action number 1
of Create Event
for object obj_key_up:

global variable <unknown built-in variable>(-1610512736, -2147483648) not set before reading it.
at gml_Object_obj_key_up_CreateEvent_1 (line 1) – key = global.key_up;
############################################################################################

Reply

Totor Le Castor

June 29, 2020

Hello man ! I just wanted to know if it work with the external controlers like x box pads or anithing else thanks.

Reply

FP

June 29, 2020

AWESOME tutorial, love your vids ! 😀

Reply

Dynasty Lobster

June 29, 2020

can I map the control to a gamepad?

Reply

Christian Nunez

June 29, 2020

What is (SXGAMES_LIME)? and (fnt_1)?
those aren't colored in my game's code. What am I missing?

Reply

Appear

June 29, 2020

Wow, what an amazing tutorial!

Reply

Roy Flaherty

June 29, 2020

Plz help me with this error!

_________________________________________
FATAL ERROR in
action number 1
of Draw Event
for object obj_key_right:

Variable obj_key_right.hover(100056, -2147483648) not set before reading it.
at gml_Object_obj_key_right_DrawEvent_1 (line 6) – if (hover == true)

Reply

IGotRunOver

June 29, 2020

i get an error which i don't quite understand, i really hope you can help me.

This is the error i'm getting:

_________________________________________
FATAL ERROR in
action number 1
of Mouse Event for Left Pressed
for object obj_key_up:

COMPILATION ERROR in code action
Error in code at line 3:
var a = instance_create( room_width/2, room_height/2, obj_keycontroller)
^
at position 14: Unexpected symbol in expression.

help me pls.

I must say you make good tutorial :3

Reply

Purple Ice

June 29, 2020

20 seconds into the tutorial and I can tell this is worth that hour and a half watching, I know how to make menus already but I want to see how others do it and it already looks good even if it's just tutorial.
For future reference: you should use button RELEASED, in case there are buttons in other room at the same spot of the original button. Most of the time it will doubleclick on both buttons and it will just in worse case, start looping between eachother every time you press the mouse button.
At least this is what was happening when I was using menus controlled by keyboard.

When you mentioned saving I just decided to copy everything you've got here and it turned out pretty well…
Now I feel dumb for putting it right into my project and not template so I can simply use any parts of it instead of having to go through this hell again, lol.

Reply

JinNJuice

June 29, 2020

I'm having a very strange problem. Objects I have set to draw text aren't drawing the text.

Reply

Donnys YX Carrasco S

June 29, 2020

sub títulos por favor
please sub titles

Reply

HumanOddity69

June 29, 2020

Hey Slasher, this is a brilliant tutorial and by following along I've been able to construct a very good menu system based on it. I'm having trouble with one thing in particular though. When I start my game the audio all returns to 100% but when I check it in the audio options the sliders will be set at the last values saved to the .ini. Strangely enough, when I left click on either of the sliders the sound updates to the value of the sliders. Do you have any idea why this is? I'm using global.music = audio_group_set_gain(BGM,obj_slider_music.percent/100,0);in the step event for my slider parent.

Reply

Michael Barclay

June 29, 2020

Cheers mate — Fantastic.

Reply

Jackal See's you hiding

June 29, 2020

thank you very much definitely totally worth the subscribed. my school started the "video game design" this year and my teacher is very clueless, in fact he is learning more by us. anyway i am very interested in learning this and i'm still very shaky on coding but i got my whole main menu down but i was wondering how do you assign the sliders with music? that's something i haven't found.

Reply

Leave a Reply