How To Create, Save And Load Keybinds In Godot 4!

How To Create, Save And Load Keybinds In Godot 4!

CoffeeCrow

8 месяцев назад

3,815 Просмотров

In this video we'll be creating an entire system for handling our keybinds, including default settings, saving them in an effective way and loading them from a save file. Creating keybinds is relatively simple but saving and loading them is a whole other cup of coffee within Godot so I decided to create the only guide you'll hopefully ever need to design a system you can improve upon and expand as much as you'll need for as many keybinds as you'll need!

In future videos we'll add some quality of life to the options menu, polish it up a little and move on to some other projects I've been creating that I'm very excited to share, If you'd like to see that and much more!

Godot : https://godotengine.org/

Kenney Pixel platformer pack :https://www.kenney.nl/assets/pixel-platformer

Godot 2D Playlist : https://www.youtube.com/playlist?list=PLhBqFleCVBkVVmfpU7HhhXNbCNt13jNWb

#gamedev #gamedevelopment #indiedev #indiegamedev

Тэги:

#godot #godot_4 #2d #game_dev #indie_dev #turorial
Ссылки и html тэги не поддерживаются


Комментарии:

@dm-ix5tj
@dm-ix5tj - 23.01.2024 07:02

Hey @CoffeeCrow, thanks for the videos! You're one of the few covering such niche areas of Godot, and I greatly appreciate it!

I know you covered it a little in one of your comments, but I did want to suggest covering the wider range of input options, like MouseButtons and Numbers as an example. I think it can pose some interesting accessibility challenges. For example, what if you consider any of the keybind buttons being able to be a mouse button? How would we then change the HotkeyRebindButton and PlayerKeybindResource classes to accommodate this?

These are interesting questions I'm left with after watching the series so far -- they have me stumped on this video.

Ответить
@fnanfne
@fnanfne - 04.01.2024 23:53

Great tutorial! Just wondering which video did you go over the creation of the SettingsDataContainer?

Ответить
@owenlloyd2528
@owenlloyd2528 - 25.11.2023 09:56

Thank you. I allow users to pick their action keys but one thing I have never managed to work out was how to allow the capture and save of a shifted or multi-key value, eg Alt-J or Shift-Q. I am going to study this video again (probably a few times, lol) as it is very different from anything I do and you explore concepts that are, to me, quite advanced. I am hoping this will give me a clue on multiple-key actions/hotkeys/keybinds. :) I have just discovered your vids, you do good stuff, please keep teaching us.

Ответить
@anthonsteiness3488
@anthonsteiness3488 - 15.11.2023 17:03

I think these are the best Godot tutorials I have come across. They go into depth and actually explain your thought process. Sometimes it's questionable, but it makes us think for ourselves.

Good work!

I am having a hard time converting it all to C# though. I just refuse to learn GD Script.

Ответить
@chettfitzgerald
@chettfitzgerald - 31.10.2023 05:29

Having a bit of trouble following these steps with mouse buttons, or with numbers. (Specifically loading: errors with mouse clicks, and keys that are definitely not numbers)
I imagine mouse clicks have a whole different process, and the numbers just have to do with keycode shenanigans.
Thoughts?

Ответить
@c__beck
@c__beck - 28.10.2023 15:10

Not related to this video specifically, but what's the difference between setting a variable type and typecasting a variable (if I'm even using the right terminology 🤔) ?

For example:
`var data : {type} = {value}`
`var data = {value} as {type}`

When do you use one vs the other?

Thanks for the great content!

Ответить