On 10 September 2012 23:25, Vojtěch Polášek <krec...@gmail.com> wrote:
> while running == True: > for event in pygame.event.get(): > if event.type == blahblahblah, #processing various events > blahblahblah, contiuing the code after events are analysed > > I am looking mainly for keyboard events. I notice a quite nonnegligible > lag when running this under Windows XP, when compared to the same code > on Ubuntu 12.04. > I do not have WinXP available, but if you want the best help from this board you should post the *exact* code that you are running. I don't think anyone has ever complained of code lasting a page or so (although any more and it becomes a bit of a chore :P). It does help. How are you sure that it is pygame.event.get() that is lagging? Have you tried """ while True: for e in pygame.event.get(): pass """* or even "while True: pygame.event.get()"*? If you have not, would it not be something else? How are you measuring the lag and what type is it (late signals? program freezes?)? *Obviously you need to add code that tells you whether it's on time, but I'm not sure how you're doing that currently. I'm not saying this to be harsh and if I could I would look further into the question, but I am trying to ask what I would probably need to know if I did have a Windows installation. Or it could be a known bug. Eh.
-- http://mail.python.org/mailman/listinfo/python-list