LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-22-2010, 12:14 AM   #1
General
Member
 
Registered: Aug 2005
Distribution: Debian 7
Posts: 526

Rep: Reputation: 31
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?

Last edited by General; 03-22-2010 at 08:10 AM.
 
Old 03-22-2010, 03:39 PM   #2
CoderMan
Member
 
Registered: Jan 2009
Location: Gemini Capsule 25164
Distribution: Gentoo
Posts: 375
Blog Entries: 24

Rep: Reputation: 43
Quote:
Originally Posted by General View Post
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
 
Old 03-22-2010, 05:27 PM   #3
General
Member
 
Registered: Aug 2005
Distribution: Debian 7
Posts: 526

Original Poster
Rep: Reputation: 31
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?
 
Old 03-22-2010, 05:48 PM   #4
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
Python == Very, Very, Very slow.http://www.google.com/search?q=pytho...GLL_en___US368
 
Old 03-22-2010, 06:22 PM   #5
CoderMan
Member
 
Registered: Jan 2009
Location: Gemini Capsule 25164
Distribution: Gentoo
Posts: 375
Blog Entries: 24

Rep: Reputation: 43
Quote:
Originally Posted by General View Post
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
 
Old 03-23-2010, 04:06 AM   #6
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
My system feels inefficient in its use of CPU power Changes Linux - General 7 10-06-2009 10:49 PM
rsync - inefficient behaviour? Unclesmiff Linux - Software 4 01-02-2008 11:13 AM
Question for programmers/occasional programmers Robert Diggs Programming 9 12-23-2006 07:55 PM
pygame kierwind Linux - Software 5 05-21-2003 04:19 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration