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

[pygame] Re: Pygame 1.8.1 blits under Windows slower than 1.8.0?



Yes! That was it. I didn't realize the default SDL driver had changed
for Windows. Thanks.

On Aug 6, 1:23 am, "René Dudfield" <ren...@xxxxxxxxx> wrote:
> hi,
>
> What is that your refresh rate?  91fps is probably the refresh rate of
> your monitor.
> right click on monitor, select settings tab, select advanced button,
> select Monitor tab in new window.
>
> It's probably using the directx driver on your machine, and most
> likely waiting for vsync.  Whereas 1.8.0 probably used the windib
> driver on your machine.
>
> I hope it's vsync anyway...
>
> cheers,
>
> On Wed, Aug 6, 2008 at 4:10 PM, Wojciech Stryjewski <thvor...@xxxxxxxxx> wrote:
> > I wrote a little demo that blits a tiled scrolling background along
> > with some sprites bouncing around. It also measures the time it takes
> > to display each frame and displays the timing info in the window's
> > title bar every second. When running with Python 2.5 and Pygame 1.8.0
> > under Windows XP, my demo measures about 0.7ms to render a single
> > frame in a 640x480 window using SWSURFACEs.
>
> > However, after I installed Pygame 1.8.1 using the precompiled binary
> > ("pygame-1.8.1.win32-py2.5.msi"), my demo now reports 7.37ms rendering
> > time per frame. That's a 10x slow down.
>
> > Can anyone confirm if this slow down is happening on other Windows
> > machines (and other Pygame programs)? Or am I doing something really
> > stupid in my code that causes this?
>
> > You can download my little demo from:
> >http://code.google.com/p/game-game/source/browse/#svn/trunk/experimen...
>
> > You'll need the following files:
> > swsurface-linear.py
> > tile.png
> > ball.png
> > palette.png
>
> > When you run swsurface-linear.py, the window's title bar will look
> > something like this:
> > 640x480   Drawing: 7.37ms (67.6%)   Display: 91.7fps   Virtual:
> > 20.0fps
>
> > The "Drawing" is the average time per frame and the percentage is
> > computed as actual rendering time over total available time per frame
> > (about 10.9ms for 91.7fps).