I have to try and profile the code in the coming days, thanks for the link. The images are converted (i just added that part). As for rendering the sprites, I am a little cofused.. my code looks like this : enemies = pygame.sprite.Group() then ..enemies.update(salt,pixels)
for RenderUpdates, would i use enemies = pygame.sprite.RenderUpdates() ? and to update it I would use enemies.draw(salt,pixels) ? Also, if that is correct, would I have to change the update method to be called draw() ? Kamilche, is your game now written in pygame? If so, 400 fps is pretty good...lots of optimization, i guess.. Thanks..s. On 6/13/06, Kamilche <[EMAIL PROTECTED]> wrote:
Rene Dudfield wrote: > Try profiling your game to see where/if it can be sped up. > http://www.pygame.org/wiki/Profiling > > Do you use dirty rects using sprite.RenderUpdates? Do you convert() > your images? > > Yeah, you can't get away without doing optimizations, even in C. I know, I wrote a C engine before I switched to Python! I'm doing full screen, 32-bit color in a 1024x768 window with an alpha channel on every graphic... and I'm sitting at about 14,000 fps. That number is misleading because if the screen were fully loaded with something moving every frame, it would drop to 400 fps or so... but the trick is to not fully load it. You HAVE to put a throttle on your graphics, to get any kind of speed out of it. --Kamilche