[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Axelay-like background scroll getting operand error



Well, you're calling:
pygame.time.delay(1000/100)
every frame, which I think limits it to <10fps tops.  That should be the major reason this is running slowly.  Try using pygame.time.Clock()

As to sizing the background every time, it can probably be avoided depending on the application--cache the result of a single scaling operation and use the result for subsequent frames (i.e., do one scaling operation outside the main loop).

Ian