What is the purpose to having calculations done with a size that's 10 times larger? If it's just precision, the solution could be simply to use floats for the calculations and convert to ints as necessary. Or, you could write some simple functions or methods that divide the x and y by 10 and then pass the new values to the appropriate Pygame methods. Or, if you really want to use the normal Pygame methods, just integer-divide the values as you pass them. Even better, you could make a derived class and override the Pygame methods with more appropriate ones (a technique commonly used with wxPython) like so: def blit(self, source, dest, area=None, special_flags=0): # Change dest so that its x and y are divided by 10 pretend_this_function_does_what_you_want() pygame.Surface.blit(self, source, dest, area, special_flags) One last possibility that I can think of is to scale up your graphics for 1000x1000 and then scale the window surface every time you want to draw it. That is, draw to a 1000x1000 surface, but shrink it to 100x100 when it's displayed. I would only recommend this if you find it easy to implement and any performance hit is negligible or unimportant. Anyway, I hope that helps! --- On Fri, 9/23/11, Mac Ryan <quasipedia@xxxxxxxxx> wrote:
|