On 9 Okt., 22:48, Ben Sizer <[email protected]> wrote: > Smooth movement requires an unchanging velocity, even if frames are > not rendered at exactly equal intervals. So just decide how many > pixels per second you want to move (eg. 400), and instead of using the > constant 10, use (pixels_per_second * dt). For the smoothest motion, > store the accumulated value as a float but pass a rounded version to > blit().
Thanks, tried it and seems a bit better! > > It would be interesting to know how many fps you actually get when you > turn the fps limiting off. Most modern platforms should be able to > give you 60-85 with vsync on for a simple scene, and at that frequency > you wouldn't need such a high number as 10 pixels each frame. Perhaps > there is inefficiency elsewhere in your application that is making > frames take a long time. I figured out, that vsync was already on, so it was limited to 60fps. When turning vsync off, I get 160-210fps. Seems to be relatively smooth now, but the tearing in the big picture to the left stays...I´ve got no idea how to fix that. There´s always a wandering line, which seems to cut the pic in two. If I turn vsync off and alter the fps_limit values, I can see how it influences the line going up or down, and faster or slower. So it seems, that my vsync is somehow broken. Marc --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---
