[pygame] pygame 1.9 in 3-4 weeks
hello, I'm hoping we can release pygame1.9 in 3-4 weeks. Which means that there's about 1 week to get any last minute changes in. If they are new features, we will require docs/example, and tests... and it's probably too late to add any big features with an API larger than a function or two(unless the API has been discussed on the mailing list already). The pygame1.9release is timed this way, so that we can get a release out around the time the GSOC coding period officially starts. The GSOC students can be involved in a release, and we can devote more time to their new projects after the release is out(amongst other things). We should also have a good version ready for before python3.1 is released... whose release schedule http://www.python.org/dev/peps/pep-0375/#release-schedule says it is to be released in 6-7 weeks (June 27th). There are a number of things that need doing... - bugs that need attention(search the mailing list for BUG, or look at the bug tracker), - a whole bunch of unittests that could be written(all the functions that need tests are marked todo in the test/*.py files), - documentation fixes (from the doc comments). - the WHATSNEW file needs updating. By looking at the svn commit logs and creating updating the file - making sure proper credit is given to people who've sent in patches... (in readme files etc) I'd like to finally finish off the pygame.midi stuff (docs and tests)... and after that start getting into the stuff above. As usual... we'll be using the release process from the file: docs/howto_release_pygame.txt I've pasted it in below. We are at the first point declare next release as coming soon to developers, and mailing list. If you'd like to test the latest pygame1.9 pre-release, please see: This page for windows and mac binaries: http://thorbrian.com/pygame/builds.php Or for compilation, follow these links: *Compilation http://pygame.org/wiki/Compilation?parent=index:* Windowshttp://pygame.org/wiki/CompileWindows?parent=index MingW gcc on windows http://pygame.org/wiki/MingW?parent=index MacOSXhttp://pygame.org/wiki/MacCompile?parent=index Ubuntu http://pygame.org/wiki/CompileUbuntu?parent=index Susehttp://pygame.org/wiki/CompileSuse?parent=index Red Hat http://pygame.org/wiki/CompileRedHat?parent=index Python CEhttp://pygame.org/wiki/CompilePythonCE?parent=index Try and run your game with it, and report back any issues! cheers! == release steps == * declare next release as coming soon to developers, and mailing list. * declare feature freeze. * check with people on different platforms that tests are working. * ask platform people to sign off for their platform building, and testing ok. * WHATSNEW document is updated, with any changes. * declare tar ball set, by making a branch in svn with the pygame version as rc1. eg 1.7.1rc1 - files to change version string: lib/version.py setup.py readme.html readme.txt - This is the subversion command used: svn copy svn:// seul.org/svn/pygame/trunk svn://seul.org/svn/pygame/tags/release_1_8_0rc1 -m new 1.8.0rc1 release. * second round of testing goes on the new release branch. If any changes need to be made, all platforms need to be tested again and signed off. The pygame rc version is incremented and a new rc tar ball is released. eg 1.7.1rc2. * if no changes needed to be made to the rc release, then the version is changed. eg from 1.7.1rc1 to 1.7.1release * release person uploads final sources tarball to website. * documentation is remade, and uploaded to website, not before sources. * release binaries, not before sources. * announce to the mailing list, and the world that a new pygame is released. * the version of pygame is incremented by 1 and pre appended. eg 1.7.1 goes to 1.7.2pre
[pygame] Re: pygame 1.9 in 3-4 weeks
hi again, I forgot to mention... if these plans aren't suitable for any reason, please let me know. cheers! On Tue, May 12, 2009 at 9:44 PM, René Dudfield ren...@gmail.com wrote: hello, I'm hoping we can release pygame1.9 in 3-4 weeks. Which means that there's about 1 week to get any last minute changes in. If they are new features, we will require docs/example, and tests... and it's probably too late to add any big features with an API larger than a function or two(unless the API has been discussed on the mailing list already). The pygame1.9release is timed this way, so that we can get a release out around the time the GSOC coding period officially starts. The GSOC students can be involved in a release, and we can devote more time to their new projects after the release is out(amongst other things). We should also have a good version ready for before python3.1 is released... whose release schedule http://www.python.org/dev/peps/pep-0375/#release-schedule says it is to be released in 6-7 weeks (June 27th). There are a number of things that need doing... - bugs that need attention(search the mailing list for BUG, or look at the bug tracker), - a whole bunch of unittests that could be written(all the functions that need tests are marked todo in the test/*.py files), - documentation fixes (from the doc comments). - the WHATSNEW file needs updating. By looking at the svn commit logs and creating updating the file - making sure proper credit is given to people who've sent in patches... (in readme files etc) I'd like to finally finish off the pygame.midi stuff (docs and tests)... and after that start getting into the stuff above. As usual... we'll be using the release process from the file: docs/howto_release_pygame.txt I've pasted it in below. We are at the first point declare next release as coming soon to developers, and mailing list. If you'd like to test the latest pygame1.9 pre-release, please see: This page for windows and mac binaries: http://thorbrian.com/pygame/builds.php Or for compilation, follow these links: *Compilation http://pygame.org/wiki/Compilation?parent=index:* Windowshttp://pygame.org/wiki/CompileWindows?parent=index MingW gcc on windows http://pygame.org/wiki/MingW?parent=index MacOSXhttp://pygame.org/wiki/MacCompile?parent=index Ubuntu http://pygame.org/wiki/CompileUbuntu?parent=index Susehttp://pygame.org/wiki/CompileSuse?parent=index Red Hat http://pygame.org/wiki/CompileRedHat?parent=index Python CEhttp://pygame.org/wiki/CompilePythonCE?parent=index Try and run your game with it, and report back any issues! cheers! == release steps == * declare next release as coming soon to developers, and mailing list. * declare feature freeze. * check with people on different platforms that tests are working. * ask platform people to sign off for their platform building, and testing ok. * WHATSNEW document is updated, with any changes. * declare tar ball set, by making a branch in svn with the pygame version as rc1. eg 1.7.1rc1 - files to change version string: lib/version.py setup.py readme.html readme.txt - This is the subversion command used: svn copy svn:// seul.org/svn/pygame/trunk svn://seul.org/svn/pygame/tags/release_1_8_0rc1-m new 1.8.0rc1 release. * second round of testing goes on the new release branch. If any changes need to be made, all platforms need to be tested again and signed off. The pygame rc version is incremented and a new rc tar ball is released. eg 1.7.1rc2. * if no changes needed to be made to the rc release, then the version is changed. eg from 1.7.1rc1 to 1.7.1release * release person uploads final sources tarball to website. * documentation is remade, and uploaded to website, not before sources. * release binaries, not before sources. * announce to the mailing list, and the world that a new pygame is released. * the version of pygame is incremented by 1 and pre appended. eg 1.7.1 goes to 1.7.2pre
Re: [pygame] [Pygame] Key Configuration
On Mon, May 11, 2009 at 05:31:06PM -0700, Fawkes wrote: I was wondering what would be the best way to do a key configuration for my game? One of the comments from our recent release ( http://pygame.org/project/1106/ ) was that we ought to have the controls configurable by the player for instance if they have a non QWERTY keyboard. Right now all the controls are hard coded (e.g. the game looks to see if Z is pressed, do something). I was thinking of using a dictionary like the following. controls{ confirm:K_z, cancel:K_x prev_ally:K_a, next_ally:K_s, prev_enemy:K_q, next_enemy:K_w} The values within the dictionary would be changeable by the player within the game. Is this a good way to go about doing this? Sometimes it's useful to allow more than one key for the same action. Like claudio already said, for the purposes of the main game loop it's more convenient to have a dictionary from key to action (it also allows you to detect conflicts). However for the purposes of the user interface, it may be more convenient to have a dictionary like you have. It's pretty simple to translate between the two forms, so you could have both. Marius Gedminas -- Never, ever expect hackers to be able to read closed proprietary document formats like Microsoft Word. Most hackers react to these about as well as you would to having a pile of steaming pig manure dumped on your doorstep. -- ESR (http://www.tuxedo.org/~esr/faqs/smart-questions.html) signature.asc Description: Digital signature
Re: [pygame] pygame 1.9 in 3-4 weeks
I have a font loading routines that automatically looks in different directory's for the font to load. If the font isn't present in the current build I now get a RuntimeError, whereas I before got an IOError. If this is by design you may want to add that to what's new. try: font_object = pygame.font.Font(fullname, self.size) done = True except IOError: continue except RuntimeError: continue Bo) Btw, thanks to all that keeps working on pygame.
BUG, different exception raised for missing font. Re: [pygame] pygame 1.9 in 3-4 weeks
thanks... I'll look into this. I guess it should use the same exception as before. cheers, On Tue, May 12, 2009 at 11:32 PM, Bo Jangeborg b...@softwave.se wrote: I have a font loading routines that automatically looks in different directory's for the font to load. If the font isn't present in the current build I now get a RuntimeError, whereas I before got an IOError. If this is by design you may want to add that to what's new. try: font_object = pygame.font.Font(fullname, self.size) done = True except IOError: continue except RuntimeError: continue Bo) Btw, thanks to all that keeps working on pygame.
[pygame] BUG, Userevents disapears in pygame 1.9
This one is more severe. My own events seems to disappear on the event stack without any exceptions. pygame.event.post(pygame.event.Event(CALL_FUNCTION, event_data)) where CALL_FUNCTION = USEREVENT + 21 and event_data is a dictionary Bo)
Re: [pygame] BUG, Userevents disapears in pygame 1.9
Well, to the first bug, could we please see the exact text of the RuntimeError versus the IOError? The runtime error could be related to processing the font file, if the font loader didn't throw an error that there was no file. The second bug, can you please show what the output of this code does?: pygame.event.clear() pygame.event.post(pygame.event.Event(CALL_FUNCTION, event_data)) events = pygame.event.get() print events events2 = pygame.event.get(CALL_FUNCTION) print events -Tyler On Tue, May 12, 2009 at 7:10 AM, Bo Jangeborg b...@softwave.se wrote: This one is more severe. My own events seems to disappear on the event stack without any exceptions. pygame.event.post(pygame.event.Event(CALL_FUNCTION, event_data)) where CALL_FUNCTION = USEREVENT + 21 and event_data is a dictionary Bo) -- Visit my blog at http://oddco.ca/zeroth/zblog
Re: [pygame] BUG, Userevents disapears in pygame 1.9
### Font error first. fullname = C:\Projekt\eclipse\Pyos\System\LiberationSans-Regular.ttf a file that does not exist. here is the full error trace: Traceback (most recent call last): File C:\Projekt\eclipse\Pyos\System\DB_Edit\db_edit.pyw, line 1338, in module main() File C:\Projekt\eclipse\Pyos\System\DB_Edit\db_edit.pyw, line 60, in main standalone=True) File C:\Projekt\eclipse\Pyos\System\DB_Edit\db_edit.pyw, line 101, in __init__ height_max = 20 File C:\Projekt\eclipse\Pyos\System\widgets.py, line 7660, in __init__ alpha, align, flags, **extra_attributes) File C:\Projekt\eclipse\Pyos\System\widgets.py, line 4401, in __init__ self.font = get_font(self, font) File C:\Projekt\eclipse\Pyos\System\widgets.py, line 4870, in get_font fontobj = _Fontcache(parent.gui, font, parent.app.get_source_path()) File C:\Projekt\eclipse\Pyos\System\widgets.py, line 4904, in __init__ self.font_object = self.load_font(font_path) File C:\Projekt\eclipse\Pyos\System\widgets.py, line 4921, in load_font font_object = pygame.font.Font(fullname, self.size) RuntimeError: Can't seek in stream ### Event error I added print CALL_FUNCTION, eventdata to your output and I changed your second print to events2 and the combined output was this: [] [] 45 {'item': ('Table view', bound method DbEditor.set_table_view of __main__.DbEditor instance at 0x02E7E030, None, 'Ctrl-T'), 'gui': System.widgets.Gui instance at 0x024C4BE8, 'hit_pos': (18, 3), 'over_widget': System.widgets.MenuItem instance at 0x084EB5D0} In other words the event disappears without a trace. Bo) Tyler Laing skrev: Well, to the first bug, could we please see the exact text of the RuntimeError versus the IOError? The runtime error could be related to processing the font file, if the font loader didn't throw an error that there was no file. The second bug, can you please show what the output of this code does?: pygame.event.clear() pygame.event.post(pygame.event.Event(CALL_FUNCTION, event_data)) events = pygame.event.get() print events events2 = pygame.event.get(CALL_FUNCTION) print events
Re: [pygame] BUG, Userevents disapears in pygame 1.9
Bo, Okay, so the load_font is not raising an error, which is a bug, and could you try modifying CALL_FUNCTION to be USEREVENT+1 ? 45 is the value of K_MINUS. I don't know if that would cause the issue, but if its still throwing an error for 25, then its not a conflict with a key value. Thank you! -Tyler On Tue, May 12, 2009 at 7:43 AM, Bo Jangeborg b...@softwave.se wrote: ### Font error first. fullname = C:\Projekt\eclipse\Pyos\System\LiberationSans-Regular.ttf a file that does not exist. here is the full error trace: Traceback (most recent call last): File C:\Projekt\eclipse\Pyos\System\DB_Edit\db_edit.pyw, line 1338, in module main() File C:\Projekt\eclipse\Pyos\System\DB_Edit\db_edit.pyw, line 60, in main standalone=True) File C:\Projekt\eclipse\Pyos\System\DB_Edit\db_edit.pyw, line 101, in __init__ height_max = 20 File C:\Projekt\eclipse\Pyos\System\widgets.py, line 7660, in __init__ alpha, align, flags, **extra_attributes) File C:\Projekt\eclipse\Pyos\System\widgets.py, line 4401, in __init__ self.font = get_font(self, font) File C:\Projekt\eclipse\Pyos\System\widgets.py, line 4870, in get_font fontobj = _Fontcache(parent.gui, font, parent.app.get_source_path()) File C:\Projekt\eclipse\Pyos\System\widgets.py, line 4904, in __init__ self.font_object = self.load_font(font_path) File C:\Projekt\eclipse\Pyos\System\widgets.py, line 4921, in load_font font_object = pygame.font.Font(fullname, self.size) RuntimeError: Can't seek in stream ### Event error I added print CALL_FUNCTION, eventdata to your output and I changed your second print to events2 and the combined output was this: [] [] 45 {'item': ('Table view', bound method DbEditor.set_table_view of __main__.DbEditor instance at 0x02E7E030, None, 'Ctrl-T'), 'gui': System.widgets.Gui instance at 0x024C4BE8, 'hit_pos': (18, 3), 'over_widget': System.widgets.MenuItem instance at 0x084EB5D0} In other words the event disappears without a trace. Bo) Tyler Laing skrev: Well, to the first bug, could we please see the exact text of the RuntimeError versus the IOError? The runtime error could be related to processing the font file, if the font loader didn't throw an error that there was no file. The second bug, can you please show what the output of this code does?: pygame.event.clear() pygame.event.post(pygame.event.Event(CALL_FUNCTION, event_data)) events = pygame.event.get() print events events2 = pygame.event.get(CALL_FUNCTION) print events -- Visit my blog at http://oddco.ca/zeroth/zblog
Re: [pygame] Lots of spam comments in the docs...
Just require validation when the comment contains a url. 99% of all spam comments contain urls. 99% of comments that don't contain comments are real. The only thing you have to worry about is the ??% of real comments with non-spammy urls. So when the comment-poster clicks submit, check to see if the comment contains http:// * If there is no http:// just post the comment with no futher validation. A few vandalism spams might slip through, but they will be small in number and easy to fix. (I say this from personal experience from using a similar system on my own site) * If there is an http:// then use some further form of validation. Maybe present a captcha, maybe a text question, maybee require a bubbman2 high score, whatever. I also suggest not bothering with IP bans. All modern spammers will be using anonymizers, and all modern spam-robots will be using botnet nodes. IP bans are only (slightly) useful for vandals, not for spammers. --- James On Tue, May 12, 2009 at 10:54:50AM +1000, René Dudfield wrote: hi, validation, and login drop the amount of real comments by 10x... plus they are annoying :) Maybe we should require people getting a Bubbman 2 high score before allowing comments? Using a custom website means there's way less spam than on things like wordpress/trac/dango/blogger etc. Since there are heaps of websites for all of those ones. Also, there's a few protections already in place that mean hardly anything gets in. ... it's fixed for now anyway. cu, On Tue, May 12, 2009 at 10:45 AM, pymike pymik...@gmail.com wrote: A simple addition validation system would be good, like on wiki sites, then do IP recording to ban spammers if they manage to hack it. (What is 4 + 4? [input box])
Re: [pygame] BUG, Userevents disapears in pygame 1.9
here is the old error out put for the fontloading Traceback (most recent call last): File C:\Projekt\eclipse\Pyos\System\DB_Edit\db_edit.pyw, line 1338, in module main() File C:\Projekt\eclipse\Pyos\System\DB_Edit\db_edit.pyw, line 60, in main standalone=True) File C:\Projekt\eclipse\Pyos\System\DB_Edit\db_edit.pyw, line 101, in __init__ height_max = 20 File C:\Projekt\eclipse\Pyos\System\widgets.py, line 7661, in __init__ alpha, align, flags, **extra_attributes) File C:\Projekt\eclipse\Pyos\System\widgets.py, line 4401, in __init__ self.font = get_font(self, font) File C:\Projekt\eclipse\Pyos\System\widgets.py, line 4870, in get_font fontobj = _Fontcache(parent.gui, font, parent.app.get_source_path()) File C:\Projekt\eclipse\Pyos\System\widgets.py, line 4904, in __init__ self.font_object = self.load_font(font_path) File C:\Projekt\eclipse\Pyos\System\widgets.py, line 4922, in load_font font_object = pygame.font.Font(fullname, self.size) IOError: unable to read font filename About the userevent. User events works but only up to USEREVENT+7, anything after that disappears. So I can work around it by having my own number sequence in the dictionary. Bo) Tyler Laing skrev: Bo, Okay, so the load_font is not raising an error, which is a bug, and could you try modifying CALL_FUNCTION to be USEREVENT+1 ? 45 is the value of K_MINUS. I don't know if that would cause the issue, but if its still throwing an error for 25, then its not a conflict with a key value. Thank you! -Tyler On Tue, May 12, 2009 at 7:43 AM, Bo Jangeborg b...@softwave.se mailto:b...@softwave.se wrote: ### Font error first. fullname = C:\Projekt\eclipse\Pyos\System\LiberationSans-Regular.ttf a file that does not exist. here is the full error trace: Traceback (most recent call last): File C:\Projekt\eclipse\Pyos\System\DB_Edit\db_edit.pyw, line 1338, in module main() File C:\Projekt\eclipse\Pyos\System\DB_Edit\db_edit.pyw, line 60, in main standalone=True) File C:\Projekt\eclipse\Pyos\System\DB_Edit\db_edit.pyw, line 101, in __init__ height_max = 20 File C:\Projekt\eclipse\Pyos\System\widgets.py, line 7660, in __init__ alpha, align, flags, **extra_attributes) File C:\Projekt\eclipse\Pyos\System\widgets.py, line 4401, in __init__ self.font = get_font(self, font) File C:\Projekt\eclipse\Pyos\System\widgets.py, line 4870, in get_font fontobj = _Fontcache(parent.gui, font, parent.app.get_source_path()) File C:\Projekt\eclipse\Pyos\System\widgets.py, line 4904, in __init__ self.font_object = self.load_font(font_path) File C:\Projekt\eclipse\Pyos\System\widgets.py, line 4921, in load_font font_object = pygame.font.Font(fullname, self.size) RuntimeError: Can't seek in stream ### Event error I added print CALL_FUNCTION, eventdata to your output and I changed your second print to events2 and the combined output was this: [] [] 45 {'item': ('Table view', bound method DbEditor.set_table_view of __main__.DbEditor instance at 0x02E7E030, None, 'Ctrl-T'), 'gui': System.widgets.Gui instance at 0x024C4BE8, 'hit_pos': (18, 3), 'over_widget': System.widgets.MenuItem instance at 0x084EB5D0} In other words the event disappears without a trace. Bo) Tyler Laing skrev: Well, to the first bug, could we please see the exact text of the RuntimeError versus the IOError? The runtime error could be related to processing the font file, if the font loader didn't throw an error that there was no file. The second bug, can you please show what the output of this code does?: pygame.event.clear() pygame.event.post(pygame.event.Event(CALL_FUNCTION, event_data)) events = pygame.event.get() print events events2 = pygame.event.get(CALL_FUNCTION) print events -- Visit my blog at http://oddco.ca/zeroth/zblog No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.325 / Virus Database: 270.12.25/2109 - Release Date: 05/11/09 16:14:00
Re: [pygame] SDL_ffmpeg vs ffmpeg
Hi Alexandre, Sorry if I came across a little insensitive on the matter of movie encoding. As you can tell I'm not very knowledgeable on video encoding. No one is suggesting Pygame shouldn't support motion-jpeg. Apparently smpeg, upon which the existing movie module is based, doesn't. The existing module has problems, not showing an image on XP is one I've recently encountered. That is why Tyler writing a replacement module using ffmpeg. If ffmpeg supports Motion-JPEG, then great. The thing is the popular ffmpeg binaries for Windows are unsuitable for use with Pygame. All third party packages used by Pygame on Windows are custom built for Pygame and distributed with it. The list is long enough already, and ffmpeg will add to it. If Motion-JPEG requires a separately built library, another dependency, then there will need to be general support from Pygame users before it is added to Windows. Of course if you are committed to seeing general Motion-JPEG support in Pygame there are ways you can help. Make a short test video available in the desired format. I can check if my experimental ffmpeg build will accept it. If not then the appropriate support libraries must be identified and built. Providing links to enabling Motion-JPEG support in ffmpeg would speed the process. If you are competent in building libraries with C and MSYS then you can try building ffmpeg yourself and post the build instructions. I will use them for Pygame. Note that MSYS 1.0.11 will be needed. But of course ffmpeg distributions for other operating systems must be considered as well. Lenard Alexandre Quessy wrote: Hi ! Supporting only MPEG and AVI ? Well, first of all, MPEG can be either a codec or a container, whereas AVI is a container that can contain many different codecs. This said, I guess MPEG here refers to the MPEG container. In this container, there can be MPEG-2, which is a video codec. My two cents : I would recommend supporting also the Motion-JPEG codec. It is faster to decode in realtime than MPEG-family time-based codecs. For a game, a developer would most likely either : 1) play a movie as a transition betwen game levels. MPEG-2, H.263 or H.264 would be best suited for this. 2) play different frames from a movie to make a character or landscape change over time. Motion-JPEG or Motion-PNG are best for this, since their compression is not time-based, it is faster to decode when reading random-access frames. Hence, in the case #2, motion-JPEG is pretty handy. The picture would also look a lot better than with a time-based compression. I think there is also a motion-PNG codec, which supports a transparency channel. The Animation codec is a lossless codec from Apple that also supports a transparency channel. It would nice to have it too. I guess ffmpeg supports them all. Ciao, 2009/5/8 Tyler Laing trinio...@gmail.com: Another significant difference I just found is that SDL_ffmpeg has no support for subtitle streams. Supporting subtitle streams is smart, it allows for it to be easier to internationalize games by having the game select the subtitle stream it wants to play. Plus, I like my cutscenes to have subtitles in english, as I'm hard of hearing. :) -Tyler On Thu, May 7, 2009 at 4:59 PM, Tyler Laing trinio...@gmail.com wrote: Hi Rene, Perhaps. But SDL_ffmpeg is a separate project, another dependency. FFmpeg is much more likely to be on someone's system. SDL_ffmpeg also uses a completely different build system, complicating the process of using it within pygame. I'm having trouble getting it built against ffmpeg 0.5.0 and I can't find any info or instructions on building it. If I'm having trouble, it'll also be difficult for others. Its just not ready for wide-scale usage, in my personal view. Like I said, I am definitely leaning towards just using ffmpeg directly. It also means I have greater control over whats going on, and don't have to try to fiddle and be stopped by the limitations of sdl_ffmpeg. -Tyler On Thu, May 7, 2009 at 4:33 PM, René Dudfield ren...@gmail.com wrote: Hi, I think you will end up re implementing many of the things from SDL_ffpmeg anyway. Overlay is pretty good - and is designed for movie playback. However it has limitations. The C docs are here: http://sdl.beuc.net/sdl.wiki/SDL_Overlay It's probably a good idea to get basic playback working first, and then worry about other features. SDL_ffmpeg has most of what is needed to remake the current Movie module using ffmpeg. cu, On Fri, May 8, 2009 at 2:27 AM, Tyler Laing trinio...@gmail.com wrote: Hello all, I've been looking at SDL_ffmpeg and ffmpeg. There are some considerations for choosing each. SDL_ffmpeg is fairly simple to interact with, load, play, pause a movie. You can interact with each frame, and so on. However, SDL_ffmpeg converts every frame from YUV to RGB, to make it easier on the programmers to use image manipulation functions and so on. This is a
Re: [pygame] BUG, Userevents disapears in pygame 1.9
Bo, Thanks for all the information. Best of luck. :) -Tyler On Tue, May 12, 2009 at 8:43 AM, Bo Jangeborg b...@softwave.se wrote: I would assume that NUMEVENTS is constrained to 32 for a reason so I think using my own number series is a better option. I am not using SVN, I am using the latest build from http://thorbrian.com/pygame/builds.php Bo) Tyler Laing skrev: Bo, Try increasing the value of pygame.NUMEVENTS. After reading through the event code, and checking through the SDL docs, I find this about User events: The contents of the structure members or completely up to the programmer, the only requirement is that /type/ is a value from SDL_USEREVENT to SDL_NUMEVENTS-1 (inclusive). pygame.NUMEVENTS has a value of 32, which explains what you ran into. Examining the font code, I see that apparently the check if the file exists is not working properly, and returning a success, which is why we get a RuntimeError rather than an IOError. To be specific for others, between the lines 589 and 631 is where the error is happening in font.c. Bo, are you using the latest SVN version of pygame? -Tyler On Tue, May 12, 2009 at 8:03 AM, Bo Jangeborg b...@softwave.se mailto: b...@softwave.se wrote: here is the old error out put for the fontloading Traceback (most recent call last): File C:\Projekt\eclipse\Pyos\System\DB_Edit\db_edit.pyw, line 1338, in module main() File C:\Projekt\eclipse\Pyos\System\DB_Edit\db_edit.pyw, line 60, in main standalone=True) File C:\Projekt\eclipse\Pyos\System\DB_Edit\db_edit.pyw, line 101, in __init__ height_max = 20 File C:\Projekt\eclipse\Pyos\System\widgets.py, line 7661, in __init__ alpha, align, flags, **extra_attributes) File C:\Projekt\eclipse\Pyos\System\widgets.py, line 4401, in __init__ self.font = get_font(self, font) File C:\Projekt\eclipse\Pyos\System\widgets.py, line 4870, in get_font fontobj = _Fontcache(parent.gui, font, parent.app.get_source_path()) File C:\Projekt\eclipse\Pyos\System\widgets.py, line 4904, in __init__ self.font_object = self.load_font(font_path) File C:\Projekt\eclipse\Pyos\System\widgets.py, line 4922, in load_font font_object = pygame.font.Font(fullname, self.size) IOError: unable to read font filename About the userevent. User events works but only up to USEREVENT+7, anything after that disappears. So I can work around it by having my own number sequence in the dictionary. Bo) Tyler Laing skrev: Bo, Okay, so the load_font is not raising an error, which is a bug, and could you try modifying CALL_FUNCTION to be USEREVENT+1 ? 45 is the value of K_MINUS. I don't know if that would cause the issue, but if its still throwing an error for 25, then its not a conflict with a key value. Thank you! -Tyler On Tue, May 12, 2009 at 7:43 AM, Bo Jangeborg b...@softwave.se mailto:b...@softwave.se mailto:b...@softwave.se mailto:b...@softwave.se wrote: ### Font error first. fullname = C:\Projekt\eclipse\Pyos\System\LiberationSans-Regular.ttf a file that does not exist. here is the full error trace: Traceback (most recent call last): File C:\Projekt\eclipse\Pyos\System\DB_Edit\db_edit.pyw, line 1338, in module main() File C:\Projekt\eclipse\Pyos\System\DB_Edit\db_edit.pyw, line 60, in main standalone=True) File C:\Projekt\eclipse\Pyos\System\DB_Edit\db_edit.pyw, line 101, in __init__ height_max = 20 File C:\Projekt\eclipse\Pyos\System\widgets.py, line 7660, in __init__ alpha, align, flags, **extra_attributes) File C:\Projekt\eclipse\Pyos\System\widgets.py, line 4401, in __init__ self.font = get_font(self, font) File C:\Projekt\eclipse\Pyos\System\widgets.py, line 4870, in get_font fontobj = _Fontcache(parent.gui, font, parent.app.get_source_path()) File C:\Projekt\eclipse\Pyos\System\widgets.py, line 4904, in __init__ self.font_object = self.load_font(font_path) File C:\Projekt\eclipse\Pyos\System\widgets.py, line 4921, in load_font font_object = pygame.font.Font(fullname, self.size) RuntimeError: Can't seek in stream ### Event error I added print CALL_FUNCTION, eventdata to your output and I changed your second print to events2 and the combined output was this: [] [] 45 {'item': ('Table view', bound method DbEditor.set_table_view of
Re: [pygame] SDL_ffmpeg vs ffmpeg
Alexandre, I'm sorry, I think I may have across as a bit insensitive as well. As to shipping , Lenard, Rene, and anyone else that is concerned, I was considering that ffplay could be distributed as a statically built executable, so the movie module can, in the worst case scenario, fall back on a working movie player that it knows about, and exactly where it is located. This lessens the need for the user to have vlc, mplayer, or any other video player installed. -Tyler On Tue, May 12, 2009 at 8:44 AM, Lenard Lindstrom le...@telus.net wrote: Hi Alexandre, Sorry if I came across a little insensitive on the matter of movie encoding. As you can tell I'm not very knowledgeable on video encoding. No one is suggesting Pygame shouldn't support motion-jpeg. Apparently smpeg, upon which the existing movie module is based, doesn't. The existing module has problems, not showing an image on XP is one I've recently encountered. That is why Tyler writing a replacement module using ffmpeg. If ffmpeg supports Motion-JPEG, then great. The thing is the popular ffmpeg binaries for Windows are unsuitable for use with Pygame. All third party packages used by Pygame on Windows are custom built for Pygame and distributed with it. The list is long enough already, and ffmpeg will add to it. If Motion-JPEG requires a separately built library, another dependency, then there will need to be general support from Pygame users before it is added to Windows. Of course if you are committed to seeing general Motion-JPEG support in Pygame there are ways you can help. Make a short test video available in the desired format. I can check if my experimental ffmpeg build will accept it. If not then the appropriate support libraries must be identified and built. Providing links to enabling Motion-JPEG support in ffmpeg would speed the process. If you are competent in building libraries with C and MSYS then you can try building ffmpeg yourself and post the build instructions. I will use them for Pygame. Note that MSYS 1.0.11 will be needed. But of course ffmpeg distributions for other operating systems must be considered as well. Lenard Alexandre Quessy wrote: Hi ! Supporting only MPEG and AVI ? Well, first of all, MPEG can be either a codec or a container, whereas AVI is a container that can contain many different codecs. This said, I guess MPEG here refers to the MPEG container. In this container, there can be MPEG-2, which is a video codec. My two cents : I would recommend supporting also the Motion-JPEG codec. It is faster to decode in realtime than MPEG-family time-based codecs. For a game, a developer would most likely either : 1) play a movie as a transition betwen game levels. MPEG-2, H.263 or H.264 would be best suited for this. 2) play different frames from a movie to make a character or landscape change over time. Motion-JPEG or Motion-PNG are best for this, since their compression is not time-based, it is faster to decode when reading random-access frames. Hence, in the case #2, motion-JPEG is pretty handy. The picture would also look a lot better than with a time-based compression. I think there is also a motion-PNG codec, which supports a transparency channel. The Animation codec is a lossless codec from Apple that also supports a transparency channel. It would nice to have it too. I guess ffmpeg supports them all. Ciao, 2009/5/8 Tyler Laing trinio...@gmail.com: Another significant difference I just found is that SDL_ffmpeg has no support for subtitle streams. Supporting subtitle streams is smart, it allows for it to be easier to internationalize games by having the game select the subtitle stream it wants to play. Plus, I like my cutscenes to have subtitles in english, as I'm hard of hearing. :) -Tyler On Thu, May 7, 2009 at 4:59 PM, Tyler Laing trinio...@gmail.com wrote: Hi Rene, Perhaps. But SDL_ffmpeg is a separate project, another dependency. FFmpeg is much more likely to be on someone's system. SDL_ffmpeg also uses a completely different build system, complicating the process of using it within pygame. I'm having trouble getting it built against ffmpeg 0.5.0 and I can't find any info or instructions on building it. If I'm having trouble, it'll also be difficult for others. Its just not ready for wide-scale usage, in my personal view. Like I said, I am definitely leaning towards just using ffmpeg directly. It also means I have greater control over whats going on, and don't have to try to fiddle and be stopped by the limitations of sdl_ffmpeg. -Tyler On Thu, May 7, 2009 at 4:33 PM, René Dudfield ren...@gmail.com wrote: Hi, I think you will end up re implementing many of the things from SDL_ffpmeg anyway. Overlay is pretty good - and is designed for movie playback. However it has limitations. The C docs are here: http://sdl.beuc.net/sdl.wiki/SDL_Overlay It's probably a good idea to get basic playback working first,
Re: [pygame] pygame 1.9 in 3-4 weeks
Hi René, René Dudfield wrote: hello, I'm hoping we can release pygame1.9 in 3-4 weeks. [snip] I'd like to finally finish off the pygame.midi stuff (docs and tests)... If you want to add midi for Python 3.1 then you will have to look at the Pyrex generated pypm.c file. As far as I know Pyrex doesn't yet support Python 3. But Cython does. However Cython might generate differing C files for Python 3.x and 2.x. It may be necessary to have two versions of pypm.c, with the appropriate one selected at build time. Lenard
Re: [pygame] SDL_ffmpeg vs ffmpeg
Hi Tyler, If licensing permits, an existing ffplay could be included with Pygame on Windows. It would likely support more codecs than anything I would build. For some reason my first build attempt omitted ffplay. Lenard Tyler Laing wrote: Lenard, Rene, and anyone else that is concerned, I was considering that ffplay could be distributed as a statically built executable, so the movie module can, in the worst case scenario, fall back on a working movie player that it knows about, and exactly where it is located. This lessens the need for the user to have vlc, mplayer, or any other video player installed. -
Re: [pygame] BUG, Userevents disapears in pygame 1.9
FYI, those builds are generally from a very recent svn revision. You can see what revision by printing the: pygame.version.ver string On Tue, May 12, 2009 at 8:43 AM, Bo Jangeborg b...@softwave.se wrote: I am not using SVN, I am using the latest build from http://thorbrian.com/pygame/builds.php
Re: BUG, different exception raised for missing font. Re: [pygame] pygame 1.9 in 3-4 weeks
Fixed rev 2117. Lenard René Dudfield wrote: thanks... I'll look into this. I guess it should use the same exception as before. cheers, On Tue, May 12, 2009 at 11:32 PM, Bo Jangeborg b...@softwave.se mailto:b...@softwave.se wrote: I have a font loading routines that automatically looks in different directory's for the font to load. If the font isn't present in the current build I now get a RuntimeError, whereas I before got an IOError. If this is by design you may want to add that to what's new. try: font_object = pygame.font.Font(fullname, self.size) done = True except IOError: continue except RuntimeError: continue Bo) Btw, thanks to all that keeps working on pygame.
[pygame] file mods and svn props for executables
Hi, I was looking at the Pygame examples in linux and noted that many have the '#!/usr/bin/env python' tag line but are not marked as executable either by SVN or linux. Is there a convention for this? Lenard
Re: [pygame] file mods and svn props for executables
On, Tue May 12, 2009, Lenard Lindstrom wrote: Hi, I was looking at the Pygame examples in linux and noted that many have the '#!/usr/bin/env python' tag line but are not marked as executable either by SVN or linux. Is there a convention for this? Never mark anything executable in SVN repositories. The #!/... line is usually dealt with correctly by env(), which in turn is executed correctly by bourne-compatible shells. Regards Marcus pgp7sQpwSRl34.pgp Description: PGP signature
Re: [pygame] file mods and svn props for executables
Marius Gedminas wrote: On Tue, May 12, 2009 at 11:49:36AM -0700, Lenard Lindstrom wrote: I was looking at the Pygame examples in linux and noted that many have the '#!/usr/bin/env python' tag line but are not marked as executable either by SVN or linux. Is there a convention for this? If it has a #! line, and works when executed, it should be marked as executable in svn/file system permissions. Marius Gedminas I agree. But if nothing is to be marked 'executable' then all #! lines should be removed. Lenard