python - Replace Text On Pygame Window -


i making score system on python file. tried using this:

font = pygame.font.sysfont(none, 25) text = font.render('score: '+str(score), true, black) gamedisplay.blit(text, [0,0]) 

for reason, new score goes on top of old score, , can't read it. makes huge blob of numbers. there way of replacing text?

in game loop, have clear drawn filling screen painting:

gamedisplay.fill(your_color_tuple)  # afterwards add drawing code 

Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

python - Exception while importing pymorphy2 -

c# - Nested Internal Class with Readonly Hashtable throws Null ref exception.. on assignment -