LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Pygame slow or just programmers are inefficient? (https://www.linuxquestions.org/questions/programming-9/pygame-slow-or-just-programmers-are-inefficient-796973/)

General 03-22-2010 12:14 AM

Pygame slow or just programmers are inefficient?
 
Why are all of the Pygame games so slow? Even a simple platform-hopping game moves like a snail. Other enourmously more complicated games, not Python in origin, don't seem to have such a problem on the same hardware.

Is it that the programmers are (just like me), too inexperienced? Or can I just not expect to get good performance from Pygame?

CoderMan 03-22-2010 03:39 PM

Quote:

Originally Posted by General (Post 3907167)
Why are all of the Pygame games so slow? Even a simple platform-hopping game moves like a snail. Other enourmously more complicated games, not Python in origin, don't seem to have such a problem on the same hardware.

Is it that the programmers are (just like me), too inexperienced? Or can I just not expect to get good performance from Pygame?

Are you sure that Pygame is the problem here? I really enjoy a Pygame-based game called 20000 Light Years into Space, and I have never had seen any performance problems. Perhaps there are graphical/resource issues on the computer you are playing on.
http://indicium.us/cgi-bin/pages/get...ung-lightyears

Also, your profile says you are running Debian: how recent is your version of Pygame? As you can see, there has been something like three new releases in the last two years:

http://www.pygame.org/download.shtml

General 03-22-2010 05:27 PM

I never thought to check that. I'm running Debian 5 now, so I've got Pygame 1.7.1, from 2005. So old. If I download the lates version of Pygame, can it run with the Python that came with Debian 5 (Python 2.5.2-3), or do I need to upgrade Python and Pygame together?

smeezekitty 03-22-2010 05:48 PM

Python == Very, Very, Very slow.http://www.google.com/search?q=pytho...GLL_en___US368

CoderMan 03-22-2010 06:22 PM

Quote:

Originally Posted by General (Post 3908080)
I never thought to check that. I'm running Debian 5 now, so I've got Pygame 1.7.1, from 2005. So old. If I download the lates version of Pygame, can it run with the Python that came with Debian 5 (Python 2.5.2-3), or do I need to upgrade Python and Pygame together?

Python is not one of my stronger languages, but I don't see how that would be a problem. I think you would just have to make sure your module search path was getting to the new Pygame rather than the old one. From a quick google search:

http://linuxtopia.org/online_books/p...on_tut_47.html

Of course, I don't know how much having an old version of python affects performance, either.

I would continue to keep the graphical performance issue in the back of your mind as well. What kind of graphics card do you have? Are drivers properly installed? etc.

2.6.4

H_TeXMeX_H 03-23-2010 04:06 AM

It certainly can be slow, depends on the game. It's certainly slow compared to games written in C/C++. If they manage to use OpenGL and you have a good video card it will be just about as fast as C.


All times are GMT -5. The time now is 12:01 AM.