performance - Pygame repetitive backgrounds -


consider situation have e.g. bar width of screen. 1 more efficient:

1) make narrow sprite bar , draw piece many times

2) make wide sprite bar , draw larger piece fewer times

the operations here load smaller or larger image once independent of case chosen, , blit smaller or larger image more times in 1 in 2.

generally, have run lot of cases repetitive backgrounds are, ahem, repeated. hear blit operation slow.

you kind of answered own question, blit slow, i'd use sprites cause draw without use of blit, assuming use blit, faster have larger image , blit screen fewer times, less calls blit better. 1 thing remember speed blit make sure convert surface.

surface = pygame.surface((100,100)) surface.convert() 

Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -