Saving and loading in pygame with json
A tutorial on how to save and load files in pygame using the json module. The approach shown here would work in pretty much any python code and could generally be used to create and load data.
Timetamps:
0:00 - Intro
0:50 - saving information and json
8:46 - creating the clicker game
19:50 - json part of the game
Пікірлер: 85
I was doing my Computer Science project and was opening the phone to google 'How to save game in pygame' but before that i see this in my notification.😂😂😂
The legend is back! :D
@SKSam-bq6zt
3 жыл бұрын
Yeah so cool
I personally love the minimalist way of your Explanation and edits which makes it easier to get into Head!! Keep. Uploading!! Your Channel is loved!!❣
Please dont stop making these, you inspire me
Thanks, I just wanted to research this subject and then I found you uploaded this video. It's really important and useful in pygame games.
@SKSam-bq6zt
3 жыл бұрын
But man you are really underrated.
Helpful videos and great explanation!
Just when I was thinking about how to implement a saving mechanism.... Like a gift from heaven...
I was just searching for this, perfect timing!
This tutorial worked perfectly for me...Thanks for this😄☺
I've been doing very basic coding as a way to mentally exercise and pass time with some benefits. Being a complete dummy when it comes to using external files in my programs, I just couldn't pass that roadblock for some reason (called lazyness 😄). The video has been exceedingly helpful at giving clear directions on where to look and what to do.
Perfeito trabalho com pygame agora estou entendendo de verdade. Parabens pelo trabalho e dedicação. I'm from Rio de janeiro, Brazil.
I'm gonna use this for my upgrade to your space invaders. Good fun. Thanks.
Before watching this video I did same thing with SQLite, Thanks for teaching me the shortest method.😃
Straight to the point, good explanation, i understood it well!
Amazing, back on track in half an hour
cool video, this will help me a lot in my future career! Thank you so much
Thank you For making this video,
Plz make videos on games your explanation is best 👍👍
This helped me a lot man, you should do tutorials on unity
You are truly great
Thank you very much :)
I am in high school..man you make my days cool...it's so awsome..I can't explain you..💜
@devloper_d
3 жыл бұрын
where are you from?
@abrarmasumabir3809
3 жыл бұрын
@@devloper_d From Bangladesh bro and you....
@devloper_d
3 жыл бұрын
@@abrarmasumabir3809 I am from India and I am in class 7th.
@abrarmasumabir3809
3 жыл бұрын
@@devloper_d can we contact bro...let's learn together....💜
@devloper_d
3 жыл бұрын
@@abrarmasumabir3809 Yes of course share your e-mail id or other contact detail.
oh my gosh he uploaded another video!!
thank you, it helped me a lot ;)
Subbed. You're amazing.
Great Video!
Thanks 👍👍
Amazing.
Made my day
You are amazing!!!
How about Menus in pygame and 3d games in Godot?
@codedecode1498
3 жыл бұрын
For 3D games in godot, i can highly recommend this channel called Garbaj :D
@hariharanthegreat5576
3 жыл бұрын
@@codedecode1498 Yeah, I too watch his videos. But this channel Clear Code explains everything in a slow and neat manner which helps me to understand better. If clear code did some, it would be amazing
@codedecode1498
3 жыл бұрын
@@hariharanthegreat5576 Yeah ik i prefer this channel over other channels too, but im just saying you could watch those till ClearCode makes them :)
How do you do this with more complex projects containing Player and Enemy classes, animation frames etc?
Nice ;D
he bacc
nice video...but don't forget to record your cursor also xD :) 😁
Can you make a video on controller input?
AttributeError: 'FirstPersonController' object has no attribute 'cursor' hello in the last video of minecraft in python i encounter this problem could you help me (the code is right because i also tried to get it from your git hub)
Can anyone explain to me how this works, i have follow the video, but the load is having conflict with the dump if I never run the game (like, the text file is never created, and that creates conflict with the loader trying to get the file). Should I make the file first and assigning the dictionary value into text file (like 'click' : 0 in the text file)? Sorry if my question sounds dumb, I'm new to python, and sorry about my grammar (not really good at English). For anyone reading this comment, have a nice day!! 🙂
But how would I make multiple saves with different names that the user(s) inputs?
could you make a Video about Sound effects in pygame?(pitching, etc..) it would help me a lot!
How would I implement this with your Mario style platformer?
( i'm italian so not watch grammatic:D) please you can say me what program for Ursina engine you have used (that for minecraft Python edition)? pls (i want to create from myself but i don't know what type of file i must to use on Visual Studio)
@ClearCode
3 жыл бұрын
Hey, I use sublime text but any python ide is fine
@il_piruz
3 жыл бұрын
@@ClearCode thank As soon as I can I try it
@il_piruz
3 жыл бұрын
@@ClearCode sorry for disturbe but how you use (always sorry for the bad english) sublime text? ( for example run the code and show up the window with the game)?
@il_piruz
3 жыл бұрын
@@ClearCode nothing at the end i've made it and..... thankssss for all the help and time you put in for help me
@il_piruz
3 жыл бұрын
@@ClearCode sorry for another disturb 😅, but I've installed also psd tools3 but the file (opened with python) not work and the prompt of python spam message of Missing assets/blocks, you can help me another time? 😅
What if I want to save a game, but manually? Like in most games, you can chose the name of your save and the path of your save, how can I do that?
Does this work on your ursa-craft?
@ClearCode
2 жыл бұрын
it is just another python module, it works with anything, including pygame and ursina.
new vid!!!! any plans for more Godot tutorials?
@SKSam-bq6zt
3 жыл бұрын
yeah Godot is really important for making games
and here i thought json stood for 'just a series of numbers'
Hey the content is veryyyyy gd but how can I save all the data in a game that contains classes?
@CodingCircle
2 жыл бұрын
You can save classes with json as well but the class should not contain any image or Font
Ok, so I should save each variable into a global dictionary then save that dictionary as json file, and load the variables from that dictionary?
Why use json instead of saving your data as raw binaries?
@deistormmods
2 жыл бұрын
Better to use raw binary. It's quicker. But it's your choice.
@ZgavY
2 жыл бұрын
@@deistormmods I'll use raw binary so 9 year olds can't edit the data and cheat on my game lol
@deistormmods
2 жыл бұрын
@@ZgavY Lol if they're smart enough they can
Hey! When's the new video coming?
Can you teach how to do this with sqlite3?
25:06 funny number :D
Can you teach us how to make multiplayer game
18:02, just saving so i can sleep :)
But user can change the values and cheat plz make a new method
@user-dh8oi2mk4f
3 жыл бұрын
In a singleplayer game, why would you want to prevent the user from cheating?
Hi I need your help
@aiyazm7278
3 жыл бұрын
I had a problem in Arduino UNO using python
can you code the floppy bird game with memory?
Sir if its possible please make games by kivy too
Kivy tuts pls
This guy keeps telling us to get rect, how rude! (This is a python joke)