Python Pygame Tutorial - Episode 6! Creating Restart Code and Previous Run and High Score Tracking!

Поділитися
Вставка
  • Опубліковано 29 жов 2024

КОМЕНТАРІ • 21

  • @grv1z
    @grv1z 2 роки тому +8

    Hello, your explanation of resetting the game with pygame is very good, I was wondering if a similar thing could be done with a button in tkinter.

    • @lemastertech
      @lemastertech  2 роки тому +1

      Hi great question! Yes if you create a button for reset and set the command=reset and put all your reset code inside that function it will give you the same functionality!

  • @haouatzakaria9128
    @haouatzakaria9128 7 місяців тому +1

    ❤❤❤❤

  • @fortune655
    @fortune655 2 роки тому +2

    Would it be possible to implement a way to keep track of the previous score and the high score after closing the game? Like using a file to put the previous and high score then the next time the game is opened, both are brought out of the file and put onto the screen.

    • @lemastertech
      @lemastertech  2 роки тому +2

      Hi! That’s a great idea and yes it absolutely is possible. In the last two weeks I just created a video on how to read and write to a text file, so I’d recommend you check those out! You could write the high score to a text file every time it’s beat, then read from that when the program starts up the next time!

    • @fortune655
      @fortune655 2 роки тому +1

      @@lemastertech Thank you! I’ll try it out

    • @lemastertech
      @lemastertech  2 роки тому

      @@fortune655 Awesome good luck!

    • @lemastertech
      @lemastertech  2 роки тому +1

      Just as a heads up I took your idea here and made a full tutorial on how to to do here if you still need it friend!: ua-cam.com/video/_N8_BhcGHxU/v-deo.html

  • @kennethpascasio5701
    @kennethpascasio5701 8 місяців тому +1

    Thank you bro!!!!

    • @lemastertech
      @lemastertech  8 місяців тому +1

      Super welcome thank you for watching!!

  • @alexcabrallequinho1805
    @alexcabrallequinho1805 2 роки тому +1

    nice video bro👍

  • @Janselin23
    @Janselin23 2 роки тому

    hey there. thanks for this video. I actually have to make a project where I have to save the scores on a .txt file and then show the high score on screen before starting the game. any idea how to do it? 😅😅

    • @lemastertech
      @lemastertech  2 роки тому

      Hey!! I have a video on exactly this, I show you how to open a text file in the beginning to load in a high score and save it and close at the end of a play! Hope this helps and let me know with any issues!!
      ua-cam.com/video/_N8_BhcGHxU/v-deo.html

  • @kapils4113
    @kapils4113 Рік тому +1

    thanks

    • @lemastertech
      @lemastertech  Рік тому

      You’re welcome! Thanks for watching!

  • @SunithaSumanam1
    @SunithaSumanam1 Місяць тому

    Bro I came here for height score but when u close the game the high score rests to 0

  • @isabelaribeiro1813
    @isabelaribeiro1813 Рік тому

    Does somebody have this in github?

    • @lemastertech
      @lemastertech  Рік тому

      Hi, I put all of my bigger projects in GitHub now so any big pygame game you find in my channel will be in GitHub now, but this was earlier on and I didn’t put code in GitHub then I’m sorry - I don’t still have this specific file!