Python Forum
[PyGame] My program is very laggy
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyGame] My program is very laggy
#5
I made up two random images (I don't think it would matter what they look like, unless they're massive), and didn't notice any lag at all.  Unrelated, but is there a reason you're using pygame.display.update() instead of pygame.display.flip()?

Scaling the images could be a major time sink.  I'd try either a) lower resolution images, and b) a different format such as jpg.

I ran it through the profiler, and got the following output:
Reply


Messages In This Thread
My program is very laggy - by GamePlanet - Aug-13-2017, 09:32 AM
RE: My program is very laggy - by Larz60+ - Aug-13-2017, 10:25 AM
RE: My program is very laggy - by GamePlanet - Aug-13-2017, 11:46 AM
RE: My program is very laggy - by Larz60+ - Aug-13-2017, 03:45 PM
RE: My program is very laggy - by nilamo - Aug-13-2017, 05:01 PM
RE: My program is very laggy - by GamePlanet - Aug-15-2017, 02:16 PM
RE: My program is very laggy - by nilamo - Aug-15-2017, 03:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Laggy Game Movement game_slayer_99 12 4,651 Oct-05-2022, 11:34 AM
Last Post: metulburr
  [PyGame] sound effect delay and program laggy xBlackHeartx 26 13,289 Oct-09-2019, 11:36 AM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020