1

I only get about 30 fps with games like a screen changing colors in pygame. If i set the window size to 1000x1000 it barely runs at 5 fps. Or the simplest pymunk example scripts (Balls falling down on some platform) at 20 fps. Im running these scripts in the pycharm IDE.

Is there any general way to run Python scripts with better performance or is the framerate limited by Python being an interpreter language. Can i somehow "compile" the script or dedicate more RAM or more cpu cores.

Thanks for answers.

PS.: I hope i didn't ask something which wasn't asked before. Yes i saw the thread about some pygame-program running on low FPS but i believe it was more about the code itself.

Hell stormer
  • 413
  • 1
  • 4
  • 14
  • Show code, system specs and resource usage etc. Might be a range of reasons. – meowgoesthedog Mar 12 '19 at 11:50
  • 4
    The framerate is limited by what you are doing. Since no code is appended no one can tell you, where the problem might be. But one thing some people are pointing out sometimes is: import psyco; psyco.full() – Richard Lenkiewicz Mar 12 '19 at 11:58
  • 1
    Simple procedural errors can cause big slowdowns. One of the common mistakes seen frequently in code posted to SO are things like: load the image every-time it's painted, re-compute constants every time, not using dirty areas (updating parts of the screen that don't need to be). – Kingsley Mar 12 '19 at 21:25

0 Answers0