Re: [pygame] Time to load font with pygame.font.SysFont on Mac
If I remember correctly, there's a external call to fc-list that is very slow. At one time, I intended to improve this situation by removing the fc-list dependency on Mac and Linux and instead collecting only the needed font data by using freetype and/or Mike C. Fletcher's TTFQuery, but I got too busy. Jason On Sun, Apr 4, 2021, 4:36 PM Irv Kalb wrote: > [I apologize if this is a duplicate, but I haven't seen this message show > up on the list.] > > > I have tracked down a huge slowdown on loading fonts with > pygame.font.SysFont > > Mac OSX 11.2.3 > Python 3.9.1 > Pygame 2.0.1 > > If I load a font like the system font using None with a call to > pygame.font.font, it happens almost immediately. > > But if I load a font by name using pygame.font.SysFont, it's taking over 7 > seconds on my Mac to load. It doesn't seem to matter which font I try to > use. > > Sample program: > > import sys > import pygame > import time > > pygame.init() > screen = pygame.display.set_mode((400, 400)) > clock = pygame.time.Clock() > > now = time.time() > font1 = pygame.font.Font(None, 24) > print('Loading System font took', time.time() - now) > > now = time.time() > font2 = pygame.font.SysFont('Arial', 24) > print('Loading Arial font took', time.time() - now) > > while True: >for event in pygame.event.get(): >if event.type == pygame.QUIT: >pygame.quit() >sys.exit() > >screen.fill((255, 255, 255)) > >pygame.display.flip() >clock.tick(30) > > > Output: > pygame 2.0.1 (SDL 2.0.14, Python 3.9.1) > Hello from the pygame community. https://www.pygame.org/contribute.html > Loading System font took 0.0006210803985595703 > Loading Arial font took 7.058471202850342 > > > (I don't have a setup to test this on Windows.) > > This seems like a rather excessive amount of time as it slows down that > start up of many of my programs. > > It seems to be related to how long it takes to get the list of fonts. If > I add this before the call to SysFont: > > now = time.time() > fontList = pygame.font.get_fonts() > print('Getting fonts took', time.time() - now) > > I get: > > Loading System font took 0.0006549358367919922 > Getting fonts took 7.013390064239502 > Loading Arial font took 0.0004830360412597656 > > > Anyone else seeing this? > > Can someone tell me how to send in a bug report for this? > > Thanks, > > Irv > > > > >
Re: [pygame] Why does Rect and Surface have copy method when copy exist in std-lib?
In the C code, rect.copy and surface.copy are equivalent to rect.__copy__ and surface.__copy__. You may use copy.copy(rect) and copy.copy(surface) in your code, but copy.copy will simply call rect.__copy__ or surface.__copy__. By using rect.copy and surface.copy rather than the standard library's copy.copy, your code will run ≈0.0001% faster. For aesthetic reasons, you would use rect.copy and surface.copy rather than rect.__copy__ and surface.__copy__ in your code. Jason On Mon, May 29, 2017 at 3:38 PM, Victor Blomqvist <v...@viblo.se> wrote: > Hello, > > Something I have been thinking about: > Rect and Surface classes have their own copy methods. Why do they have that > when there is a module called copy in the standard lib that can handle copy > (with help)? The rect copy method was added in pygame 1.9 so it is fairly > recent. > > http://pygame.org/docs/ref/rect.html#pygame.Rect.copy > https://docs.python.org/2/library/copy.html > > Thanks for any insights! > /Victor
Re: [pygame] NO MOVIE module in Pygame??
I think that updating the python-VLC code is more likely to work with pygame than using pyglet (AVbin). http://stackoverflow.com/questions/19748648/attempting-to-embed-a-video-in-pygame-using-pyglet On Fri, Apr 7, 2017 at 11:33 PM, DiliupG <dili...@gmail.com> wrote: > what about using some other python library like pyglet only for this > purpose? > > On 8 April 2017 at 09:24, Jason Marshall <jasonmarshall...@gmail.com> wrote: >> >> Diliup, >> >> Well, there's pygame 1.9.1. >> >> Two years ago, I tried to play a video in pygame using a script called >> pygame-vlc.py, but I was not successful. (I guess that modern versions of >> VLC have a different interface from the one that pygame-vlc.py was designed >> to use. I don't really know though.) >> https://gist.github.com/smathot/1521059 >> >> Jason >> >> On Apr 7, 2017 12:36 PM, "DiliupG" <dili...@gmail.com> wrote: >>> >>> Hi Jason! >>> Good to hear from you! :) >>> I realized that the module has been removed But hoped that some miracle ( >>> by your guys) can bring it or similar back. What options available to use >>> movies in Pygame? >>> >>> >>> >>> >>> >>> On 7 April 2017 at 03:45, Jason Marshall <jasonmarshall...@gmail.com> >>> wrote: >>>> >>>> Diliup, >>>> >>>> Yes, pygame.movie was removed because it caused more trouble than it's >>>> worth. >>>> >>>> More info: >>>> >>>> https://bitbucket.org/pygame/pygame/issues/238/no-module-named-pygamemovie >>>> >>>> Jason >>>> >>>> On Thu, Apr 6, 2017 at 2:41 PM, DiliupG <dili...@gmail.com> wrote: >>>>> >>>>> Has the Movie module been removed from Pygame? I get this error. >>>>> >>>>> NotImplementedError: movie module not available >>>>> (ImportError: No module named movie) >>>>> >>>>> -- >>>>> Kalasuri Diliup Gabadamudalige >>>>> >>>>> https://dahamgatalu.wordpress.com/ >>>>> http://soft.diliupg.com/ >>>>> http://www.diliupg.com >>>>> >>>>> >>>>> ** >>>>> This e-mail is confidential. It may also be legally privileged. If you >>>>> are not the intended recipient or have received it in error, please delete >>>>> it and all copies from your system and notify the sender immediately by >>>>> return e-mail. Any unauthorized reading, reproducing, printing or further >>>>> dissemination of this e-mail or its contents is strictly prohibited and >>>>> may >>>>> be unlawful. Internet communications cannot be guaranteed to be timely, >>>>> secure, error or virus-free. The sender does not accept liability for any >>>>> errors or omissions. >>>>> >>>>> ** >>>>> >>>> >>> >>> >>> >>> -- >>> Kalasuri Diliup Gabadamudalige >>> >>> https://dahamgatalu.wordpress.com/ >>> http://soft.diliupg.com/ >>> http://www.diliupg.com >>> >>> >>> ** >>> This e-mail is confidential. It may also be legally privileged. If you >>> are not the intended recipient or have received it in error, please delete >>> it and all copies from your system and notify the sender immediately by >>> return e-mail. Any unauthorized reading, reproducing, printing or further >>> dissemination of this e-mail or its contents is strictly prohibited and may >>> be unlawful. Internet communications cannot be guaranteed to be timely, >>> secure, error or virus-free. The sender does not accept liability for any >>> errors or omissions. >>> >>> ** >>> > > > > -- > Kalasuri Diliup Gabadamudalige > > https://dahamgatalu.wordpress.com/ > http://soft.diliupg.com/ > http://www.diliupg.com > > ** > This e-mail is confidential. It may also be legally privileged. If you are > not the intended recipient or have received it in error, please delete it > and all copies from your system and notify the sender immediately by return > e-mail. Any unauthorized reading, reproducing, printing or further > dissemination of this e-mail or its contents is strictly prohibited and may > be unlawful. Internet communications cannot be guaranteed to be timely, > secure, error or virus-free. The sender does not accept liability for any > errors or omissions. > ** >
Re: [pygame] NO MOVIE module in Pygame??
Diliup, Well, there's pygame 1.9.1. Two years ago, I tried to play a video in pygame using a script called pygame-vlc.py, but I was not successful. (I guess that modern versions of VLC have a different interface from the one that pygame-vlc.py was designed to use. I don't really know though.) https://gist.github.com/smathot/1521059 Jason On Apr 7, 2017 12:36 PM, "DiliupG" <dili...@gmail.com> wrote: > Hi Jason! > Good to hear from you! :) > I realized that the module has been removed But hoped that some miracle ( > by your guys) can bring it or similar back. What options available to use > movies in Pygame? > > > > > > On 7 April 2017 at 03:45, Jason Marshall <jasonmarshall...@gmail.com> > wrote: > >> Diliup, >> >> Yes, pygame.movie was removed because it caused more trouble than it's >> worth. >> >> More info: >> https://bitbucket.org/pygame/pygame/issues/238/no-module-nam >> ed-pygamemovie >> >> Jason >> >> On Thu, Apr 6, 2017 at 2:41 PM, DiliupG <dili...@gmail.com> wrote: >> >>> Has the Movie module been removed from Pygame? I get this error. >>> >>> NotImplementedError: movie module not available >>> (ImportError: No module named movie) >>> >>> -- >>> Kalasuri Diliup Gabadamudalige >>> >>> https://dahamgatalu.wordpress.com/ >>> http://soft.diliupg.com/ >>> http://www.diliupg.com >>> >>> >>> ** >>> This e-mail is confidential. It may also be legally privileged. If you >>> are not the intended recipient or have received it in error, please delete >>> it and all copies from your system and notify the sender immediately by >>> return e-mail. Any unauthorized reading, reproducing, printing or further >>> dissemination of this e-mail or its contents is strictly prohibited and may >>> be unlawful. Internet communications cannot be guaranteed to be timely, >>> secure, error or virus-free. The sender does not accept liability for any >>> errors or omissions. >>> >>> ** >>> >>> >> > > > -- > Kalasuri Diliup Gabadamudalige > > https://dahamgatalu.wordpress.com/ > http://soft.diliupg.com/ > http://www.diliupg.com > > > ** > This e-mail is confidential. It may also be legally privileged. If you are > not the intended recipient or have received it in error, please delete it > and all copies from your system and notify the sender immediately by return > e-mail. Any unauthorized reading, reproducing, printing or further > dissemination of this e-mail or its contents is strictly prohibited and may > be unlawful. Internet communications cannot be guaranteed to be timely, > secure, error or virus-free. The sender does not accept liability for any > errors or omissions. > > ** > >
Re: [pygame] NO MOVIE module in Pygame??
Diliup, Yes, pygame.movie was removed because it caused more trouble than it's worth. More info: https://bitbucket.org/pygame/pygame/issues/238/no-module-named-pygamemovie Jason On Thu, Apr 6, 2017 at 2:41 PM, DiliupG <dili...@gmail.com> wrote: > Has the Movie module been removed from Pygame? I get this error. > > NotImplementedError: movie module not available > (ImportError: No module named movie) > > -- > Kalasuri Diliup Gabadamudalige > > https://dahamgatalu.wordpress.com/ > http://soft.diliupg.com/ > http://www.diliupg.com > > > ** > This e-mail is confidential. It may also be legally privileged. If you are > not the intended recipient or have received it in error, please delete it > and all copies from your system and notify the sender immediately by return > e-mail. Any unauthorized reading, reproducing, printing or further > dissemination of this e-mail or its contents is strictly prohibited and may > be unlawful. Internet communications cannot be guaranteed to be timely, > secure, error or virus-free. The sender does not accept liability for any > errors or omissions. > > ** > >
Re: [pygame] Dirty rect overlapping optimizations
I agree with Leif. I have now used Cython to compile and test my optimize_dirty_rects script (along with the bisect standard library module it uses). The disappointing result was that my test suite ran a little bit slower than it did using pure Python. Maybe there would've been some performance improvement if I had reduced overhead by using structs and C++ standard library containers instead of Rect objects and Python lists & dicts, but I don't know how to do that. (I also found that psyco on 32-bit Python 2.7 helps performance a little bit, but not enough to make optimize_dirty_rects have a positive overall effect on performance.) So, for the kind of programs I make with pygame, I've determined that it's faster to just update one big rectangular area that covers all of the blits. Maybe someone else could contrive a better optimization algorithm and implement it in C to minimize overhead, but I don't think I'll be able to do that. Jason On Mar 28, 2017 9:21 AM, "Leif Theden" <leif.the...@gmail.com> wrote: In my experience, I've found it is better to optimize the game as if the whole screen was being updated at the same time. The effect being, I never bother with dirty updates. It seems that many games will have moments of brief full or near full screen updates, and time spent optimizing the screen updates is effectively wasted. On Tue, Mar 28, 2017 at 7:19 AM, Jason Marshall <jasonmarshall...@gmail.com> wrote: > I tested the effect of my optimize_dirty_rects script that René mentioned, > and I found that the time spent in my optimization algorithm exceeded the > time saved by blitting fewer pixels. :-( I've thought about reimplementing > it in Cython to see if that would make the algorithm run fast enough that > its overall effect is to save time, but I haven't gotten around to doing > that. > > Jason > > > On Mar 26, 2017 2:50 PM, "René Dudfield" <ren...@gmail.com> wrote: > > Because rectangles can overlap, it's possible to reduce the amount drawing > done when using them for dirty rect updating. If there's two rectangles > overlapping, then we don't need to over draw the overlapping area twice. > Normally the dirty rect update algorithm used just makes a bigger rectangle > which contains two of the smaller rectangles. But that's not optimal. > > But, as with all over draw algorithms, can it be done fast enough to be > worth it? > > Here's an article on the topic: > http://gandraxa.com/detect_overlapping_subrectangles.xml > > jmm0 made some code here: > https://bitbucket.org/jmm0/optimize_dirty_rects/src/c2affd54 > 50b57fc142c919de10e530e367306222/optimize_dirty_rects.py?at= > default=file-view-default > > DR0ID, also did some with tests and faster code... > https://bitbucket.org/dr0id/pyweek-games/src/1a9943ebadc6e21 > 02db0457d17ca3e6025f6ca60/pyweek19-2014-10/practice/dirtyrects/?at=default > > > So far DR0ID says it's not really fast enough to be worth it. However, > there are opportunities to improve it. Perhaps a more optimal algorithm, or > one which uses C or Cython. > > "worst case szenario with 2000 rects it takes ~0.3126376 seconds" > If it's 20x faster in C, then that gets down to 0.01. Still too slow > perhaps. > > > It's not an embarrassingly parallel problem... I think. But I haven't > thought on it much at all. Maybe there is a use for multi core here. > > > Anyone done any other work like this? Or know of some good algos for this? > > > > cheers, > > >
Re: [pygame] Dirty rect overlapping optimizations
I tested the effect of my optimize_dirty_rects script that René mentioned, and I found that the time spent in my optimization algorithm exceeded the time saved by blitting fewer pixels. :-( I've thought about reimplementing it in Cython to see if that would make the algorithm run fast enough that its overall effect is to save time, but I haven't gotten around to doing that. Jason On Mar 26, 2017 2:50 PM, "René Dudfield" <ren...@gmail.com> wrote: Because rectangles can overlap, it's possible to reduce the amount drawing done when using them for dirty rect updating. If there's two rectangles overlapping, then we don't need to over draw the overlapping area twice. Normally the dirty rect update algorithm used just makes a bigger rectangle which contains two of the smaller rectangles. But that's not optimal. But, as with all over draw algorithms, can it be done fast enough to be worth it? Here's an article on the topic: http://gandraxa.com/detect_overlapping_subrectangles.xml jmm0 made some code here: https://bitbucket.org/jmm0/optimize_dirty_rects/src/ c2affd5450b57fc142c919de10e530e367306222/optimize_dirty_rects.py?at=default& fileviewer=file-view-default DR0ID, also did some with tests and faster code... https://bitbucket.org/dr0id/pyweek-games/src/1a9943ebadc6e2102db0457d17ca3e 6025f6ca60/pyweek19-2014-10/practice/dirtyrects/?at=default So far DR0ID says it's not really fast enough to be worth it. However, there are opportunities to improve it. Perhaps a more optimal algorithm, or one which uses C or Cython. "worst case szenario with 2000 rects it takes ~0.3126376 seconds" If it's 20x faster in C, then that gets down to 0.01. Still too slow perhaps. It's not an embarrassingly parallel problem... I think. But I haven't thought on it much at all. Maybe there is a use for multi core here. Anyone done any other work like this? Or know of some good algos for this? cheers,
Re: [pygame] display.set_mode opens oversized window.
See issue 245 on BitBucket. Jason Sent from Yahoo Mail on Android From:Estevo euccas...@gmail.com Date:Sun, Aug 2, 2015 at 10:04 PM Subject:Re: [pygame] display.set_mode opens oversized window. That was it, thanks! It was set to 150% (so I had eyeballed it alright :)), and setting it to 100% fixes it. Now, this seems like a problem for releasing software. Do I need to tell all the people who use my game to go check their DPI setting? Is there no way to programmatically account for this and make it just work? On Mon, Aug 3, 2015 at 3:45 AM, mspaintmaes...@gmail.com mspaintmaes...@gmail.com wrote: What's your system DPI setting? On Sun, Aug 2, 2015 at 6:43 PM, Estevo euccas...@gmail.com wrote: When I call pygame.display.set_mode the resulting window is about 150% the requested size. That's true whether I ask for FULLSCREEN or not. When I do ask for fullscreen, the window is too big (and thus I only get to see the upper left part) whether I explicitly set the screen size to that of my laptop's monitor (1920x1080) or use (0,0) for auto detection. HWSURFACE and bit depth doesn't seem to matter at all in this respect. Either calling get_size on the return value of set_mode or calling pygame.display.Info claims that the window is indeed 1920x1080. Has anyone heard about this problem? My laptop is a Toshiba Satellite P50-B-10V. It has two graphics cards: one Intel HD Graphics 4600, which it uses by default, and one AMD Radeon R9 M265X, which IIUC only gets used when I plug in an external monitor. I'm using pygame-1.9.1-win32-py2.7, Python 2.7 on Windows 8.1. Thanks in advance! Estevo.
Re: [pygame] What's next for Pygame project?
René, What aspects of being the lead developer website maintainer give you enjoyment and pride?And which parts of your roles are a bore or a nuisance to you? I want to help you to find the job in the pygame community that gives you the most satisfaction and maximizes the impact of your talents. I do not want people to have unrealistic expectations of you though, and I want to maximize the impact of others' talents too. Thanks, Jason On Monday, July 13, 2015 8:02 AM, René Dudfield ren...@gmail.com wrote: Hi, a few notes: - I have dropped the ball, but would like to finish the new website and get 1.9.2 out the door. - pygame_sdl2 seems the best choice going forward. For backward compat reasons, platform support, and C/asm code is needed. Many things have been put into SDL and related libs already, and this is a good way to go to share with other SDL projects. - seul.org has only been used for the mailing list for a number of years (7 years maybe?). - there are many other considerations which the new website addresses. Reddit integration, and bitbucket is done. Also, fun is important, as is integration with youtube and other ways of sharing work (like playing music can be done on the new website too). - I have done some thinking with Tom about how to do a migration with pygame_sdl2 to the pygame infrastructure. - nothing has stopped contributors for 1.9.2 being released. Many people have admin access to the bitbucket repo, and there has been some work been done. - ... more to come. best, On Mon, Jul 13, 2015 at 6:10 AM, Peter Shinners p...@shinners.org wrote: Yes! I'm motivated to make some changes sooner than later. If we really need to we can do some amount of reverting. I think it's time to move off of the seul.org hosting Pygame has had since day 1. This was such a great choice back in 2004. But nowadays there's many options beyond sourceforge! As soon as we switch the DNS the pygame mailing list may be inaccessible. I think the following things should be in order before switching. 1. New website with some amount of placeholders or redirects to the popular pages of the current site. 2. New forum or mailing option. 3. Get documentation on readthedocs.org? On 07/12/2015 05:05 PM, Jason Marshall wrote: René Dudfield, pygame's lead developer, has contributed significant Python, C and assembly code to pygame and has generously hosted the pygame.org website for years. We all should be thankful for that. However, René has not been active on this mailing list for almost 3 months. I guess that René has new priorities that have overtaken his interest in pygame, so I think that he should pass his leadership role to a new leader or leadership committee. (I'd prefer a leadership committee so that pygame's development would not be so susceptible to stalling if one person's priorities change.) I have opinions on what the website's features should be and what pygame2 should be, but I don't think that we're ready to discuss those topics yet. We need active leadership first. To me, the pygame leader is the person (or people) in control of the official pygame.org website. Fortunately, Pete Shinners is the person who keeps the pygame.org name registered, so, even if René remains inactive, it would be technically possible Pete to redirect the pygame.org name to a new official website that would be under different leadership. So here's the question for Pete: Pete, if René remains uninvolved, would you be willing to point pygame.org at a new website? Jason PS. Sorry about the coup d'état suggestion, René. On Friday, July 10, 2015 10:05 PM, Peter Shinners p...@shinners.org wrote: I haven't been paying close attention to Pygame, but it doesn't seem controversial to say things have stalled. I haven't gotten much feedback from Rene, but I'd like to give him time to put something together. Some of the main things that may need help are: * Getting 1.9.2 actually released * Moving on to Pygame 2, whatever that means * Catch up on the Bitbucket pull requests * Website replacement and love * Migrate forum to Reddit (or community forum) It seems there are still many great people involved with the Pygame project. Perhaps I can help by getting those people the control they need to make progress. I'm completely detached from things at this point, so I don't have any context to jump in and try to change anything. What parts of the project are going well these days?
Re: [pygame] What's next for Pygame project?
In 2009, there was a prototype of a redesign of the pygame website. It was written in Python (Django) instead of PHP (SiteSwing). The redesign was not adopted and the people who had worked it lost interest in volunteering and left the pygame community. http://article.gmane.org/gmane.comp.python.pygame/24070/ The code for this redesign still exists at https://code.google.com/p/pygame/downloads/detail?name=pygweb1.0.tar.gzcan=2q= Jason Sent from Yahoo Mail on Android From:Daniel Foerster pydsig...@gmail.com Date:Mon, Jul 13, 2015 at 4:03 PM Subject:Re: [pygame] What's next for Pygame project? On 07/12/2015 10:05 AM, Paul Vincent Craven wrote: I don't think a Pygame website needs to be build on Python. I've got the pygame.info domain and I think a Wordpress site that has several verified contributers would be the way to go. Share the 'love' and efforts across several people. It isn't a requirement. However, I'm a full-stack developer who uses Python so that's what would make sense for me. Not a big fan of Wordpress to be honest.
[pygame] Who wants to help update the credits in the readme?
Everybody / anybody, This readme is outdated: https://bitbucket.org/pygame/pygame/src/default/readme.rst Right now, the readme credits approximately 50 people with reporting or patching bugs. This list of contributors has not been updated in years. For the pygame 1.9.2 release, I would like to update the list of bug reporters patchers and also give credit to people who have cleaned up wiki spam. I created a Google Sheet to gather the names of the recent contributors and track which issues wiki pages have been checked for contributors' names. If you would like to help me in this effort, then send me your Google account address, and I will share the sheet with you. Thanks, Jason
Re: [pygame] create account on pygame.org
Welcome to the pygame mailing list! I am sending you the secret URL that I have. Thanks, Jason Sent from Yahoo Mail on Android From:Gino Ingras ginoing...@gmail.com Date:Sun, Feb 15, 2015 at 7:22 AM Subject:[pygame] create account on pygame.org would like an admin please, mail me to setup an account on pygame.org. my project: http://sourceforge.net/projects/pybreak360/ thanks,
Re: [pygame] create account on pygame.org
Ted, I'll send you the secret URL that I have. Let me know if it works for you. Good luck, Jason Sent from Yahoo Mail on Android From:Ted Hunt ted.h...@clear.net.nz Date:Sun, Feb 15, 2015 at 7:11 PM Subject:Re: [pygame] create account on pygame.org Hi Jason, I've been trying to get registered on pygame.org for months. Can you please send me the secret URL. Cheers, Ted. On 16/02/2015 4:45 a.m., Jason Marshall wrote: Welcome to the pygame mailing list! I am sending you the secret URL that I have. Thanks, Jason Sent from Yahoo Mail on Android From:Gino Ingras ginoing...@gmail.com Date:Sun, Feb 15, 2015 at 7:22 AM Subject:[pygame] create account on pygame.org would like an admin please, mail me to setup an account on pygame.org. my project: http://sourceforge.net/projects/pybreak360/ thanks,  This email is free from viruses and malware because avast! Antivirus protection is active.
[pygame] Repo's multiple heads problem is my fault. Sorry.
Yesterday, I pushed an updated compat.py to the BitBucket repository. It looks like the changes weren't merged how I expected because I see a multiple heads notice when I look at __init__.py on BitBucket. I'll straighten out my mistake as soon as possible (probably tomorrow). More detail: I use Subversion at work without problems, but Mercurial confuses and frustrates me. I'm trying a new tool, PyCharm with its Mercurial integration. Using PyCharm, I committed compat.py to my local repo and then tried to push the change to BitBucket. I got an error that directed me to pull merge first. I tried to figure out how to do that, but I failed. So then I tried the force push option, and that appeared to have worked, except that it appears to have caused this multiple heads problem in the BitBucket repo. Sorry, Jason
Re: [pygame] Pygame non-MPEG1 video options?
ffmpeg is a good tool for converting to MPEG1. Questions: What is your operating system?What version of pygame are you using? What computer hardware are you using (CPU and GPU)? According to pygame.display.get_driver(), what video driver is being used?Are you running full-screen or windowed? What is the resolution of the video?Are you loading the video file from your hard drive or from a network location? Jason From: Brian Madden br...@missionpinball.com To: pygame-users@seul.org Sent: Friday, February 13, 2015 11:59 AM Subject: Re: [pygame] Pygame non-MPEG1 video options? Oh man that would be awesome! Unfortunately Pygame can't do that (unless I'm missing something)... Anyone else? On Fri, Feb 13, 2015 at 9:45 AM, Charles Cossé cco...@gmail.com wrote: Hi Brian, Don't know if possible, but if i were you i'd investigate embedding your videos. Is there any html support in pygame? I don't know, personally, but if yes then that's the way i'd suggest ... good luck, Charles On Fri, Feb 13, 2015 at 10:41 AM, Brian Madden br...@missionpinball.com wrote: Hi Everyone, I have a Python app that's pretty much ready to go. Problem is that we need to be able to play videos. To be honest I never really looked too deep into Pygame's video support. I knew from the docs that it had to be MPEG-1 and that if you wanted audio then it had to have exclusive control of Pygame.media, so I kind of thought, Ok, that's fine, I'll deal with all that later. So now it's later and I'm dealing with it. :) Problem is that we cannot get videos converted to MPEG-1 in a way that works reliably. We've gone through all the posts on this list and read a lot. Sometimes the videos play, sometimes not, sometimes we get SDL errors, sometimes we get garbage on the screen.. It's really kind of a mess. So I've started looking into options for non-MPEG1 videos and I wonder if anyone has successfully done anything? I found a blog post where a guy wrote a simple app that uses Pyglet to play the video and then for each frame it converts the Pyglet video frame to a Pyglet texture (kind of like Pyglet's version of a Surface), converts the pixels to a ctype, converts the ctype to the format Pygame can use, converts it to an image, then blits it to the Pygame window surface. That technically works but it's far too slow.. for hi-def videos we're only getting about 10fps. So I wonder if there are any other alternatives? Like can we install SDL2 and use PySDL2 to play the video and somehow convert that to a Pygame surface? (I have no idea if surfaces between SDL1.2 and SDL2 are compatible, or if so if it would be possible to get them into Pygame.) Or are there any other crazy ideas? To be honest if we can't figure this out then I think we're going to have to go with something other than Pygame, which would be a lot of work, but I don't know of any other alternatives? Unfortunately I don't know C or C++ so I'm afraid I'm not much help in terms of contributing to Pygame. Has anyone successfully taken a Python project based on Pygame and converted it to PySDL2? From what I've read it seems like there are many similarities since they're both SDL, but I don't know how much other work Pygame is doing, and whether if I recreated any of that in Python it will be fast enough? Anyway, sorry I'm a bit all over the place. I wonder if anyone has any thoughts to share? Thanks, Brian -- Brian Madden Mission Pinball (blog | twitter | MPF software framework | sample games) -- Brian Madden Mission Pinball (blog | twitter | MPF software framework | sample games)
Re: [pygame] registration
Only René Dudfield can register a new user. To request a new account, send a message directly to René's address, which you can get by evaluating this Python expression: __import__('codecs').decode('erarfq\x40tznvy\x2Epbz','rot_13') René may or may not notice your request because he's drowning in mail.https://twitter.com/renedudfield/status/543637671755915264 (I have full access to the News feed and any project's data, but I cannot register or delete users.) Jason From: bw stabbingfin...@gmail.com To: pygame-users@seul.org Sent: Friday, February 6, 2015 9:53 AM Subject: Re: [pygame] registration Howdy, folks, The pygame.org site maintainers read this list. They will hook you up with web site accounts when they see your request here. Have patience, it may take more than a day. It is this way because auto-registration enabled an amount of commercial spam on the web site that was impossible to prevent, and damaged the editable content. Can't blame 'em. It was difficult to police, and nobody wants that chore. :) In the meantime please visit IRC #pygame. It's vibrant in spurts. But again, have patience, because people have lives. They will eventually see your messages, so if you stick around you will get to meet some members of the community. This mailing list, the web site, and IRC each fill a niche. Between them we have a pretty cozy community. Gumm On 2/5/2015 11:48 PM, cco...@gmail.com wrote: Hey, I agree ... it's a shame that the community isn't as vibrant as it could be. I noticed in both your emails that pygame-users@seul.org is listed as additional recipients. That's interesting ... SEUL stands for Simple End User Linux ... I just messaged a friend of mine who is involved with that ... maybe he's even the guy, but I doubt, else I would have know that by now ... unfortunately he just got into a motorcycle accident in Bangkok, but it's daytime there and he's probably going to respond shortly ... so I'll try to help from that angle ... I've never had anything to do with pygame admin, but I also have a pending question on this list asking if it's okay to put a certain project on pygame as it's not using pygame at all, apps are in javascript ... but apps have evolved from pygame original impls ... I googled pygame seul and there are IRC channels ... maybe try those ... I can't right now ... but here's the channel: #seul at irc.seul.org I'm interested in seeing a more active/engaged/vibrant community for sure. Cheers, Charles On Friday, February 6, 2015 at 12:36:57 AM UTC-7, Michael Lutynski wrote: Hello! I wish I could help you! In fact, I wish our community could grow instead of turn away people who want to participate. So who is in charge of the pygame.org site? Are they here on this list? I know there was a new beta version of the site, but was its horizontal scrolling on the home page an issue for its not being adopted? Who is in charge of the site?? And what would it take to have a vibrant community that pygame deserves? ~ Michael On Fri : Feb 6, 2015 12:03:06 AM you wrote: Hi, I would like to register to pygame.org but it was disabled, can someone sign me up please? Cheers:)
Re: [pygame] Announcing SplatGL
I have added the announcement to the News section on pygame.org. Thanks, Michael. Jason On Wed, Oct 29, 2014 at 9:44 PM, Michael Dale Long ml...@digitalbytes.net wrote: Hello, This is more PySDL2 related news than it is PyGame related, but this list seems to be the best place to post it. I've created a simple OpenGL/SDL2-based render library called SplatGL. SplatGL is written in C, and also provides Python bindings, which rely on marcusva's PySDL2 bindings. It is still early in development, however it is already usable for the basic needs of sprite and tile-based games. I have made it available on Github under the zlib license. I'm looking for early adopters to try it out and provide feedback and contributions to the project. You can find more information here: Announcement: http://digitalbytes.net/announcing-splatgl/ Github repository: http://github.com/nikarul/splatgl/ -Michael
Re: [pygame] TMX support in pygame
• I think 2.7+ is fine at this point, but it's usually easy to port to 2.4/2.6+. I would like more clarity. René, would you start a new thread to declare what pygame 1.9.2 will and will not support please? I think pygame 1.9.2 should support Python 2.7 and 3.2+. (According to python.org, Python 2.6 and 3.1 have been retired.) Thanks, Jason From: René Dudfield ren...@gmail.com To: pygame-users@seul.org pygame-users@seul.org Sent: Wednesday, September 24, 2014 4:59 AM Subject: Re: [pygame] TMX support in pygame Hello, Very cool. This has been something many people have asked for before :) * Do you know of any other games or examples that are using them? We'll need at least one example to include with pygame, and it would be nice if other people can try out the API and give feedback. * I think 2.7+ is fine at this point, but it's usually easy to port to 2.4/2.6+. * We'll need to figure out where internal parts like Quadtree go. Do we keep them private or make them publicly available? * For testing, it would be good if at least every method is tested. 100% coverage tested is not necessary but nice. * There needs to be documentation for every public method. * The other documentation that would be good is a tutorial in how to use it.Maybe we could organise a mini sprint to discuss things? Otherwise we can go over each part on the mailing list. I'll be at this game jam thing on Saturday doing pygame things, and perhaps we can meet then on irc to discuss? If you want to do this, then I could work on a little game using your libraries to get a feel for them then too. http://www.berlinminijam.de/2014/09/next-game-jam-announcement-september.html It's probably a good idea to discuss the API, and get feedback with a few people on how it could be made more usable before we go ahead and write lots of documentation/tests/etc for it. Of course, pygame hasn't done a release for a while. So you may want to take that into consideration before embarking on all this work. cu. On Fri, Sep 19, 2014 at 6:10 PM, Leif Theden leif.the...@gmail.com wrote: Any specific reason for targeting python 2.4?... It's ten years old. Currently, it is tested again 2.7 and 3.3, but I can't think of any reasons why 2.6 wouldn't work. As for 2.4, there might be some issues with the generator syntax. Its been a long time since I've used 2.4. On Fri, Sep 19, 2014 at 6:06 AM, Jason Marshall j...@yahoo.com wrote: How difficult would it be to make the code compatible with Python 2.4+? Jason From: Jason Marshall j...@yahoo.com; To: pygame-users@seul.org pygame-users@seul.org; Subject: Re: [pygame] TMX support in pygame Sent: Thu, Sep 18, 2014 11:48:26 AM I haven't used your tools myself, but if they really work well and have a tutorial and good documentation, then I'm in favor of adding them. Batteries included! Thanks, Jason From: Leif Theden leif.the...@gmail.com To: pygame-users@seul.org Sent: Monday, September 15, 2014 11:51 AM Subject: [pygame] TMX support in pygame Hello everyone! I'm a long time user of pygame and active member of #pygame under the handle bitcraft. I help many people who stumble into the channel to build their first game in pygame. I've also released and maintain a couple small libraries PyTMX and Pyscroll to help new users develop using the Tiled Map Editor. https://github.com/bitcraft/PyTMX https://github.com/bitcraft/pyscroll The Tiled Map Editor is widely known in the indie game community and many popular game development ecosystems include out-of-the-box support for it, including pyglet, cocos2d-x, allegro5, libgdx, and many others. I am confident that PyGame will benefit from a TMX loader that it is integrated into the core and documented on pygame.org. As maintainer of PyTMX and pyscroll, I would like to nominate these projects to be integrated into the pygame core. They both support python 2.7 and 3.3+ and I have tried to make them feel like native pygame libraries; and they even work well with the spite/group concept. The only library that it depends on outside of the python standard lib is the six module. There are of other loaders available as well, and I will list them as well for the consideration of the pygame core developers. My apologies if I have overlooked another tiled TMX map format project. http://www.pygame.org/project/1158/ http://pytmxlib.readthedocs.org/en/v0.1.0/ https://bitbucket.org/r1chardj0n3s/pygame-tutorial/src/a383dd24790d/tmx.py https://github.com/renfredxh/tmx Thank you everyone and I look forward to hearing your comments.
Re: [pygame] Multiple sound cards
Sorry, no.
Re: [pygame] TMX support in pygame
How difficult would it be to make the code compatible with Python 2.4+? Jason
[pygame] How to make your own local working copy of pygame.org
To download all of the resources on pygame.org so that you can use them when you're offline, you can use wget. Here's the command to use at the command line: wget -mpck --user-agent= -e robots=off --wait 30 --random-wait http://www.pygame.org/old/ Let it run for a day. It'll download 1.4GB of data. wget is included with Linux distributions. wget can be built with Xcode on OS X: Install wget in Mac OS X Without Homebrew or MacPorts | OSXDaily wget for Windows: http://eternallybored.org/misc/wget/wget-1.15-win32.zip
Re: [pygame] TMX support in pygame
http://article.gmane.org/gmane.comp.python.pygame/20577/ A long time ago, I asked which Python version should be the minimum that we support, and René said Python 2.4. What do you think should be the oldest supported version now? I would be comfortable with Python 2.6. Jason From: Leif Theden leif.the...@gmail.com To: pygame-users@seul.org Sent: Friday, September 19, 2014 11:10 AM Subject: Re: [pygame] TMX support in pygame Any specific reason for targeting python 2.4?... It's ten years old. Currently, it is tested again 2.7 and 3.3, but I can't think of any reasons why 2.6 wouldn't work. As for 2.4, there might be some issues with the generator syntax. Its been a long time since I've used 2.4. On Fri, Sep 19, 2014 at 6:06 AM, Jason Marshall j...@yahoo.com wrote: How difficult would it be to make the code compatible with Python 2.4+? Jason From: Jason Marshall j...@yahoo.com; To: pygame-users@seul.org pygame-users@seul.org; Subject: Re: [pygame] TMX support in pygame Sent: Thu, Sep 18, 2014 11:48:26 AM I haven't used your tools myself, but if they really work well and have a tutorial and good documentation, then I'm in favor of adding them. Batteries included! Thanks, Jason From: Leif Theden leif.the...@gmail.com To: pygame-users@seul.org Sent: Monday, September 15, 2014 11:51 AM Subject: [pygame] TMX support in pygame Hello everyone! I'm a long time user of pygame and active member of #pygame under the handle bitcraft. I help many people who stumble into the channel to build their first game in pygame. I've also released and maintain a couple small libraries PyTMX and Pyscroll to help new users develop using the Tiled Map Editor. https://github.com/bitcraft/PyTMX https://github.com/bitcraft/pyscroll The Tiled Map Editor is widely known in the indie game community and many popular game development ecosystems include out-of-the-box support for it, including pyglet, cocos2d-x, allegro5, libgdx, and many others. I am confident that PyGame will benefit from a TMX loader that it is integrated into the core and documented on pygame.org. As maintainer of PyTMX and pyscroll, I would like to nominate these projects to be integrated into the pygame core. They both support python 2.7 and 3.3+ and I have tried to make them feel like native pygame libraries; and they even work well with the spite/group concept. The only library that it depends on outside of the python standard lib is the six module. There are of other loaders available as well, and I will list them as well for the consideration of the pygame core developers. My apologies if I have overlooked another tiled TMX map format project. http://www.pygame.org/project/1158/ http://pytmxlib.readthedocs.org/en/v0.1.0/ https://bitbucket.org/r1chardj0n3s/pygame-tutorial/src/a383dd24790d/tmx.py https://github.com/renfredxh/tmx Thank you everyone and I look forward to hearing your comments.
Re: [pygame] TMX support in pygame
I haven't used your tools myself, but if they really work well and have a tutorial and good documentation, then I'm in favor of adding them. Batteries included! Thanks, Jason From: Leif Theden leif.the...@gmail.com To: pygame-users@seul.org Sent: Monday, September 15, 2014 11:51 AM Subject: [pygame] TMX support in pygame Hello everyone! I'm a long time user of pygame and active member of #pygame under the handle bitcraft. I help many people who stumble into the channel to build their first game in pygame. I've also released and maintain a couple small libraries PyTMX and Pyscroll to help new users develop using the Tiled Map Editor. https://github.com/bitcraft/PyTMX https://github.com/bitcraft/pyscroll The Tiled Map Editor is widely known in the indie game community and many popular game development ecosystems include out-of-the-box support for it, including pyglet, cocos2d-x, allegro5, libgdx, and many others. I am confident that PyGame will benefit from a TMX loader that it is integrated into the core and documented on pygame.org. As maintainer of PyTMX and pyscroll, I would like to nominate these projects to be integrated into the pygame core. They both support python 2.7 and 3.3+ and I have tried to make them feel like native pygame libraries; and they even work well with the spite/group concept. The only library that it depends on outside of the python standard lib is the six module. There are of other loaders available as well, and I will list them as well for the consideration of the pygame core developers. My apologies if I have overlooked another tiled TMX map format project. http://www.pygame.org/project/1158/ http://pytmxlib.readthedocs.org/en/v0.1.0/ https://bitbucket.org/r1chardj0n3s/pygame-tutorial/src/a383dd24790d/tmx.py https://github.com/renfredxh/tmx Thank you everyone and I look forward to hearing your comments.
Re: [pygame] Perf - No. of rects vs area of rects
Number of rects is not very important. The total area is much more important. Also, aligning surface widths to multiples of 16 and blitting to locations on the x axis that are multiples of 16 can help the performance of the blitting. (I just learned that from this mailing list.) Setting the source surface's RLEACCEL flag helps if there is a lot of solid coloration in your source surface. This script reduces the update area as much as possible: https://bitbucket.org/jmm0/optimize_dirty_rects/downloads Jason From:Abhas Bhattacharya abhasbhattachar...@gmail.com To: pygame-mirror-on-google-gro...@googlegroups.com Sent: Saturday, June 14, 2014 8:13 PM Subject: [pygame] Perf - No. of rects vs area of rects Does the performance of pygame.update depend solely on no. of rects or total area of all rects passed to it? I was thinking of a small speedup by splitting two intersecting rects into three non-intersecting rects, which will reduce the toal area, but increase the no. of rects. Its probably a very small gain, and might result in a actual loss if the no. of rects explode. But if I know for sure that performance depende solely on one factor or the other, small gains like h=this might be possible.
Re: [pygame] BUG: Color order reversed on Windows
Ben, 64-bit or 32-bit Windows 8.1?(And if 64-bit Windows 8.1, then 64-bit or 32-bit Python? Does the problem persist if you use the current 1.9.2pre and SDL 1.2.15? http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame Thanks, Jason From: Ben Withbroe ben.says.b...@gmail.com To: pygame-users@seul.org Sent: Friday, May 16, 2014 12:30 PM Subject: [pygame] BUG: Color order reversed on Windows Hi pygame devs- I'm running Pygame 1.9.1release on top of SDL 1.2.13 on Windows 8.1. When I set a pixel on a Surface object (with set_at()), and then read the modified pixel back out (with get_at()), the red and blue channels have been exchanged. A minimal demonstration script is attached. For what it's worth, displaying Surfaces works correctly: if I load an image file to a Surface and then display it, it looks correct. However, if I modify the surface (using Surface.set_at()), the modified pixels also display with their red and blue channels exchanged. Thanks, Ben Withbroe
Re: [pygame] Updating the pygame.org news section with an intro video to pygame?
I've posted this news item. Thanks! Jason From: Michael Lutynski mich...@callthecomputerdoctor.com To: pygame-users@seul.org Sent: Thursday, May 22, 2014 1:05 AM Subject: [pygame] Updating the pygame.org news section with an intro video to pygame? I'd like to get this piece of news on the Pygame.org site's main page as I think it'd be helpful. It's an intro to game programming from PyCon 2014: http://pyvideo.org/video/2620/introduction-to-game-programming How do I go about that? This is part of my personal wish to see more Pygame news to counter PySDL's presence. I feel that all the mentioning of PySDL is like an endorsement of PySDL over Pygame. I want to hear more about Pygame :) Michael
Re: [pygame] which distribution to use for OSX mavericks python 2.7 ?
For Mavericks, you have to build from source. Using Homebrew may help. https://bitbucket.org/pygame/pygame/issue/82/homebrew-on-leopard-fails-to-install#comment-636765 Jason From: Floris van Manen v...@klankschap.nl To: pygame-users@seul.org Sent: Sunday, May 4, 2014 1:58 PM Subject: [pygame] which distribution to use for OSX mavericks python 2.7 ? Where can i find the latest distribution of pygame to be used with OSX mavericks and python 2.7.6 ? e.g. where can i find the download link ? Thanks .F
[pygame] How to call EnumDisplaySettings using ctypes?
I know how to get the screen's refresh rate in Windows using pywin32 (win32all). import win32api d = win32api.EnumDisplaySettings(None, -1) print (d.DisplayFrequency) How would I call the same function using ctypes? Thanks, Jason
Re: [pygame] IDE ?
I'm trying out Eclipse/PyDev. It has features that I want (syntax highlighting, change bars [called Quick Diff], cross-platform compatibility, $0, viewable whitespace). So far, I hated the 100-step process to install it. I am annoyed by the project paradigm. (I keep related files in the same directory, and that is enough project organization for me, thank you very much.) I was surprised that Quick Diff doesn't work if I am editing a file that isn't part of the current project, but at least it does work when I do things the Eclipse way. I got used to having change bars from using UltraEdit at work. I miss change bars when I'm changing big sections of code in existing scripts, which is why I'm trying to get used to PyDev. I don't know of any other Python IDEs that have change bars besides PyDev. Does anyone? I have tried... * UltraEdit - Very good, but expensive. I've earned a living writing thousands of lines of Python code with this. It isn't great for Python out-of-the-box, but it can be customized. I customized it to run PyChecker at the click of a button. * SPE - Great. I especially like the integrated PyChecker. PyChecker hasn't been updated for new versions of Python, and SPE had an error once that made me lose my work, so I don't use it anymore. * DrPython - Good, nice, simple. DrPython had an error once that made me lose my work, so I don't use it anymore. * Geany - Good, nice, simple. I used this to create optimize_dirty_rects.py last year. * IDLE - Not good for large scripts. Can't view whitespace. * Komodo Edit - I haven't used this much. Seems a bit complicated. I don't like the project paradigm, and I don't see change bars. I prefer the simplicity of Geany over this to just get things done. * Wing101 - I haven't used this much. Seems slightly less complicated than Komodo Edit. I don't see change bars. I prefer the simplicity of Geany over this to just get things done. Jason From: David dvp1...@gmail.com To: pygame-users@seul.org Sent: Monday, April 7, 2014 7:02 PM Subject: [pygame] IDE ? This must have been asked before Which IDE do you like? I'd want Free and Cross-Platform (Win/Linux). A debugger would be very handy. Would be beneficial if it is widely used and that it will be around a good long time. I can't tell if they mean Eclipse/Pydev has a steep learning curve because of the installation/setup or the everyday use? If not that, then Spider and PyScripter looked like possible candidates... I know there are hold outs for Emacs and Vim...(Im a Vim usermyself) but I'm asking whihc IDEs do you use and like (and if you dont use one, perhaps you know of one that many people generally use and like) thanks. -- David Running Linux since 1994
Re: [pygame] PySDL2 0.9.1 released
I've added this to the website news. Thanks! Jason From: Marcus von Appen m...@sysfault.org To: pygame-users@seul.org; SDL development mailing list s...@lists.libsdl.org Sent: Saturday, April 5, 2014 3:46 AM Subject: [pygame] PySDL2 0.9.1 released PySDL2 0.9.1 has been released. PySDL2 is a wrapper around the SDL2 library and as such similar to the discontinued PySDL project. In contrast to PySDL, it has no licensing restrictions, nor does it rely on C code, but uses ctypes instead. Version 0.9.1 is a bugfix release, which fixes some issues in the PySDL2 API: * fixed issue #50: corrected the sdl2.ext.load_image() documentation * fixed issue #52: sdl2.ext.Renderer.fill(), sdl2.ext.Renderer.draw_rect() and sdl2.ext.Renderer.draw_point() convert sequences correctly now * fixed issue #53: provide backwards compatibility for previous SDL2 releases by adding a wrapper function for sdl2.cpuinfo.SDL_HasAVX() You can download it from http://bitbucket.org/marcusva/py-sdl2/downloads. The documentation, listing all of its features, can be browsed online at http://pysdl2.readthedocs.org/. Cheers Marcus
[pygame] Website updates - 26 March 2014
* Added news about PyWeek 18 (May 11-18) * Added news about cocos2d 0.6.0 release * Added news about PySDL2 0.9.0 release * Added news about Blender 2.70 release * Deleted projects tagged pleasedelete
Re: [pygame] Python3 version packaged?
Here#39;s an idea: what if we were to remove pyportmidi 0.0.6 from the pygame source and make pygame.midi dependent on stand-alone pyportmidi? Jason PS. I think the most recent version of pyportmidi, 0.0.7, is here: https://bitbucket.org/aalex/pyportmidi/ From: Christopher Night cosmologi...@gmail.com To: pygame-users@seul.org Sent: Tuesday, December 31, 2013 4:58 PM Subject: Re: [pygame] Python3 version packaged? That#39;s all well and good for development, but if I want to distribute my game to other Ubuntu users I#39;m not going to tell players they have to comment out part of the setup file for one of my dependencies and install it from source. I#39;m not complaining or anything. Set whatever priorities you think are appropriate. I#39;m just adding another data point: this is blocking me from transitioning to Python3. -Christopher On Tue, Dec 31, 2013 at 5:47 PM, Lenard Lindstrom le...@telus.net wrote: Hi, On Gnu/Linux it is simpler to just build Pygame from source. The dependencies are libsdl-mixer, libsdl-image, libsdl-ttf, and libportmidi0. Installing these libraries, and their header file dev packages should force the installation of all Pygame dependencies, such as SDL and freetype2. Also be sure to include the Python3 dev package. Since I do most of my Pygame development on Linux Mint, there should be no compatibility issues on Ubuntu, except with libportmidi0. So I suggest commenting out the Pygame midi module entry in the Setup file. Lenard Lindstrom On 13-12-31 09:36 AM, Sam Bull wrote: Can we get a working Python3 version of Pygame packaged either in the Ubuntu repositories or in pip3? This would be really helpful in allowing us to transition to Python3 for our projects.
[pygame] Website updates - 13 March 2014
* Added news about PyJ2D and Pyjsdl * Added news about BaconGameJam 07 and Mini Ludum Dare 50 competitions * Deleted some ridiculousspam advertising escort services
[pygame] Website update - 27 February 2014
• added news about the next Ludum Dare competition
[pygame] Maintenance of sysfont.py (issue #179)
In sysfont.py, there are long lists of fonts for Windows XP and Mac OS X 10.something. I think that we should remove those lists because they're a pain to maintain, nobody has been maintaining them lately (which is why there's no font list for Windows Vista, 7 or 8), and we can get a system's list of fonts programmatically. Does anyone have a reason why I should not remove the long lists of fonts from sysfont.py? Jason
[pygame] Pull request #26: sysfont.py change for OS X 10.9 from Dan Ross
Should we accept this change for pygame 1.9.2? https://bitbucket.org/pygame/pygame/pull-request/26/removed-usage-of-fc-list-in-os-x-font/diff Jason lib/sysfont.py def initsysfonts_darwin(): read the fonts on OSX. # if the X11 binary exists... try and use that. # Not likely to be there on pre 10.4.x ... # so still need to do other OSX specific method below. - if os.path.exists(/usr/X11/bin/fc-list): - fonts = initsysfonts_unix() - else: - fonts = {} + # if os.path.exists(/usr/X11/bin/fc-list): +# fonts = initsysfonts_unix() +# else: +# fonts = {} + fonts = {} # we look for the default paths. _search_osx_font_paths(fonts) return fonts
[pygame] Website update - 31 December 2013
* Added news about PySDL 0.8.0
[pygame] Website updates: 10 December 2013
* News about pygame-cffi on the Raspberry Pi and PyPy
Re: [pygame] Quick OS survey - 2013
I use Windows 7 at work for 150 to 200 hours per month. I've used Linux Mint for about 1 hour per month this year, so that's roughly 0.5%. From: Julian onp...@gmail.com To: pygame-users@seul.org Sent: Thursday, December 5, 2013 11:18 PM Subject: Re: [pygame] Quick OS survey - 2013 -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Just Trisquel for me. I have to wonder, though, how the heck can you deduce how much you use each OS to the nearest half of a percent? -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJSoV4cAAoJEIAKJ6Gj4QxvZ2kH/jrFST7XW4WpsYbPpzuPGcib gTckwf/eaqcp704qhzmW0QJyzSuYI2duf3hI/SPJC07agTP3vv1S5shqQ7Xpytzq zTjBa1gOiidQAiPZsyuPPPne0CT6uD69AAHIlSsh/C5u++CqW9YpddANeeCMXexY 8EzJULC375uxJ51WjsgkR4UitrnxK97vx4tO8GbIqtGtOAfIYfWFQi1Ji8TiqgSp PkHtHbw4FYA5Zo+1qnjpQ5oijsaV/74X1MMEn6cRhZcrW6MxFQ+jrzP2YIX/8sqQ 7D9hcR+xkfXq41ac4RXJ2CzF0266tGUp0IIYJFgFrPI8qalB89OHX6H4saKTpB4= =VvJv -END PGP SIGNATURE-
Re: [pygame] Quick OS survey - 2013
No, if this survey were on a dedicated web service, then it never would have been created because setting up a dedicated web service would take too much effort. Also, fewer people would have noticed it and responded to it. I'm still hoping for many more responses. Doesn't somebody use pygame with Windows 8.x? Jason From: Olivier Crouzet olivier.crou...@univ-nantes.fr To: pygame-users@seul.org Sent: Friday, December 6, 2013 1:06 AM Subject: Re: [pygame] Quick OS survey - 2013 Dear all, it seems to me that if any single pygame user is going to answer this survey, it won't be long until this list becomes full with any single answer! Wouldn't it be wise, if this really is a matter of interest, to set up a survey on a dedicated web service so everyone can continue discussing and reading pygame issues? Thanks for your understanding. Olivier. --Message d'origine-- De: Miriam English Expéditeur: owner-pygame-us...@seul.org À: pygame-users@seul.org Cc: Jason Marshall Répondre à: pygame-users@seul.org Objet: Re: [pygame] Quick OS survey - 2013 Envoyé: 6 déc. 2013 07:27 Puppy Linux 97% Android 1% Ubuntu Linux 1% various flavors of MSWindows and FreeDOS 1% Jason Marshall wrote: pygamers, which computer operating system(s) have you used this year? If you have been using more than 1 operating system, approximately what percentage of your time are you using each one? Here's my breakdown: 0.5%Linux Mint 0.5%Mac OS X 10.4 2%Windows ME 4%Windows XP 5%Mac OS X 10.6 88%Windows 7 -- If you don't have any failures then you're not trying hard enough. - Dr. Charles Elachi, director of NASA's Jet Propulsion Laboratory - Website: http://miriam-english.org Blogs: http://miriam-e.dreamwidth.org http://miriam-e.livejournal.com -- Olivier Crouzet LLING - Laboratoire de Linguistisque
[pygame] Quick OS survey - 2013
pygamers, which computer operating system(s) have you used this year? If you have been using more than 1 operating system, approximately what percentage of your time are you using each one? Here's my breakdown: 0.5% Linux Mint 0.5% Mac OS X 10.4 2% Windows ME 4% Windows XP 5% Mac OS X 10.6 88% Windows 7
Re: [pygame] Old projects with bad links
I figured it out. Source, Windows and Mac URLs are per-release, so I have to dig down into the release data to edit them. Jason From: Jason Marshall j...@yahoo.com To: pygame-users@seul.org pygame-users@seul.org Sent: Sunday, November 10, 2013 3:16 PM Subject: Re: [pygame] Old projects with bad links Could we make the Source, Windows and Mac URLs on project pages editable? We could point people to archive.org in some cases. (Even my own Firework project has a dead Source link, and I can't update it.) From: René Dudfield ren...@gmail.com To: pygame-users@seul.org pygame-users@seul.org Sent: Monday, November 4, 2013 3:55 AM Subject: Re: [pygame] Old projects with bad links Please do not delete them yet.
[pygame] Website updates: 18 November 2013
* Question: Should we consider the posts by Geeta Sanganee to be spam? * Deleted projects with names like delete or deleteme * Deleted projects by spam users: Markus Mueller, donaldholton, vilan duck, ashley grace, dds, Jhonny, pcdriver, niammuddin, bdee
[pygame] Website updates: 17 November 2013
* Deleted projects of the following spammers: seputarsoftware, danicastro, rixos35, danicastro, ocim, johnyeo90, dadanramadhan, alfanbutway, blahau, Chriestover Arie, benyocyberprotokol, gini sen, budi, TinguBondi, jemimaann, Agen Bola, eliyanirahayu, Cah Manggar, arumi, kasmir hdm, Jose Vieira Da Silva Neto, irfan tampan, Bio Sanjaya, mark lewis, alip iskandar, Sophie Green, drew belmore * Deleted testing project of bro bro
[pygame] Website updates: 12 November 2013
* Removed spam projects by kevinnguyen (kizi2), gameslove57 (gameslove), Girls Games (y8girlsgames), Kizi 1 (kizi1), Y8 freey8games.net (vienmaria) and cute girl (cutegirl36)
[pygame] Website updates: 12 November 2013
* News: Ludum Dare #28 dates announced * Removed projects by spammers Theodorus Mardjohan(johantheo88), Jorolo Kakac (taoof2gts), seputarsoftware (seputarsoftware)
Re: [pygame] Old projects with bad links
Could we make the Source, Windows and Mac URLs on project pages editable? We could point people to archive.org in some cases. (Even my own Firework project has a dead Source link, and I can't update it.) From: René Dudfield ren...@gmail.com To: pygame-users@seul.org pygame-users@seul.org Sent: Monday, November 4, 2013 3:55 AM Subject: Re: [pygame] Old projects with bad links Please do not delete them yet.
[pygame] Optimization of dirty rects (removal of overlapping area)
I wrote a function to remove overlapping sections of rectangles. I'm pretty proud of it. It should speed up blit time when using dirty rectangles on a stationary background, but if the whole background is moving or there are no overlapping sprites, it will waste time. Please try it out and let me know if it helps or hurts performance. Link to download details: http://www.pygame.org/project-Optimize+Dirty+Rects-2866-4646.html Jason
Re: [pygame] Pygame minigames
One way to do this is to use nested loops. An outer loop calls functions which each contain their own inner loop. Each inner loop function will return either the inner loop function that should run next or None. If None is returned instead of a function, then the program exits. Here's a template for you: import pygame def main(): one main loop to rule them all pygame.init() screen = pygame.display.set_mode((500, 500)) func = menu while func is not None: next_func = func(screen) func = next_func pygame.quit() def menu(screen): main loop for menu mode # Clear screen # Put your menu's main loop here # To run minigame_1, set chosen_game to minigame_1 and exit the loop # To run minigame_2, set chosen_game to minigame_2 and exit the loop # To quit the application, set chosen_game to None and exit the loop return chosen_game def minigame_1(screen): main loop for minigame_1 # Clear screen # Put your first game's main loop here return menu def minigame_2(screen): main loop for minigame_2 # Clear screen # Put your second game's main loop here return menu if __name__ == __main__: main() Jason From: Astan k12...@gmail.com To: pygame-users@seul.org Sent: Monday, November 4, 2013 8:50 PM Subject: [pygame] Pygame minigames Hi, I'm trying to make a sort of game in pygame that is a collection of minigames (that may or may not be timed-based). The problem I'm having is developing something like this. I was wondering if it was possible to make the main interface of the game with pygame normally for menus, etc and then making these minigames with pygame as well and then combining them. Currently, I'm having problems combining these two files/modules since they both init pygame and do various background manipulation. Are there any examples of something like this that might help me? Cheers Thanks -- To make a photocopier, simply photocopy a mirror.
Re: [pygame] Pygame logo license?
Julian, That's an understandable conclusion. I'll try to contact the logo's creator for an attorney-compatible clarification. Jason On Sat, 11/2/13, Julian onp...@gmail.com wrote: Subject: Re: [pygame] Pygame logo license? To: pygame-users@seul.org Date: Saturday, November 2, 2013, 11:57 PM -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/02/2013 04:48 PM, Jason Marshall wrote: See this previous discussion: https://groups.google.com/forum/#!searchin/pygame-mirror-on-google-groups/horst$20snake$20logo/pygame-mirror-on-google-groups/Td1bnVhsZeA/W7q4MwBP5DgJ It looks like the only answer in there was vaguely, it's in the Pygame repo, so I suppose it's under the LGPL. Vague speculation isn't enough for me. I want to be very thorough about this. If what sort of license the logo is under is up in the air, I'm going to assume that it was never actually licensed by its copyright holder and not use it. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJSddd9AAoJEIAKJ6Gj4Qxv+hAH/2IhWL1T0pzHZbsyxIXhzF5v kg9IiIVBH77IjqoetKcHshnQG3lU7L9xUygX755fncDD+UJZ2hZKtiHA1lNUGB61 k85AHJUOwn23z+AV4X1JvlVc17Ns2Z6KiUu5N7PAugX1HSc1XE//k8+HWW8Zf3tK 5vZWkN5JGlmwUVNb8XR5PeJePgzflAjHHsNrQf8UWjGJLwHlVYp3LVOWX11g0K13 qYL+oeettaK2Zj6YElJT0APyyHd+Kblt/XIcE6xzU2tSXm+gDbu9irSkdEKXA+4A LnnZ57oAMDFjC/925/PY4Iaag9Vz+QjvfLI/eSj1sPejBMHxQRtI5cm8BBZZk5o= =x9pQ -END PGP SIGNATURE-
RE: [pygame] pygame idea: pgHoF (pygame Hall of Fame)
I have created a Google Group for discussion of the pygame Arcade idea. https://groups.google.com/forum/#!forum/pygame-arcade I think we should consider it a separate project from pygame. Jason On Fri, 11/1/13, Westley Martínez aniko...@gmail.com wrote: Subject: RE: [pygame] pygame idea: pgHoF (pygame Hall of Fame) To: pygame-users@seul.org Date: Friday, November 1, 2013, 1:56 PM -Original Message- From: owner-pygame-us...@seul.org [mailto:owner-pygame-us...@seul.org] On Behalf Of Jason Marshall Sent: Friday, November 01, 2013 5:35 AM To: pygame-users@seul.org Subject: Re: [pygame] pygame idea: pgHoF (pygame Hall of Fame) Thanks, Westley. 1. On bitbucket.org, should I create a new repository for pygame Arcade under the existing pygame team's control? This repository would be at https://bitbucket.org/pygame/Arcade. Or should I create a new team on bitbucket.org? I guess it depends how closely tied we want to be with Pygame. I'm not a Pygame developer so I don't know what the proper protocol for this would be. 2. Does anybody have a better idea for a name for this application? I think it's a good start. It's better than Pygame Launcher. Maybe PyArcade, but that might be taking the Py- convention too far. I have a question though. Will this be open to any games written in Python or only those that use Pygame? 3. Should we start from scratch or start with something that somebody else has created? (Adam Furman's Python OS, which I haven't looked into, comes to mind.) I'm inclined to start from scratch with Python 2.7.6, which bundles the version of Tkinter that's compatible with OS X Mavericks and integrates well with Mercurial. Because I have used Tkinter at work, it's my first choice for creating a basic GUI, but what are your opinions of using it? Tkinter is my first choice as well. We should reuse code when we can. (And if it's a good idea of course) 4. Does anybody have a good reason why we shouldn't create a pygame Arcade application at all? Jason There's never a good reason to not make a good program :) Why don't we start with a sheet of ideas/goals that we want to accomplish for the app? Maybe present it on this mailing list so we can get input from everyone else. Here's one goal of mine: * Track data made by games, such as save files, so that it may be removed (like when the game is uninstalled).
[pygame] Old projects with bad links
Should we delete old projects if the user is inactive and the links are dead? The existence of so many dead projects is not friendly to newbies. Jason
[pygame] Website updates: 3 November 2013
• Deleted spam projects by users: Kizi 1 (kizi1), Friv frivminiclips.com (frivminiclip) • Updated URL for PYGRIS project
Re: [pygame] Pygame logo license?
OK, here is a definitive answer from Gareth Noyce: 'They're public domain but I'd like attribution if they're used anywhere. Just a logo by Gareth Noyce would do, but I won't be complaining if people forget. :)' Jason On Sun, 11/3/13, Jason Marshall j...@yahoo.com wrote: Subject: Re: [pygame] Pygame logo license? To: pygame-users@seul.org Date: Sunday, November 3, 2013, 5:51 AM Julian, That's an understandable conclusion. I'll try to contact the logo's creator for an attorney-compatible clarification. Jason On Sat, 11/2/13, Julian onp...@gmail.com wrote: Subject: Re: [pygame] Pygame logo license? To: pygame-users@seul.org Date: Saturday, November 2, 2013, 11:57 PM -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/02/2013 04:48 PM, Jason Marshall wrote: See this previous discussion: https://groups.google.com/forum/#!searchin/pygame-mirror-on-google-groups/horst$20snake$20logo/pygame-mirror-on-google-groups/Td1bnVhsZeA/W7q4MwBP5DgJ It looks like the only answer in there was vaguely, it's in the Pygame repo, so I suppose it's under the LGPL. Vague speculation isn't enough for me. I want to be very thorough about this. If what sort of license the logo is under is up in the air, I'm going to assume that it was never actually licensed by its copyright holder and not use it. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJSddd9AAoJEIAKJ6Gj4Qxv+hAH/2IhWL1T0pzHZbsyxIXhzF5v kg9IiIVBH77IjqoetKcHshnQG3lU7L9xUygX755fncDD+UJZ2hZKtiHA1lNUGB61 k85AHJUOwn23z+AV4X1JvlVc17Ns2Z6KiUu5N7PAugX1HSc1XE//k8+HWW8Zf3tK 5vZWkN5JGlmwUVNb8XR5PeJePgzflAjHHsNrQf8UWjGJLwHlVYp3LVOWX11g0K13 qYL+oeettaK2Zj6YElJT0APyyHd+Kblt/XIcE6xzU2tSXm+gDbu9irSkdEKXA+4A LnnZ57oAMDFjC/925/PY4Iaag9Vz+QjvfLI/eSj1sPejBMHxQRtI5cm8BBZZk5o= =x9pQ -END PGP SIGNATURE-
RE: [pygame] Old projects with bad links
Hmm, that's a good idea, but it might be a problem. As a junior admin, I can modify delete projects, but I cannot view users' e-mail addresses (or delete their accounts). Jason On Sun, 11/3/13, Westley Martínez aniko...@gmail.com wrote: Subject: RE: [pygame] Old projects with bad links To: pygame-users@seul.org Date: Sunday, November 3, 2013, 1:05 PM Yes. Maybe try to contact the maintainers telling them it's deleted or will be deleted. -Original Message- From: owner-pygame-us...@seul.org [mailto:owner-pygame-us...@seul.org] On Behalf Of Jason Marshall Sent: Sunday, November 03, 2013 4:17 AM To: pygame-users@seul.org Subject: [pygame] Old projects with bad links Should we delete old projects if the user is inactive and the links are dead? The existence of so many dead projects is not friendly to newbies. Jason
Re: [pygame] Pygame logo license?
See this previous discussion: https://groups.google.com/forum/#!searchin/pygame-mirror-on-google-groups/horst$20snake$20logo/pygame-mirror-on-google-groups/Td1bnVhsZeA/W7q4MwBP5DgJ Jason On Sat, 11/2/13, Julian onp...@gmail.com wrote: Subject: [pygame] Pygame logo license? To: pygame-users@seul.org Date: Saturday, November 2, 2013, 2:49 PM -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Is the Pygame logo[0] under any sort of free culture license? I can't seem to find any license information about it. [0] http://www.pygame.org/docs/logos.html -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJSdVdQAAoJEIAKJ6Gj4QxvSyAH/ihZqpaUmk4QfAmy597+oGk+ TSq3CzPQIP2uBj/RdcpMN+jieXJivQBi4z3PbFZ3LspKqz/E17LUiEYuF1vtcBtW pjw1Ml354gSHYas/yO13VotIFg8kruAxz2ilJx8il2HrplcJRLOkv/03sx8SLHgP pEi17l5NW6LYzRAwzM4+vfK19sXjI2uBrpwRZ0dT0D1mi/gIQolG4YVByxRVOTsv 9uYudKWvqT/meoxa/0SLD/Hov31K8lz9yKTYGkv2X12GMhrUr/z74kW9nMFmXzdZ lvcSeLtFwelpqoF1iIqQmv5HXINhui1huDrrhV+bxKJgpQLW0qfbtRcabbTcWdg= =bHT9 -END PGP SIGNATURE-
Re: [pygame] pygame idea: pgHoF (pygame Hall of Fame)
Thanks, Westley. 1. On bitbucket.org, should I create a new repository for pygame Arcade under the existing pygame team's control? This repository would be at https://bitbucket.org/pygame/Arcade. Or should I create a new team on bitbucket.org? 2. Does anybody have a better idea for a name for this application? 3. Should we start from scratch or start with something that somebody else has created? (Adam Furman's Python OS, which I haven't looked into, comes to mind.) I'm inclined to start from scratch with Python 2.7.6, which bundles the version of Tkinter that's compatible with OS X Mavericks and integrates well with Mercurial. Because I have used Tkinter at work, it's my first choice for creating a basic GUI, but what are your opinions of using it? 4. Does anybody have a good reason why we shouldn't create a pygame Arcade application at all?Jason From: Westley Martínez aniko...@gmail.com To: pygame-users@seul.org Sent: Thursday, October 31, 2013 11:24 PM Subject: RE: [pygame] pygame idea: pgHoF (pygame Hall of Fame) I'd be interested in working on this. -Original Message- From: owner-pygame-us...@seul.org [mailto:owner-pygame-us...@seul.org] On Behalf Of Jason Marshall Sent: Thursday, October 31, 2013 7:56 PM To: pygame-users@seul.org Subject: Re: [pygame] pygame idea: pgHoF (pygame Hall of Fame) Popularity-driven fame rather than committee-driven fame is an excellent idea, Jake! We could make one application—I call it pygame Arcade—to install which would be able to download and launch Python games that we've screened for malicious code. When it would make sense, we could modify the games ahead of time to share high scores (using a service like Scoreoid) to promote competition in the community. The launcher could track each time that a game is played to calculate popularity. To promote learning and experimentation, there would be a button to open the directory that contains the .py files, and another button to restore the game to a pristine state after the user has experimented with it. I could go on Jason From: Jake b ninmonk...@gmail.com To: pygame-users@seul.org pygame-users@seul.org Sent: Thursday, October 31, 2013 8:20 AM Subject: Re: [pygame] pygame idea: pgHoF (pygame Hall of Fame) If we suggest projects to be posted on github/etc, that would prevent dying links. Down the road maybe viewer's votes would simplify who to choose for the month. I'm thinking simplicity is better here. ( facebook and greenlight only have an upvote, no downvotes ). We could could pick by recent-popular activity. -- Jake On Thu, Oct 31, 2013 at 7:27 AM, Jason Marshall j...@yahoo.com wrote: There are a lot of old projects on pygame.org with dead links. This isn't newbie friendly. To counter this, I boldly propose the following: Deletion of old projects if the user is inactive and the links are dead. Enshrinement of the really good old projects into a pygame Hall of Fame. Proposed details: The pgHoF project must be really good. We'll need volunteers to nominate projects and vote for a winner. The pgHoF project must use pygame or a derivative of it. The pgHoF project must have freely-available source code. The pgHoF project must be = 1 year old. To make it elite, only 1 pygame application can be added per quarter (January-March, April-June, July-September, October-December). If necessary, the pgHoF application will be modified to run on pygame 1.9.2. Installation will be simpler than installing Python, especially on Windows. What do you think? Jason -- Jake
Re: [pygame] news items:
I have posted news about PVC's textbook. Did anyone use Python in BaconGameJam 06? Indie game competitions are news, but I'm trying to find the pygame connection so a post about this competition will be relevant. Thanks, Jason From: Jake b ninmonk...@gmail.com To: pygame-users@seul.org pygame-users@seul.org Sent: Wednesday, October 9, 2013 5:29 PM Subject: [pygame] news items: Couple ideas for today: 1- http://www.reddit.com/r/pygame/comments/1o3529/student_pygame_animations/ 2- http://www.reddit.com/r/BaconGameJam/comments/1nlyov/bacongamejam_06_on_20131025_2200_utc_48_hours/ -- Jake
Re: [pygame] leveraging current non-mailing list members
Jake, I have that junior admin status. I can post news, moderate comments and edit any project page, but I can't modify pages, site code or user data. If you want junior admin status too, ask René. You have a good track record in the pygame community, so I would like you to be a fellow junior admin. Jason From: Jake b ninmonk...@gmail.com To: pygame-users@seul.org pygame-users@seul.org Sent: Friday, October 25, 2013 2:55 PM Subject: [pygame] leveraging current non-mailing list members Once the site is updated, I think it needs a system for more dynamic addition of lower level admins. Because there's plenty of people active in the non-mailing list sites, like: http://www.reddit.com/r/pygame http://www.reddit.com/r/gamedev http://www.reddit.com/r/learnprogramming http://stackoverflow.com/questions/tagged/pygame I'm sure we could get volunteers to post news, since there's frequently a coding jam or perhaps even link to Screenshot Saturdays? ( Example: http://www.reddit.com/r/gamedev/comments/1o9xo6/screenshot_saturday_140_streamtown/ ) Note: If you read screenshot saturday, having RES to auto-expand all gifs is nice. -- Jake
Re: [pygame] leveraging current non-mailing list members
Edit: I can't modify static pages. From: Jason Marshall j...@yahoo.com To: pygame-users@seul.org pygame-users@seul.org Sent: Thursday, October 31, 2013 6:53 AM Subject: Re: [pygame] leveraging current non-mailing list members Jake, I have that junior admin status. I can post news, moderate comments and edit any project page, but I can't modify pages, site code or user data. If you want junior admin status too, ask René. You have a good track record in the pygame community, so I would like you to be a fellow junior admin. Jason From: Jake b ninmonk...@gmail.com To: pygame-users@seul.org pygame-users@seul.org Sent: Friday, October 25, 2013 2:55 PM Subject: [pygame] leveraging current non-mailing list members Once the site is updated, I think it needs a system for more dynamic addition of lower level admins. Because there's plenty of people active in the non-mailing list sites, like: http://www.reddit.com/r/pygame http://www.reddit.com/r/gamedev http://www.reddit.com/r/learnprogramming http://stackoverflow.com/questions/tagged/pygame I'm sure we could get volunteers to post news, since there's frequently a coding jam or perhaps even link to Screenshot Saturdays? ( Example: http://www.reddit.com/r/gamedev/comments/1o9xo6/screenshot_saturday_140_streamtown/ ) Note: If you read screenshot saturday, having RES to auto-expand all gifs is nice. -- Jake
[pygame] pygame idea: pgHoF (pygame Hall of Fame)
There are a lot of old projects on pygame.org with dead links. This isn't newbie friendly. To counter this, I boldly propose the following: 1. Deletion of old projects if the user is inactive and the links are dead. 2. Enshrinement of the really good old projects into a pygame Hall of Fame. Proposed details: * The pgHoF project must be really good. We'll need volunteers to nominate projects and vote for a winner. * The pgHoF project must use pygame or a derivative of it. * The pgHoF project must have freely-available source code. * The pgHoF project must be = 1 year old. * To make it elite, only 1 pygame application can be added per quarter (January-March, April-June, July-September, October-December). * If necessary, the pgHoF application will be modified to run on pygame 1.9.2. * Installation will be simpler than installing Python, especially on Windows. What do you think? Jason
Re: [pygame] pygame idea: pgHoF (pygame Hall of Fame)
Popularity-driven fame rather than committee-driven fame is an excellent idea, Jake! We could make one application—I call it pygame Arcade—to install which would be able to download and launch Python games that we've screened for malicious code. When it would make sense, we could modify the games ahead of time to share high scores (using a service like Scoreoid) to promote competition in the community. The launcher could track each time that a game is played to calculate popularity. To promote learning and experimentation, there would be a button to open the directory that contains the .py files, and another button to restore the game to a pristine state after the user has experimented with it. I could go on Jason From: Jake b ninmonk...@gmail.com To: pygame-users@seul.org pygame-users@seul.org Sent: Thursday, October 31, 2013 8:20 AM Subject: Re: [pygame] pygame idea: pgHoF (pygame Hall of Fame) If we suggest projects to be posted on github/etc, that would prevent dying links. Down the road maybe viewer's votes would simplify who to choose for the month. I'm thinking simplicity is better here. ( facebook and greenlight only have an upvote, no downvotes ). We could could pick by recent-popular activity. -- Jake On Thu, Oct 31, 2013 at 7:27 AM, Jason Marshall j...@yahoo.com wrote: There are a lot of old projects on pygame.org with dead links. This isn't newbie friendly. To counter this, I boldly propose the following: Deletion of old projects if the user is inactive and the links are dead. Enshrinement of the really good old projects into a pygame Hall of Fame. Proposed details: The pgHoF project must be really good. We'll need volunteers to nominate projects and vote for a winner. The pgHoF project must use pygame or a derivative of it. The pgHoF project must have freely-available source code. The pgHoF project must be = 1 year old. To make it elite, only 1 pygame application can be added per quarter (January-March, April-June, July-September, October-December). If necessary, the pgHoF application will be modified to run on pygame 1.9.2. Installation will be simpler than installing Python, especially on Windows. What do you think? Jason -- Jake
[pygame] Website updates - 30 October 2013
Deleted spam projects by these users: wanda sintia (koranpagi99), dayoo tigoo (dayoo)
[pygame] Website updates: 29 October 2013
* Added news about the availability of Paul Vincent Craven's new pygame book * Deleted spam projects by these users: blahau, topik (opickaza), seoandi
[pygame] Website updates - 28 October 2013
* Added news about the PySDL2 0.7.0 release. * Added news about PyWeek 17's completion. * Deleted spam projects by this user:vFcvff
Re: [pygame] Pygame look and feel
Nice! Jason From: Aikiman j...@diadem.co.nz To: pygame-users@seul.org Sent: Thursday, October 10, 2013 4:52 AM Subject: Re: [pygame] Pygame look and feel Sorry forgot the drop shadow http://pygame-users.25799.x6.nabble.com/file/n957/pythonLogo_v04.jpg -- View this message in context: http://pygame-users.25799.x6.nabble.com/Pygame-look-and-feel-tp906p957.html Sent from the pygame-users mailing list archive at Nabble.com.
Re: [pygame] freetype + unusual font format: What am I doing wrong?
Thanks for digging into this. If multiplying the em width by 2 // 3 is the most difficult step in using a bitmap font with pygame, then I'm happy! Jason From: Lenard Lindstrom le...@telus.net To: pygame-users@seul.org Sent: Tuesday, October 8, 2013 12:32 AM Subject: Re: [pygame] freetype + unusual font format: What am I doing wrong? I looked at the BDF code in freetype2, and then ran a debugger on pygame.freetype to confirm. In freetype2, when only a SIZE record in a BDF file, the width, in pixels-per-em, is calculated as (height * 2 / 3) [1], which may not be the point size given in the SIZE record. For c64.dbf this is (8 * 2 / 3) = 5. The width is used as the font size. This is a quirk of the freetype library. I see no easy work-around. Lenard Lindstrom [1] bdfdrivr.c:438, see http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/src/bdf/bdfdrivr.c?id=VER-2-5-0-1#n438 On 13-10-06 02:44 PM, Lenard Lindstrom wrote: Okay, setting the resolution to 45 corrects the sizes: pygame.freetype.init(resolution=45) Python 2.7.3 pygame 1.9.2a0 pygame.freetype 2.4.10 radon.bdf 12 radon.bdf 13 radon-wide.bdf 12 radon-wide.bdf 13 c64.bdf 8 c64d.bdf 16 I don't know why this is the case. Explicit bitmap font support is not built into the freetype module, so is untested. It is something I intended, but have not got around too. Sorry. Lenard Lindstrom. On 13-10-05 03:07 PM, Lenard Lindstrom wrote: [snip] The freetype version of pygame.font.init() is just pygame.freetype.init(). It takes a 'resolution' keyword argument that sets the default pitch used in rendering. I suppose setting the pitch to the screen resolution, in pixels per inch, makes the point size equal pixel size. The pygame.freetype.Font type allows pitch to be set individually for each Font instance. It is this pitch twiddling which allows pygame.freetype.Font to mimic how pygame.font.Font handles the default Pygame font, which is scaled differently from other fonts. On 13-10-05 01:48 PM, Jason Marshall wrote: Maybe my understanding of size is wrong... http://www.freetype.org/freetype2/docs/ft2faq.html#other-size *From:* Jason Marshall j...@yahoo.com *To:* pygame-users@seul.org pygame-users@seul.org *Sent:* Saturday, October 5, 2013 2:41 PM *Subject:* Re: [pygame] freetype + unusual font format: What am I doing wrong? Lenard, Sorry, updating to pygame-1.9.2a0-12de2da43ecb.win32-py3.3.msi didn't help. By passing a different (wrong) size, I was able to get freetype to render some fonts but not others. I made a webpage with the only documentation that I have found, some demo code that can render from some BDF fonts, and a screenshot: http://www.marshallworkshop.com/pygame/freetype-bug/ I suspect that there's a mistake in the documentation for instantiating the pygame.freetype.Font class. If I follow the documentation and pass it the font name, style and size, I get an error. If I just pass only the font name and a certain (wrong) size, it sometimes renders. Jason
Re: [pygame] freetype + unusual font format: What am I doing wrong?
Lenard, Sorry, updating to pygame-1.9.2a0-12de2da43ecb.win32-py3.3.msi didn't help. By passing a different (wrong) size, I was able to get freetype to render some fonts but not others. I made a webpage with the only documentation that I have found, some demo code that can render from some BDF fonts, and a screenshot: http://www.marshallworkshop.com/pygame/freetype-bug/ I suspect that there's a mistake in the documentation for instantiating the pygame.freetype.Font class. If I follow the documentation and pass it the font name, style and size, I get an error. If I just pass only the font name and a certain (wrong) size, it sometimes renders. Jason From: Lenard Lindstrom le...@telus.net To: pygame-users@seul.org Sent: Friday, October 4, 2013 1:21 PM Subject: Re: [pygame] freetype + unusual font format: What am I doing wrong? Hi Jason, This sounds like issue #144, unable to render text. https://bitbucket.org/pygame/pygame/issue/144/unable-to-render-text The issue #144 fix is included in an updated 32bit Windows installer added to the downloads page https://bitbucket.org/pygame/pygame/issue/144/unable-to-render-text earlier this week: pygame-1.9.2a0-12de2da43ecb.win32-py3.3.msi https://bitbucket.org/pygame/pygame/downloads/pygame-1.9.2a0-12de2da43ecb.win32-py3.3.msi. I have taken to adding a changeset identifier to the file name so tracking installer versions will be easer. Lenard Lindstrom On 13-10-04 05:50 AM, Jason Marshall wrote: I would like to use the freetype module to render text from a BDF font file, but I am getting a vague error. I am using the 8x8 font from this site: http://beej.us/c64bdf/c64bdf/c64.bdf import os os.environ[PYGAME_FREETYPE] = 1 import pygame pygame.font module 'pygame.ftfont' from 'C:\\Python33\\lib\\site-packages\\pygame\\ftfont.py' import pygame.freetype pygame.freetype.init() c64 = pygame.freetype.Font(r'C:\Users\marshalls\Downloads\c64.bdf', 8) s = c64.render('TEST', pygame.Color('white'), pygame.Color('blue')) Traceback (most recent call last): File stdin, line 1, in module SystemError: error return without exception set Can somebody spot what I am doing wrong? I am using a recent build of pygame 1.9.2pre and Python 3.3 (32-bit) on Windows. Thanks, Jason
Re: [pygame] freetype + unusual font format: What am I doing wrong?
Maybe my understanding of size is wrong... http://www.freetype.org/freetype2/docs/ft2faq.html#other-size From: Jason Marshall j...@yahoo.com To: pygame-users@seul.org pygame-users@seul.org Sent: Saturday, October 5, 2013 2:41 PM Subject: Re: [pygame] freetype + unusual font format: What am I doing wrong? Lenard, Sorry, updating to pygame-1.9.2a0-12de2da43ecb.win32-py3.3.msi didn't help. By passing a different (wrong) size, I was able to get freetype to render some fonts but not others. I made a webpage with the only documentation that I have found, some demo code that can render from some BDF fonts, and a screenshot: http://www.marshallworkshop.com/pygame/freetype-bug/ I suspect that there's a mistake in the documentation for instantiating the pygame.freetype.Font class. If I follow the documentation and pass it the font name, style and size, I get an error. If I just pass only the font name and a certain (wrong) size, it sometimes renders. Jason From: Lenard Lindstrom le...@telus.net To: pygame-users@seul.org Sent: Friday, October 4, 2013 1:21 PM Subject: Re: [pygame] freetype + unusual font format: What am I doing wrong? Hi Jason, This sounds like issue #144, unable to render text. https://bitbucket.org/pygame/pygame/issue/144/unable-to-render-text The issue #144 fix is included in an updated 32bit Windows installer added to the downloads page https://bitbucket.org/pygame/pygame/issue/144/unable-to-render-text earlier this week: pygame-1.9.2a0-12de2da43ecb.win32-py3.3.msi https://bitbucket.org/pygame/pygame/downloads/pygame-1.9.2a0-12de2da43ecb.win32-py3.3.msi. I have taken to adding a changeset identifier to the file name so tracking installer versions will be easer. Lenard Lindstrom On 13-10-04 05:50 AM, Jason Marshall wrote: I would like to use the freetype module to render text from a BDF font file, but I am getting a vague error. I am using the 8x8 font from this site: http://beej.us/c64bdf/c64bdf/c64.bdf import os os.environ[PYGAME_FREETYPE] = 1 import pygame pygame.font module 'pygame.ftfont' from 'C:\\Python33\\lib\\site-packages\\pygame\\ftfont.py' import pygame.freetype pygame.freetype.init() c64 = pygame.freetype.Font(r'C:\Users\marshalls\Downloads\c64.bdf', 8) s = c64.render('TEST', pygame.Color('white'), pygame.Color('blue')) Traceback (most recent call last): File stdin, line 1, in module SystemError: error return without exception set Can somebody spot what I am doing wrong? I am using a recent build of pygame 1.9.2pre and Python 3.3 (32-bit) on Windows. Thanks, Jason
Re: [pygame] Pygame look and feel
I like it, Aikiman. Here's an idea: We could keep the old logo for pygame 1.x.x and use the new logo for pygame 2. Jason From: Aikiman j...@diadem.co.nz To: pygame-users@seul.org Sent: Friday, October 4, 2013 2:45 AM Subject: Re: [pygame] Pygame look and feel For what its worth then here are a couple of designs of the logo. Im only throwing them up here because i've already done the work but if you are interested I can continue onward with colors, otherwise I can drop this no problems. Maybe its something for the future then. http://pygame-users.25799.x6.nabble.com/file/n912/pygame1.jpg -- View this message in context: http://pygame-users.25799.x6.nabble.com/Pygame-look-and-feel-tp906p912.html Sent from the pygame-users mailing list archive at Nabble.com.
[pygame] freetype + unusual font format: What am I doing wrong?
I would like to use the freetype module to render text from a BDF font file, but I am getting a vague error. I am using the 8x8 font from this site: http://beej.us/c64bdf/c64bdf/c64.bdf import os os.environ[PYGAME_FREETYPE] = 1 import pygame pygame.font module 'pygame.ftfont' from 'C:\\Python33\\lib\\site-packages\\pygame\\ftfont.py' import pygame.freetype pygame.freetype.init() c64 = pygame.freetype.Font(r'C:\Users\marshalls\Downloads\c64.bdf', 8) s = c64.render('TEST', pygame.Color('white'), pygame.Color('blue')) Traceback (most recent call last): File stdin, line 1, in module SystemError: error return without exception set Can somebody spot what I am doing wrong? I am using a recent build of pygame 1.9.2pre and Python 3.3 (32-bit) on Windows. Thanks, Jason
Re: [pygame] Pygame.org is down?
If you're desperate for online docs, they are still available (though outdated) at http://pygame.seul.org/docs/. Jason From: Sean Felipe Wolfe ether@gmail.com To: pygame-users@seul.org Sent: Sunday, September 15, 2013 4:26 AM Subject: Re: [pygame] Pygame.org is down? Aaaah! Help!! Just thought that might be useful. Er maybe not. On Sep 15, 2013 4:38 AM, Dominik George n...@naturalnet.de wrote: Hi, The pygame.org website seems to be down. Is there a problem with the host? I found it to not resolve yesterday, but didn't investigate further. I tried to reach both DNS servers (a.ns.py3d.org and b.ns.f0o.com) and both cannot be resolved either. It seems suspicious that both py3d.org and f0o.com have nameservers in their own domain, but do not have glue records in Whois. -nik -- Wer den Grünkohl nicht ehrt, ist der Mettwurst nicht wert! PGP-Fingerprint: 3C9D 54A4 7575 C026 FB17 FD26 B79A 3C16 A0C4 F296
Re: [pygame] Re: Developing on a Mac
See http://www.python.org/download/mac/tcltk/for a description of IDLE problems on newer versions of OS X. Jason From: Aikiman j...@diadem.co.nz To: pygame-users@seul.org Sent: Friday, June 14, 2013 4:56 AM Subject: [pygame] Re: Developing on a Mac I think my IDLE shat itself a few months ago on Lion, I think there is a bug with Lion or IDLE not sure which so I cant use IDEL anymore, instead I code with Eclipse and run the game inside Terminal. Whatever errors I get, Terminal spits out line numbers and error codes easily enough to read and I fix them. If you download Eclipse you need to install pydev, to be honest I havent set it up properly and you may be able to run the game from eclipse without Terminal but because it isnt setup right, I just save the code and use terminal instead. -- View this message in context: http://pygame-users.25799.x6.nabble.com/Developing-on-a-Mac-tp633p743.html Sent from the pygame-users mailing list archive at Nabble.com.
Re: [pygame] spam on cookbook?
I know that the WordPress CMS has a plugin called Bad Behavior for blocking wiki spam, but I haven't tried it myself. Jason From: Jake b ninmonk...@gmail.com To: pygame-users@seul.org pygame-users@seul.org Sent: Tuesday, May 14, 2013 7:43 PM Subject: Re: [pygame] spam on cookbook? I wonder there must be some method or different CMS that would help with the spam issue. On Tue, May 14, 2013 at 4:28 PM, James Paige b...@hamsterrepublic.com wrote: That is definitely spam. Many of the wiki pages on pygame.org are still plagued with it :( On Tue, May 14, 2013 at 04:04:39PM -0500, Jake b wrote: I found strange links on the bottom of the cookbook. It just says http://spam link redacted -- Jake -- Jake
Re: [pygame] PyGame website
What's stopping anyone from making a new website? I'd be willing to contribute if someone else takes the initiative. On Saturday, December 1, 2012 8:10:24 AM UTC-5, Radomir Dopieralski wrote: On Sat, Dec 1, 2012 at 1:36 PM, Thomas Kluyver tak...@gmail.comjavascript: wrote: Does anyone know who runs the website? Here's what I know. According to whois, the domain is registered to Contact Privacy Inc. Customer 0118713523, and the server is hosted by Hetzner Online AG, which is a big hosting provider. The website itself contains no contact information or address, which may or may not be against the law, depending on the country. The only person who I know has access to the website is not responding to e-mail or other contact attempts from multiple people since 3 months, although I can see he is active online. The people on the mailing list and IRC channel either have no idea or simply don't care. Yes, this is frustrating. No, I don't know what else could be done, apart from just making a separate website, which may actually be for the best, even though I'm a great fan of gradual improvement. If anybody has any better information or ideas, I'd love to hear them. Sorry if this all sounds negative, I'm sure this situation didn't arise because of malice or bad will. But it still hurts to see people wanting to help and being unable to do it. -- Radomir Dopieralski, http://sheep.art.pl
Re: [pygame] OSX 10.7/10.8 Regression
Does performance improve on OS X 10.7/10.8 if you disable every CPU core except for the first one? http://developer.apple.com/library/mac/#qa/qa1141/_index.html From: Ryan Hope rmh3...@gmail.com To: pygame-users@seul.org Sent: Saturday, October 20, 2012 10:39 PM Subject: Re: [pygame] OSX 10.7/10.8 Regression This was with software. On Sat, Oct 20, 2012 at 11:12 PM, Jason M. Marshall j...@yahoo.com wrote: Oh, right. I forgot. Which renderer are you using? Software or OpenGL? From: Ryan Hope rmh3...@gmail.com To: pygame-users@seul.org Sent: Saturday, October 20, 2012 9:20 AM Subject: Re: [pygame] OSX 10.7/10.8 Regression The doublebuf flag doesnt do anything for sw surfaces. On Fri, Oct 19, 2012 at 11:19 PM, Jason M. Marshall j...@yahoo.com wrote: Is there a significant difference in performance between using the DOUBLEBUF flag and not using the DOUBLEBUF flag? e.g. Using DOUBLEBUF: screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN | pygame.DOUBLEBUF) Not using DOUBLEBUF: screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN) From: Ryan Hope rmh3...@gmail.com To: pygame-users@seul.org Sent: Sunday, October 14, 2012 9:32 PM Subject: Re: [pygame] OSX 10.7/10.8 Regression I've converted my app to do dirty rect animation and it still super slow on MacOS 10.7/10.8. When I profile my code, pygame.display.update take ~20ms per call on 10.7/10.8, on my 10.6 system which has slower CPU and GPU pygame.display.update takes 0.01ms per call. What gives? Am I the only one that is experiencing this? On Wed, Oct 10, 2012 at 1:01 PM, Ryan Hope rmh3...@gmail.com wrote: I cleared out all the old pygame and sdl code and install the new stuff. Im fairly confident I did this correctly as the game runs with out errors and pygame is reporting the expected sdl version. On Wed, Oct 10, 2012 at 12:57 PM, Jason M. Marshall j...@yahoo.com wrote: Assuming that you installed the SDL 1.2.15 build correctly, I'm stumped. Sorry. From: Ryan Hope rmh3...@gmail.com To: pygame-users@seul.org Sent: Wednesday, October 10, 2012 11:02 AM Subject: Re: [pygame] OSX 10.7/10.8 Regression I just got a build of pygame against SDL 1.2.15, its still terribly slow in fullscreen. On Wed, Oct 10, 2012 at 11:55 AM, Ryan Hope rmh3...@gmail.com wrote: Apple 2.7, I was using this http://www.pygame.org/ftp/pygame-1.9.2pre-py2.7-macosx10.7.mpkg.zip On Wed, Oct 10, 2012 at 11:52 AM, Jason M. Marshall j...@yahoo.com wrote: I think you should try a build of pygame that uses SDL 1.2.15. Which version of Python are you using? From: Ryan Hope rmh3...@gmail.com To: pygame-users@seul.org Sent: Wednesday, October 10, 2012 9:06 AM Subject: Re: [pygame] OSX 10.7/10.8 Regression No, 1.2.14 On Wed, Oct 10, 2012 at 9:58 AM, Jason M. Marshall j...@yahoo.com wrote: Ryan, Does your build of pygame use the new SDL 1.2.15? Enter this into an interactive Python window: import pygame pygame.get_sdl_version() Jason From: Ryan Hope rmh3...@gmail.com To: pygame-users@seul.org Sent: Tuesday, October 9, 2012 7:49 PM Subject: [pygame] OSX 10.7/10.8 Regression Has anyone noticed any issues running their pygame apps in fullscreen on 10.7 or 10.8. I have an app that runs fine on 10.5 but on a faster laptop with 10.8 and an even faster laptop with 10.7 the app runs like shit in fullscreen. -- Ryan Hope, M.S. CogWorks Lab Cognitive Science Department Rensselaer Polytechnic Institute -- Ryan Hope, M.S. CogWorks Lab Cognitive Science Department Rensselaer Polytechnic Institute -- Ryan Hope, M.S. CogWorks Lab Cognitive Science Department Rensselaer Polytechnic Institute -- Ryan Hope, M.S. CogWorks Lab Cognitive Science Department Rensselaer Polytechnic Institute -- Ryan Hope, M.S. CogWorks Lab Cognitive Science Department Rensselaer Polytechnic Institute -- Ryan Hope, M.S. CogWorks Lab Cognitive Science Department Rensselaer Polytechnic Institute -- Ryan Hope, M.S. CogWorks Lab Cognitive Science Department Rensselaer Polytechnic Institute -- Ryan Hope, M.S. CogWorks Lab Cognitive Science Department Rensselaer Polytechnic Institute
Re: [pygame] OSX 10.7/10.8 Regression
Oh, right. I forgot. Which renderer are you using? Software or OpenGL? From: Ryan Hope rmh3...@gmail.com To: pygame-users@seul.org Sent: Saturday, October 20, 2012 9:20 AM Subject: Re: [pygame] OSX 10.7/10.8 Regression The doublebuf flag doesnt do anything for sw surfaces. On Fri, Oct 19, 2012 at 11:19 PM, Jason M. Marshall j...@yahoo.com wrote: Is there a significant difference in performance between using the DOUBLEBUF flag and not using the DOUBLEBUF flag? e.g. Using DOUBLEBUF: screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN | pygame.DOUBLEBUF) Not using DOUBLEBUF: screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN) From: Ryan Hope rmh3...@gmail.com To: pygame-users@seul.org Sent: Sunday, October 14, 2012 9:32 PM Subject: Re: [pygame] OSX 10.7/10.8 Regression I've converted my app to do dirty rect animation and it still super slow on MacOS 10.7/10.8. When I profile my code, pygame.display.update take ~20ms per call on 10.7/10.8, on my 10.6 system which has slower CPU and GPU pygame.display.update takes 0.01ms per call. What gives? Am I the only one that is experiencing this? On Wed, Oct 10, 2012 at 1:01 PM, Ryan Hope rmh3...@gmail.com wrote: I cleared out all the old pygame and sdl code and install the new stuff. Im fairly confident I did this correctly as the game runs with out errors and pygame is reporting the expected sdl version. On Wed, Oct 10, 2012 at 12:57 PM, Jason M. Marshall j...@yahoo.com wrote: Assuming that you installed the SDL 1.2.15 build correctly, I'm stumped. Sorry. From: Ryan Hope rmh3...@gmail.com To: pygame-users@seul.org Sent: Wednesday, October 10, 2012 11:02 AM Subject: Re: [pygame] OSX 10.7/10.8 Regression I just got a build of pygame against SDL 1.2.15, its still terribly slow in fullscreen. On Wed, Oct 10, 2012 at 11:55 AM, Ryan Hope rmh3...@gmail.com wrote: Apple 2.7, I was using this http://www.pygame.org/ftp/pygame-1.9.2pre-py2.7-macosx10.7.mpkg.zip On Wed, Oct 10, 2012 at 11:52 AM, Jason M. Marshall j...@yahoo.com wrote: I think you should try a build of pygame that uses SDL 1.2.15. Which version of Python are you using? From: Ryan Hope rmh3...@gmail.com To: pygame-users@seul.org Sent: Wednesday, October 10, 2012 9:06 AM Subject: Re: [pygame] OSX 10.7/10.8 Regression No, 1.2.14 On Wed, Oct 10, 2012 at 9:58 AM, Jason M. Marshall j...@yahoo.com wrote: Ryan, Does your build of pygame use the new SDL 1.2.15? Enter this into an interactive Python window: import pygame pygame.get_sdl_version() Jason From: Ryan Hope rmh3...@gmail.com To: pygame-users@seul.org Sent: Tuesday, October 9, 2012 7:49 PM Subject: [pygame] OSX 10.7/10.8 Regression Has anyone noticed any issues running their pygame apps in fullscreen on 10.7 or 10.8. I have an app that runs fine on 10.5 but on a faster laptop with 10.8 and an even faster laptop with 10.7 the app runs like shit in fullscreen. -- Ryan Hope, M.S. CogWorks Lab Cognitive Science Department Rensselaer Polytechnic Institute -- Ryan Hope, M.S. CogWorks Lab Cognitive Science Department Rensselaer Polytechnic Institute -- Ryan Hope, M.S. CogWorks Lab Cognitive Science Department Rensselaer Polytechnic Institute -- Ryan Hope, M.S. CogWorks Lab Cognitive Science Department Rensselaer Polytechnic Institute -- Ryan Hope, M.S. CogWorks Lab Cognitive Science Department Rensselaer Polytechnic Institute -- Ryan Hope, M.S. CogWorks Lab Cognitive Science Department Rensselaer Polytechnic Institute -- Ryan Hope, M.S. CogWorks Lab Cognitive Science Department Rensselaer Polytechnic Institute
Re: [pygame] OSX 10.7/10.8 Regression
Is there a significant difference in performance between using the DOUBLEBUF flag and not using the DOUBLEBUF flag? e.g. Using DOUBLEBUF: screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN | pygame.DOUBLEBUF) Not using DOUBLEBUF: screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN) From: Ryan Hope rmh3...@gmail.com To: pygame-users@seul.org Sent: Sunday, October 14, 2012 9:32 PM Subject: Re: [pygame] OSX 10.7/10.8 Regression I've converted my app to do dirty rect animation and it still super slow on MacOS 10.7/10.8. When I profile my code, pygame.display.update take ~20ms per call on 10.7/10.8, on my 10.6 system which has slower CPU and GPU pygame.display.update takes 0.01ms per call. What gives? Am I the only one that is experiencing this? On Wed, Oct 10, 2012 at 1:01 PM, Ryan Hope rmh3...@gmail.com wrote: I cleared out all the old pygame and sdl code and install the new stuff. Im fairly confident I did this correctly as the game runs with out errors and pygame is reporting the expected sdl version. On Wed, Oct 10, 2012 at 12:57 PM, Jason M. Marshall j...@yahoo.com wrote: Assuming that you installed the SDL 1.2.15 build correctly, I'm stumped. Sorry. From: Ryan Hope rmh3...@gmail.com To: pygame-users@seul.org Sent: Wednesday, October 10, 2012 11:02 AM Subject: Re: [pygame] OSX 10.7/10.8 Regression I just got a build of pygame against SDL 1.2.15, its still terribly slow in fullscreen. On Wed, Oct 10, 2012 at 11:55 AM, Ryan Hope rmh3...@gmail.com wrote: Apple 2.7, I was using this http://www.pygame.org/ftp/pygame-1.9.2pre-py2.7-macosx10.7.mpkg.zip On Wed, Oct 10, 2012 at 11:52 AM, Jason M. Marshall j...@yahoo.com wrote: I think you should try a build of pygame that uses SDL 1.2.15. Which version of Python are you using? From: Ryan Hope rmh3...@gmail.com To: pygame-users@seul.org Sent: Wednesday, October 10, 2012 9:06 AM Subject: Re: [pygame] OSX 10.7/10.8 Regression No, 1.2.14 On Wed, Oct 10, 2012 at 9:58 AM, Jason M. Marshall j...@yahoo.com wrote: Ryan, Does your build of pygame use the new SDL 1.2.15? Enter this into an interactive Python window: import pygame pygame.get_sdl_version() Jason From: Ryan Hope rmh3...@gmail.com To: pygame-users@seul.org Sent: Tuesday, October 9, 2012 7:49 PM Subject: [pygame] OSX 10.7/10.8 Regression Has anyone noticed any issues running their pygame apps in fullscreen on 10.7 or 10.8. I have an app that runs fine on 10.5 but on a faster laptop with 10.8 and an even faster laptop with 10.7 the app runs like shit in fullscreen. -- Ryan Hope, M.S. CogWorks Lab Cognitive Science Department Rensselaer Polytechnic Institute -- Ryan Hope, M.S. CogWorks Lab Cognitive Science Department Rensselaer Polytechnic Institute -- Ryan Hope, M.S. CogWorks Lab Cognitive Science Department Rensselaer Polytechnic Institute -- Ryan Hope, M.S. CogWorks Lab Cognitive Science Department Rensselaer Polytechnic Institute -- Ryan Hope, M.S. CogWorks Lab Cognitive Science Department Rensselaer Polytechnic Institute -- Ryan Hope, M.S. CogWorks Lab Cognitive Science Department Rensselaer Polytechnic Institute
Re: [pygame] OSX 10.7/10.8 Regression
Ryan, Does your build of pygame use the new SDL 1.2.15? Enter this into an interactive Python window: import pygame pygame.get_sdl_version() Jason From: Ryan Hope rmh3...@gmail.com To: pygame-users@seul.org Sent: Tuesday, October 9, 2012 7:49 PM Subject: [pygame] OSX 10.7/10.8 Regression Has anyone noticed any issues running their pygame apps in fullscreen on 10.7 or 10.8. I have an app that runs fine on 10.5 but on a faster laptop with 10.8 and an even faster laptop with 10.7 the app runs like shit in fullscreen. -- Ryan Hope, M.S. CogWorks Lab Cognitive Science Department Rensselaer Polytechnic Institute
Re: [pygame] OSX 10.7/10.8 Regression
I think you should try a build of pygame that uses SDL 1.2.15. Which version of Python are you using? From: Ryan Hope rmh3...@gmail.com To: pygame-users@seul.org Sent: Wednesday, October 10, 2012 9:06 AM Subject: Re: [pygame] OSX 10.7/10.8 Regression No, 1.2.14 On Wed, Oct 10, 2012 at 9:58 AM, Jason M. Marshall j...@yahoo.com wrote: Ryan, Does your build of pygame use the new SDL 1.2.15? Enter this into an interactive Python window: import pygame pygame.get_sdl_version() Jason From: Ryan Hope rmh3...@gmail.com To: pygame-users@seul.org Sent: Tuesday, October 9, 2012 7:49 PM Subject: [pygame] OSX 10.7/10.8 Regression Has anyone noticed any issues running their pygame apps in fullscreen on 10.7 or 10.8. I have an app that runs fine on 10.5 but on a faster laptop with 10.8 and an even faster laptop with 10.7 the app runs like shit in fullscreen. -- Ryan Hope, M.S. CogWorks Lab Cognitive Science Department Rensselaer Polytechnic Institute -- Ryan Hope, M.S. CogWorks Lab Cognitive Science Department Rensselaer Polytechnic Institute
Re: [pygame] OSX 10.7/10.8 Regression
Assuming that you installed the SDL 1.2.15 build correctly, I'm stumped. Sorry. From: Ryan Hope rmh3...@gmail.com To: pygame-users@seul.org Sent: Wednesday, October 10, 2012 11:02 AM Subject: Re: [pygame] OSX 10.7/10.8 Regression I just got a build of pygame against SDL 1.2.15, its still terribly slow in fullscreen. On Wed, Oct 10, 2012 at 11:55 AM, Ryan Hope rmh3...@gmail.com wrote: Apple 2.7, I was using this http://www.pygame.org/ftp/pygame-1.9.2pre-py2.7-macosx10.7.mpkg.zip On Wed, Oct 10, 2012 at 11:52 AM, Jason M. Marshall j...@yahoo.com wrote: I think you should try a build of pygame that uses SDL 1.2.15. Which version of Python are you using? From: Ryan Hope rmh3...@gmail.com To: pygame-users@seul.org Sent: Wednesday, October 10, 2012 9:06 AM Subject: Re: [pygame] OSX 10.7/10.8 Regression No, 1.2.14 On Wed, Oct 10, 2012 at 9:58 AM, Jason M. Marshall j...@yahoo.com wrote: Ryan, Does your build of pygame use the new SDL 1.2.15? Enter this into an interactive Python window: import pygame pygame.get_sdl_version() Jason From: Ryan Hope rmh3...@gmail.com To: pygame-users@seul.org Sent: Tuesday, October 9, 2012 7:49 PM Subject: [pygame] OSX 10.7/10.8 Regression Has anyone noticed any issues running their pygame apps in fullscreen on 10.7 or 10.8. I have an app that runs fine on 10.5 but on a faster laptop with 10.8 and an even faster laptop with 10.7 the app runs like shit in fullscreen. -- Ryan Hope, M.S. CogWorks Lab Cognitive Science Department Rensselaer Polytechnic Institute -- Ryan Hope, M.S. CogWorks Lab Cognitive Science Department Rensselaer Polytechnic Institute -- Ryan Hope, M.S. CogWorks Lab Cognitive Science Department Rensselaer Polytechnic Institute -- Ryan Hope, M.S. CogWorks Lab Cognitive Science Department Rensselaer Polytechnic Institute
Re: [pygame] Will Pygames run with python 3 or greater on MAC ?
Mfred, A build posted here might work for you: https://bitbucket.org/pygame/pygame/issue/110/python-32-os-x-106-binary-build-needed Back up your computer before trying it! Jason From: Mfred mfred...@mdanderson.org To: pygame-users@seul.org Sent: Monday, September 10, 2012 9:35 PM Subject: [pygame] Will Pygames run with python 3 or greater on MAC ? The web is filled with obscure,difficult to follow references, and out of context postings for getting pygames to run with python V3 or greater on a MAC. Most people point out that there is an installer already for python 3.2.3 for MAC, but there is little info how well pygames (and which versions of pygames) could successfully run with anything beyond python 2.7 on a MAC. Mixed into this problem are the 3 different MAC OS, leopard, lion, and now mountain lion. 1)So I am wondering what peoples experience are with pygames plus python 3 version or greater on all these various MAC OS. 2) Also, if somebody were up to the challange of creating better step by step instructions for a novice to homebew install pygames for all these MAC OS with python 3 (assuming it works at all). My 13-year old son is trying to complete a very nice pygames tutorial on his Mac running mountain lion, and the tutorial is geared for python 3 and above. So now we are stuck, because the tutorial is written for python 3. Any help or advice would be appreciated. Thanks.
[pygame] Default SDL_VIDEODRIVER for Windows XP is now windib
To resolve issue #31, I have changed the default SDL_VIDEODRIVER setting for Windows XP from directx to windib. This improves compatibility with newer hardware. (directx means DirectX 5 from 1997, which is not supported well by hardware manufacturers nowadays.) For details, read this page: https://bitbucket.org/pygame/pygame/issue/31/pygameerror-no-available-video-device
Re: [pygame] pgreloaded on the move
Hooray! From: Marcus von Appen m...@sysfault.org To: pygame-users@seul.org Sent: Tuesday, June 26, 2012 2:22 PM Subject: [pygame] pgreloaded on the move It got quite quiet for the last months (year) around pgreloaded. Apologies to everyone who had expectations in it. Since March I started over with moving on to SDL2, stopping the SDL1.2 rewrite completely, since I did not see any major benefits from it anymore. That said, pgreloaded is back on track with focusing on SDL2 and friends. It does not use any C code anymore, instead it makes heavy use of ctypes and hence is able to run with less implications on different Python implementations. Right now it offers bindings for - SDL2 (bleeding edge HG) - SDL2_image (bleeding edge HG) - SDL2_ttf (bleeding edge HG) - OpenAL (1.0+) Further features are: - simple component-oriented pattern system for core classes in graphics and audio - CPython 2.7 and 3.1+ support - PyPy 1.8+ support (with minor regressions) - IronPython 2.7.x support (with several regressions) - Public Domain/Zlib licensing for the code base The HG version ships with prebuilt DLLs for Win32 platforms (32 and 64-bit) and probably lots of dragons hidden inside the code. You can get your copy at http://code.google.com/p/pgreloaded/ If someone is interested in taking over the SDL1.2 pgreloaded code for maintenance and further code sharing and integration with Pygame, please let me know. Helping hands are welcome Marcus
Re: [pygame] Compilation
PyInstaller supposedly suports Mac OS X now, but I haven't tried it yet. http://www.pyinstaller.org/ From: Zack Baker zbaker1...@gmail.com To: Pygame pygame-users@seul.org Sent: Thursday, February 16, 2012 7:50 PM Subject: [pygame] Compilation I have a Mac with pygame 2.7.2 and pygasme 1.9.1. Is it possiblerr for me to 'compile' my 2d game for distribution. BTW py2app has not really worked for me. Are there any alternatives? -Zack
Re: [pygame] Chose a specific display...
Not very easily. If you know the dimensions of your displays, you might be able to use the SDL_VIDEO_WINDOW_POS environment variable to place the pygame window on the non-primary display. Jason From: Gene Buckle ge...@deltasoft.com To: pygame-users@seul.org Sent: Friday, December 16, 2011 3:43 PM Subject: [pygame] Chose a specific display... Is it possible to chose the output display with pygame yet? tnx. g. -- Proud owner of F-15C 80-0007 http://www.f15sim.com - The only one of its kind. http://www.diy-cockpits.org/coll - Go Collimated or Go Home. Some people collect things for a hobby. Geeks collect hobbies. ScarletDME - The red hot Data Management Environment A Multi-Value database for the masses, not the classes. http://www.scarletdme.org - Get it _today_! Political correctness is a doctrine, fostered by a delusional, illogical minority, and rabidly promoted by an unscrupulous mainstream media, which holds forth the proposition that it is entirely possible to pick up a turd by the clean end.
Re: [pygame] pygame.time source code
Sean, Here's the current source code for the time module: https://bitbucket.org/pygame/pygame/src/dd6752f761be/src/time.c Jason From: Sean Wolfe ether@gmail.com To: pygame-users pygame-users@seul.org Sent: Wednesday, November 9, 2011 10:44 AM Subject: [pygame] pygame.time source code I'm curious to look at the core pygame.time code. I see a time.pyd file but no .py file. Is it compiled from C then? Any way I can look at the time or Clock sourcecode? I'm trying to clone the pygame clock functionality in Java. Interesting exercise ... kind of. Thanks! -- A musician must make music, an artist must paint, a poet must write, if he is to be ultimately at peace with himself. - Abraham Maslow
Re: [pygame] Pygame 1.9.2a0 questions
Florian, Here's the link to the WHATSNEW file: https://bitbucket.org/pygame/pygame/src/efe9c4a4e42f/WHATSNEW Jason From: Florian Krause siebenhundertz...@gmail.com To: pygame-users@seul.org Sent: Wednesday, October 5, 2011 6:25 AM Subject: Re: [pygame] Pygame 1.9.2a0 questions Hi, thanks for your answer Rene. Unfortunately your answer to question 3 does not help. The Pygame download page says that 1.9.1 was released August 6, 2009. However, the entries in What's new end at July 17 2009. Florian
[pygame] SDL 1.2.13 or SDL 1.2.14
Will the final release for pygame 1.9.2 use SDL 1.2.13 or SDL 1.2.14? (Using Mac OS X, I ran into a bug that's been fixed in SDL 1.2.14 according to the change log.) Thanks, Jason
Re: [pygame] pygame on Citrix?
If your OS is Windows XP or earlier, you may need to do the following before importing pygame: import os os.environ['SDL_VIDEODRIVER'] = 'windib' Jason From: Brooks, Lewis broo...@mail.weston.org To: 'pygame-users@seul.org' pygame-users@seul.org Sent: Monday, August 15, 2011 1:54 PM Subject: [pygame] pygame on Citrix? I was asked to install pygame 1.9.1 (along with python 2.5.4 and wing ide 3.2) on our school's citrix servers. The programs are installed and running, but when a program is run we get the following command and error: self.screen = pygame.display.set_mode(size) pygame.error: No available video device I know nothing about this software and the teacher who uses it is away until the start of school, but he tells me the program works fine on his laptop. Can you point me to anything that will help solve this? Or is pygame just incompatible with Citrix? We've encountered that several times, but I can't find any documentation to that affect. Any help would be greatly appreciated. Thanks, Lewis Brooks Network Tech Support Weston Public Schools
Re: [pygame] BUG: Memoryleak in pygame.sprite.GroupSingle
Tobias, Try pygame revision 2953 and confirm that the bug is fixed. http://thorbrian.com/pygame/builds.php Thanks! Jason From: Lenard Lindstrom le...@telus.net To: pygame-users@seul.org Sent: Fri, November 19, 2010 10:56:14 PM Subject: Re: [pygame] BUG: Memoryleak in pygame.sprite.GroupSingle Hi, Yes Tobias, that is right. GroupSingle.draw is inherited from AbstractGroup, which adds each sprite drawn to the spritedict dictionary. It is a bug, though technically not a memory leak since the sprites are still referenced. Lenard Lindstrom On 17/11/10 02:48 PM, Jason M. Marshall wrote: Tobias, Here's my theory: I think that GroupSingle's spritedict dictionary is growing by 1 sprite every time that the draw method is called. The spritedict dictionary is not emptied by GroupSingle, so a reference to each newly-created sprite remains even after a new sprite has been put into GroupSingle. I'll have to test my theory before I'm certain though. If that's the problem, then I'll fix it. Jason *From:* Tobias Steinrücken t.steinruec...@conesoft.org *To:* pygame-users@seul.org *Sent:* Tue, November 16, 2010 4:18:04 PM *Subject:* [pygame] BUG: Memoryleak in pygame.sprite.GroupSingle Hello, for me it seems that GroupSingle dosnt release references to the old Sprite when a new Sprite is beeing assigned. ive attached 2 Files. pygame_memleak.py actually triggers the leak (Dont uncomment the sleep - it will eat your memory instantly!). In the second file pygame_memleak2.py i just changed GroupSingle to Group and s.sprite = ... to s.empty(); s.add( ... ) to achieve the same behaviour as GroupSingle - and this one works fine. Im using: Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56) [GCC 4.4.5] (64-Bit) Pygame 1.9.1release (The default Ubuntu 10.10 setup -but ive seen this on older Versions of Python aswell) -- Conesoft / Brose - Steinrücken GbR Ehm. Service4every1 Flemerskamp 19 a 44319 Dortmund Telefon: +49 (0) 231 / 108722231* Fax: +49 (0) 231 / 283798 E-Mail: t.steinruec...@conesoft.org mailto:t.steinruec...@conesoft.org Gesellschaftsform: Gesellschaft bürgerlichen Rechts Sitz: Dortmund Geschäftsführer: Roland Brose, Tobias Steinrücken USt-IdNr.: DE237763154
Re: [pygame] Re: Suppress Quickdraw deprecation warning?
Pygame itself needs to be upgraded. From: Clay H. cchea...@gmail.com To: pygame-users@seul.org Sent: Thu, November 18, 2010 9:13:11 AM Subject: [pygame] Re: Suppress Quickdraw deprecation warning? Not trying to be obtuse here, but are you saying that pygame itself needs to be upgraded or that we, as users, need to install an upgraded version? On Nov 3, 3:01 pm, René Dudfield ren...@gmail.com wrote: Yeah, upgrade pygame to use the latest SDL :) On Wed, Nov 3, 2010 at 7:50 PM, Greg Ewing greg.ew...@canterbury.ac.nzwrote: Is there any way to suppress the Apps should cease using Quickdraw and move to Quartz message that appears every time a pygame program is run on MacOSX 10.6? -- Greg
Re: [pygame] BUG: Memoryleak in pygame.sprite.GroupSingle
Tobias, Here's my theory: I think that GroupSingle's spritedict dictionary is growing by 1 sprite every time that the draw method is called. The spritedict dictionary is not emptied by GroupSingle, so a reference to each newly-created sprite remains even after a new sprite has been put into GroupSingle. I'll have to test my theory before I'm certain though. If that's the problem, then I'll fix it. Jason From: Tobias Steinrücken t.steinruec...@conesoft.org To: pygame-users@seul.org Sent: Tue, November 16, 2010 4:18:04 PM Subject: [pygame] BUG: Memoryleak in pygame.sprite.GroupSingle Hello, for me it seems that GroupSingle dosnt release references to the old Sprite when a new Sprite is beeing assigned. ive attached 2 Files. pygame_memleak.py actually triggers the leak (Dont uncomment the sleep - it will eat your memory instantly!). In the second file pygame_memleak2.py i just changed GroupSingle to Group and s.sprite = ... to s.empty(); s.add( ... ) to achieve the same behaviour as GroupSingle - and this one works fine. Im using: Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56) [GCC 4.4.5] (64-Bit) Pygame 1.9.1release (The default Ubuntu 10.10 setup -but ive seen this on older Versions of Python aswell) -- Conesoft / Brose - Steinrücken GbR Ehm. Service4every1 Flemerskamp 19 a 44319 Dortmund Telefon: +49 (0) 231 / 108722231* Fax: +49 (0) 231 / 283798 E-Mail: t.steinruec...@conesoft.org Gesellschaftsform: Gesellschaft bürgerlichen Rechts Sitz: Dortmund Geschäftsführer: Roland Brose, Tobias Steinrücken USt-IdNr.: DE237763154
Re: [pygame] The Spectacularly Adequate Build Page is stuck at revision 2814
It looks like the Spectacularly Adequate Build Page is working again, but hey, there's no download for Python 2.7! Fix that before December lest Jer Juke taunt us a second time! (Just kidding.) Jason From: Brian Fisher br...@hamsterrepublic.com To: pygame-users@seul.org Sent: Sun, July 25, 2010 6:33:07 PM Subject: Re: [pygame] The Spectacularly Adequate Build Page is stuck at revision 2814 Yeah, basically lost my cron in operating system updates didn't know. thanks for the heads up, I'll get them going again when I get a chance On Thu, Jul 22, 2010 at 12:16 PM, Lenard Lindstrom le...@telus.net wrote: Hi, Brian Fisher, the build page hasn't updated since May 28. Is there a problem? Lenard Lindstrom
Re: [pygame] Writing a simple GUI
Generate a new callback function for each unit instance. In the example below, each instance has its own lambda function that is assigned to func. Each lambda function remembers the instance's label as the argument's default value. class unit(object): def __init__(self, label): self.func = lambda x=label: another_function(x) def another_function(x): print x u1 = unit(1) u2 = unit(2) u1.func() 1 u2.func() 2 Jason From: Herman amberautumnameth...@gmail.com To: pygame-users@seul.org Sent: Wed, June 2, 2010 3:18:03 AM Subject: [pygame] Writing a simple GUI Hi everyone, I've just started learning Pygame (wrote a tetris game) and currently I'm trying to write a simple turn-based strategy game, similar to Advance Wars. What I need to implement now is a simple GUI system which essentially provides menus to select what each unit does. I decided to try to have a Tmenu class which consists of several Toption instances (each one representing a menu option). The Toption basically consists of a label member, a image member and a func member. The func member is supposed to be a function that will be executed when that specific option is selected. But if I wanted to say, have an option for the selected unit to attack an adjacent unit, the function I assigned to func couldn't possibly know which unit is attacking which (since the arguments between different functions should vary). I thought about having a global variable that stores arguments that the function could access but that seems to complicate the code and I read that global variable use should be minimized. So I'm wondering if someone could show me how I could solve this problem so that the each menu option's function will have the information it needs when it executes?
Re: [pygame] question about Rect objects
Alex, In your situation, I would approach the problem differently. I think that the sprite module's Group class and Sprite class would save you some time. If I were creating your GUI, I would pre-draw red, blue, and white images. Then, I would make a Sprite for each square on your grid. I would make references to the Sprite in two locations. First, I would put each Sprite in a position in a 2D array. (I would implement this 2D array as a list of lists; there's no need to be fancy.) Second, I would add every sprite to a Group. For each sprite, a Rect would represent the Sprite's position and size on the screen; this Rect would be assigned to Sprite.rect. The state of each square (hit, miss, etc.) would be indicated by changing the Sprite.image attribute to the appropriate pre-drawn image. Jason From: Alex Hall mehg...@gmail.com To: pygame-users@seul.org Sent: Mon, May 17, 2010 11:24:15 PM Subject: [pygame] question about Rect objects Hi all, I am new to this list. A quick intro: I am a blind college student studying for a computer science degree. I use Jaws for Windows from Freedom Scientific to read the content of my computer screen. I have a bit of vision, enough to see high-contrast colors in a big enough window (500x500 or larger is good). I use Python2.6 with the latest release of Pygame. I am trying to add a visual element to a Battleship game I wrote last year. Originally, the game was all based on screen readers; the user could arrow around and their screen reader (the program that reads text on the computer) would announce which square they were on and the status of that square, among other information. No visuals were needed since most screen readers offer an API which I can interface with directly. However, I want to expand this to a 2-player, online game so my sighted friend and I can play against each other. Of course, for that, I need to give him something to look at. I am trying to generate a grid of rectangles, each rect a square on the classic Battleship grid. All rects will start out gray, and will then change color as the game progresses (red=hit, white=miss, blue=enemy sighted). I have a Square class, which has variables like firedOn or ship. That way I can examine the square on which the user fired, change its firedOn from False to True, and say something like if(grid[i][j].ship!=None): #change color to red. You get the idea. Anyway, the pygame documentation says rect cannot be subclassed. Is there any way, then, for me to put a rect object in my Square class, then draw the grid using my grid (a 2d array of Squares)? I guess what I want is to say: bg.replace_ip(red, grid[i][j].rect) #change fired-on grid square to red and redraw it after building my grid of rects? I am quite new to Pygame, and this is my first time venturing into the world of generating shapes and grids; up to now, my involvement in visual elements has been some experimenting with wxPython and XRC, and that package does most of the layout for you. Any help with this grid problem would be greatly appreciated, and please tell me if my above question and explanation do not make sense (as I doubt they will). -- Have a great day, Alex (msg sent from GMail website) mehg...@gmail.com; http://www.facebook.com/mehgcap
Re: [pygame] using pil to covert rgb into grayscale
Stas, This is simple and it works. Jason def convert_to_gs(surf): width, height = surf.get_size() for x in range(width): for y in range(height): red, green, blue, alpha = surf.get_at((x, y)) average = (red + green + blue) // 3 gs_color = (average, average, average, alpha) surf.set_at((x, y), gs_color) From: stas zytkiewicz stas.zytkiew...@gmail.com To: pygame-users@seul.org Sent: Thu, April 29, 2010 8:56:37 AM Subject: [pygame] using pil to covert rgb into grayscale Hello, I'm trying to convert a RGB image into a grayscaled image using PIL but pygame keeps throwing this error: ValueError: Buffer length does not equal format and resolution size Why this code doesn't work, I have no idea :-( ('surf' is a pygame.Surface) pilimg = Image.fromstring('RGBA', surf.get_size(), pygame.image.tostring(surf, 'RGBA')) pilimg = pilimg.convert('L') pilimg.show()# it's grayscaled surf_gr = pygame.image.fromstring(pilimg.tostring(), pilimg.size, 'RGBA') OK, I know the last 'RGBA' probably isn't correct but 'P' isn't either nor is one of the other possible modes. Can someone explain to me how to properly convert a RGB into grayscale, with or without PIL. Thanks, Stas -- Free-source educational programs for schools http://www.schoolsplay.org and http://wiki.laptop.org/go/Schoolsplay http://gvr.sf.net and http://wiki.laptop.org/go/Guido_van_Robot
Re: [pygame] informal poll on Windows python version
Windows Version: Windows XP Pygame Version: 1.9.2pre Python Version: 2.5 and 3.1
[pygame] sprite module optimizations have been uploaded
I finished making optimizations to the sprite module. The new sprite.py has been uploaded to the Subversion repository. I am pleased to announce that on my Mac with Python 2.5, sprite_test.py now runs in 0.038 seconds rather than 0.076 seconds, and on my PC with Python 3.1, sprite_test.py now runs in 0.016 seconds rather than 0.031 seconds. If I have inadvertently broken your code or made it slower, let me know and I'll undo the optimization that doesn't work for you. Jason
Re: [pygame] sprite module optimizations have been uploaded
The revision number for the optimizations is 2793. It has not been built yet, but it will be built soon. You will be able to download it from the following webpage: http://thorbrian.com/pygame/builds.php Jason From: claudio canepa ccanep...@gmail.com To: pygame-users@seul.org Sent: Sat, April 17, 2010 1:08:10 PM Subject: Re: [pygame] sprite module optimizations have been uploaded On Sat, Apr 17, 2010 at 2:51 PM, Jason M. Marshall j...@yahoo.com wrote: I finished making optimizations to the sprite module. The new sprite.py has been uploaded to the Subversion repository. I am pleased to announce that on my Mac with Python 2.5, sprite_test.py now runs in 0.038 seconds rather than 0.076 seconds, and on my PC with Python 3.1, sprite_test.py now runs in 0.016 seconds rather than 0.031 seconds. If I have inadvertently broken your code or made it slower, let me know and I'll undo the optimization that doesn't work for you. Jason The automated build site will provide binaries for this revision? -- claxo