Im making a game to practice mygame and im creating a highscore screen but i cant seem to properly blit the text how i want
here is the highscore method
def high_screen(self):
screen.blit(background,(0,0))
myfont = pygame.font.SysFont("impact", 20)
scorefile = open('highscores.txt', 'r')
highscores = scorefile.read()
label = myfont.render((highscores), 1, (0,0,0))
screen.blit(label, (0, 0))
self.back = pygame.image.load('resources/screen/back.png')
self.back_r = self.back.get_bounding_rect()
self.back_r.x,self.back_r.y = (100,600)
screen.blit(self.back,(100, 600))
screen.blit(self.player,(self.mouse_pos))
if self.player_r.colliderect(self.back_r)and pygame.mouse.get_pressed()[0]:
self.state = 1
this ggets the highscores from a .txt file and blits them but it blits them on one line when i want each score blitted about 100 pixels down from the one above it
so how can i make it so that it splits the text from the file and blits each score 100 pixels down?
Thank You
-Christian Careaga