Pygame Saving and Loading Tutorial: Creating Customizable Controls

preview_player
Показать описание
In this tutorial, we're going to see how we can use
Saving and Loading to create customizable controls and
profiles to enhance a player's options and experience.

Download the font:

Github repository for this Tutorial:

Links to other videos:

Timestamps:
0:00 Intro
1:29 Simple Game Loop
2:48 Saving and Loading Functions
7:40 The Control Handler - Printing the Controls
14:13 The Control Handler - Navigating and Switching Profiles
16:45 The Control Handler - Setting New Controls
19:30 - Final product and Outro

Music:

Cave Story - Safety
Cave Story - Snoopy Cake

#pygame #python #gamedev
Рекомендации по теме
Комментарии
Автор

Really helpful man. Thanks. Can you make a tutorial on how to make different level for a game and how to make the transition between levels after pressing a button. I've been wanting this. Thanks :)

DhevAcoustic
Автор

great! My idol has released a video again!!! thank you so much <3

kirfzatd
Автор

Congrats on 1k! It costed me a channel strike lol but it was worth it 👊

asmeticful
Автор

Oh yes more! Your videos have been super helpful thank you so much. Ive been thinking on using state machine for player control similar to how you handle game states. Would that be an improvement to the player class? Especially when the player can do more than just jumping and running. Also would be awesome if you make a tutorial on shooting mechanic like the one in cave story!

cliffordwilliam
Автор

I'm wondering how can I make a game button that has a function like 1p mode and 2p mode on super smash bros?

ahmadsyahmibinjamaludin
Автор

Can't get it to work because when I save it saves the integers, not the "pygame.K_a" type codes.
when I load in my JSON I can't load in direct pygame methods so I have to load them in as strings, and then evaluate them. But I can't get the codes from the integers, and I can't get the integers to work as a pygame event.

DutchDread
Автор

Hello, Christian!
self.font = pygame.font.Font("RetroFont.ttf", 20)
FileNotFoundError: [Errno 2] No such file or directory: 'RetroFont.ttf'
why do i get this all the time
ps :i installed everything you said to install

AnasMamdouh
Автор

What happened to you, man. You haven't uploaded in a while.

chosenone