You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A lot of games written with pygame uses functions like this:
@staticmethoddefdisplay_single_line(line, x, y, screen):
"""Displays a single line of text on Battle screen"""txt=pygame.font.Font(None, 36)
render=txt.render(line[0:13], 0, (255, 255, 255))
screen.blit(render, (x, y))
So font file being opened every time when function is called. But this error doesn't happen in PyGame.
Maybe we should add caching or something like it?
The text was updated successfully, but these errors were encountered:
A lot of games written with pygame uses functions like this:
So font file being opened every time when function is called. But this error doesn't happen in PyGame.
Maybe we should add caching or something like it?
The text was updated successfully, but these errors were encountered: